diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..4749f10c60 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 00b13da72b..b8c64425cb 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -26,7 +26,7 @@ jobs: path: .github/workflows/support-files/notifications/deny.message notification: needs: cargo-deny - runs-on: ubuntu-20.04 + runs-on: custom-runner-linux steps: - name: Check out repository code uses: actions/checkout@v2 @@ -35,6 +35,10 @@ jobs: with: name: report path: .github/workflows/support-files/notifications + - name: install npm + uses: actions/setup-node@v3 + with: + node-version: 16 - name: Keybase - Node Install run: npm install working-directory: .github/workflows/support-files @@ -47,6 +51,11 @@ jobs: KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}" KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "security" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/build-ts-packages.yml b/.github/workflows/build-ts-packages.yml index 2dbf56ad7b..82a9d0b9b5 100644 --- a/.github/workflows/build-ts-packages.yml +++ b/.github/workflows/build-ts-packages.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Install rsync run: sudo apt-get install rsync + continue-on-error: true - uses: rlespinasse/github-slug-action@v3.x - uses: actions/setup-node@v3 with: @@ -58,6 +59,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-ts-packages" IS_SUCCESS: "${{ job.status == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad1f3d4d54..402d5e2def 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,12 +11,13 @@ on: jobs: build: runs-on: [ self-hosted, custom-linux ] - # Enable sccache via environment variable + # Enable sccache via environment variable env: RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true - name: Check out repository code uses: actions/checkout@v2 @@ -41,6 +42,12 @@ jobs: command: build args: --workspace + - name: Build all examples + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --examples + - name: Run all tests uses: actions-rs/cargo@v1 with: @@ -56,6 +63,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --workspace --all-features @@ -64,7 +72,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --workspace -- -D warnings + args: --workspace --all-targets --all-features -- -D warnings # COCONUT stuff diff --git a/.github/workflows/connect.yml b/.github/workflows/connect.yml index 292fee7482..1d56e12ad7 100644 --- a/.github/workflows/connect.yml +++ b/.github/workflows/connect.yml @@ -13,6 +13,7 @@ jobs: steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools libayatana-appindicator3-dev + continue-on-error: true - name: Check out repository code uses: actions/checkout@v2 @@ -45,6 +46,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --manifest-path nym-connect/Cargo.toml --workspace --all-features diff --git a/.github/workflows/network-explorer-api.yml b/.github/workflows/network-explorer-api.yml index 5c60038347..86b8a33ac6 100644 --- a/.github/workflows/network-explorer-api.yml +++ b/.github/workflows/network-explorer-api.yml @@ -21,6 +21,7 @@ jobs: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true - name: Check the release tag starts with `nym-explorer-api-` if: startsWith(github.ref, 'refs/tags/nym-explorer-api-') == false && github.event_name != 'workflow_dispatch' diff --git a/.github/workflows/network-explorer.yml b/.github/workflows/network-explorer.yml index 2f5b10de94..4ae55435de 100644 --- a/.github/workflows/network-explorer.yml +++ b/.github/workflows/network-explorer.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v2 - name: Install rsync run: sudo apt-get install rsync + continue-on-error: true - uses: rlespinasse/github-slug-action@v3.x - uses: actions/setup-node@v3 with: @@ -73,6 +74,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-network-explorer" IS_SUCCESS: "${{ job.status == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index d103b66278..79eeff6e42 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -25,6 +25,7 @@ jobs: steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true if: matrix.os == 'ubuntu-20.04' - name: Check out repository code @@ -38,6 +39,12 @@ jobs: override: true components: rustfmt, clippy + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Build all binaries uses: actions-rs/cargo@v1 with: @@ -50,6 +57,18 @@ jobs: with: command: clean + - name: Build all examples + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --examples + + - name: Reclaim some disk space (because Windows is being annoying) + uses: actions-rs/cargo@v1 + if: ${{ matrix.os == 'windows-latest' }} + with: + command: clean + - name: Run all tests uses: actions-rs/cargo@v1 with: @@ -69,12 +88,6 @@ jobs: command: test args: --workspace --all-features -- --ignored - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Reclaim some disk space (because Windows is being annoying) uses: actions-rs/cargo@v1 if: ${{ matrix.os == 'windows-latest' }} @@ -83,6 +96,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features @@ -92,7 +106,7 @@ jobs: if: ${{ matrix.rust != 'nightly' }} with: command: clippy - args: --workspace --all-targets -- -D warnings + args: --workspace --all-targets --all-features -- -D warnings - name: Reclaim some disk space uses: actions-rs/cargo@v1 @@ -160,12 +174,17 @@ jobs: notification: needs: build - runs-on: ubuntu-20.04 + runs-on: custom-runner-linux steps: - name: Collect jobs status uses: technote-space/workflow-conclusion-action@v2 - name: Check out repository code uses: actions/checkout@v2 + - name: install npm + uses: actions/setup-node@v3 + if: env.WORKFLOW_CONCLUSION == 'failure' + with: + node-version: 16 - name: Keybase - Node Install if: env.WORKFLOW_CONCLUSION == 'failure' run: npm install @@ -183,6 +202,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-nightly" IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nightly_build_release.yml b/.github/workflows/nightly_build_release.yml index 30e43d7f90..31fb1b1d4c 100644 --- a/.github/workflows/nightly_build_release.yml +++ b/.github/workflows/nightly_build_release.yml @@ -38,6 +38,7 @@ jobs: steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true if: matrix.os == 'ubuntu-20.04' - name: Check out latest release branch @@ -98,6 +99,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features @@ -175,12 +177,17 @@ jobs: notification: needs: [build,get_release] - runs-on: ubuntu-20.04 + runs-on: custom-runner-linux steps: - name: Collect jobs status uses: technote-space/workflow-conclusion-action@v2 - name: Check out repository code uses: actions/checkout@v3 + - name: install npm + uses: actions/setup-node@v3 + if: env.WORKFLOW_CONCLUSION == 'failure' + with: + node-version: 16 - name: Keybase - Node Install if: env.WORKFLOW_CONCLUSION == 'failure' run: npm install @@ -198,6 +205,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-nightly-release" IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nightly_build_release2.yml b/.github/workflows/nightly_build_release2.yml index 6ff5368c56..69e3570980 100644 --- a/.github/workflows/nightly_build_release2.yml +++ b/.github/workflows/nightly_build_release2.yml @@ -38,6 +38,7 @@ jobs: steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true if: matrix.os == 'ubuntu-20.04' - name: Check out latest release branch @@ -98,6 +99,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features @@ -175,12 +177,17 @@ jobs: notification: needs: [build,get_release] - runs-on: ubuntu-20.04 + runs-on: custom-runner-linux steps: - name: Collect jobs status uses: technote-space/workflow-conclusion-action@v2 - name: Check out repository code uses: actions/checkout@v3 + - name: install npm + uses: actions/setup-node@v3 + if: env.WORKFLOW_CONCLUSION == 'failure' + with: + node-version: 16 - name: Keybase - Node Install if: env.WORKFLOW_CONCLUSION == 'failure' run: npm install @@ -198,6 +205,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-nightly-release" IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nym-connect-publish-ubuntu.yml b/.github/workflows/nym-connect-publish-ubuntu.yml index a4eb77cae1..390c087e4c 100644 --- a/.github/workflows/nym-connect-publish-ubuntu.yml +++ b/.github/workflows/nym-connect-publish-ubuntu.yml @@ -23,6 +23,7 @@ jobs: run: > sudo apt-get update && sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev + continue-on-error: true - name: Check the release tag starts with `nym-connect-` if: startsWith(github.ref, 'refs/tags/nym-connect-') == false && github.event_name != 'workflow_dispatch' uses: actions/github-script@v3 diff --git a/.github/workflows/nym-connect.yml b/.github/workflows/nym-connect.yml index 5a652e92d2..e941259252 100644 --- a/.github/workflows/nym-connect.yml +++ b/.github/workflows/nym-connect.yml @@ -16,6 +16,7 @@ jobs: - uses: actions/checkout@v2 - name: Install rsync run: sudo apt-get install rsync + continue-on-error: true - uses: rlespinasse/github-slug-action@v3.x - uses: actions/setup-node@v3 with: @@ -54,6 +55,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-nym-connect" IS_SUCCESS: "${{ job.status == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nym-release-publish.yml b/.github/workflows/nym-release-publish.yml index 565834e789..1b100f34ed 100644 --- a/.github/workflows/nym-release-publish.yml +++ b/.github/workflows/nym-release-publish.yml @@ -27,6 +27,7 @@ jobs: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true - name: Check the release tag starts with `nym-binaries-` if: startsWith(github.ref, 'refs/tags/nym-binaries-') == false && github.event_name != 'workflow_dispatch' diff --git a/.github/workflows/nym-wallet-publish-ubuntu.yml b/.github/workflows/nym-wallet-publish-ubuntu.yml index 04ff746851..d0a7e778b2 100644 --- a/.github/workflows/nym-wallet-publish-ubuntu.yml +++ b/.github/workflows/nym-wallet-publish-ubuntu.yml @@ -22,6 +22,7 @@ jobs: run: > sudo apt-get update && sudo apt-get install -y webkit2gtk-4.0 + continue-on-error: true - name: Check the release tag starts with `nym-wallet-` if: startsWith(github.ref, 'refs/tags/nym-wallet-') == false uses: actions/github-script@v3 diff --git a/.github/workflows/nym-wallet-storybook.yml b/.github/workflows/nym-wallet-storybook.yml index 7e4ead501f..7c17893beb 100644 --- a/.github/workflows/nym-wallet-storybook.yml +++ b/.github/workflows/nym-wallet-storybook.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Install rsync run: sudo apt-get install rsync + continue-on-error: true - uses: rlespinasse/github-slug-action@v3.x - uses: actions/setup-node@v3 with: @@ -50,6 +51,11 @@ jobs: KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" KEYBASE_NYM_CHANNEL: "ci-nym-wallet" IS_SUCCESS: "${{ job.status == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" uses: docker://keybaseio/client:stable-node with: args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/nym_wallet.yml b/.github/workflows/nym_wallet.yml index 49b2381ed0..4b921ffb7a 100644 --- a/.github/workflows/nym_wallet.yml +++ b/.github/workflows/nym_wallet.yml @@ -26,6 +26,7 @@ jobs: libappindicator3-dev webkit2gtk-driver xvfb + continue-on-error: true - name: Install minimal stable uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/support-files/.env.example b/.github/workflows/support-files/.env.example index f869af7605..df05f1801c 100644 --- a/.github/workflows/support-files/.env.example +++ b/.github/workflows/support-files/.env.example @@ -2,6 +2,13 @@ KEYBASE_NYM_CHANNEL= KEYBASE_NYMBOT_USERNAME= KEYBASE_NYMBOT_PAPERKEY= +MATRIX_SERVER= +MATRIX_ROOM= +MATRIX_ROOM_OF_SHAME= +MATRIX_USER_ID= +MATRIX_TOKEN= +MATRIX_DEVICE_ID= + NYM_NOTIFICATION_KIND=nightly NYM_PROJECT_NAME=Nightly Build diff --git a/.github/workflows/support-files/.gitignore b/.github/workflows/support-files/.gitignore index 2ca1a3414b..37f81d053b 100644 --- a/.github/workflows/support-files/.gitignore +++ b/.github/workflows/support-files/.gitignore @@ -2,4 +2,6 @@ node_modules .idea # don't commit the lock file to avoid cross-platform issues -package-lock.json \ No newline at end of file +package-lock.json + +scratch \ No newline at end of file diff --git a/.github/workflows/support-files/notifications/send_message.js b/.github/workflows/support-files/notifications/send_message.js index 671e40bd84..c83a43d88a 100644 --- a/.github/workflows/support-files/notifications/send_message.js +++ b/.github/workflows/support-files/notifications/send_message.js @@ -1,6 +1,7 @@ require('dotenv').config(); const Bot = require('keybase-bot'); +const { sendMatrixMessage } = require('./send_message_to_matrix'); let context = { kinds: ['nym-wallet', 'ts-packages', 'network-explorer', 'nightly', 'nym-connect','security'], @@ -38,6 +39,28 @@ function validateContext() { 'Paperkey is not defined. Please set env var KEYBASE_NYMBOT_PAPERKEY', ); } + if (context.env.MATRIX_ROOM) { + if (!context.env.MATRIX_SERVER) { + throw new Error( + 'Matrix server is not defined. Please set env var MATRIX_SERVER', + ); + } + if (!context.env.MATRIX_USER_ID) { + throw new Error( + 'Matrix user id is not defined. Please set env var MATRIX_USER_ID', + ); + } + if (!context.env.MATRIX_TOKEN) { + throw new Error( + 'Matrix token is not defined. Please set env var MATRIX_TOKEN', + ); + } + if (!context.env.MATRIX_DEVICE_ID) { + throw new Error( + 'Matrix device id is not defined. Please set env var MATRIX_DEVICE_ID', + ); + } + } } /** @@ -147,6 +170,13 @@ async function main() { console.log('-----------------------------------------'); } await sendKeybaseMessage(messageBody); + if(context.env.MATRIX_ROOM) { + await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM) + } + if(context.env.MATRIX_ROOM_OF_SHAME && context.env.IS_SUCCESS !== 'true') { + // when a job fails + await sendMatrixMessage(context, messageBody, context.env.MATRIX_ROOM_OF_SHAME) + } } // call main function and let NodeJS handle the promise diff --git a/.github/workflows/support-files/notifications/send_message_to_matrix.js b/.github/workflows/support-files/notifications/send_message_to_matrix.js new file mode 100644 index 0000000000..6b21b56184 --- /dev/null +++ b/.github/workflows/support-files/notifications/send_message_to_matrix.js @@ -0,0 +1,80 @@ +const sdk = require('matrix-js-sdk'); +global.Olm = require('olm'); +const { LocalStorage } = require('node-localstorage'); +const localStorage = new LocalStorage('./scratch'); +const { + LocalStorageCryptoStore, +} = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'); + +const vfile = require('to-vfile'); +const unified = require('unified'); +const remarkParse = require('remark-parse'); +const remarkHtml = require('remark-html'); +const emoji = require('remark-emoji'); + +// hide all matrix client output +console.error = (error) => console.log('❌ error: ', error); +process.stderr.write = () => {}; +process.stdout.write = () => {}; + + +function createClient(context, room, message) { + const server = context.env.MATRIX_SERVER; + const token = context.env.MATRIX_TOKEN; + const deviceId = context.env.MATRIX_DEVICE_ID; + const userId = context.env.MATRIX_USER_ID; + + const client = sdk.createClient({ + baseUrl: server, + accessToken: token, + userId, + deviceId, + sessionStore: new sdk.WebStorageSessionStore(localStorage), + cryptoStore: new LocalStorageCryptoStore(localStorage), + }); + + client.on('sync', async function(state, prevState, res) { + if (state !== 'PREPARED') return; + client.setGlobalErrorOnUnknownDevices(false); + try { + await client.joinRoom(room); + await client.sendEvent( + room, + 'm.room.message', + { + msgtype: 'm.text', + format: 'org.matrix.custom.html', + body: message, + formatted_body: message, + }, + '', + ); + } catch (error) { + console.error('Job failed: ' + error.message); + } + client.stopClient(); + process.exit(0); + }); + + return client; +} + +async function markdownToHtml(messageAsMarkdown) { + const file = await unified() + .use(emoji) + .use(remarkParse) + .use(remarkHtml) + .process(await vfile({ path: 'test.md', contents: messageAsMarkdown})); + return String(file); +} + +async function sendMatrixMessage(contextArg, messageAsMarkdown, roomId) { + const messageAsHtml = await markdownToHtml(messageAsMarkdown); + const client = createClient(contextArg, roomId, messageAsHtml); + await client.initCrypto(); + await client.startClient({ initialSyncLimit: 1 }); +} + +module.exports = { + sendMatrixMessage, +}; diff --git a/.github/workflows/support-files/package.json b/.github/workflows/support-files/package.json index b73f32259d..8f20c34091 100644 --- a/.github/workflows/support-files/package.json +++ b/.github/workflows/support-files/package.json @@ -11,7 +11,15 @@ "dotenv": "^16.0.0", "handlebars": "^4.7.7", "keybase-bot": "^3.6.1", - "octokit": "^1.7.1" + "matrix-js-sdk": "^9.3.0", + "node-localstorage": "^2.1.6", + "octokit": "^1.7.1", + "olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz", + "remark-emoji": "^2.2.0", + "remark-html": "^13.0.2", + "remark-parse": "^9.0.0", + "to-vfile": "^6.1.0", + "unified": "^9.2.2" }, "devDependencies": { "prettier": "2.3.2" diff --git a/.github/workflows/support-files/scratch/.gitkeep b/.github/workflows/support-files/scratch/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/typescript-lint.yml b/.github/workflows/typescript-lint.yml new file mode 100644 index 0000000000..f9671fd6a7 --- /dev/null +++ b/.github/workflows/typescript-lint.yml @@ -0,0 +1,50 @@ +name: CI for linting Typescript + +on: + push: + paths: + - 'ts-packages/**' + - 'sdk/typescript/**' + - nym-connect + - nym-wallet + +jobs: + build: + runs-on: custom-runner-linux + steps: + - uses: actions/checkout@v2 + - name: Install rsync + run: sudo apt-get install rsync + continue-on-error: true + - uses: rlespinasse/github-slug-action@v3.x + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Setup yarn + run: npm install -g yarn + - name: Lint + run: yarn && yarn lint && yarn tsc + - name: Keybase - Node Install + run: npm install + working-directory: .github/workflows/support-files + - name: Keybase - Send Notification + env: + NYM_NOTIFICATION_KIND: ts-packages + NYM_PROJECT_NAME: "ts-packages" + NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}" + NYM_CI_WWW_LOCATION: "ts-${{ env.GITHUB_REF_SLUG }}" + GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" + GIT_BRANCH: "${GITHUB_REF##*/}" + KEYBASE_NYMBOT_USERNAME: "${{ secrets.KEYBASE_NYMBOT_USERNAME }}" + KEYBASE_NYMBOT_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}" + KEYBASE_NYMBOT_TEAM: "${{ secrets.KEYBASE_NYMBOT_TEAM }}" + KEYBASE_NYM_CHANNEL: "ci-ts-packages" + IS_SUCCESS: "${{ job.status == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" + uses: docker://keybaseio/client:stable-node + with: + args: .github/workflows/support-files/notifications/entry_point.sh diff --git a/.github/workflows/wallet.yml b/.github/workflows/wallet.yml index 44e593d9cb..6e23f6833a 100644 --- a/.github/workflows/wallet.yml +++ b/.github/workflows/wallet.yml @@ -48,6 +48,7 @@ jobs: - uses: actions-rs/clippy-check@v1 name: Clippy checks + continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features diff --git a/.github/workflows/wasm_client_build.yml b/.github/workflows/wasm_client_build.yml index e1da3b04b0..4067e81939 100644 --- a/.github/workflows/wasm_client_build.yml +++ b/.github/workflows/wasm_client_build.yml @@ -29,11 +29,6 @@ jobs: command: build args: --manifest-path clients/webassembly/Cargo.toml --target wasm32-unknown-unknown --features=coconut - - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path clients/webassembly/Cargo.toml - - uses: actions-rs/cargo@v1 with: command: fmt diff --git a/.gitignore b/.gitignore index 6d81c53530..718b680220 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ storybook-static envs/qwerty.env Cargo.lock nym-connect/Cargo.lock +.parcel-cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b24cc3551..f003cb0023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,51 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# [Unreleased] + +### Added + +- dkg rerun from scratch and dkg-specific epochs ([#2839]) +- nym-sdk: add support for surb storage ([#2870]) +- nym-sdk: enable reply-SURBs by default ([#2874]) + +[#2839]: https://github.com/nymtech/nym/pull/2839 +[#2870]: https://github.com/nymtech/nym/pull/2870 +[#2874]: https://github.com/nymtech/nym/pull/2874 + +# [v1.1.7] (2023-01-24) + +### Added + +- Gateways now shut down gracefully ([#2019]). +- Rust SDK - Initial version for nym-client ([#2669]). +- Introduce vesting contract query for addresses of all vesting accounts (required for the circulating supply calculation) ([#2778]). +- Add threshold value to the contract storage ([#1893]) + +### Changed + +- Refactor vesting account storage (and in particular, ACCOUNTS saving) ([#2795]). +- Move from manual advancing DKG state to an automatic process ([#2670]). + +### Fixed + +- Gateways now shut down gracefully ([#2019]). + +[#2019]: https://github.com/nymtech/nym/issues/2019 +[#2669]: https://github.com/nymtech/nym/issues/2669 +[#2795]: https://github.com/nymtech/nym/issues/2795 +[#2778]: https://github.com/nymtech/nym/issues/2778 +[#2670]: https://github.com/nymtech/nym/issues/2670 +[#1893]: https://github.com/nymtech/nym/issues/1893 + ## [v1.1.6] (2023-01-17) ### Added +- nym-sdk: added initial version of a Rust client sdk +- nym-api: added `/circulating-supply` endpoint ([#2814]) +- nym-api: add endpoint listing detailed gateway info by @octol in https://github.com/nymtech/nym/pull/2833 + ### Changed - streamline override_config functions -> there's a lot of duplicate if statements everywhere ([#2774]) @@ -21,6 +62,7 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// [#2696]: https://github.com/nymtech/nym/pull/2696 [#2753]: https://github.com/nymtech/nym/pull/2753 [#2762]: https://github.com/nymtech/nym/pull/2762 +[#2814]: https://github.com/nymtech/nym/pull/2814 [#2772]: https://github.com/nymtech/nym/pull/2772 [#2774]: https://github.com/nymtech/nym/pull/2774 diff --git a/Cargo.lock b/Cargo.lock index 82e66eeec2..cb5f65ea20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,15 +14,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.5", -] - [[package]] name = "aead" version = "0.5.1" @@ -30,7 +21,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" dependencies = [ "crypto-common", - "generic-array 0.14.5", + "generic-array 0.14.6", ] [[package]] @@ -48,9 +39,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe0133578c0986e1fe3dfcd4af1cc5b2dd6c3dbf534d69916ce16a2701d40ba" +checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if 1.0.0", "cipher 0.4.3", @@ -59,14 +50,14 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", + "aead", + "aes 0.8.2", + "cipher 0.4.3", + "ctr 0.9.2", "ghash", "subtle 2.4.1", ] @@ -77,40 +68,40 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.8", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" -version = "1.0.56" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "arrayref" @@ -147,9 +138,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1" dependencies = [ "proc-macro2", "quote", @@ -189,7 +180,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -209,6 +200,52 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "axum" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5694b64066a2459918d8074c2ce0d5a88f409431994c2356617c8ae0c4721fc" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa 1.0.5", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "bandwidth-claim-contract" version = "0.1.0" @@ -225,15 +262,27 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "binascii" @@ -261,7 +310,7 @@ dependencies = [ "k256", "once_cell", "pbkdf2", - "rand_core 0.6.3", + "rand_core 0.6.4", "ripemd160", "sha2 0.9.9", "subtle 2.4.1", @@ -295,9 +344,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", @@ -319,28 +368,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" +checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if 1.0.0", "constant_time_eq", - "digest 0.10.3", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", + "digest 0.10.6", ] [[package]] @@ -349,26 +386,17 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.5", + "block-padding", + "generic-array 0.14.6", ] [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "generic-array 0.14.5", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", + "generic-array 0.14.6", ] [[package]] @@ -387,7 +415,7 @@ dependencies = [ "ff 0.10.1", "group 0.10.0", "pairing 0.20.0", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle 2.4.1", ] @@ -397,10 +425,10 @@ version = "0.6.0" source = "git+https://github.com/jstuczyn/bls12_381?branch=gt-serialisation#10fb6f700bfda17c8475af3bfd31e3fec15f2278" dependencies = [ "digest 0.9.0", - "ff 0.11.0", + "ff 0.11.1", "group 0.11.0", "pairing 0.21.0", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle 2.4.1", "zeroize", ] @@ -426,11 +454,18 @@ dependencies = [ "serde", ] +[[package]] +name = "build-information" +version = "0.1.0" +dependencies = [ + "vergen 7.5.0", +] + [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-tools" @@ -446,18 +481,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cast" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" -dependencies = [ - "rustc_version 0.4.0", -] +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "cast" @@ -467,9 +493,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] @@ -513,7 +539,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.1", + "aead", "chacha20", "cipher 0.4.3", "poly1305", @@ -522,15 +548,17 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", "serde", - "time 0.1.44", + "time 0.1.45", + "wasm-bindgen", "winapi", ] @@ -567,7 +595,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.5", + "generic-array 0.14.6", ] [[package]] @@ -594,45 +622,55 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.8" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190814073e85d238f31ff738fcb0bf6910cedeb73376c87cd69291028966fd83" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +dependencies = [ + "bitflags", + "clap_lex 0.2.4", + "indexmap", + "textwrap 0.16.0", +] + +[[package]] +name = "clap" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d93d855ce6a0aa87b8473ef9169482f40abaa2e9e0993024c35c902cbd5920" dependencies = [ - "atty", "bitflags", "clap_derive", - "clap_lex", - "indexmap", + "clap_lex 0.3.1", + "is-terminal", "once_cell", "strsim", "termcolor", - "textwrap 0.15.0", ] [[package]] name = "clap_complete" -version = "3.2.4" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4179da71abd56c26b54dd0c248cc081c1f43b0a1a7e8448e28e57a29baa993d" +checksum = "3d6540eedc41f8a5a76cf3d8d458057dcdf817be4158a55b5f861f7a5483de75" dependencies = [ - "clap 3.2.8", + "clap 4.1.3", ] [[package]] name = "clap_complete_fig" -version = "3.2.4" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed37b4c0c1214673eba6ad8ea31666626bf72be98ffb323067d973c48b4964b9" +checksum = "cf0c76d8fcf782a1102ccfcd10ca8246e7fdd609c1cd6deddbb96cb638e9bb5c" dependencies = [ - "clap 3.2.8", + "clap 4.1.3", "clap_complete", ] [[package]] name = "clap_derive" -version = "3.2.7" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -650,6 +688,15 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "clap_lex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "client-connections" version = "0.1.0" @@ -660,7 +707,7 @@ dependencies = [ [[package]] name = "client-core" -version = "1.1.5" +version = "1.1.7" dependencies = [ "async-trait", "client-connections", @@ -739,6 +786,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "colored" version = "2.0.0" @@ -752,9 +809,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "6.0.0" +version = "6.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121d8a5b0346092c18a4b2fd6f620d7a06f0eb7ac0a45860939a0884bc579c56" +checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d" dependencies = [ "crossterm", "strum 0.24.1", @@ -766,7 +823,7 @@ dependencies = [ name = "completions" version = "0.1.0" dependencies = [ - "clap 3.2.8", + "clap 4.1.3", "clap_complete", "clap_complete_fig", ] @@ -786,22 +843,21 @@ dependencies = [ [[package]] name = "console-api" -version = "0.1.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc347c19eb5b940f396ac155822caee6662f850d97306890ac3773ed76c90c5a" +checksum = "e57ff02e8ad8e06ab9731d5dc72dc23bef9200778eae1a89d555d8c42e5d4a86" dependencies = [ - "prost 0.9.0", - "prost-types 0.9.0", + "prost 0.11.6", + "prost-types 0.11.6", "tonic", - "tonic-build", "tracing-core", ] [[package]] name = "console-subscriber" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565a7dfea2d10dd0e5c57cc394d5d441b1910960d8c9211ed14135e0e6ec3a20" +checksum = "22a3a81dfaf6b66bce5d159eddae701e3a002f194d378cbf7be5f053c281d9be" dependencies = [ "console-api", "crossbeam-channel", @@ -809,7 +865,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime 2.1.0", - "prost-types 0.9.0", + "prost-types 0.11.6", "serde", "serde_json", "thread_local", @@ -829,9 +885,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.1.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" [[package]] name = "contracts-common" @@ -848,17 +904,17 @@ dependencies = [ [[package]] name = "cookie" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "aes-gcm", - "base64", + "base64 0.20.0", "hkdf 0.12.3", "hmac 0.12.1", "percent-encoding", "rand 0.8.5", - "sha2 0.10.2", + "sha2 0.10.6", "subtle 2.4.1", "time 0.3.17", "version_check", @@ -885,7 +941,7 @@ name = "cosmos-sdk-proto" version = "0.12.3" source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" dependencies = [ - "prost 0.10.3", + "prost 0.10.4", "prost-types 0.10.1", "tendermint-proto", ] @@ -899,11 +955,11 @@ dependencies = [ "cosmos-sdk-proto", "ecdsa", "eyre", - "getrandom 0.2.6", + "getrandom 0.2.8", "k256", - "prost 0.10.3", + "prost 0.10.4", "prost-types 0.10.1", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "serde_json", "subtle-encoding", @@ -921,15 +977,15 @@ dependencies = [ "digest 0.9.0", "ed25519-zebra", "k256", - "rand_core 0.6.3", + "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.0.0" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b36e527620a2a3e00e46b6e731ab6c9b68d11069c986f7d7be8eba79ef081a4" +checksum = "6fca30d51f7e5fbfa6440d8b10d7df0231bdf77e97fd3fe5d0cb79cc4822e50c" dependencies = [ "syn", ] @@ -940,7 +996,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "875994993c2082a6fcd406937bf0fca21c349e4a624f3810253a14fa83a3a195" dependencies = [ - "base64", + "base64 0.13.1", "cosmwasm-crypto", "cosmwasm-derive", "forward_ref", @@ -975,7 +1031,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" dependencies = [ - "crc-catalog 2.1.0", + "crc-catalog 2.2.0", ] [[package]] @@ -986,9 +1042,9 @@ checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" [[package]] name = "crc32fast" @@ -1005,7 +1061,7 @@ version = "0.1.0" dependencies = [ "bip39", "cfg-if 0.1.10", - "clap 3.2.8", + "clap 4.1.3", "coconut-interface", "completions", "config", @@ -1028,7 +1084,7 @@ version = "0.1.0" dependencies = [ "async-trait", "log", - "sqlx 0.5.11", + "sqlx 0.5.13", "thiserror", "tokio", ] @@ -1049,14 +1105,14 @@ dependencies = [ [[package]] name = "criterion" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" dependencies = [ "atty", - "cast 0.2.7", + "cast", "clap 2.34.0", - "criterion-plot 0.4.4", + "criterion-plot 0.4.5", "csv", "itertools", "lazy_static", @@ -1081,9 +1137,9 @@ checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" dependencies = [ "anes", "atty", - "cast 0.3.0", + "cast", "ciborium", - "clap 3.2.8", + "clap 3.2.23", "criterion-plot 0.5.0", "itertools", "lazy_static", @@ -1101,11 +1157,11 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" dependencies = [ - "cast 0.2.7", + "cast", "itertools", ] @@ -1115,15 +1171,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ - "cast 0.3.0", + "cast", "itertools", ] [[package]] name = "crossbeam-channel" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1131,9 +1187,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -1142,23 +1198,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.8" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg 1.1.0", "cfg-if 1.0.0", "crossbeam-utils", - "lazy_static", "memoffset", "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1166,25 +1221,24 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if 1.0.0", - "lazy_static", ] [[package]] name = "crossterm" -version = "0.23.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ "bitflags", "crossterm_winapi", "libc", "mio", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "signal-hook", "signal-hook-mio", "winapi", @@ -1209,14 +1263,14 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" name = "crypto" version = "0.1.0" dependencies = [ - "aes 0.8.1", + "aes 0.8.2", "blake3", "bs58", "cipher 0.4.3", - "ctr 0.9.1", - "digest 0.10.3", + "ctr 0.9.2", + "digest 0.10.6", "ed25519-dalek", - "generic-array 0.14.5", + "generic-array 0.14.6", "hkdf 0.12.3", "hmac 0.12.1", "nymsphinx-types", @@ -1236,8 +1290,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" dependencies = [ - "generic-array 0.14.5", - "rand_core 0.6.3", + "generic-array 0.14.6", + "rand_core 0.6.4", "subtle 2.4.1", "zeroize", ] @@ -1248,8 +1302,8 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.5", - "rand_core 0.6.3", + "generic-array 0.14.6", + "rand_core 0.6.4", "typenum", ] @@ -1269,7 +1323,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.5", + "generic-array 0.14.6", "subtle 2.4.1", ] @@ -1315,9 +1369,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d14f329cfbaf5d0e06b5e87fff7e265d2673c5ea7d2c27691a2c107db1442a0" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher 0.4.3", ] @@ -1421,6 +1475,50 @@ dependencies = [ "serde", ] +[[package]] +name = "cxx" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "darling" version = "0.13.4" @@ -1476,7 +1574,7 @@ dependencies = [ "hashbrown 0.12.3", "lock_api", "once_cell", - "parking_lot_core 0.9.4", + "parking_lot_core 0.9.6", ] [[package]] @@ -1536,16 +1634,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.5", + "generic-array 0.14.6", ] [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.3", "crypto-common", "subtle 2.4.1", ] @@ -1577,14 +1675,14 @@ dependencies = [ "bitvec", "bls12_381 0.6.0", "bs58", - "criterion 0.3.5", - "ff 0.11.0", + "criterion 0.3.6", + "ff 0.11.1", "group 0.11.0", "lazy_static", "pemstore", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "serde_derive", "sha2 0.9.9", @@ -1606,18 +1704,15 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "dotenvy" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9155c8f4dc55c7470ae9da3f63c6785245093b3f6aeb0f5bf2e968efbba314" -dependencies = [ - "dirs", -] +checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" [[package]] name = "dyn-clone" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28" +checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" [[package]] name = "ecdsa" @@ -1633,9 +1728,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "serde", "signature", @@ -1658,24 +1753,24 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown 0.12.3", "hex", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "sha2 0.9.9", - "thiserror", "zeroize", ] [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" @@ -1686,10 +1781,10 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "ff 0.11.0", - "generic-array 0.14.5", + "ff 0.11.1", + "generic-array 0.14.6", "group 0.11.0", - "rand_core 0.6.3", + "rand_core 0.6.4", "sec1", "subtle 2.4.1", "zeroize", @@ -1706,18 +1801,38 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" +checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" dependencies = [ - "enum-iterator-derive", + "enum-iterator-derive 0.8.1", +] + +[[package]] +name = "enum-iterator" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91a4ec26efacf4aeff80887a175a419493cb6f8b5480d26387eb0bd038976187" +dependencies = [ + "enum-iterator-derive 1.1.0", ] [[package]] name = "enum-iterator-derive" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" +checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "828de45d0ca18782232dfb8f3ea9cc428e8ced380eb26a520baaacfc70de39ce" dependencies = [ "proc-macro2", "quote", @@ -1737,6 +1852,27 @@ dependencies = [ "termcolor", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "error-chain" version = "0.12.4" @@ -1762,10 +1898,10 @@ dependencies = [ [[package]] name = "explorer-api" -version = "1.1.2" +version = "1.1.7" dependencies = [ "chrono", - "clap 3.2.8", + "clap 4.1.3", "contracts-common", "dotenv", "humantime-serde", @@ -1778,6 +1914,9 @@ dependencies = [ "network-defaults", "okapi", "pretty_env_logger", + "rand 0.8.5", + "rand_pcg 0.3.1", + "rand_seeder", "reqwest", "rocket", "rocket_cors", @@ -1801,12 +1940,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fastrand" version = "1.8.0" @@ -1822,25 +1955,25 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle 2.4.1", ] [[package]] name = "ff" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle 2.4.1", ] [[package]] name = "figment" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df" +checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9" dependencies = [ "atomic", "pear", @@ -1850,21 +1983,13 @@ dependencies = [ "version_check", ] -[[package]] -name = "fixedbitset" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" - [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "miniz_oxide", ] @@ -1880,14 +2005,14 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.12" +version = "0.10.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" dependencies = [ "futures-core", "futures-sink", "pin-project", - "spin 0.9.2", + "spin 0.9.4", ] [[package]] @@ -1913,11 +2038,10 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] @@ -1941,9 +2065,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -1956,9 +2080,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -1966,15 +2090,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", @@ -1983,9 +2107,9 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" +checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" dependencies = [ "futures-core", "lock_api", @@ -1994,15 +2118,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-macro" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -2011,21 +2135,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-util" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures-channel", "futures-core", @@ -2050,12 +2174,13 @@ dependencies = [ "crypto", "futures", "gateway-requests", - "getrandom 0.2.6", + "getrandom 0.2.8", "log", "network-defaults", "nymsphinx", "pemstore", "rand 0.7.3", + "serde", "task", "thiserror", "tokio", @@ -2097,15 +2222,15 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generator" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee" +checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" dependencies = [ "cc", "libc", "log", "rustversion", - "winapi", + "windows", ] [[package]] @@ -2119,9 +2244,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -2142,14 +2267,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -2167,9 +2292,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", "polyval", @@ -2177,9 +2302,22 @@ dependencies = [ [[package]] name = "git2" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c" +checksum = "2994bee4a3a6a51eb90c218523be382fd7ea09b16380b9312e9dbe955ff7c7d1" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "git2" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ "bitflags", "libc", @@ -2190,15 +2328,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-timers" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", @@ -2214,7 +2352,7 @@ checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" dependencies = [ "byteorder", "ff 0.10.1", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle 2.4.1", ] @@ -2225,16 +2363,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" dependencies = [ "byteorder", - "ff 0.11.0", - "rand_core 0.6.3", + "ff 0.11.1", + "rand_core 0.6.4", "subtle 2.4.1", ] +[[package]] +name = "group-contract-common" +version = "0.1.0" +dependencies = [ + "cw4", + "schemars", + "serde", +] + [[package]] name = "h2" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -2245,7 +2392,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tracing", ] @@ -2307,11 +2454,11 @@ dependencies = [ [[package]] name = "hdrhistogram" -version = "7.5.0" +version = "7.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31672b7011be2c4f7456c4ddbcb40e7e9a4a9fad8efe49a6ebaf5f307d0109c0" +checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" dependencies = [ - "base64", + "base64 0.13.1", "byteorder", "flate2", "nom", @@ -2320,18 +2467,18 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" +checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "base64", + "base64 0.13.1", "bitflags", "bytes", "headers-core", "http", "httpdate", "mime", - "sha-1 0.10.0", + "sha1", ] [[package]] @@ -2370,6 +2517,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hex" version = "0.4.3" @@ -2429,25 +2585,25 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "http" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa 1.0.5", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -2455,10 +2611,16 @@ dependencies = [ ] [[package]] -name = "httparse" -version = "1.6.0" +name = "http-range-header" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -2493,9 +2655,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -2506,7 +2668,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", + "itoa 1.0.5", "pin-project-lite", "socket2", "tokio", @@ -2577,6 +2739,30 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2611,12 +2797,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.8.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg 1.1.0", - "hashbrown 0.11.2", + "hashbrown 0.12.3", "serde", ] @@ -2632,7 +2818,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.5", + "generic-array 0.14.6", ] [[package]] @@ -2657,10 +2843,20 @@ dependencies = [ ] [[package]] -name = "ipnet" -version = "2.4.0" +name = "io-lifetimes" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "ipnet" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "ipnetwork" @@ -2680,6 +2876,18 @@ dependencies = [ "serde", ] +[[package]] +name = "is-terminal" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +dependencies = [ + "hermit-abi 0.2.6", + "io-lifetimes", + "rustix", + "windows-sys", +] + [[package]] name = "isocountry" version = "0.3.2" @@ -2692,9 +2900,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -2707,15 +2915,15 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ "libc", ] @@ -2745,9 +2953,12 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] [[package]] name = "keystream" @@ -2811,15 +3022,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.122" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libgit2-sys" -version = "0.13.2+1.4.2" +version = "0.14.2+1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b" +checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4" dependencies = [ "cc", "libc", @@ -2829,9 +3040,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libsqlite3-sys" @@ -2846,9 +3057,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "libc", @@ -2856,6 +3067,21 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "lioness" version = "0.1.2" @@ -2897,9 +3123,9 @@ dependencies = [ [[package]] name = "loom" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5c7d328e32cc4954e8e01193d7f0ef5ab257b5090b70a964e099a36034309" +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" dependencies = [ "cfg-if 1.0.0", "generator", @@ -2910,12 +3136,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - [[package]] name = "matchers" version = "0.1.0" @@ -2927,9 +3147,15 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "maxminddb" @@ -2951,15 +3177,15 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg 1.1.0", ] @@ -2978,24 +3204,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", - "autocfg 1.1.0", ] [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -3005,8 +3230,9 @@ dependencies = [ "futures", "log", "nymsphinx", + "task", "tokio", - "tokio-util 0.7.3", + "tokio-util", ] [[package]] @@ -3037,6 +3263,7 @@ dependencies = [ "futures", "humantime-serde", "log", + "network-defaults", "nymsphinx-acknowledgements", "nymsphinx-addressing", "nymsphinx-forwarding", @@ -3048,7 +3275,7 @@ dependencies = [ "task", "thiserror", "tokio", - "tokio-util 0.7.3", + "tokio-util", "url", "validator-client", "version-checker", @@ -3056,9 +3283,9 @@ dependencies = [ [[package]] name = "multer" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8f35e687561d5c1667590911e6698a8cb714a134a7505718a182e7bc9d3836" +checksum = "6ed4198ce7a4cbd2a57af78d28c6fbb57d81ac5f1d6ad79ac6c5587419cbdf22" dependencies = [ "bytes", "encoding_rs", @@ -3068,18 +3295,12 @@ dependencies = [ "log", "memchr", "mime", - "spin 0.9.2", + "spin 0.9.4", "tokio", - "tokio-util 0.6.9", + "tokio-util", "version_check", ] -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - [[package]] name = "multisig-contract-common" version = "0.1.0" @@ -3095,9 +3316,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -3132,9 +3353,9 @@ checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -3148,7 +3369,7 @@ dependencies = [ "slab", "tokio", "tokio-stream", - "tokio-util 0.7.3", + "tokio-util", "wasm-timer", ] @@ -3161,6 +3382,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -3174,9 +3405,9 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg 1.1.0", "num-traits", @@ -3184,9 +3415,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg 1.1.0", "libm", @@ -3194,14 +3425,82 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] +[[package]] +name = "nym-api" +version = "1.1.7" +dependencies = [ + "anyhow", + "async-trait", + "bip39", + "bs58", + "build-information", + "cfg-if 1.0.0", + "clap 4.1.3", + "coconut-bandwidth-contract-common", + "coconut-dkg-common", + "coconut-interface", + "config", + "console-subscriber", + "contracts-common", + "cosmwasm-std", + "credential-storage", + "credentials", + "crypto", + "cw-utils", + "cw3", + "cw4", + "dirs", + "dkg", + "dotenv", + "futures", + "gateway-client", + "getset", + "humantime-serde", + "inclusion-probability", + "lazy_static", + "log", + "logging", + "mixnet-contract-common", + "multisig-contract-common", + "nym-api-requests", + "nymcoconut", + "nymsphinx", + "okapi", + "pemstore", + "pin-project", + "pretty_env_logger", + "rand 0.7.3", + "rand 0.8.5", + "reqwest", + "rocket", + "rocket_cors", + "rocket_okapi", + "schemars", + "serde", + "serde_json", + "sqlx 0.6.2", + "tap", + "task", + "thiserror", + "time 0.3.17", + "tokio", + "tokio-stream", + "topology", + "ts-rs", + "url", + "validator-client", + "version-checker", + "vesting-contract-common", +] + [[package]] name = "nym-api-requests" version = "0.1.0" @@ -3234,13 +3533,13 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.5" +version = "1.1.7" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bip39", "bs58", - "clap 3.2.8", + "clap 4.1.3", "clap_complete", "clap_complete_fig", "dotenv", @@ -3260,19 +3559,23 @@ dependencies = [ name = "nym-cli-commands" version = "1.0.0" dependencies = [ - "base64", + "base64 0.13.1", "bip39", "bs58", "cfg-if 1.0.0", - "clap 3.2.8", + "clap 4.1.3", + "coconut-bandwidth-contract-common", + "coconut-dkg-common", "comfy-table", "cosmrs", "cosmwasm-std", + "cw-utils", "handlebars", "humantime-serde", "k256", "log", "mixnet-contract-common", + "multisig-contract-common", "network-defaults", "rand 0.6.5", "serde", @@ -3288,9 +3591,10 @@ dependencies = [ [[package]] name = "nym-client" -version = "1.1.5" +version = "1.1.7" dependencies = [ - "clap 3.2.8", + "build-information", + "clap 4.1.3", "client-connections", "client-core", "coconut-interface", @@ -3303,6 +3607,7 @@ dependencies = [ "futures", "gateway-client", "gateway-requests", + "lazy_static", "log", "logging", "network-defaults", @@ -3320,20 +3625,21 @@ dependencies = [ "topology", "url", "validator-client", - "vergen 5.1.17", "version-checker", "websocket-requests", ] [[package]] name = "nym-gateway" -version = "1.1.5" +version = "1.1.7" dependencies = [ "anyhow", "async-trait", + "atty", "bip39", "bs58", - "clap 3.2.8", + "build-information", + "clap 4.1.3", "coconut-interface", "colored", "completions", @@ -3346,39 +3652,44 @@ dependencies = [ "futures", "gateway-requests", "humantime-serde", + "lazy_static", "log", "logging", "mixnet-client", "mixnode-common", "network-defaults", "nym-api-requests", + "nym-types", "nymsphinx", "once_cell", "pemstore", "pretty_env_logger", "rand 0.7.3", "serde", - "sqlx 0.5.11", + "serde_json", + "sqlx 0.5.13", "statistics-common", "subtle-encoding", + "task", "thiserror", "tokio", "tokio-stream", "tokio-tungstenite 0.14.0", - "tokio-util 0.7.3", + "tokio-util", "url", "validator-client", - "vergen 5.1.17", "version-checker", ] [[package]] name = "nym-mixnode" -version = "1.1.5" +version = "1.1.7" dependencies = [ "anyhow", + "atty", "bs58", - "clap 3.2.8", + "build-information", + "clap 4.1.3", "colored", "completions", "config", @@ -3394,6 +3705,7 @@ dependencies = [ "mixnet-client", "mixnode-common", "nonexhaustive-delayqueue", + "nym-types", "nymsphinx", "nymsphinx-params", "nymsphinx-types", @@ -3402,24 +3714,24 @@ dependencies = [ "rand 0.7.3", "rocket", "serde", + "serde_json", "sysinfo", "task", "tokio", - "tokio-util 0.7.3", + "tokio-util", "toml", "topology", "url", "validator-client", - "vergen 5.1.17", "version-checker", ] [[package]] name = "nym-network-requester" -version = "1.1.5" +version = "1.1.7" dependencies = [ "async-trait", - "clap 3.2.8", + "clap 4.1.3", "client-connections", "completions", "dirs", @@ -3448,7 +3760,7 @@ dependencies = [ [[package]] name = "nym-network-statistics" -version = "1.1.5" +version = "1.1.7" dependencies = [ "dirs", "log", @@ -3456,7 +3768,7 @@ dependencies = [ "pretty_env_logger", "rocket", "serde", - "sqlx 0.5.11", + "sqlx 0.5.13", "statistics-common", "thiserror", "tokio", @@ -3472,17 +3784,43 @@ dependencies = [ "criterion 0.4.0", "curve25519-dalek", "fastrand", - "getrandom 0.2.6", + "getrandom 0.2.8", "rayon", "thiserror", "zeroize", ] [[package]] -name = "nym-socks5-client" -version = "1.1.5" +name = "nym-sdk" +version = "0.1.0" dependencies = [ - "clap 3.2.8", + "client-connections", + "client-core", + "crypto", + "futures", + "gateway-client", + "gateway-requests", + "log", + "logging", + "network-defaults", + "nymsphinx", + "pretty_env_logger", + "rand 0.7.3", + "tap", + "task", + "thiserror", + "tokio", + "toml", + "url", + "validator-client", +] + +[[package]] +name = "nym-socks5-client" +version = "1.1.7" +dependencies = [ + "build-information", + "clap 4.1.3", "client-connections", "client-core", "coconut-interface", @@ -3495,6 +3833,7 @@ dependencies = [ "futures", "gateway-client", "gateway-requests", + "lazy_static", "log", "logging", "network-defaults", @@ -3515,7 +3854,6 @@ dependencies = [ "topology", "url", "validator-client", - "vergen 5.1.17", "version-checker", ] @@ -3545,70 +3883,6 @@ dependencies = [ "vesting-contract-common", ] -[[package]] -name = "nym-validator-api" -version = "1.1.5" -dependencies = [ - "anyhow", - "async-trait", - "bs58", - "cfg-if 1.0.0", - "clap 3.2.8", - "coconut-bandwidth-contract-common", - "coconut-dkg-common", - "coconut-interface", - "config", - "console-subscriber", - "contracts-common", - "cosmwasm-std", - "credential-storage", - "credentials", - "crypto", - "cw-utils", - "cw3", - "dirs", - "dkg", - "dotenv", - "futures", - "gateway-client", - "getset", - "humantime-serde", - "inclusion-probability", - "log", - "logging", - "mixnet-contract-common", - "multisig-contract-common", - "nym-api-requests", - "nymcoconut", - "nymsphinx", - "okapi", - "pemstore", - "pin-project", - "pretty_env_logger", - "rand 0.7.3", - "rand 0.8.5", - "reqwest", - "rocket", - "rocket_cors", - "rocket_okapi", - "schemars", - "serde", - "serde_json", - "sqlx 0.6.2", - "tap", - "task", - "thiserror", - "time 0.3.17", - "tokio", - "tokio-stream", - "topology", - "ts-rs", - "url", - "validator-client", - "vergen 7.2.1", - "version-checker", -] - [[package]] name = "nym-wallet-types" version = "1.0.0" @@ -3636,12 +3910,12 @@ dependencies = [ "bincode", "bls12_381 0.6.0", "bs58", - "criterion 0.3.5", + "criterion 0.3.6", "digest 0.9.0", "dkg", "doc-comment", - "ff 0.11.0", - "getrandom 0.2.6", + "ff 0.11.1", + "getrandom 0.2.8", "group 0.11.0", "itertools", "pemstore", @@ -3761,7 +4035,7 @@ dependencies = [ "nymsphinx-params", "nymsphinx-types", "thiserror", - "tokio-util 0.7.3", + "tokio-util", ] [[package]] @@ -3794,9 +4068,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "oorandom" @@ -3818,18 +4092,30 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" version = "0.1.5" @@ -3838,9 +4124,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg 1.1.0", "cc", @@ -3859,9 +4145,15 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pairing" @@ -3889,51 +4181,51 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", + "parking_lot_core 0.8.6", ] [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.4", + "parking_lot_core 0.9.6", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if 1.0.0", "instant", "libc", "redox_syscall", - "smallvec 1.8.0", + "smallvec 1.10.0", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", - "smallvec 1.8.0", - "windows-sys 0.42.0", + "smallvec 1.10.0", + "windows-sys", ] [[package]] name = "paste" -version = "1.0.7" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "pbkdf2" @@ -4000,7 +4292,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" dependencies = [ - "base64", + "base64 0.13.1", "once_cell", "regex", ] @@ -4014,24 +4306,25 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.1.3" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" dependencies = [ + "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.1.0" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +checksum = "241cda393b0cdd65e62e07e12454f1f25d57017dcc514b1514cd3c4645e3a0a6" dependencies = [ "pest", "pest_generator", @@ -4039,9 +4332,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.1.3" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +checksum = "46b53634d8c8196302953c74d5352f33d0c512a9499bd2ce468fc9f4128fa27c" dependencies = [ "pest", "pest_meta", @@ -4052,39 +4345,29 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.1.3" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +checksum = "0ef4f1332a8d4678b41966bb4cc1d0676880e84183a1ecc3f4b69f03e99c7a51" dependencies = [ - "maplit", + "once_cell", "pest", - "sha-1 0.8.2", -] - -[[package]] -name = "petgraph" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" -dependencies = [ - "fixedbitset", - "indexmap", + "sha2 0.10.6", ] [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -4093,9 +4376,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -4116,15 +4399,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "plotters" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" dependencies = [ "num-traits", "plotters-backend", @@ -4135,15 +4418,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] @@ -4156,26 +4439,26 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.0", + "universal-hash", ] [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" dependencies = [ "cfg-if 1.0.0", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_env_logger" @@ -4213,9 +4496,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] @@ -4235,55 +4518,22 @@ dependencies = [ [[package]] name = "prost" -version = "0.9.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" -dependencies = [ - "bytes", - "prost-derive 0.9.0", -] - -[[package]] -name = "prost" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" dependencies = [ "bytes", "prost-derive 0.10.1", ] [[package]] -name = "prost-build" -version = "0.9.0" +name = "prost" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" +checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698" dependencies = [ "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost 0.9.0", - "prost-types 0.9.0", - "regex", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", + "prost-derive 0.11.6", ] [[package]] @@ -4300,13 +4550,16 @@ dependencies = [ ] [[package]] -name = "prost-types" -version = "0.9.0" +name = "prost-derive" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" +checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d" dependencies = [ - "bytes", - "prost 0.9.0", + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -4316,7 +4569,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ "bytes", - "prost 0.10.3", + "prost 0.10.4", +] + +[[package]] +name = "prost-types" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788" +dependencies = [ + "bytes", + "prost 0.11.6", ] [[package]] @@ -4332,7 +4595,7 @@ dependencies = [ "task", "tokio", "tokio-test", - "tokio-util 0.7.3", + "tokio-util", ] [[package]] @@ -4363,9 +4626,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -4390,7 +4653,7 @@ dependencies = [ "rand_isaac", "rand_jitter", "rand_os", - "rand_pcg", + "rand_pcg 0.1.2", "rand_xorshift", "winapi", ] @@ -4416,7 +4679,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -4446,7 +4709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -4475,11 +4738,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.8", ] [[package]] @@ -4554,6 +4817,24 @@ dependencies = [ "rand_core 0.4.2", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rand_xorshift" version = "0.1.1" @@ -4565,26 +4846,23 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] @@ -4599,9 +4877,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] @@ -4612,25 +4890,25 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.8", "redox_syscall", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.6" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.6" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" dependencies = [ "proc-macro2", "quote", @@ -4639,9 +4917,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -4659,9 +4937,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -4674,11 +4952,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.11" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ - "base64", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -4690,10 +4968,10 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "lazy_static", "log", "mime", "native-tls", + "once_cell", "percent-encoding", "pin-project-lite", "serde", @@ -4766,7 +5044,7 @@ dependencies = [ "memchr", "multer", "num_cpus", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite", "rand 0.8.5", "ref-cast", @@ -4779,7 +5057,7 @@ dependencies = [ "time 0.3.17", "tokio", "tokio-stream", - "tokio-util 0.7.3", + "tokio-util", "ubyte", "version_check", "yansi", @@ -4835,7 +5113,7 @@ dependencies = [ "pin-project-lite", "ref-cast", "serde", - "smallvec 1.8.0", + "smallvec 1.10.0", "stable-pattern", "state", "time 0.3.17", @@ -4887,7 +5165,21 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.7", + "semver 1.0.16", +] + +[[package]] +name = "rustix" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] @@ -4896,7 +5188,7 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64", + "base64 0.13.1", "log", "ring", "sct 0.6.1", @@ -4905,9 +5197,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -4929,24 +5221,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64", + "base64 0.21.0", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "same-file" @@ -4959,19 +5251,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "winapi", + "windows-sys", ] [[package]] name = "schemars" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "indexmap", @@ -4982,9 +5273,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -4994,9 +5285,9 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -5004,6 +5295,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + [[package]] name = "sct" version = "0.6.1" @@ -5031,7 +5328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ "der", - "generic-array 0.14.5", + "generic-array 0.14.6", "pkcs8", "subtle 2.4.1", "zeroize", @@ -5039,9 +5336,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" dependencies = [ "bitflags", "core-foundation", @@ -5052,9 +5349,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -5080,9 +5377,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.7" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "semver-parser" @@ -5101,9 +5398,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.136" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] @@ -5119,9 +5416,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" +checksum = "718dc5fff5b36f99093fc49b280cfc96ce6fc824317783bff5a1fed0c7a64819" dependencies = [ "serde", ] @@ -5138,9 +5435,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -5160,20 +5457,20 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.5", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" +checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" dependencies = [ "proc-macro2", "quote", @@ -5187,23 +5484,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa 1.0.5", "ryu", "serde", ] -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - [[package]] name = "sha-1" version = "0.9.8" @@ -5219,13 +5504,24 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.6", ] [[package]] @@ -5243,13 +5539,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -5305,19 +5601,22 @@ dependencies = [ [[package]] name = "signature" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" dependencies = [ "digest 0.9.0", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "smallvec" @@ -5330,15 +5629,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snafu" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ba99b054b22972ee794cf04e5ef572da1229e33b65f3c57abbff0525a454" +checksum = "cb0656e7e3ffb70f6c39b3c2a86332bb74aa3c679da781642590f3c1118c5045" dependencies = [ "doc-comment", "snafu-derive", @@ -5346,9 +5645,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e79cdebbabaebb06a9bdbaedc7f159b410461f63611d4d0e3fb0fab8fed850" +checksum = "475b3bbe5245c26f2d8a6f62d67c1f30eb9fffeccee721c45d162c3ebbdf81b2" dependencies = [ "heck 0.4.0", "proc-macro2", @@ -5358,9 +5657,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -5405,9 +5704,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" dependencies = [ "lock_api", ] @@ -5435,9 +5734,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a" +checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" dependencies = [ "itertools", "nom", @@ -5446,12 +5745,12 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.11" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc15591eb44ffb5816a4a70a7efd5dd87bfd3aa84c4c200401c4396140525826" +checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" dependencies = [ "sqlx-core 0.5.13", - "sqlx-macros 0.5.11", + "sqlx-macros 0.5.13", ] [[package]] @@ -5489,7 +5788,7 @@ dependencies = [ "hashlink 0.7.0", "hex", "indexmap", - "itoa 1.0.1", + "itoa 1.0.5", "libc", "libsqlite3-sys", "log", @@ -5498,8 +5797,8 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.19.1", - "sha2 0.10.2", - "smallvec 1.8.0", + "sha2 0.10.6", + "smallvec 1.10.0", "sqlformat 0.1.8", "sqlx-rt 0.5.13", "stringprep", @@ -5536,7 +5835,7 @@ dependencies = [ "hashlink 0.8.1", "hex", "indexmap", - "itoa 1.0.1", + "itoa 1.0.5", "libc", "libsqlite3-sys", "log", @@ -5544,32 +5843,32 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls 0.20.6", + "rustls 0.20.8", "rustls-pemfile", - "sha2 0.10.2", - "smallvec 1.8.0", - "sqlformat 0.2.0", + "sha2 0.10.6", + "smallvec 1.10.0", + "sqlformat 0.2.1", "sqlx-rt 0.6.2", "stringprep", "thiserror", "tokio-stream", "url", - "webpki-roots 0.22.4", + "webpki-roots 0.22.6", ] [[package]] name = "sqlx-macros" -version = "0.5.11" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee35713129561f5e55c554bba1c378e2a7e67f81257b7311183de98c50e6f94" +checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" dependencies = [ "dotenv", "either", - "heck 0.3.3", + "heck 0.4.0", "once_cell", "proc-macro2", "quote", - "sha2 0.9.9", + "sha2 0.10.6", "sqlx-core 0.5.13", "sqlx-rt 0.5.13", "syn", @@ -5588,7 +5887,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.2", + "sha2 0.10.6", "sqlx-core 0.6.2", "sqlx-rt 0.6.2", "syn", @@ -5650,7 +5949,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sqlx 0.5.11", + "sqlx 0.5.13", "thiserror", "tokio", ] @@ -5735,15 +6034,21 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.104" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + [[package]] name = "synstructure" version = "0.12.6" @@ -5758,9 +6063,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.24.1" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a8e71535da31837213ac114531d31def75d7aebd133264e420a3451fa7f703" +checksum = "54cb4ebf3d49308b99e6e9dc95e989e2fdbdc210e4f67c39db0bb89ba927001c" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -5818,7 +6123,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.10.3", + "prost 0.10.4", "prost-types 0.10.1", "ripemd160", "serde", @@ -5858,7 +6163,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.10.3", + "prost 0.10.4", "prost-types 0.10.1", "serde", "serde_bytes", @@ -5876,7 +6181,7 @@ dependencies = [ "bytes", "flex-error", "futures", - "getrandom 0.2.6", + "getrandom 0.2.8", "http", "hyper", "hyper-proxy", @@ -5901,9 +6206,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] @@ -5919,24 +6224,24 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -5954,9 +6259,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -5969,7 +6274,7 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.5", "js-sys", "serde", "time-core", @@ -6003,9 +6308,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.22.0" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg 1.1.0", "bytes", @@ -6013,13 +6318,13 @@ dependencies = [ "memchr", "mio", "num_cpus", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "winapi", + "windows-sys", ] [[package]] @@ -6034,9 +6339,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -6070,21 +6375,21 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.6", + "rustls 0.20.8", "tokio", "webpki 0.22.0", ] [[package]] name = "tokio-stream" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.3", + "tokio-util", ] [[package]] @@ -6127,23 +6432,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", @@ -6156,22 +6447,23 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] [[package]] name = "tonic" -version = "0.6.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" dependencies = [ "async-stream", "async-trait", - "base64", + "axum", + "base64 0.13.1", "bytes", "futures-core", "futures-util", @@ -6182,11 +6474,11 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.9.0", - "prost-derive 0.9.0", + "prost 0.11.6", + "prost-derive 0.11.6", "tokio", "tokio-stream", - "tokio-util 0.6.9", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -6194,18 +6486,6 @@ dependencies = [ "tracing-futures", ] -[[package]] -name = "tonic-build" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" -dependencies = [ - "proc-macro2", - "prost-build", - "quote", - "syn", -] - [[package]] name = "topology" version = "0.1.0" @@ -6223,9 +6503,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", @@ -6235,29 +6515,48 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tower-layer", "tower-service", "tracing", ] [[package]] -name = "tower-layer" -version = "0.3.1" +name = "tower-http" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.33" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b9fa4360528139bc96100c160b7ae879f5567f49f1782b0b02035b0358ebf3" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", "log", @@ -6268,9 +6567,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -6279,11 +6578,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.24" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90442985ee2f57c9e1b548ee72ae842f4a9a20e3f417cc38dbc5dc684d9bb4ee" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -6299,9 +6598,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", "log", @@ -6310,16 +6609,16 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.11" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" dependencies = [ - "ansi_term", - "lazy_static", "matchers", + "nu-ansi-term", + "once_cell", "regex", "sharded-slab", - "smallvec 1.8.0", + "smallvec 1.10.0", "thread_local", "tracing", "tracing-core", @@ -6328,15 +6627,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ts-rs" -version = "6.1.2" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d26cba30c9b3a2f537f765cf754126f11c983b7426d280ae0b4cef2374cab98" +checksum = "4added4070a4fdf9df03457206cd2e4b12417c8560a2954d91ffcbe60177a56a" dependencies = [ "thiserror", "ts-rs-macros", @@ -6359,9 +6658,9 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "6.1.2" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8e302fbcf5b60dfa1df443535967511442c5ce4eac8b4c9fa811f2274280a4" +checksum = "9f807fdb3151fee75df7485b901a89624358cd07a67a8fb1a5831bf5a07681ff" dependencies = [ "Inflector", "proc-macro2", @@ -6376,7 +6675,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fe8dada8c1a3aeca77d6b51a4f1314e0f4b8e438b7b1b71e3ddaca8080e4093" dependencies = [ - "base64", + "base64 0.13.1", "byteorder", "bytes", "http", @@ -6396,14 +6695,14 @@ version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ - "base64", + "base64 0.13.1", "byteorder", "bytes", "http", "httparse", "log", "rand 0.8.5", - "sha-1 0.10.0", + "sha-1 0.10.1", "thiserror", "url", "utf-8", @@ -6411,30 +6710,30 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ubyte" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42756bb9e708855de2f8a98195643dff31a97f0485d90d8467b39dc24be9e8fe" +checksum = "c81f0dae7d286ad0d9366d7679a77934cfc3cf3a8d67e82669794412b2368fe6" dependencies = [ "serde", ] [[package]] name = "ucd-trie" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -6444,9 +6743,9 @@ dependencies = [ [[package]] name = "uncased" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0" +checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" dependencies = [ "serde", "version_check", @@ -6473,15 +6772,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -6494,21 +6793,21 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unicode_categories" @@ -6516,16 +6815,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.5", - "subtle 2.4.1", -] - [[package]] name = "universal-hash" version = "0.5.0" @@ -6544,13 +6833,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", "serde", ] @@ -6572,7 +6860,7 @@ name = "validator-client" version = "0.1.0" dependencies = [ "async-trait", - "base64", + "base64 0.13.1", "bip39", "coconut-bandwidth-contract-common", "coconut-dkg-common", @@ -6583,16 +6871,18 @@ dependencies = [ "cosmrs", "cosmwasm-std", "cw3", + "cw4", "execute", "flate2", "futures", + "group-contract-common", "itertools", "log", "mixnet-contract-common", "multisig-contract-common", "network-defaults", "nym-api-requests", - "prost 0.10.3", + "prost 0.10.4", "reqwest", "serde", "serde_json", @@ -6626,9 +6916,9 @@ dependencies = [ "anyhow", "cfg-if 1.0.0", "chrono", - "enum-iterator", + "enum-iterator 0.8.1", "getset", - "git2", + "git2 0.16.1", "rustc_version 0.4.0", "rustversion", "thiserror", @@ -6636,15 +6926,15 @@ dependencies = [ [[package]] name = "vergen" -version = "7.2.1" +version = "7.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f44ef1afcf5979e34748c12595f9589f3dc4e34abf156fb6d95f9b835568dc" +checksum = "571b69f690c855821462709b6f41d42ceccc316fbd17b60bd06d06928cfe6a99" dependencies = [ "anyhow", "cfg-if 1.0.0", - "enum-iterator", + "enum-iterator 1.2.0", "getset", - "git2", + "git2 0.15.0", "rustc_version 0.4.0", "rustversion", "thiserror", @@ -6666,7 +6956,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vesting-contract" -version = "1.1.2" +version = "1.1.3" dependencies = [ "contracts-common", "cosmwasm-std", @@ -6757,9 +7047,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -6824,9 +7114,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -6863,9 +7153,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.4" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki 0.22.0", ] @@ -6879,17 +7169,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "which" -version = "4.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" -dependencies = [ - "either", - "lazy_static", - "libc", -] - [[package]] name = "winapi" version = "0.3.9" @@ -6922,16 +7201,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.36.1" +name = "windows" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows_aarch64_msvc 0.39.0", + "windows_i686_gnu 0.39.0", + "windows_i686_msvc 0.39.0", + "windows_x86_64_gnu 0.39.0", + "windows_x86_64_msvc 0.39.0", ] [[package]] @@ -6941,85 +7220,85 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.1", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -7032,9 +7311,9 @@ dependencies = [ [[package]] name = "wyz" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ "tap", ] @@ -7068,9 +7347,9 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index e756fc7bf8..d0cd902eb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ members = [ "common/cosmwasm-smart-contracts/coconut-bandwidth-contract", "common/cosmwasm-smart-contracts/coconut-dkg", "common/cosmwasm-smart-contracts/contracts-common", + "common/cosmwasm-smart-contracts/group-contract", "common/cosmwasm-smart-contracts/mixnet-contract", "common/cosmwasm-smart-contracts/multisig-contract", "common/cosmwasm-smart-contracts/vesting-contract", @@ -73,6 +74,7 @@ members = [ "gateway/gateway-requests", "integrations/bity", "mixnode", + "sdk/rust/nym-sdk", "service-providers/network-requester", "service-providers/network-statistics", "nym-api", @@ -94,3 +96,12 @@ default-members = [ ] exclude = ["explorer", "contracts", "clients/webassembly", "nym-wallet", "nym-connect"] + +[workspace.package] +authors = ["Nym Technologies SA"] +repository = "https://github.com/nymtech/nym" +homepage = "https://nymtech.net" +edition = "2021" + +[workspace.dependencies] +log = "0.4" diff --git a/Makefile b/Makefile index 883be67453..558290cead 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ no-clippy: build cargo-test wasm fmt happy: fmt clippy-happy test clippy-all: clippy-main clippy-coconut clippy-all-contracts clippy-all-wallet clippy-all-connect clippy-all-wasm-client clippy-happy: clippy-happy-main clippy-happy-contracts clippy-happy-wallet clippy-happy-connect -cargo-test: test-main test-contracts test-wallet test-connect test-coconut test-wasm-client +cargo-test: test-main test-contracts test-wallet test-connect test-coconut cargo-test-expensive: test-main-expensive test-contracts-expensive test-wallet-expensive test-connect-expensive test-coconut-expensive build: build-contracts build-wallet build-main build-connect build-wasm-client fmt: fmt-main fmt-contracts fmt-wallet fmt-connect fmt-wasm-client @@ -68,9 +68,6 @@ test-wallet: test-wallet-expensive: cargo test --manifest-path nym-wallet/Cargo.toml --all-features -- --ignored -test-wasm-client: - cargo test --workspace --manifest-path clients/webassembly/Cargo.toml --all-features - test-connect: cargo test --manifest-path nym-connect/Cargo.toml --all-features diff --git a/clients/.DS_Store b/clients/.DS_Store new file mode 100644 index 0000000000..31c7b1aa5d Binary files /dev/null and b/clients/.DS_Store differ diff --git a/clients/client-core/Cargo.toml b/clients/client-core/Cargo.toml index fc5b421dea..438ebd72ee 100644 --- a/clients/client-core/Cargo.toml +++ b/clients/client-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "client-core" -version = "1.1.6" +version = "1.1.7" authors = ["Dave Hrycyszyn "] edition = "2021" rust-version = "1.66" @@ -13,14 +13,14 @@ dirs = "4.0" dashmap = "5.4.0" futures = "0.3" humantime-serde = "1.0" -log = "0.4" +log = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.89" tap = "1.0.1" thiserror = "1.0.34" url = { version ="2.2", features = ["serde"] } -tokio = { version = "1.21.2", features = ["macros"]} +tokio = { version = "1.24.1", features = ["macros"]} time = "0.3.17" # internal @@ -38,11 +38,11 @@ validator-client = { path = "../../common/client-libs/validator-client", default task = { path = "../../common/task" } [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-stream] -version = "0.1.9" +version = "0.1.11" features = ["time"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] -version = "1.21.2" +version = "1.24.1" features = ["time"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.sqlx] @@ -75,7 +75,7 @@ features = ["wasm-bindgen"] tempfile = "3.1.0" [build-dependencies] -tokio = { version = "1.21.2", features = ["rt-multi-thread", "macros"] } +tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] } [features] diff --git a/clients/client-core/build.rs b/clients/client-core/build.rs index bac1b20c53..62c02c3968 100644 --- a/clients/client-core/build.rs +++ b/clients/client-core/build.rs @@ -9,9 +9,9 @@ async fn main() { use std::env; let out_dir = env::var("OUT_DIR").unwrap(); - let database_path = format!("{}/fs-surbs-example.sqlite", out_dir); + let database_path = format!("{out_dir}/fs-surbs-example.sqlite"); - let mut conn = SqliteConnection::connect(&format!("sqlite://{}?mode=rwc", database_path)) + let mut conn = SqliteConnection::connect(&format!("sqlite://{database_path}?mode=rwc")) .await .expect("Failed to create SQLx database connection"); diff --git a/clients/client-core/src/client/base_client/mod.rs b/clients/client-core/src/client/base_client/mod.rs index 4757c3bf2c..84bc70a985 100644 --- a/clients/client-core/src/client/base_client/mod.rs +++ b/clients/client-core/src/client/base_client/mod.rs @@ -25,6 +25,8 @@ use client_connections::{ConnectionCommandReceiver, ConnectionCommandSender, Lan use crypto::asymmetric::{encryption, identity}; use futures::channel::mpsc; use gateway_client::bandwidth::BandwidthController; +#[cfg(target_arch = "wasm32")] +use gateway_client::wasm_mockups::CosmWasmClient; use gateway_client::{ AcknowledgementReceiver, AcknowledgementSender, GatewayClient, MixnetMessageReceiver, MixnetMessageSender, @@ -33,11 +35,16 @@ use log::{debug, info}; use nymsphinx::acknowledgements::AckKey; use nymsphinx::addressing::clients::Recipient; use nymsphinx::addressing::nodes::NodeIdentity; +use nymsphinx::receiver::ReconstructedMessage; use std::sync::Arc; use std::time::Duration; use tap::TapFallible; use task::{TaskClient, TaskManager}; use url::Url; +#[cfg(not(target_arch = "wasm32"))] +use validator_client::nyxd::CosmWasmClient; + +use super::received_buffer::ReceivedBufferMessage; #[cfg(all(not(target_arch = "wasm32"), feature = "fs-surb-storage"))] pub mod non_wasm_helpers; @@ -48,10 +55,30 @@ pub struct ClientInput { } pub struct ClientOutput { - pub shared_lane_queue_lengths: LaneQueueLengths, pub received_buffer_request_sender: ReceivedBufferRequestSender, } +impl ClientOutput { + pub fn register_receiver( + &mut self, + ) -> Result>, ClientCoreError> { + let (reconstructed_sender, reconstructed_receiver) = mpsc::unbounded(); + + self.received_buffer_request_sender + .unbounded_send(ReceivedBufferMessage::ReceiverAnnounce( + reconstructed_sender, + )) + .map_err(|_| ClientCoreError::FailedToRegisterReceiver)?; + + Ok(reconstructed_receiver) + } +} + +pub struct ClientState { + pub shared_lane_queue_lengths: LaneQueueLengths, + pub reply_controller_sender: ReplyControllerSender, +} + pub enum ClientInputStatus { AwaitingProducer { client_input: ClientInput }, Connected, @@ -80,7 +107,33 @@ impl ClientOutputStatus { } } -pub struct BaseClientBuilder<'a, B> { +#[derive(Copy, Clone, PartialEq, Eq)] +pub enum CredentialsToggle { + Enabled, + Disabled, +} + +impl CredentialsToggle { + pub fn is_enabled(&self) -> bool { + self == &CredentialsToggle::Enabled + } + + pub fn is_disabled(&self) -> bool { + self == &CredentialsToggle::Disabled + } +} + +impl From for CredentialsToggle { + fn from(value: bool) -> Self { + if value { + CredentialsToggle::Enabled + } else { + CredentialsToggle::Disabled + } + } +} + +pub struct BaseClientBuilder<'a, B, C: Clone> { // due to wasm limitations I had to split it like this : ( gateway_config: &'a GatewayEndpointConfig, debug_config: &'a DebugConfig, @@ -88,20 +141,21 @@ pub struct BaseClientBuilder<'a, B> { nym_api_endpoints: Vec, reply_storage_backend: B, - bandwidth_controller: Option, + bandwidth_controller: Option>, key_manager: KeyManager, } -impl<'a, B> BaseClientBuilder<'a, B> +impl<'a, B, C> BaseClientBuilder<'a, B, C> where B: ReplyStorageBackend + Send + Sync + 'static, + C: CosmWasmClient + Sync + Send + Clone + 'static, { pub fn new_from_base_config( base_config: &'a Config, key_manager: KeyManager, - bandwidth_controller: Option, + bandwidth_controller: Option>, reply_storage_backend: B, - ) -> BaseClientBuilder<'a, B> { + ) -> BaseClientBuilder<'a, B, C> { BaseClientBuilder { gateway_config: base_config.get_gateway_endpoint_config(), debug_config: base_config.get_debug_config(), @@ -117,15 +171,15 @@ where gateway_config: &'a GatewayEndpointConfig, debug_config: &'a DebugConfig, key_manager: KeyManager, - bandwidth_controller: Option, + bandwidth_controller: Option>, reply_storage_backend: B, - disabled_credentials: bool, + credentials_toggle: CredentialsToggle, nym_api_endpoints: Vec, - ) -> BaseClientBuilder<'a, B> { + ) -> BaseClientBuilder<'a, B, C> { BaseClientBuilder { gateway_config, debug_config, - disabled_credentials, + disabled_credentials: credentials_toggle.is_disabled(), nym_api_endpoints, reply_storage_backend, bandwidth_controller, @@ -230,7 +284,7 @@ where mixnet_message_sender: MixnetMessageSender, ack_sender: AcknowledgementSender, shutdown: TaskClient, - ) -> Result { + ) -> Result, ClientCoreError> { let gateway_id = self.gateway_config.gateway_id.clone(); if gateway_id.is_empty() { return Err(ClientCoreError::GatewayIdUnknown); @@ -248,7 +302,7 @@ where .map_err(ClientCoreError::UnableToCreatePublicKeyFromGatewayId)?; // disgusting wasm workaround since there's no key persistence there (nor `client init`) - let shared_key = if self.key_manager.gateway_key_set() { + let shared_key = if self.key_manager.is_gateway_key_set() { Some(self.key_manager.gateway_shared_key()) } else { None @@ -316,7 +370,7 @@ where // over it. Perhaps GatewayClient needs to be thread-shareable or have some channel for // requests? fn start_mix_traffic_controller( - gateway_client: GatewayClient, + gateway_client: GatewayClient, shutdown: TaskClient, ) -> BatchMixMessageSender { info!("Starting mix traffic controller..."); @@ -332,22 +386,32 @@ where where ::StorageError: Sync + Send, { - let persistent_storage = PersistentReplyStorage::new(backend); - let mem_store = persistent_storage - .load_state_from_backend() - .await - .map_err(|err| ClientCoreError::SurbStorageError { - source: Box::new(err), - })?; - - let store_clone = mem_store.clone(); - spawn_future(async move { - persistent_storage - .flush_on_shutdown(store_clone, shutdown) + if backend.is_active() { + log::trace!("Setup persistent reply storage"); + let persistent_storage = PersistentReplyStorage::new(backend); + let mem_store = persistent_storage + .load_state_from_backend() .await - }); + .map_err(|err| ClientCoreError::SurbStorageError { + source: Box::new(err), + })?; - Ok(mem_store) + let store_clone = mem_store.clone(); + spawn_future(async move { + persistent_storage + .flush_on_shutdown(store_clone, shutdown) + .await + }); + + Ok(mem_store) + } else { + log::trace!("Setup inactive reply storage"); + Ok(backend + .get_inactive_storage() + .map_err(|err| ClientCoreError::SurbStorageError { + source: Box::new(err), + })?) + } } pub async fn start_base(mut self) -> Result @@ -475,11 +539,13 @@ where }, client_output: ClientOutputStatus::AwaitingConsumer { client_output: ClientOutput { - shared_lane_queue_lengths, received_buffer_request_sender, }, }, - reply_controller_sender, + client_state: ClientState { + shared_lane_queue_lengths, + reply_controller_sender, + }, task_manager, }) } @@ -488,9 +554,7 @@ where pub struct BaseClient { pub client_input: ClientInputStatus, pub client_output: ClientOutputStatus, - - // it feels very wrong to put this channel here, but I can't think of any other way of passing it to the native client - pub reply_controller_sender: ReplyControllerSender, + pub client_state: ClientState, pub task_manager: TaskManager, } diff --git a/clients/client-core/src/client/base_client/non_wasm_helpers.rs b/clients/client-core/src/client/base_client/non_wasm_helpers.rs index 996dcc8fc3..efd7d41bf0 100644 --- a/clients/client-core/src/client/base_client/non_wasm_helpers.rs +++ b/clients/client-core/src/client/base_client/non_wasm_helpers.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::client::replies::reply_storage::{ - fs_backend, CombinedReplyStorage, ReplyStorageBackend, + self, fs_backend, CombinedReplyStorage, ReplyStorageBackend, }; use crate::config::DebugConfig; use crate::error::ClientCoreError; @@ -43,6 +43,14 @@ async fn setup_fresh_backend>( Ok(storage_backend) } +fn setup_inactive_backend(debug_config: &DebugConfig) -> fs_backend::Backend { + info!("creating inactive surb database"); + fs_backend::Backend::new_inactive( + debug_config.minimum_reply_surb_storage_threshold, + debug_config.maximum_reply_surb_storage_threshold, + ) +} + fn archive_corrupted_database>(db_path: P) -> io::Result<()> { let db_path = db_path.as_ref(); debug_assert!(db_path.exists()); @@ -53,7 +61,7 @@ fn archive_corrupted_database>(db_path: P) -> io::Result<()> { let new_extension = if let Some(existing_extension) = db_path.extension().and_then(|ext| ext.to_str()) { - format!("{existing_extension}.{}", suffix) + format!("{existing_extension}.{suffix}") } else { suffix }; @@ -65,23 +73,35 @@ fn archive_corrupted_database>(db_path: P) -> io::Result<()> { } pub async fn setup_fs_reply_surb_backend>( - db_path: P, + db_path: Option

, debug_config: &DebugConfig, ) -> Result { - // if the database file doesnt exist, initialise fresh storage, otherwise attempt to load the existing one - let db_path = db_path.as_ref(); - if db_path.exists() { - info!("loading existing surb database"); - match fs_backend::Backend::try_load(db_path).await { - Ok(backend) => Ok(backend), - Err(err) => { - error!("failed to setup persistent storage backend for our reply needs: {err}. We're going to create a fresh database instead. This behaviour might change in the future"); + if let Some(db_path) = db_path { + // if the database file doesnt exist, initialise fresh storage, otherwise attempt to load + // the existing one + let db_path = db_path.as_ref(); + if db_path.exists() { + info!("loading existing surb database"); + match fs_backend::Backend::try_load(db_path).await { + Ok(backend) => Ok(backend), + Err(err) => { + error!("failed to setup persistent storage backend for our reply needs: {err}. We're going to create a fresh database instead. This behaviour might change in the future"); - archive_corrupted_database(db_path)?; - setup_fresh_backend(db_path, debug_config).await + archive_corrupted_database(db_path)?; + setup_fresh_backend(db_path, debug_config).await + } } + } else { + setup_fresh_backend(db_path, debug_config).await } } else { - setup_fresh_backend(db_path, debug_config).await + Ok(setup_inactive_backend(debug_config)) + } +} + +pub fn setup_empty_reply_surb_backend(debug_config: &DebugConfig) -> reply_storage::Empty { + reply_storage::Empty { + min_surb_threshold: debug_config.minimum_reply_surb_storage_threshold, + max_surb_threshold: debug_config.maximum_reply_surb_storage_threshold, } } diff --git a/clients/client-core/src/client/key_manager.rs b/clients/client-core/src/client/key_manager.rs index 6fa264f43f..da0b9f5cbf 100644 --- a/clients/client-core/src/client/key_manager.rs +++ b/clients/client-core/src/client/key_manager.rs @@ -17,6 +17,7 @@ use std::sync::Arc; // use the old key after new one was issued. // Remember that Arc has Deref implementation for T +#[derive(Clone)] pub struct KeyManager { /// identity key associated with the client instance. identity_keypair: Arc, @@ -41,9 +42,6 @@ pub struct KeyManager { */ impl KeyManager { - // this is actually **NOT** dead code - // I have absolutely no idea why the compiler insists it's unused. The call happens during client::init::execute - #[allow(dead_code)] /// Creates new instance of a [`KeyManager`] pub fn new(rng: &mut R) -> Self where @@ -57,16 +55,22 @@ impl KeyManager { } } - // this is actually **NOT** dead code - // I have absolutely no idea why the compiler insists it's unused. The call happens during client::init::execute - #[allow(dead_code)] - /// After shared key with the gateway is derived, puts its ownership to this instance of a [`KeyManager`]. - pub fn insert_gateway_shared_key(&mut self, gateway_shared_key: Arc) { - self.gateway_shared_key = Some(gateway_shared_key) + pub fn from_keys( + id_keypair: identity::KeyPair, + enc_keypair: encryption::KeyPair, + gateway_shared_key: SharedKeys, + ack_key: AckKey, + ) -> Self { + Self { + identity_keypair: Arc::new(id_keypair), + encryption_keypair: Arc::new(enc_keypair), + gateway_shared_key: Some(Arc::new(gateway_shared_key)), + ack_key: Arc::new(ack_key), + } } - /// Loads previously stored keys from the disk. - pub fn load_keys(client_pathfinder: &ClientKeyPathfinder) -> io::Result { + /// Loads previously stored client keys from the disk. + fn load_client_keys(client_pathfinder: &ClientKeyPathfinder) -> io::Result { let identity_keypair: identity::KeyPair = pemstore::load_keypair(&pemstore::KeyPairPath::new( client_pathfinder.private_identity_key().to_owned(), @@ -78,24 +82,51 @@ impl KeyManager { client_pathfinder.public_encryption_key().to_owned(), ))?; - let gateway_shared_key: SharedKeys = - pemstore::load_key(client_pathfinder.gateway_shared_key())?; - let ack_key: AckKey = pemstore::load_key(client_pathfinder.ack_key())?; - // TODO: ack key is never stored so it is generated now. But perhaps it should be stored - // after all for consistency sake? Ok(KeyManager { identity_keypair: Arc::new(identity_keypair), encryption_keypair: Arc::new(encryption_keypair), - gateway_shared_key: Some(Arc::new(gateway_shared_key)), + gateway_shared_key: None, ack_key: Arc::new(ack_key), }) } - // this is actually **NOT** dead code - // I have absolutely no idea why the compiler insists it's unused. The call happens during client::init::execute - #[allow(dead_code)] + /// Loads previously stored keys from the disk. Fails if not all, including the shared gateway + /// key, is available. + pub fn load_keys(client_pathfinder: &ClientKeyPathfinder) -> io::Result { + let mut key_manager = Self::load_client_keys(client_pathfinder)?; + + let gateway_shared_key: SharedKeys = + pemstore::load_key(client_pathfinder.gateway_shared_key())?; + + key_manager.gateway_shared_key = Some(Arc::new(gateway_shared_key)); + + Ok(key_manager) + } + + /// Loads previously stored keys from the disk. Fails if client keys are not availabe, but the + /// shared gateway key is optional. + pub fn load_keys_but_gateway_is_optional( + client_pathfinder: &ClientKeyPathfinder, + ) -> io::Result { + let mut key_manager = Self::load_client_keys(client_pathfinder)?; + + let gateway_shared_key: Result = + pemstore::load_key(client_pathfinder.gateway_shared_key()); + + // It's ok if the gateway key was not found + let gateway_shared_key = match gateway_shared_key { + Err(err) if err.kind() == io::ErrorKind::NotFound => Ok(None), + Err(err) => Err(err), + Ok(key) => Ok(Some(key)), + }?; + + key_manager.gateway_shared_key = gateway_shared_key.map(Arc::new); + + Ok(key_manager) + } + /// Stores all available keys on the disk. // While perhaps there is no much point in storing the `AckKey` on the disk, // it is done so for the consistency sake so that you wouldn't require an rng instance @@ -119,7 +150,7 @@ impl KeyManager { pemstore::store_key(self.ack_key.as_ref(), client_pathfinder.ack_key())?; match self.gateway_shared_key.as_ref() { - None => warn!("No gateway shared key available to store!"), + None => debug!("No gateway shared key available to store!"), Some(gate_key) => { pemstore::store_key(gate_key.as_ref(), client_pathfinder.gateway_shared_key())? } @@ -128,16 +159,57 @@ impl KeyManager { Ok(()) } + pub fn store_gateway_key(&self, client_pathfinder: &ClientKeyPathfinder) -> io::Result<()> { + match self.gateway_shared_key.as_ref() { + None => { + return Err(io::Error::new( + io::ErrorKind::Other, + "trying to store a non-existing key", + )) + } + Some(gate_key) => { + pemstore::store_key(gate_key.as_ref(), client_pathfinder.gateway_shared_key())? + } + } + + Ok(()) + } + + /// Overwrite the existing identity keypair + pub fn set_identity_keypair(&mut self, id_keypair: identity::KeyPair) { + self.identity_keypair = Arc::new(id_keypair); + } + /// Gets an atomically reference counted pointer to [`identity::KeyPair`]. pub fn identity_keypair(&self) -> Arc { Arc::clone(&self.identity_keypair) } + /// Overwrite the existing encryption keypair + pub fn set_encryption_keypair(&mut self, enc_keypair: encryption::KeyPair) { + self.encryption_keypair = Arc::new(enc_keypair); + } + /// Gets an atomically reference counted pointer to [`encryption::KeyPair`]. pub fn encryption_keypair(&self) -> Arc { Arc::clone(&self.encryption_keypair) } + /// Overwrite the existing ack key + pub fn set_ack_key(&mut self, ack_key: AckKey) { + self.ack_key = Arc::new(ack_key); + } + + /// Gets an atomically reference counted pointer to [`AckKey`]. + pub fn ack_key(&self) -> Arc { + Arc::clone(&self.ack_key) + } + + /// After shared key with the gateway is derived, puts its ownership to this instance of a [`KeyManager`]. + pub fn insert_gateway_shared_key(&mut self, gateway_shared_key: Arc) { + self.gateway_shared_key = Some(gateway_shared_key) + } + /// Gets an atomically reference counted pointer to [`SharedKey`]. // since this function is not fully public, it is not expected to be used externally and // hence it's up to us to ensure it's called in correct context @@ -149,12 +221,7 @@ impl KeyManager { ) } - pub fn gateway_key_set(&self) -> bool { + pub fn is_gateway_key_set(&self) -> bool { self.gateway_shared_key.is_some() } - - /// Gets an atomically reference counted pointer to [`AckKey`]. - pub fn ack_key(&self) -> Arc { - Arc::clone(&self.ack_key) - } } diff --git a/clients/client-core/src/client/mix_traffic.rs b/clients/client-core/src/client/mix_traffic.rs index 94944cb481..05d44824e7 100644 --- a/clients/client-core/src/client/mix_traffic.rs +++ b/clients/client-core/src/client/mix_traffic.rs @@ -2,9 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 use crate::spawn_future; +#[cfg(target_arch = "wasm32")] +use gateway_client::wasm_mockups::CosmWasmClient; use gateway_client::GatewayClient; use log::*; use nymsphinx::forwarding::packet::MixPacket; +#[cfg(not(target_arch = "wasm32"))] +use validator_client::nyxd::CosmWasmClient; pub type BatchMixMessageSender = tokio::sync::mpsc::Sender>; pub type BatchMixMessageReceiver = tokio::sync::mpsc::Receiver>; @@ -13,10 +17,10 @@ pub type BatchMixMessageReceiver = tokio::sync::mpsc::Receiver>; pub const MIX_MESSAGE_RECEIVER_BUFFER_SIZE: usize = 32; const MAX_FAILURE_COUNT: usize = 100; -pub struct MixTrafficController { +pub struct MixTrafficController { // TODO: most likely to be replaced by some higher level construct as // later on gateway_client will need to be accessible by other entities - gateway_client: GatewayClient, + gateway_client: GatewayClient, mix_rx: BatchMixMessageReceiver, // TODO: this is temporary work-around. @@ -24,8 +28,13 @@ pub struct MixTrafficController { consecutive_gateway_failure_count: usize, } -impl MixTrafficController { - pub fn new(gateway_client: GatewayClient) -> (MixTrafficController, BatchMixMessageSender) { +impl MixTrafficController +where + C: CosmWasmClient + Sync + Send + Clone + 'static, +{ + pub fn new( + gateway_client: GatewayClient, + ) -> (MixTrafficController, BatchMixMessageSender) { let (sphinx_message_sender, sphinx_message_receiver) = tokio::sync::mpsc::channel(MIX_MESSAGE_RECEIVER_BUFFER_SIZE); ( @@ -57,7 +66,7 @@ impl MixTrafficController { if self.consecutive_gateway_failure_count == MAX_FAILURE_COUNT { // todo: in the future this should initiate a 'graceful' shutdown or try // to reconnect? - panic!("failed to send sphinx packet to the gateway {} times in a row - assuming the gateway is dead. Can't do anything about it yet :(", MAX_FAILURE_COUNT) + panic!("failed to send sphinx packet to the gateway {MAX_FAILURE_COUNT} times in a row - assuming the gateway is dead. Can't do anything about it yet :(") } } Ok(_) => { diff --git a/clients/client-core/src/client/real_messages_control/acknowledgement_control/action_controller.rs b/clients/client-core/src/client/real_messages_control/acknowledgement_control/action_controller.rs index c65592b2f6..fe79e24183 100644 --- a/clients/client-core/src/client/real_messages_control/acknowledgement_control/action_controller.rs +++ b/clients/client-core/src/client/real_messages_control/acknowledgement_control/action_controller.rs @@ -213,7 +213,11 @@ impl ActionController { } // note: when the entry expires it's automatically removed from pending_acks_timers - fn handle_expired_ack_timer(&mut self, expired_ack: Expired) { + fn handle_expired_ack_timer( + &mut self, + expired_ack: Expired, + task_client: &mut task::TaskClient, + ) { // I'm honestly not sure how to handle it, because getting it means other things in our // system are already misbehaving. If we ever see this panic, then I guess we should worry // about it. Perhaps just reschedule it at later point? @@ -231,9 +235,16 @@ impl ActionController { // downgrading an arc and then upgrading vs cloning is difference of 30ns vs 15ns // so it's literally a NO difference while it might prevent us from unnecessarily // resending data (in maybe 1 in 1 million cases, but it's something) - self.retransmission_sender + if self + .retransmission_sender .unbounded_send(Arc::downgrade(pending_ack_data)) - .unwrap() + .is_err() + { + assert!( + task_client.is_shutdown_poll(), + "Failed to send pending ack for retransmission" + ); + } } else { // this shouldn't cause any issues but shouldn't have happened to begin with! error!("An already removed pending ack has expired") @@ -264,7 +275,7 @@ impl ActionController { } }, expired_ack = self.pending_acks_timers.next() => match expired_ack { - Some(expired_ack) => self.handle_expired_ack_timer(expired_ack), + Some(expired_ack) => self.handle_expired_ack_timer(expired_ack, &mut shutdown), None => { log::trace!("ActionController: Stopping since ack channel closed"); break; @@ -275,10 +286,7 @@ impl ActionController { } } } - #[cfg(not(target_arch = "wasm32"))] - tokio::time::timeout(Duration::from_secs(5), shutdown.recv()) - .await - .expect("Task stopped without shutdown called"); + shutdown.recv_timeout().await; log::debug!("ActionController: Exiting"); } } diff --git a/clients/client-core/src/client/real_messages_control/real_traffic_stream.rs b/clients/client-core/src/client/real_messages_control/real_traffic_stream.rs index 2abbd4661e..d601e9c24a 100644 --- a/clients/client-core/src/client/real_messages_control/real_traffic_stream.rs +++ b/clients/client-core/src/client/real_messages_control/real_traffic_stream.rs @@ -471,14 +471,10 @@ where let mult = self.sending_delay_controller.current_multiplier(); let delay = self.current_average_message_sending_delay().as_millis(); let status_str = if self.config.disable_poisson_packet_distribution { - format!( - "Status: {lanes} lanes, backlog: {:.2} kiB ({packets}), no delay", - backlog - ) + format!("Status: {lanes} lanes, backlog: {backlog:.2} kiB ({packets}), no delay") } else { format!( - "Status: {lanes} lanes, backlog: {:.2} kiB ({packets}), avg delay: {}ms ({mult})", - backlog, delay + "Status: {lanes} lanes, backlog: {backlog:.2} kiB ({packets}), avg delay: {delay}ms ({mult})" ) }; if packets > 1000 { @@ -535,9 +531,7 @@ where } } } - tokio::time::timeout(Duration::from_secs(5), shutdown.recv()) - .await - .expect("Task stopped without shutdown called"); + shutdown.recv_timeout().await; } #[cfg(target_arch = "wasm32")] diff --git a/clients/client-core/src/client/replies/reply_controller/requests.rs b/clients/client-core/src/client/replies/reply_controller/requests.rs index 1f47f2ca07..6b910ebde2 100644 --- a/clients/client-core/src/client/replies/reply_controller/requests.rs +++ b/clients/client-core/src/client/replies/reply_controller/requests.rs @@ -99,6 +99,24 @@ impl ReplyControllerSender { } } +pub struct ReplyQueueLengths { + reply_controller_sender: ReplyControllerSender, +} + +impl ReplyQueueLengths { + pub fn new(reply_controller_sender: ReplyControllerSender) -> Self { + Self { + reply_controller_sender, + } + } + + pub async fn get_lane_queue_length(&self, connection_id: ConnectionId) -> usize { + self.reply_controller_sender + .get_lane_queue_length(connection_id) + .await + } +} + pub(crate) type ReplyControllerReceiver = mpsc::UnboundedReceiver; #[derive(Debug)] diff --git a/clients/client-core/src/client/replies/reply_storage/backend/browser_backend.rs b/clients/client-core/src/client/replies/reply_storage/backend/browser_backend.rs index 9711ea759f..1d37ddb043 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/browser_backend.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/browser_backend.rs @@ -7,6 +7,7 @@ use async_trait::async_trait; // well, right now we don't have the browser storage : ( // so we keep everything in memory +#[derive(Debug)] pub struct Backend { empty: Empty, } @@ -40,4 +41,8 @@ impl ReplyStorageBackend for Backend { async fn load_surb_storage(&self) -> Result { self.empty.load_surb_storage().await } + + fn get_inactive_storage(&self) -> Result { + self.empty.get_inactive_storage() + } } diff --git a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/error.rs b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/error.rs index 8164762123..824b67e019 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/error.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/error.rs @@ -10,6 +10,12 @@ pub enum StorageError { #[error("the provided database path doesn't have a filename defined")] DatabasePathWithoutFilename { provided_path: PathBuf }, + #[error("unable to create the directory for the database")] + DatabasePathUnableToCreateParentDirectory { + provided_path: PathBuf, + source: io::Error, + }, + #[error("failed to rename our databse file - {source}")] DatabaseRenameError { #[source] diff --git a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/manager.rs b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/manager.rs index 578c0021a3..40c4da18fa 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/manager.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/manager.rs @@ -20,6 +20,16 @@ impl StorageManager { database_path: P, fresh: bool, ) -> Result { + // ensure the whole directory structure exists + if let Some(parent_dir) = database_path.as_ref().parent() { + std::fs::create_dir_all(parent_dir).map_err(|source| { + StorageError::DatabasePathUnableToCreateParentDirectory { + provided_path: database_path.as_ref().to_path_buf(), + source, + } + })?; + } + let mut opts = sqlx::sqlite::SqliteConnectOptions::new() .filename(database_path) .create_if_missing(fresh); diff --git a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/mod.rs b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/mod.rs index 9fd48bcd2c..931c2f925f 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/mod.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/mod.rs @@ -22,11 +22,49 @@ mod error; mod manager; mod models; +#[derive(Debug)] +enum StorageManagerState { + Storage(StorageManager), + Inactive(InactiveMetadata), +} + +// When the storage backaed is initialized as inactive, it will still contain metadata parameters +// that will be needed when the in-mem storage is fetched for use. +#[derive(Debug)] +struct InactiveMetadata { + pub minimum_reply_surb_storage_threshold: usize, + pub maximum_reply_surb_storage_threshold: usize, +} + +impl StorageManagerState { + fn get(&self) -> &StorageManager { + match self { + StorageManagerState::Storage(manager) => manager, + StorageManagerState::Inactive(_) => { + panic!("tried to get storage of an inactive backend") + } + } + } + + fn get_mut(&mut self) -> &mut StorageManager { + match self { + StorageManagerState::Storage(manager) => manager, + StorageManagerState::Inactive(_) => { + panic!("tried to get storage of an inactive backend") + } + } + } + + fn is_active(&self) -> bool { + matches!(self, StorageManagerState::Storage(_)) + } +} + #[derive(Debug)] pub struct Backend { temporary_old_path: Option, database_path: PathBuf, - manager: StorageManager, + manager: StorageManagerState, } impl Backend { @@ -40,17 +78,32 @@ impl Backend { }); } + let manager = StorageManager::init(database_path, true).await?; + manager.create_status_table().await?; + let backend = Backend { temporary_old_path: None, database_path: owned_path, - manager: StorageManager::init(database_path, true).await?, + manager: StorageManagerState::Storage(manager), }; - backend.manager.create_status_table().await?; - Ok(backend) } + pub fn new_inactive( + minimum_reply_surb_storage_threshold: usize, + maximum_reply_surb_storage_threshold: usize, + ) -> Self { + Backend { + temporary_old_path: None, + database_path: PathBuf::new(), + manager: StorageManagerState::Inactive(InactiveMetadata { + minimum_reply_surb_storage_threshold, + maximum_reply_surb_storage_threshold, + }), + } + } + pub async fn try_load>(database_path: P) -> Result { let owned_path: PathBuf = database_path.as_ref().into(); if owned_path.file_name().is_none() { @@ -119,12 +172,12 @@ impl Backend { Ok(Backend { temporary_old_path: None, database_path: owned_path, - manager, + manager: StorageManagerState::Storage(manager), }) } async fn close_pool(&mut self) { - self.manager.connection_pool.close().await; + self.manager.get_mut().connection_pool.close().await; } async fn rotate(&mut self) -> Result<(), StorageError> { @@ -143,8 +196,9 @@ impl Backend { fs::rename(&self.database_path, &temp_old) .map_err(|err| StorageError::DatabaseRenameError { source: err })?; - self.manager = StorageManager::init(&self.database_path, true).await?; - self.manager.create_status_table().await?; + self.manager = + StorageManagerState::Storage(StorageManager::init(&self.database_path, true).await?); + self.manager.get_mut().create_status_table().await?; self.temporary_old_path = Some(temp_old); Ok(()) @@ -161,26 +215,27 @@ impl Backend { } async fn start_storage_flush(&self) -> Result<(), StorageError> { - Ok(self.manager.set_flush_status(true).await?) + Ok(self.manager.get().set_flush_status(true).await?) } async fn end_storage_flush(&self) -> Result<(), StorageError> { self.manager + .get() .set_previous_flush_timestamp(OffsetDateTime::now_utc().unix_timestamp()) .await?; - Ok(self.manager.set_flush_status(false).await?) + Ok(self.manager.get().set_flush_status(false).await?) } async fn start_client_use(&self) -> Result<(), StorageError> { - Ok(self.manager.set_client_in_use_status(true).await?) + Ok(self.manager.get().set_client_in_use_status(true).await?) } async fn stop_client_use(&self) -> Result<(), StorageError> { - Ok(self.manager.set_client_in_use_status(false).await?) + Ok(self.manager.get().set_client_in_use_status(false).await?) } async fn get_stored_tags(&self) -> Result { - let stored = self.manager.get_tags().await?; + let stored = self.manager.get().get_tags().await?; // stop at the first instance of corruption. if even a single entry is malformed, // something weird has happened and we can't trust the rest of the data @@ -196,6 +251,7 @@ impl Backend { for map_ref in tags.as_raw_iter() { let (recipient, tag) = map_ref.pair(); self.manager + .get() .insert_tag(StoredSenderTag::new(*recipient, *tag)) .await?; } @@ -203,7 +259,7 @@ impl Backend { } async fn get_stored_reply_keys(&self) -> Result { - let stored = self.manager.get_reply_keys().await?; + let stored = self.manager.get().get_reply_keys().await?; // stop at the first instance of corruption. if even a single entry is malformed, // something weird has happened and we can't trust the rest of the data @@ -219,6 +275,7 @@ impl Backend { for map_ref in reply_keys.as_raw_iter() { let (digest, key) = map_ref.pair(); self.manager + .get() .insert_reply_key(StoredReplyKey::new(*digest, *key)) .await?; } @@ -226,7 +283,7 @@ impl Backend { } async fn get_stored_reply_surbs(&self) -> Result { - let surb_senders = self.manager.get_surb_senders().await?; + let surb_senders = self.manager.get().get_surb_senders().await?; let metadata = self.get_reply_surb_storage_metadata().await?; let mut received_surbs = Vec::with_capacity(surb_senders.len()); @@ -236,6 +293,7 @@ impl Backend { sender.try_into()?; let stored_surbs = self .manager + .get() .get_reply_surbs(sender_id) .await? .into_iter() @@ -263,6 +321,7 @@ impl Backend { let (tag, received_surbs) = map_ref.pair(); let sender_id = self .manager + .get() .insert_surb_sender(StoredSurbSender::new( *tag, received_surbs.surbs_last_received_at(), @@ -271,6 +330,7 @@ impl Backend { for reply_surb in received_surbs.surbs_ref() { self.manager + .get() .insert_reply_surb(StoredReplySurb::new(sender_id, reply_surb)) .await? } @@ -282,6 +342,7 @@ impl Backend { &self, ) -> Result { self.manager + .get() .get_reply_surb_storage_metadata() .await .map_err(Into::into) @@ -292,6 +353,7 @@ impl Backend { reply_surbs: &ReceivedReplySurbsMap, ) -> Result<(), StorageError> { self.manager + .get() .insert_reply_surb_storage_metadata(ReplySurbStorageMetadata::new( reply_surbs.min_surb_threshold(), reply_surbs.max_surb_threshold(), @@ -305,6 +367,10 @@ impl Backend { impl ReplyStorageBackend for Backend { type StorageError = error::StorageError; + fn is_active(&self) -> bool { + self.manager.is_active() + } + async fn start_storage_session(&self) -> Result<(), Self::StorageError> { self.start_client_use().await } @@ -342,6 +408,18 @@ impl ReplyStorageBackend for Backend { Ok(CombinedReplyStorage::load(reply_keys, reply_surbs, tags)) } + fn get_inactive_storage(&self) -> Result { + match self.manager { + StorageManagerState::Storage(_) => { + panic!("tried to get inactive storage from an active storage backend") + } + StorageManagerState::Inactive(ref state) => Ok(CombinedReplyStorage::new( + state.minimum_reply_surb_storage_threshold, + state.maximum_reply_surb_storage_threshold, + )), + } + } + async fn stop_storage_session(self) -> Result<(), Self::StorageError> { self.stop_client_use().await } diff --git a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/models.rs b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/models.rs index 65088ad05e..8b7271ed93 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/models.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/fs_backend/models.rs @@ -44,8 +44,7 @@ impl TryFrom for (RecipientBytes, AnonymousSenderTag) { let Ok(sender_tag_bytes) = value.tag.try_into() else { return Err(StorageError::CorruptedData { details: format!( - "the retrieved sender tag has length of {tag_len} while {} was expected", - SENDER_TAG_SIZE + "the retrieved sender tag has length of {tag_len} while {SENDER_TAG_SIZE} was expected", ), }); }; @@ -132,8 +131,7 @@ impl TryFrom for (AnonymousSenderTag, i64) { let Ok(sender_tag_bytes) = value.tag.try_into() else { return Err(StorageError::CorruptedData { details: format!( - "the retrieved sender tag has length of {tag_len} while {} was expected", - SENDER_TAG_SIZE + "the retrieved sender tag has length of {tag_len} while {SENDER_TAG_SIZE} was expected", ), }); }; diff --git a/clients/client-core/src/client/replies/reply_storage/backend/mod.rs b/clients/client-core/src/client/replies/reply_storage/backend/mod.rs index d80231ae1e..ea26bc1352 100644 --- a/clients/client-core/src/client/replies/reply_storage/backend/mod.rs +++ b/clients/client-core/src/client/replies/reply_storage/backend/mod.rs @@ -19,10 +19,11 @@ pub mod fs_backend; #[error("no information provided")] pub struct UndefinedError; +#[derive(Debug)] pub struct Empty { // we need to keep 'basic' metadata here to "load" the CombinedReplyStorage - min_surb_threshold: usize, - max_surb_threshold: usize, + pub min_surb_threshold: usize, + pub max_surb_threshold: usize, } #[async_trait] @@ -49,12 +50,23 @@ impl ReplyStorageBackend for Empty { self.max_surb_threshold, )) } + + fn get_inactive_storage(&self) -> Result { + Ok(CombinedReplyStorage::new( + self.min_surb_threshold, + self.max_surb_threshold, + )) + } } #[async_trait] pub trait ReplyStorageBackend: Sized { type StorageError: Error + 'static; + fn is_active(&self) -> bool { + true + } + async fn start_storage_session(&self) -> Result<(), Self::StorageError> { Ok(()) } @@ -72,6 +84,11 @@ pub trait ReplyStorageBackend: Sized { async fn load_surb_storage(&self) -> Result; + /// In the case the storage backend is initialized in an inactive state (persisting data is + /// disabled), we might still need to fetch the (in-mem) storage and the parameters it was + /// created with. + fn get_inactive_storage(&self) -> Result; + async fn stop_storage_session(self) -> Result<(), Self::StorageError> { Ok(()) } diff --git a/clients/client-core/src/config/mod.rs b/clients/client-core/src/config/mod.rs index 1d3547dbd3..df1e0aa250 100644 --- a/clients/client-core/src/config/mod.rs +++ b/clients/client-core/src/config/mod.rs @@ -88,6 +88,7 @@ impl Config { Config::default().with_id(id) } + #[must_use] pub fn with_id>(mut self, id: S) -> Self where T: NymConfig, diff --git a/clients/client-core/src/config/persistence/key_pathfinder.rs b/clients/client-core/src/config/persistence/key_pathfinder.rs index d5dda75a27..70bfe3610f 100644 --- a/clients/client-core/src/config/persistence/key_pathfinder.rs +++ b/clients/client-core/src/config/persistence/key_pathfinder.rs @@ -7,12 +7,12 @@ use std::path::{Path, PathBuf}; #[derive(Debug)] pub struct ClientKeyPathfinder { - identity_private_key: PathBuf, - identity_public_key: PathBuf, - encryption_private_key: PathBuf, - encryption_public_key: PathBuf, - gateway_shared_key: PathBuf, - ack_key: PathBuf, + pub identity_private_key: PathBuf, + pub identity_public_key: PathBuf, + pub encryption_private_key: PathBuf, + pub encryption_public_key: PathBuf, + pub gateway_shared_key: PathBuf, + pub ack_key: PathBuf, } impl ClientKeyPathfinder { @@ -22,8 +22,8 @@ impl ClientKeyPathfinder { ClientKeyPathfinder { identity_private_key: config_dir.join("private_identity.pem"), identity_public_key: config_dir.join("public_identity.pem"), - encryption_private_key: config_dir.join("public_encryption.pem"), - encryption_public_key: config_dir.join("private_encryption.pem"), + encryption_private_key: config_dir.join("private_encryption.pem"), + encryption_public_key: config_dir.join("public_encryption.pem"), gateway_shared_key: config_dir.join("gateway_shared.pem"), ack_key: config_dir.join("ack_key.pem"), } @@ -40,6 +40,28 @@ impl ClientKeyPathfinder { } } + pub fn any_file_exists(&self) -> bool { + matches!(self.identity_public_key.try_exists(), Ok(true)) + || matches!(self.identity_private_key.try_exists(), Ok(true)) + || matches!(self.encryption_public_key.try_exists(), Ok(true)) + || matches!(self.encryption_private_key.try_exists(), Ok(true)) + || matches!(self.gateway_shared_key.try_exists(), Ok(true)) + || matches!(self.ack_key.try_exists(), Ok(true)) + } + + pub fn any_file_exists_and_return(&self) -> Option { + file_exists(&self.identity_public_key) + .or_else(|| file_exists(&self.identity_private_key)) + .or_else(|| file_exists(&self.encryption_public_key)) + .or_else(|| file_exists(&self.encryption_private_key)) + .or_else(|| file_exists(&self.gateway_shared_key)) + .or_else(|| file_exists(&self.ack_key)) + } + + pub fn gateway_key_file_exists(&self) -> bool { + matches!(self.gateway_shared_key.try_exists(), Ok(true)) + } + pub fn private_identity_key(&self) -> &Path { &self.identity_private_key } @@ -64,3 +86,10 @@ impl ClientKeyPathfinder { &self.ack_key } } + +fn file_exists(path: &Path) -> Option { + if matches!(path.try_exists(), Ok(true)) { + return Some(path.to_path_buf()); + } + None +} diff --git a/clients/client-core/src/error.rs b/clients/client-core/src/error.rs index 07bd9442ec..de08bb3f20 100644 --- a/clients/client-core/src/error.rs +++ b/clients/client-core/src/error.rs @@ -55,6 +55,9 @@ pub enum ClientCoreError { #[error("The address of the gateway is unknown - did you run init?")] GatwayAddressUnknown, + #[error("failed to register receiver for reconstructed mixnet messages")] + FailedToRegisterReceiver, + #[error("Unexpected exit")] UnexpectedExit, } @@ -62,8 +65,10 @@ pub enum ClientCoreError { /// Set of messages that the client can send to listeners via the task manager #[derive(thiserror::Error, Debug)] pub enum ClientCoreStatusMessage { + // NOTE: The nym-connect frontend listens for these strings, so don't change them until we have a more robust mechanism in place #[error("The connected gateway is slow, or the connection to it is slow")] GatewayIsSlow, + // NOTE: The nym-connect frontend listens for these strings, so don't change them until we have a more robust mechanism in place #[error("The connected gateway is very slow, or the connection to it is very slow")] GatewayIsVerySlow, } diff --git a/clients/client-core/src/init/helpers.rs b/clients/client-core/src/init/helpers.rs index 01318e3b3c..cbc25000b6 100644 --- a/clients/client-core/src/init/helpers.rs +++ b/clients/client-core/src/init/helpers.rs @@ -8,17 +8,21 @@ use crate::{ }; use config::NymConfig; use crypto::asymmetric::identity; +#[cfg(target_arch = "wasm32")] +use gateway_client::wasm_mockups::SigningNyxdClient; use gateway_client::GatewayClient; use gateway_requests::registration::handshake::SharedKeys; -use rand::{rngs::OsRng, seq::SliceRandom, thread_rng}; +use rand::{seq::SliceRandom, thread_rng}; use std::{sync::Arc, time::Duration}; use tap::TapFallible; use topology::{filter::VersionFilterable, gateway}; use url::Url; +#[cfg(not(target_arch = "wasm32"))] +use validator_client::nyxd::SigningNyxdClient; pub(super) async fn query_gateway_details( validator_servers: Vec, - chosen_gateway_id: Option, + chosen_gateway_id: Option, ) -> Result { let nym_api = validator_servers .choose(&mut thread_rng()) @@ -40,7 +44,7 @@ pub(super) async fn query_gateway_details( if let Some(gateway_id) = chosen_gateway_id { filtered_gateways .iter() - .find(|gateway| gateway.identity_key.to_base58_string() == gateway_id) + .find(|gateway| gateway.identity_key == gateway_id) .ok_or_else(|| ClientCoreError::NoGatewayWithId(gateway_id.to_string())) .cloned() } else { @@ -51,12 +55,12 @@ pub(super) async fn query_gateway_details( } } -async fn register_with_gateway( +pub(super) async fn register_with_gateway( gateway: &gateway::Node, our_identity: Arc, ) -> Result, ClientCoreError> { let timeout = Duration::from_millis(1500); - let mut gateway_client = GatewayClient::new_init( + let mut gateway_client: GatewayClient = GatewayClient::new_init( gateway.clients_address(), gateway.identity_key, gateway.owner.clone(), @@ -74,20 +78,13 @@ async fn register_with_gateway( Ok(shared_keys) } -pub(super) async fn register_with_gateway_and_store_keys( - gateway_details: gateway::Node, +pub(super) fn store_keys( + key_manager: &KeyManager, config: &Config, ) -> Result<(), ClientCoreError> where T: NymConfig, { - let mut rng = OsRng; - let mut key_manager = KeyManager::new(&mut rng); - - let shared_keys = - register_with_gateway(&gateway_details, key_manager.identity_keypair()).await?; - key_manager.insert_gateway_shared_key(shared_keys); - let pathfinder = ClientKeyPathfinder::new_from_config(config); Ok(key_manager .store_keys(&pathfinder) diff --git a/clients/client-core/src/init/mod.rs b/clients/client-core/src/init/mod.rs index 4d012d366b..9af8a7c1bc 100644 --- a/clients/client-core/src/init/mod.rs +++ b/clients/client-core/src/init/mod.rs @@ -6,23 +6,26 @@ use std::fmt::Display; use nymsphinx::addressing::{clients::Recipient, nodes::NodeIdentity}; +use rand::rngs::OsRng; use serde::Serialize; use tap::TapFallible; use config::NymConfig; use crypto::asymmetric::{encryption, identity}; +use url::Url; +use crate::client::key_manager::KeyManager; use crate::{ config::{ persistence::key_pathfinder::ClientKeyPathfinder, ClientCoreConfigTrait, Config, GatewayEndpointConfig, }, error::ClientCoreError, - init::helpers::{query_gateway_details, register_with_gateway_and_store_keys}, }; mod helpers; +/// Struct describing the results of the client initialization procedure. #[derive(Debug, Serialize)] pub struct InitResults { version: String, @@ -60,12 +63,44 @@ impl Display for InitResults { } } -/// Convenience function for setting up the gateway for a client. Depending on the arguments given -/// it will do the sensible thing. -pub async fn setup_gateway( +/// Create a new set of client keys. +pub fn new_client_keys() -> KeyManager { + let mut rng = OsRng; + KeyManager::new(&mut rng) +} + +/// Authenticate and register with a gateway. +/// Either pick one at random by querying the available gateways from the nym-api, or use the +/// chosen one if it's among the available ones. +/// The shared key is added to the supplied `KeyManager` and the endpoint details are returned. +pub async fn register_with_gateway( + key_manager: &mut KeyManager, + nym_api_endpoints: Vec, + chosen_gateway_id: Option, +) -> Result { + // Get the gateway details of the gateway we will use + let gateway = helpers::query_gateway_details(nym_api_endpoints, chosen_gateway_id).await?; + log::debug!("Querying gateway gives: {}", gateway); + + let our_identity = key_manager.identity_keypair(); + + // Establish connection, authenticate and generate keys for talking with the gateway + let shared_keys = helpers::register_with_gateway(&gateway, our_identity).await?; + key_manager.insert_gateway_shared_key(shared_keys); + + Ok(gateway.into()) +} + +/// Convenience function for setting up the gateway for a client given a `Config`. Depending on the +/// arguments given it will do the sensible thing. Either it will +/// +/// a. Reuse existing gateway configuration from storage. +/// b. Create a new gateway configuration but keep existing keys. This assumes that the caller +/// knows what they are doing and that the keys match the requested gateway. +/// c. Create a new gateway configuration with a newly registered gateway and keys. +pub async fn setup_gateway_from_config( register_gateway: bool, - // TODO: this should get refactored to instead take Option - user_chosen_gateway_id: Option, + user_chosen_gateway_id: Option, config: &Config, ) -> Result where @@ -73,62 +108,47 @@ where T: NymConfig, { let id = config.get_id(); - if register_gateway { - register_with_gateway(user_chosen_gateway_id, config).await - } else if let Some(user_chosen_gateway_id) = user_chosen_gateway_id { - config_gateway_with_existing_keys(user_chosen_gateway_id, config).await - } else { - reuse_existing_gateway_config::(&id) + + // If we are not going to register gateway, and an explicitly chosed gateway is not passed in, + // load the existing configuration file + if !register_gateway && user_chosen_gateway_id.is_none() { + println!("Not registering gateway, will reuse existing config and keys"); + return load_existing_gateway_config::(&id); } -} -/// Get the gateway details by querying the validator-api. Either pick one at random or use -/// the chosen one if it's among the available ones. -/// Saves keys to disk, specified by the paths in `config`. -pub async fn register_with_gateway( - user_chosen_gateway_id: Option, - config: &Config, -) -> Result -where - T: NymConfig, -{ - println!("Configuring gateway"); + // Else, we preceed by querying the nym-api let gateway = - query_gateway_details(config.get_nym_api_endpoints(), user_chosen_gateway_id).await?; + helpers::query_gateway_details(config.get_nym_api_endpoints(), user_chosen_gateway_id) + .await?; log::debug!("Querying gateway gives: {}", gateway); - // Registering with gateway by setting up and writing shared keys to disk - log::trace!("Registering gateway"); - register_with_gateway_and_store_keys(gateway.clone(), config).await?; - println!("Saved all generated keys"); + // If we are not registering, just return this and assume the caller has the keys already and + // wants to keep the, + if !register_gateway && user_chosen_gateway_id.is_some() { + println!("Using gateway provided by user, keeping existing keys"); + return Ok(gateway.into()); + } - Ok(gateway.into()) -} + // Create new keys and derive our identity + let mut key_manager = new_client_keys(); + let our_identity = key_manager.identity_keypair(); -/// Set the gateway using the usual procedue of querying the validator-api, but don't register or -/// create any keys. -/// This assumes that the user knows what they are doing, and that the existing keys are valid for -/// the gateway being used -pub async fn config_gateway_with_existing_keys( - user_chosen_gateway_id: String, - config: &Config, -) -> Result -where - T: NymConfig, -{ - println!("Using gateway provided by user, keeping existing keys"); - let gateway = - query_gateway_details(config.get_nym_api_endpoints(), Some(user_chosen_gateway_id)).await?; - log::debug!("Querying gateway gives: {}", gateway); + // Establish connection, authenticate and generate keys for talking with the gateway + println!("Registering with new gateway"); + let shared_keys = helpers::register_with_gateway(&gateway, our_identity).await?; + key_manager.insert_gateway_shared_key(shared_keys); + + // Write all keys to storage and just return the gateway endpoint config. It is assumed that we + // will load keys from storage when actually connecting. + helpers::store_keys(&key_manager, config)?; Ok(gateway.into()) } /// Read and reuse the existing gateway configuration from a file that was generate earlier. -pub fn reuse_existing_gateway_config(id: &str) -> Result +pub fn load_existing_gateway_config(id: &str) -> Result where T: NymConfig + ClientCoreConfigTrait, { - println!("Not registering gateway, will reuse existing config and keys"); T::load_from_file(Some(id)) .map(|existing_config| existing_config.get_gateway_endpoint().clone()) .map_err(|err| { @@ -143,6 +163,20 @@ where }) } +/// Get the full client address from the client keys and the gateway identity +pub fn get_client_address( + key_manager: &KeyManager, + gateway_config: &GatewayEndpointConfig, +) -> Recipient { + Recipient::new( + *key_manager.identity_keypair().public_key(), + *key_manager.encryption_keypair().public_key(), + // TODO: below only works under assumption that gateway address == gateway id + // (which currently is true) + NodeIdentity::from_base58_string(&gateway_config.gateway_id).unwrap(), + ) +} + /// Get the client address by loading the keys from stored files. pub fn get_client_address_from_stored_keys( config: &Config, @@ -192,9 +226,9 @@ where pub fn output_to_json(init_results: &T, output_file: &str) { match std::fs::File::create(output_file) { Ok(file) => match serde_json::to_writer_pretty(file, init_results) { - Ok(_) => println!("Saved: {}", output_file), - Err(err) => eprintln!("Could not save {}: {err}", output_file), + Ok(_) => println!("Saved: {output_file}"), + Err(err) => eprintln!("Could not save {output_file}: {err}"), }, - Err(err) => eprintln!("Could not save {}: {err}", output_file), + Err(err) => eprintln!("Could not save {output_file}: {err}"), } } diff --git a/clients/credential/Cargo.toml b/clients/credential/Cargo.toml index 1fee702592..edee417191 100644 --- a/clients/credential/Cargo.toml +++ b/clients/credential/Cargo.toml @@ -13,7 +13,7 @@ rand = "0.7.3" serde = { version = "1.0", features = ["derive"] } thiserror = "1.0" url = "2.2" -tokio = { version = "1.21.2", features = ["rt-multi-thread", "net", "signal", "macros"] } # async runtime +tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal", "macros"] } # async runtime coconut-interface = { path = "../../common/coconut-interface" } config = { path = "../../common/config" } diff --git a/clients/credential/src/commands.rs b/clients/credential/src/commands.rs index f697a98d7d..a007dbf766 100644 --- a/clients/credential/src/commands.rs +++ b/clients/credential/src/commands.rs @@ -13,6 +13,7 @@ use credentials::coconut::bandwidth::{BandwidthVoucher, TOTAL_ATTRIBUTES}; use credentials::coconut::utils::obtain_aggregate_signature; use crypto::asymmetric::{encryption, identity}; use network_defaults::{NymNetworkDetails, VOUCHER_INFO}; +use validator_client::nyxd::traits::DkgQueryClient; use validator_client::nyxd::tx::Hash; use validator_client::{CoconutApiClient, Config}; @@ -80,7 +81,8 @@ pub(crate) async fn get_credential(state: &State, shared_storage: PersistentStor let network_details = NymNetworkDetails::new_from_env(); let config = Config::try_from_nym_network_details(&network_details)?; let client = validator_client::Client::new_query(config)?; - let coconut_api_clients = CoconutApiClient::all_coconut_api_clients(&client).await?; + let epoch_id = client.nyxd.get_current_epoch().await?.epoch_id; + let coconut_api_clients = CoconutApiClient::all_coconut_api_clients(&client, epoch_id).await?; let params = Parameters::new(TOTAL_ATTRIBUTES).unwrap(); let bandwidth_credential_attributes = BandwidthVoucher::new( @@ -106,6 +108,7 @@ pub(crate) async fn get_credential(state: &State, shared_storage: PersistentStor bandwidth_credential_attributes.get_private_attributes()[0].to_bs58(), bandwidth_credential_attributes.get_private_attributes()[1].to_bs58(), signature.to_bs58(), + epoch_id.to_string(), ) .await?; diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index a78d8daf4b..810655a5be 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-client" -version = "1.1.6" +version = "1.1.7" authors = ["Dave Hrycyszyn ", "Jędrzej Stuczyński "] description = "Implementation of the Nym Client" edition = "2021" @@ -23,14 +23,14 @@ url = "2.2" clap = { version = "4.0", features = ["cargo", "derive"] } dirs = "4.0" lazy_static = "1.4.0" -log = "0.4" # self explanatory +log = { workspace = true } # self explanatory pretty_env_logger = "0.4" # for formatting log messages rand = { version = "0.7.3", features = ["wasm-bindgen"] } # rng-related traits + some rng implementation to use serde = { version = "1.0.104", features = ["derive"] } # for config serialization/deserialization serde_json = "1.0" thiserror = "1.0.34" tap = "1.0.1" -tokio = { version = "1.21.2", features = ["rt-multi-thread", "net", "signal"] } # async runtime +tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] } # async runtime tokio-tungstenite = "0.14" # websocket ## internal diff --git a/clients/native/examples/websocket_binarysend.rs b/clients/native/examples/websocket_binarysend.rs index 2c22f0d03b..64791abbc6 100644 --- a/clients/native/examples/websocket_binarysend.rs +++ b/clients/native/examples/websocket_binarysend.rs @@ -85,7 +85,7 @@ async fn send_file_without_reply() { let (mut ws_stream, _) = connect_async(uri).await.unwrap(); let recipient = get_self_address(&mut ws_stream).await; - println!("our full address is: {}", recipient); + println!("our full address is: {recipient}"); let read_data = std::fs::read("examples/dummy_file").unwrap(); diff --git a/clients/native/examples/websocket_textsend.rs b/clients/native/examples/websocket_textsend.rs index a6d00aa55f..9c673c3741 100644 --- a/clients/native/examples/websocket_textsend.rs +++ b/clients/native/examples/websocket_textsend.rs @@ -36,7 +36,7 @@ async fn send_text_with_reply() { let (mut ws_stream, _) = connect_async(uri).await.unwrap(); let recipient = get_self_address(&mut ws_stream).await; - println!("our full address is: {}", recipient); + println!("our full address is: {recipient}"); let send_request = json!({ "type" : "send", @@ -45,10 +45,7 @@ async fn send_text_with_reply() { "withReplySurb": true, }); - println!( - "sending {:?} (*with* reply SURB) over the mix network...", - message - ); + println!("sending {message:?} (*with* reply SURB) over the mix network..."); let response = send_message_and_get_json_response(&mut ws_stream, send_request.to_string()).await; @@ -59,10 +56,7 @@ async fn send_text_with_reply() { "replySurb": response["replySurb"] }); - println!( - "sending {:?} (using reply SURB!) over the mix network...", - reply_message - ); + println!("sending {reply_message:?} (using reply SURB!) over the mix network..."); let response = send_message_and_get_json_response(&mut ws_stream, reply_request.to_string()).await; @@ -76,7 +70,7 @@ async fn send_text_without_reply() { let (mut ws_stream, _) = connect_async(uri).await.unwrap(); let recipient = get_self_address(&mut ws_stream).await; - println!("our full address is: {}", recipient); + println!("our full address is: {recipient}"); let send_request = json!({ "type" : "send", @@ -85,10 +79,7 @@ async fn send_text_without_reply() { "withReplySurb": false, }); - println!( - "sending {:?} (*without* reply SURB) over the mix network...", - message - ); + println!("sending {message:?} (*without* reply SURB) over the mix network..."); let response = send_message_and_get_json_response(&mut ws_stream, send_request.to_string()).await; diff --git a/clients/native/src/client/mod.rs b/clients/native/src/client/mod.rs index de6aa2748d..549f52dbe1 100644 --- a/clients/native/src/client/mod.rs +++ b/clients/native/src/client/mod.rs @@ -8,12 +8,11 @@ use crate::error::ClientError; use crate::websocket; use client_connections::TransmissionLane; use client_core::client::base_client::{ - non_wasm_helpers, BaseClientBuilder, ClientInput, ClientOutput, + non_wasm_helpers, BaseClientBuilder, ClientInput, ClientOutput, ClientState, }; use client_core::client::inbound_messages::InputMessage; use client_core::client::key_manager::KeyManager; use client_core::client::received_buffer::{ReceivedBufferMessage, ReconstructedMessagesReceiver}; -use client_core::client::replies::reply_controller::requests::ReplyControllerSender; use client_core::config::persistence::key_pathfinder::ClientKeyPathfinder; use futures::channel::mpsc; use gateway_client::bandwidth::BandwidthController; @@ -22,6 +21,7 @@ use nymsphinx::addressing::clients::Recipient; use nymsphinx::anonymous_replies::requests::AnonymousSenderTag; use nymsphinx::receiver::ReconstructedMessage; use task::TaskManager; +use validator_client::nyxd::QueryNyxdClient; pub(crate) mod config; @@ -45,50 +45,36 @@ impl SocketClient { } } - async fn create_bandwidth_controller(config: &Config) -> BandwidthController { - #[cfg(feature = "coconut")] - let bandwidth_controller = { - let details = network_defaults::NymNetworkDetails::new_from_env(); - let mut client_config = - validator_client::Config::try_from_nym_network_details(&details) - .expect("failed to construct validator client config"); - let nyxd_url = config - .get_base() - .get_validator_endpoints() - .pop() - .expect("No nyxd validator endpoint provided"); - let api_url = config - .get_base() - .get_nym_api_endpoints() - .pop() - .expect("No validator api endpoint provided"); - // overwrite env configuration with config URLs - client_config = client_config.with_urls(nyxd_url, api_url); - let client = validator_client::Client::new_query(client_config) - .expect("Could not construct query client"); - let coconut_api_clients = - validator_client::CoconutApiClient::all_coconut_api_clients(&client) - .await - .expect("Could not query api clients"); - BandwidthController::new( - credential_storage::initialise_storage(config.get_base().get_database_path()).await, - coconut_api_clients, - ) - }; - #[cfg(not(feature = "coconut"))] - let bandwidth_controller = BandwidthController::new( + async fn create_bandwidth_controller(config: &Config) -> BandwidthController { + let details = network_defaults::NymNetworkDetails::new_from_env(); + let mut client_config = validator_client::Config::try_from_nym_network_details(&details) + .expect("failed to construct validator client config"); + let nyxd_url = config + .get_base() + .get_validator_endpoints() + .pop() + .expect("No nyxd validator endpoint provided"); + let api_url = config + .get_base() + .get_nym_api_endpoints() + .pop() + .expect("No validator api endpoint provided"); + // overwrite env configuration with config URLs + client_config = client_config.with_urls(nyxd_url, api_url); + let client = validator_client::Client::new_query(client_config) + .expect("Could not construct query client"); + BandwidthController::new( credential_storage::initialise_storage(config.get_base().get_database_path()).await, + client, ) - .expect("Could not create bandwidth controller"); - bandwidth_controller } fn start_websocket_listener( config: &Config, client_input: ClientInput, client_output: ClientOutput, + client_state: ClientState, self_address: &Recipient, - reply_controller_sender: ReplyControllerSender, shutdown: task::TaskClient, ) { info!("Starting websocket listener..."); @@ -99,10 +85,14 @@ impl SocketClient { } = client_input; let ClientOutput { - shared_lane_queue_lengths, received_buffer_request_sender, } = client_output; + let ClientState { + shared_lane_queue_lengths, + reply_controller_sender, + } = client_state; + let websocket_handler = websocket::HandlerBuilder::new( input_sender, connection_command_sender, @@ -117,16 +107,9 @@ impl SocketClient { /// blocking version of `start_socket` method. Will run forever (or until SIGINT is sent) pub async fn run_socket_forever(self) -> Result<(), Box> { - let mut shutdown = self.start_socket().await?; - - let res = task::wait_for_signal_and_error(&mut shutdown).await; - - log::info!("Sending shutdown"); - shutdown.signal_shutdown().ok(); - - log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); - shutdown.wait_for_shutdown().await; + let shutdown = self.start_socket().await?; + let res = shutdown.catch_interrupt().await; log::info!("Stopping nym-client"); res } @@ -141,7 +124,7 @@ impl SocketClient { self.key_manager, Some(Self::create_bandwidth_controller(&self.config).await), non_wasm_helpers::setup_fs_reply_surb_backend( - self.config.get_base().get_reply_surb_database_path(), + Some(self.config.get_base().get_reply_surb_database_path()), self.config.get_debug_settings(), ) .await?, @@ -151,13 +134,14 @@ impl SocketClient { let mut started_client = base_builder.start_base().await?; let client_input = started_client.client_input.register_producer(); let client_output = started_client.client_output.register_consumer(); + let client_state = started_client.client_state; Self::start_websocket_listener( &self.config, client_input, client_output, + client_state, &self_address, - started_client.reply_controller_sender, started_client.task_manager.subscribe(), ); @@ -177,7 +161,7 @@ impl SocketClient { self.key_manager, Some(Self::create_bandwidth_controller(&self.config).await), non_wasm_helpers::setup_fs_reply_surb_backend( - self.config.get_base().get_reply_surb_database_path(), + Some(self.config.get_base().get_reply_surb_database_path()), self.config.get_debug_settings(), ) .await?, diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index bb8295a34e..fca65ab8af 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -114,16 +114,15 @@ pub(crate) async fn execute(args: &Init) -> Result<(), ClientError> { let already_init = Config::default_config_file_path(Some(id)).exists(); if already_init { - println!( - "Client \"{}\" was already initialised before! \ - Config information will be overwritten (but keys will be kept)!", - id - ); + println!("Client \"{id}\" was already initialised before"); } // Usually you only register with the gateway on the first init, however you can force // re-registering if wanted. let user_wants_force_register = args.force_register_gateway; + if user_wants_force_register { + println!("Instructed to force registering gateway. This might overwrite keys!"); + } // If the client was already initialized, don't generate new keys and don't re-register with // the gateway (because this would create a new shared key). @@ -138,9 +137,9 @@ pub(crate) async fn execute(args: &Init) -> Result<(), ClientError> { // Setup gateway by either registering a new one, or creating a new config from the selected // one but with keys kept, or reusing the gateway configuration. - let gateway = client_core::init::setup_gateway::( + let gateway = client_core::init::setup_gateway_from_config::( register_gateway, - user_chosen_gateway_id.map(|id| id.to_base58_string()), + user_chosen_gateway_id, config.get_base(), ) .await @@ -169,7 +168,7 @@ pub(crate) async fn execute(args: &Init) -> Result<(), ClientError> { fn print_saved_config(config: &Config) { let config_save_location = config.get_config_file_save_location(); - println!("Saved configuration file to {:?}", config_save_location); + println!("Saved configuration file to {config_save_location:?}"); println!("Using gateway: {}", config.get_base().get_gateway_id()); log::debug!("Gateway id: {}", config.get_base().get_gateway_id()); log::debug!("Gateway owner: {}", config.get_base().get_gateway_owner()); diff --git a/clients/native/src/commands/upgrade.rs b/clients/native/src/commands/upgrade.rs index 6aaa732624..2d4a258011 100644 --- a/clients/native/src/commands/upgrade.rs +++ b/clients/native/src/commands/upgrade.rs @@ -17,36 +17,26 @@ fn fail_upgrade(from_version: D1, to_version: D2) -> ! } fn print_start_upgrade(from: D1, to: D2) { - println!( - "\n==================\nTrying to upgrade client from {} to {} ...", - from, to - ); + println!("\n==================\nTrying to upgrade client from {from} to {to} ..."); } fn print_failed_upgrade(from: D1, to: D2) { - eprintln!( - "Upgrade from {} to {} failed!\n==================\n", - from, to - ); + eprintln!("Upgrade from {from} to {to} failed!\n==================\n"); } fn print_successful_upgrade(from: D1, to: D2) { - println!( - "Upgrade from {} to {} was successful!\n==================\n", - from, to - ); + println!("Upgrade from {from} to {to} was successful!\n==================\n"); } fn outdated_upgrade(config_version: &Version, package_version: &Version) -> ! { eprintln!( - "Cannot perform upgrade from {} to {}. Your version is too old to perform the upgrade.!", - config_version, package_version + "Cannot perform upgrade from {config_version} to {package_version}. Your version is too old to perform the upgrade.!" ); process::exit(1) } fn unsupported_upgrade(current_version: &Version, config_version: &Version) -> ! { - eprintln!("Cannot perform upgrade from {} to {}. Please let the developers know about this issue if you expected it to work!", config_version, current_version); + eprintln!("Cannot perform upgrade from {config_version} to {current_version}. Please let the developers know about this issue if you expected it to work!"); process::exit(1) } @@ -65,8 +55,7 @@ fn parse_config_version(config: &Config) -> Version { if version.is_prerelease() || !version.build.is_empty() { eprintln!( - "Trying to upgrade from a non-released version {}. This is not supported!", - version + "Trying to upgrade from a non-released version {version}. This is not supported!" ); process::exit(1) } @@ -81,10 +70,7 @@ fn parse_package_version() -> Version { // however, we are not using them ourselves at the moment and hence it should be fine. // if we change our mind, we could easily tweak this code if version.is_prerelease() || !version.build.is_empty() { - eprintln!( - "Trying to upgrade to a non-released version {}. This is not supported!", - version - ); + eprintln!("Trying to upgrade to a non-released version {version}. This is not supported!"); process::exit(1) } diff --git a/clients/native/src/main.rs b/clients/native/src/main.rs index edb7c56f1a..f8fd2df71b 100644 --- a/clients/native/src/main.rs +++ b/clients/native/src/main.rs @@ -3,7 +3,7 @@ use std::error::Error; -use clap::{crate_version, Parser}; +use clap::{crate_name, crate_version, Parser}; use logging::setup_logging; use network_defaults::setup_env; @@ -15,26 +15,9 @@ pub mod websocket; #[tokio::main] async fn main() -> Result<(), Box> { setup_logging(); - println!("{}", banner()); + println!("{}", logging::banner(crate_name!(), crate_version!())); let args = commands::Cli::parse(); setup_env(args.config_env_file.as_ref()); commands::execute(&args).await } - -fn banner() -> String { - format!( - r#" - - _ __ _ _ _ __ ___ - | '_ \| | | | '_ \ _ \ - | | | | |_| | | | | | | - |_| |_|\__, |_| |_| |_| - |___/ - - (client - version {:}) - - "#, - crate_version!() - ) -} diff --git a/clients/native/src/websocket/handler.rs b/clients/native/src/websocket/handler.rs index c929a907cc..fcc786d76e 100644 --- a/clients/native/src/websocket/handler.rs +++ b/clients/native/src/websocket/handler.rs @@ -27,17 +27,13 @@ use tokio_tungstenite::{ }; use websocket_requests::{requests::ClientRequest, responses::ServerResponse}; +#[derive(Default)] enum ReceivedResponseType { + #[default] Binary, Text, } -impl Default for ReceivedResponseType { - fn default() -> Self { - ReceivedResponseType::Binary - } -} - pub(crate) struct HandlerBuilder { msg_input: InputMessageSender, client_connection_tx: ConnectionCommandSender, diff --git a/clients/native/websocket-requests/src/error.rs b/clients/native/websocket-requests/src/error.rs index 2d9035c19d..67afaddc9b 100644 --- a/clients/native/websocket-requests/src/error.rs +++ b/clients/native/websocket-requests/src/error.rs @@ -84,7 +84,7 @@ impl TryFrom for ErrorKind { n => Err(Error::new( ErrorKind::MalformedResponse, - format!("invalid error code {}", n), + format!("invalid error code {n}"), )), } } diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index 4a20ac946e..6f2fe7149b 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-socks5-client" -version = "1.1.5" +version = "1.1.7" authors = ["Dave Hrycyszyn "] description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address" edition = "2021" @@ -15,7 +15,7 @@ clap = { version = "4.0", features = ["cargo", "derive"] } dirs = "4.0" futures = "0.3" lazy_static = "1.4.0" -log = "0.4" +log = { workspace = true } pin-project = "1.0" pretty_env_logger = "0.4" rand = { version = "0.7.3", features = ["wasm-bindgen"] } @@ -23,7 +23,7 @@ serde = { version = "1.0", features = ["derive"] } # for config serialization/de serde_json = "1.0.89" tap = "1.0.1" thiserror = "1.0.34" -tokio = { version = "1.21.2", features = ["rt-multi-thread", "net", "signal"] } +tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] } url = "2.2" # internal diff --git a/clients/socks5/src/client/mod.rs b/clients/socks5/src/client/mod.rs index 96bdf00932..1acea2eed8 100644 --- a/clients/socks5/src/client/mod.rs +++ b/clients/socks5/src/client/mod.rs @@ -9,7 +9,7 @@ use crate::socks::{ server::SphinxSocksServer, }; use client_core::client::base_client::{ - non_wasm_helpers, BaseClientBuilder, ClientInput, ClientOutput, + non_wasm_helpers, BaseClientBuilder, ClientInput, ClientOutput, ClientState, }; use client_core::client::key_manager::KeyManager; use client_core::config::persistence::key_pathfinder::ClientKeyPathfinder; @@ -19,7 +19,8 @@ use gateway_client::bandwidth::BandwidthController; use log::*; use nymsphinx::addressing::clients::Recipient; use std::error::Error; -use task::{wait_for_signal_and_error, TaskClient, TaskManager}; +use task::{TaskClient, TaskManager}; +use validator_client::nyxd::QueryNyxdClient; pub mod config; @@ -53,48 +54,35 @@ impl NymClient { } } - async fn create_bandwidth_controller(config: &Config) -> BandwidthController { - #[cfg(feature = "coconut")] - let bandwidth_controller = { - let details = network_defaults::NymNetworkDetails::new_from_env(); - let mut client_config = - validator_client::Config::try_from_nym_network_details(&details) - .expect("failed to construct validator client config"); - let nyxd_url = config - .get_base() - .get_validator_endpoints() - .pop() - .expect("No nyxd validator endpoint provided"); - let api_url = config - .get_base() - .get_nym_api_endpoints() - .pop() - .expect("No validator api endpoint provided"); - // overwrite env configuration with config URLs - client_config = client_config.with_urls(nyxd_url, api_url); - let client = validator_client::Client::new_query(client_config) - .expect("Could not construct query client"); - let coconut_api_clients = - validator_client::CoconutApiClient::all_coconut_api_clients(&client) - .await - .expect("Could not query api clients"); - BandwidthController::new( - credential_storage::initialise_storage(config.get_base().get_database_path()).await, - coconut_api_clients, - ) - }; - #[cfg(not(feature = "coconut"))] - let bandwidth_controller = BandwidthController::new( + async fn create_bandwidth_controller(config: &Config) -> BandwidthController { + let details = network_defaults::NymNetworkDetails::new_from_env(); + let mut client_config = validator_client::Config::try_from_nym_network_details(&details) + .expect("failed to construct validator client config"); + let nyxd_url = config + .get_base() + .get_validator_endpoints() + .pop() + .expect("No nyxd validator endpoint provided"); + let api_url = config + .get_base() + .get_nym_api_endpoints() + .pop() + .expect("No validator api endpoint provided"); + // overwrite env configuration with config URLs + client_config = client_config.with_urls(nyxd_url, api_url); + let client = validator_client::Client::new_query(client_config) + .expect("Could not construct query client"); + BandwidthController::new( credential_storage::initialise_storage(config.get_base().get_database_path()).await, + client, ) - .expect("Could not create bandwidth controller"); - bandwidth_controller } fn start_socks5_listener( config: &Config, client_input: ClientInput, client_output: ClientOutput, + client_status: ClientState, self_address: Recipient, shutdown: TaskClient, ) { @@ -108,10 +96,14 @@ impl NymClient { } = client_input; let ClientOutput { - shared_lane_queue_lengths, received_buffer_request_sender, } = client_output; + let ClientState { + shared_lane_queue_lengths, + reply_controller_sender: _, + } = client_status; + let authenticator = Authenticator::new(auth_methods, allowed_users); let mut sphinx_socks = SphinxSocksServer::new( config.get_listening_port(), @@ -142,16 +134,9 @@ impl NymClient { /// blocking version of `start` method. Will run forever (or until SIGINT is sent) pub async fn run_forever(self) -> Result<(), Box> { - let mut shutdown = self.start().await?; - - let res = wait_for_signal_and_error(&mut shutdown).await; - - log::info!("Sending shutdown"); - shutdown.signal_shutdown().ok(); - - log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); - shutdown.wait_for_shutdown().await; + let shutdown = self.start().await?; + let res = shutdown.catch_interrupt().await; log::info!("Stopping nym-socks5-client"); res } @@ -208,7 +193,7 @@ impl NymClient { self.key_manager, Some(Self::create_bandwidth_controller(&self.config).await), non_wasm_helpers::setup_fs_reply_surb_backend( - self.config.get_base().get_reply_surb_database_path(), + Some(self.config.get_base().get_reply_surb_database_path()), self.config.get_debug_settings(), ) .await?, @@ -218,11 +203,13 @@ impl NymClient { let mut started_client = base_builder.start_base().await?; let client_input = started_client.client_input.register_producer(); let client_output = started_client.client_output.register_consumer(); + let client_state = started_client.client_state; Self::start_socks5_listener( &self.config, client_input, client_output, + client_state, self_address, started_client.task_manager.subscribe(), ); diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index f9bcf219a8..ebe01ad24d 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -124,16 +124,15 @@ pub(crate) async fn execute(args: &Init) -> Result<(), Socks5ClientError> { let already_init = Config::default_config_file_path(Some(id)).exists(); if already_init { - println!( - "SOCKS5 client \"{}\" was already initialised before! \ - Config information will be overwritten (but keys will be kept)!", - id - ); + println!("SOCKS5 client \"{id}\" was already initialised before"); } // Usually you only register with the gateway on the first init, however you can force // re-registering if wanted. let user_wants_force_register = args.force_register_gateway; + if user_wants_force_register { + println!("Instructed to force registering gateway. This might overwrite keys!"); + } // If the client was already initialized, don't generate new keys and don't re-register with // the gateway (because this would create a new shared key). @@ -151,9 +150,9 @@ pub(crate) async fn execute(args: &Init) -> Result<(), Socks5ClientError> { // Setup gateway by either registering a new one, or creating a new config from the selected // one but with keys kept, or reusing the gateway configuration. - let gateway = client_core::init::setup_gateway::( + let gateway = client_core::init::setup_gateway_from_config::( register_gateway, - user_chosen_gateway_id.map(|id| id.to_base58_string()), + user_chosen_gateway_id, config.get_base(), ) .await diff --git a/clients/socks5/src/main.rs b/clients/socks5/src/main.rs index 6dcd9183ab..9c8fcdb87a 100644 --- a/clients/socks5/src/main.rs +++ b/clients/socks5/src/main.rs @@ -3,7 +3,7 @@ use std::error::Error; -use clap::{crate_version, Parser}; +use clap::{crate_name, crate_version, Parser}; use logging::setup_logging; use network_defaults::setup_env; @@ -15,26 +15,9 @@ pub mod socks; #[tokio::main] async fn main() -> Result<(), Box> { setup_logging(); - println!("{}", banner()); + println!("{}", logging::banner(crate_name!(), crate_version!())); let args = commands::Cli::parse(); setup_env(args.config_env_file.as_ref()); commands::execute(&args).await } - -fn banner() -> String { - format!( - r#" - - _ __ _ _ _ __ ___ - | '_ \| | | | '_ \ _ \ - | | | | |_| | | | | | | - |_| |_|\__, |_| |_| |_| - |___/ - - (socks5 proxy - version {:}) - - "#, - crate_version!() - ) -} diff --git a/clients/socks5/src/socks/mixnet_responses.rs b/clients/socks5/src/socks/mixnet_responses.rs index 85d0a7da86..f562ee5b68 100644 --- a/clients/socks5/src/socks/mixnet_responses.rs +++ b/clients/socks5/src/socks/mixnet_responses.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use futures::channel::mpsc; use futures::StreamExt; use log::*; @@ -116,10 +114,7 @@ impl MixnetResponseListener { } } } - #[cfg(not(target_arch = "wasm32"))] - tokio::time::timeout(Duration::from_secs(5), self.shutdown.recv()) - .await - .expect("Task stopped without shutdown called"); + self.shutdown.recv_timeout().await; log::debug!("MixnetResponseListener: Exiting"); } } diff --git a/clients/webassembly/Cargo.toml b/clients/webassembly/Cargo.toml index cd60eb7dfa..df17dc5e96 100644 --- a/clients/webassembly/Cargo.toml +++ b/clients/webassembly/Cargo.toml @@ -22,8 +22,10 @@ futures = "0.3" js-sys = "0.3" rand = { version = "0.7.3", features = ["wasm-bindgen"] } serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +anyhow = "1.0" serde-wasm-bindgen = "0.4" -tokio = { version = "1.21.2", features = ["sync"] } +tokio = { version = "1.24.1", features = ["sync"] } url = "2.2" wasm-bindgen = { version = "=0.2.83", features = ["serde-serialize"] } wasm-bindgen-futures = "0.4" diff --git a/clients/webassembly/README.md b/clients/webassembly/README.md index d2bb4966cc..6f290c1506 100644 --- a/clients/webassembly/README.md +++ b/clients/webassembly/README.md @@ -16,11 +16,7 @@ They should be implemented soon. You can build your applications, but don't rely ## Using it -See the [Nym docs](https://nymtech.net/docs). - -### Demo - -There's a demo web application in the `js-example` folder. To run it, first make sure you've got a recent `npm` installed, then follow the instructions in its README. +See the [SDK directory](../../sdk/typescript/examples) for examples on how to use it and the NPM packages available. ## Developing @@ -36,8 +32,13 @@ To be clear, this is not something that most JS developers need to worry about, ### Packaging -If you're a Nym platform developer who's made changes to the Rust (or JS) files and wants to re-publish the package to NPM, here's how you do it: +If you're a Nym platform developer who's made changes to the Rust files and wants to re-publish the package to NPM, here's how you do it: 1. bump version numbers as necessary for SemVer -2. `wasm-pack build --scope nymproject` builds the wasm binaries into the `pkg` directory (not in source control) -3. `cd pkg && npm publish --access=public` will publish your changed package to NPM +2. go the `sdk/typescript` directory (off the project root) +3. run: +``` +yarn +yarn build +yarn publish +``` \ No newline at end of file diff --git a/clients/webassembly/js-example/.bin/create-wasm-app.js b/clients/webassembly/js-example/.bin/create-wasm-app.js deleted file mode 100644 index 2f42973da2..0000000000 --- a/clients/webassembly/js-example/.bin/create-wasm-app.js +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env node - -const { spawn } = require("child_process"); -const fs = require("fs"); - -let folderName = '.'; - -if (process.argv.length >= 3) { - folderName = process.argv[2]; - if (!fs.existsSync(folderName)) { - fs.mkdirSync(folderName); - } -} - -const clone = spawn("git", ["clone", "https://github.com/rustwasm/create-wasm-app.git", folderName]); - -clone.on("close", code => { - if (code !== 0) { - console.error("cloning the template failed!") - process.exit(code); - } else { - console.log("🦀 Rust + 🕸 Wasm = ❤"); - } -}); diff --git a/clients/webassembly/js-example/.gitignore b/clients/webassembly/js-example/.gitignore deleted file mode 100644 index f06235c460..0000000000 --- a/clients/webassembly/js-example/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist diff --git a/clients/webassembly/js-example/.travis.yml b/clients/webassembly/js-example/.travis.yml deleted file mode 100644 index 04d40b4d7e..0000000000 --- a/clients/webassembly/js-example/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: "10" - -script: - - ./node_modules/.bin/webpack diff --git a/clients/webassembly/js-example/LICENSE-APACHE b/clients/webassembly/js-example/LICENSE-APACHE deleted file mode 100644 index 11069edd79..0000000000 --- a/clients/webassembly/js-example/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/clients/webassembly/js-example/README.md b/clients/webassembly/js-example/README.md deleted file mode 100644 index f694466032..0000000000 --- a/clients/webassembly/js-example/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Nym Sphinx Wasm Demo - -This example application demonstrates how to use WebAssembly to create Sphinx packets, in the browser, and forward them to a Nym gateway. - -## 🚴 Usage - -Build the WASM package for bundling: - -``` -wasm-pack build --scope nymproject --target no-modules -``` - -in the `clients/webassembly` directory (one up). - -Start the webpack dev server: - -``` -npm install # set up dependencies -npm run start # starts a web server at http://localhost:8001 -``` - -Check your dev console for output. - -### Rebuild after Rust source changes - -Install `wasm-pack`. Instruction are at the [Rust WASM tutorial](https://rustwasm.github.io/docs/book/game-of-life/hello-world.html). - -`wasm-pack build --scope nymproject --target no-modules` in the `clients/webassembly` directory (one up) will rebuild the wasm package if you make changes to the Rust source. That will be automatically picked up (and reloaded, if need be) by the npm dev server. \ No newline at end of file diff --git a/clients/webassembly/js-example/bootstrap.js b/clients/webassembly/js-example/bootstrap.js deleted file mode 100644 index f1e71036b6..0000000000 --- a/clients/webassembly/js-example/bootstrap.js +++ /dev/null @@ -1,5 +0,0 @@ -// A dependency graph that contains any wasm must all be imported -// asynchronously. This `bootstrap.js` file does the single async import, so -// that no one else needs to worry about it again. -import('./index.js') - .catch(e => console.error('Error importing `index.js`:', e)); diff --git a/clients/webassembly/js-example/index.html b/clients/webassembly/js-example/index.html deleted file mode 100644 index fe167a99e5..0000000000 --- a/clients/webassembly/js-example/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Nym WebAssembly Demo - - - -

- -

- -

- -

-

- -

-

- -

- -

Send messages from your browser, through the mixnet, and to the recipient using the "send" button.

-

Sent messages show in blue, received - messages show in green.

- -
-

- -

- - - - \ No newline at end of file diff --git a/clients/webassembly/js-example/index.js b/clients/webassembly/js-example/index.js deleted file mode 100644 index f0890bf12e..0000000000 --- a/clients/webassembly/js-example/index.js +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2020-2022 Nym Technologies SA -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -class WebWorkerClient { - worker = null; - - constructor() { - this.worker = new Worker('./worker.js'); - - this.worker.onmessage = (ev) => { - if (ev.data && ev.data.kind) { - switch (ev.data.kind) { - case 'Ready': - const { selfAddress } = ev.data.args; - displaySenderAddress(selfAddress); - break; - case 'ReceiveMessage': - const { message } = ev.data.args; - displayReceived(message); - break; - } - } - }; - } - - sendMessage = (message, recipient) => { - if (!this.worker) { - console.error('Could not send message because worker does not exist'); - return; - } - - this.worker.postMessage({ - kind: 'SendMessage', - args: { - message, recipient, - }, - }); - }; -} - -let client = null; - -async function main() { - client = new WebWorkerClient(); - - const sendButton = document.querySelector('#send-button'); - sendButton.onclick = function() { - sendMessageTo(); - }; -} - -/** - * Create a Sphinx packet and send it to the mixnet through the gateway node. - * - * Message and recipient are taken from the values in the user interface. - * - */ -async function sendMessageTo() { - const message = document.getElementById('message').value; - const recipient = document.getElementById('recipient').value; - - await client.sendMessage(message, recipient); - displaySend(message); -} - -/** - * Display messages that have been sent up the websocket. Colours them blue. - * - * @param {string} message - */ -function displaySend(message) { - let timestamp = new Date().toISOString().substr(11, 12); - - let sendDiv = document.createElement('div'); - let paragraph = document.createElement('p'); - paragraph.setAttribute('style', 'color: blue'); - let paragraphContent = document.createTextNode(timestamp + ' sent >>> ' + message); - paragraph.appendChild(paragraphContent); - - sendDiv.appendChild(paragraph); - document.getElementById('output').appendChild(sendDiv); -} - -/** - * Display received text messages in the browser. Colour them green. - * - * @param {Uint8Array} raw - */ -function displayReceived(raw, sender_tag) { - const content = new TextDecoder().decode(raw); - if (sender_tag !== undefined) { - console.log("this message also contained some surbs from", sender_tag) - } - - let timestamp = new Date().toISOString().substr(11, 12); - let receivedDiv = document.createElement('div'); - let paragraph = document.createElement('p'); - paragraph.setAttribute('style', 'color: green'); - let paragraphContent = document.createTextNode(timestamp + ' received >>> ' + content); - // let paragraphContent = document.createTextNode(timestamp + " received >>> " + content + ((replySurb != null) ? "Reply SURB was attached here (but we can't do anything with it yet" : " (NO REPLY-SURB AVAILABLE)")) - paragraph.appendChild(paragraphContent); - receivedDiv.appendChild(paragraph); - document.getElementById('output').appendChild(receivedDiv); -} - - -/** - * Display the nymClient's sender address in the user interface - * - * @param {String} address - */ -function displaySenderAddress(address) { - document.getElementById('sender').value = address; -} - -// Let's get started! -main(); \ No newline at end of file diff --git a/clients/webassembly/js-example/package-lock.json b/clients/webassembly/js-example/package-lock.json deleted file mode 100644 index 2e4adc6d90..0000000000 --- a/clients/webassembly/js-example/package-lock.json +++ /dev/null @@ -1,6872 +0,0 @@ -{ - "name": "create-wasm-app", - "version": "0.1.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "create-wasm-app", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@nymproject/nym-client-wasm": "file:../pkg" - }, - "bin": { - "create-wasm-app": ".bin/create-wasm-app.js" - }, - "devDependencies": { - "copy-webpack-plugin": "^10.2.4", - "hello-wasm-pack": "^0.1.0", - "webpack": "^5.70.0", - "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.7.4" - } - }, - "../pkg": { - "name": "@nymproject/nym-client-wasm", - "version": "0.0.1" - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nymproject/nym-client-wasm": { - "resolved": "../pkg", - "link": true - }, - "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, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/bonjour": { - "version": "3.5.10", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", - "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@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, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", - "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/express": { - "version": "4.17.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.28", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "node_modules/@types/http-proxy": { - "version": "1.17.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.10", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "17.0.23", - "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, - "license": "MIT" - }, - "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, - "license": "MIT" - }, - "node_modules/@types/retry": { - "version": "0.12.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.13.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/sockjs": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", - "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/ws": { - "version": "8.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.6.1", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "license": "Apache-2.0" - }, - "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==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.7.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "license": "Apache-2.0", - "bin": { - "ansi-html": "bin/ansi-html" - } - }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/array-flatten": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/array-union": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", - "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/async": { - "version": "2.6.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "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/batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "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/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/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==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/bonjour": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "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/browserslist": { - "version": "4.20.2", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "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-indexof": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001320", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/colorette": { - "version": "2.0.16", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/connect-history-api-fallback": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "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==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/copy-webpack-plugin": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz", - "integrity": "sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-glob": "^3.2.7", - "glob-parent": "^6.0.1", - "globby": "^12.0.2", - "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" - }, - "engines": { - "node": ">= 12.20.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "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/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/deep-equal": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/del": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/del/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/del/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/del/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", - "dev": true, - "license": "MIT" - }, - "node_modules/dns-packet": { - "version": "1.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/dns-txt": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-indexof": "^1.0.0" - } - }, - "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==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.92", - "dev": true, - "license": "ISC" - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.9.2", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, - "license": "MIT", - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "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/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "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/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/express/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==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/express/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.2.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "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==", - "dev": true, - "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/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "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.14.9", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-monkey": { - "version": "1.0.3", - "dev": true, - "license": "Unlicense" - }, - "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.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/globby": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", - "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^3.0.1", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.7", - "ignore": "^5.1.9", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "dev": true, - "license": "ISC" - }, - "node_modules/handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true, - "license": "MIT" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "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-symbols": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hello-wasm-pack": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/hello-wasm-pack/-/hello-wasm-pack-0.1.0.tgz", - "integrity": "sha512-3hx0GDkDLf/a9ThCMV2qG4mwza8N/MCtm8aeFFc/cdBCL2zMJ1kW1wjNl7xPqD1lz8Yl5+uhnc/cpui4dLwz/w==", - "dev": true - }, - "node_modules/hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/html-entities": { - "version": "2.3.2", - "dev": true, - "license": "MIT" - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "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==", - "dev": true, - "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-errors/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==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.3", - "dev": true, - "license": "MIT" - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-proxy-middleware": { - "version": "2.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } - } - }, - "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==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "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/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/ip": { - "version": "1.1.5", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arguments": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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-path-cwd": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "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/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.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/json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loader-runner": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.11.5" - } - }, - "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", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "3.4.1", - "dev": true, - "license": "Unlicense", - "dependencies": { - "fs-monkey": "1.0.3" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "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==", - "dev": true, - "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/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.6", - "dev": true, - "license": "MIT" - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/multicast-dns": { - "version": "6.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, - "node_modules/multicast-dns-service-types": { - "version": "1.1.0", - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-forge": { - "version": "1.3.0", - "dev": true, - "license": "(BSD-3-Clause OR GPL-2.0)", - "engines": { - "node": ">= 6.13.0" - } - }, - "node_modules/node-releases": { - "version": "2.0.2", - "dev": true, - "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/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "license": "MIT", - "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/open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "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-map": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-retry": { - "version": "4.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/retry": "^0.12.0", - "retry": "^0.13.1" - }, - "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/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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/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/portfinder": { - "version": "1.0.28", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/portfinder/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/portfinder/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "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==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "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/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.8.1", - "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/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "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/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "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==", - "dev": true - }, - "node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true, - "license": "MIT" - }, - "node_modules/selfsigned": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "node-forge": "^1.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "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/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true - }, - "node_modules/send/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true, - "license": "ISC" - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true, - "license": "ISC" - }, - "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==", - "dev": true, - "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==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "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/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "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/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/sockjs": { - "version": "0.3.21", - "dev": true, - "license": "MIT", - "dependencies": { - "faye-websocket": "^0.11.3", - "uuid": "^3.4.0", - "websocket-driver": "^0.7.4" - } - }, - "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/spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "node_modules/spdy-transport/node_modules/debug": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/spdy-transport/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/spdy-transport/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/spdy/node_modules/debug": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/spdy/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/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/strip-ansi": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "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/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/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/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.12.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 8" - } - }, - "node_modules/thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "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==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/watchpack": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/webpack": { - "version": "5.70.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.2", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "4.9.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.1", - "@webpack-cli/info": "^1.4.1", - "@webpack-cli/serve": "^1.6.1", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-dev-middleware": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.1", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/webpack-dev-server": { - "version": "4.7.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.2.2", - "ansi-html-community": "^0.0.8", - "bonjour": "^3.5.0", - "chokidar": "^3.5.3", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "default-gateway": "^6.0.3", - "del": "^6.0.0", - "express": "^4.17.1", - "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.0", - "ipaddr.js": "^2.0.1", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "portfinder": "^1.0.28", - "schema-utils": "^4.0.0", - "selfsigned": "^2.0.0", - "serve-index": "^1.9.1", - "sockjs": "^0.3.21", - "spdy": "^4.0.2", - "strip-ansi": "^7.0.0", - "webpack-dev-middleware": "^5.3.1", - "ws": "^8.4.2" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 12.13.0" - }, - "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-dev-server/node_modules/ipaddr.js": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", - "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/webpack/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=0.8.0" - } - }, - "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/wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true, - "license": "MIT" - }, - "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/ws": { - "version": "8.5.0", - "dev": true, - "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 - } - } - } - }, - "dependencies": { - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@nymproject/nym-client-wasm": { - "version": "file:../pkg" - }, - "@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, - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/bonjour": { - "version": "3.5.10", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", - "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/connect-history-api-fallback": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", - "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", - "dev": true, - "requires": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "@types/eslint": { - "version": "8.4.1", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.3", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true - }, - "@types/express": { - "version": "4.17.13", - "dev": true, - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.17.28", - "dev": true, - "requires": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "@types/http-proxy": { - "version": "1.17.8", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/json-schema": { - "version": "7.0.10", - "dev": true - }, - "@types/mime": { - "version": "1.3.2", - "dev": true - }, - "@types/node": { - "version": "17.0.23", - "dev": true - }, - "@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 - }, - "@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 - }, - "@types/retry": { - "version": "0.12.1", - "dev": true - }, - "@types/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", - "dev": true, - "requires": { - "@types/express": "*" - } - }, - "@types/serve-static": { - "version": "1.13.10", - "dev": true, - "requires": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "@types/sockjs": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", - "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/ws": { - "version": "8.5.3", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webpack-cli/configtest": { - "version": "1.1.1", - "dev": true, - "requires": {} - }, - "@webpack-cli/info": { - "version": "1.4.1", - "dev": true, - "requires": { - "envinfo": "^7.7.3" - } - }, - "@webpack-cli/serve": { - "version": "1.6.1", - "dev": true, - "requires": {} - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "acorn": { - "version": "8.7.0", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "requires": {} - }, - "aggregate-error": { - "version": "3.1.0", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "requires": { - "ajv": "^8.0.0" - } - }, - "ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.3" - } - }, - "ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "dev": true - }, - "ansi-regex": { - "version": "6.0.1", - "dev": true - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "array-flatten": { - "version": "2.1.2", - "dev": true - }, - "array-union": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", - "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==", - "dev": true - }, - "async": { - "version": "2.6.4", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "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 - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "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, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.20.2", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" - } - }, - "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 - }, - "buffer-indexof": { - "version": "1.1.1", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caniuse-lite": { - "version": "1.0.30001320", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "dev": true - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "colorette": { - "version": "2.0.16", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "safe-buffer": "5.2.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, - "copy-webpack-plugin": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz", - "integrity": "sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg==", - "dev": true, - "requires": { - "fast-glob": "^3.2.7", - "glob-parent": "^6.0.1", - "globby": "^12.0.2", - "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" - } - }, - "core-util-is": { - "version": "1.0.2", - "dev": true - }, - "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, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "dev": true, - "requires": { - "execa": "^5.0.0" - } - }, - "define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "del": { - "version": "6.0.0", - "dev": true, - "requires": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "dependencies": { - "array-union": { - "version": "2.1.0", - "dev": true - }, - "globby": { - "version": "11.1.0", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "slash": { - "version": "3.0.0", - "dev": true - } - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true - }, - "detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", - "dev": true - }, - "dns-packet": { - "version": "1.3.4", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "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==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.92", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.9.2", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true - }, - "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "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==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "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" - } - }, - "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-glob": { - "version": "3.2.11", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "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==", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.12", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "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, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "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, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "follow-redirects": { - "version": "1.14.9", - "dev": true - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true - }, - "fs-monkey": { - "version": "1.0.3", - "dev": true - }, - "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 - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "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 - }, - "glob": { - "version": "7.2.0", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "globby": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", - "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", - "dev": true, - "requires": { - "array-union": "^3.0.1", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.7", - "ignore": "^5.1.9", - "merge2": "^1.4.1", - "slash": "^4.0.0" - } - }, - "graceful-fs": { - "version": "4.2.9", - "dev": true - }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "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 - }, - "has-symbols": { - "version": "1.0.2", - "dev": true - }, - "hello-wasm-pack": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/hello-wasm-pack/-/hello-wasm-pack-0.1.0.tgz", - "integrity": "sha512-3hx0GDkDLf/a9ThCMV2qG4mwza8N/MCtm8aeFFc/cdBCL2zMJ1kW1wjNl7xPqD1lz8Yl5+uhnc/cpui4dLwz/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "2.3.2", - "dev": true - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "http-parser-js": { - "version": "0.5.3", - "dev": true - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "2.0.4", - "dev": true, - "requires": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - } - }, - "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 - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "indent-string": { - "version": "4.0.0", - "dev": true - }, - "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, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true - }, - "ip": { - "version": "1.1.5", - "dev": true - }, - "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==", - "dev": true - }, - "is-arguments": { - "version": "1.1.0", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.8.1", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.4", - "dev": true - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "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 - }, - "is-path-cwd": { - "version": "2.2.0", - "dev": true - }, - "is-path-inside": { - "version": "3.0.3", - "dev": true - }, - "is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.1.3", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" - } - }, - "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 - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "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, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "loader-runner": { - "version": "4.2.0", - "dev": true - }, - "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, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "dev": true - }, - "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==", - "dev": true - }, - "memfs": { - "version": "3.4.1", - "dev": true, - "requires": { - "fs-monkey": "1.0.3" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, - "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 - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "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 - }, - "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==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node-forge": { - "version": "1.3.0", - "dev": true - }, - "node-releases": { - "version": "2.0.2", - "dev": true - }, - "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 - }, - "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, - "requires": { - "path-key": "^3.0.0" - } - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "dev": true - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "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, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", - "dev": true, - "requires": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - } - }, - "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, - "requires": { - "p-try": "^2.0.0" - } - }, - "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, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "4.0.0", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-retry": { - "version": "4.6.1", - "dev": true, - "requires": { - "@types/retry": "^0.12.0", - "retry": "^0.13.1" - } - }, - "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 - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "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 - }, - "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 - }, - "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 - }, - "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 - }, - "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==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "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, - "requires": { - "find-up": "^4.0.0" - } - }, - "portfinder": { - "version": "1.0.28", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "dev": true - } - } - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "proxy-addr": { - "version": "2.0.7", - "dev": true, - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "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==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "requires": { - "resolve": "^1.9.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.1", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "resolve": { - "version": "1.22.0", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "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, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "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 - }, - "retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true - }, - "selfsigned": { - "version": "2.0.0", - "dev": true, - "requires": { - "node-forge": "^1.2.0" - } - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - } - } - }, - "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==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - } - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "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, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "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 - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "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 - }, - "slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true - }, - "sockjs": { - "version": "0.3.21", - "dev": true, - "requires": { - "faye-websocket": "^0.11.3", - "uuid": "^3.4.0", - "websocket-driver": "^0.7.4" - } - }, - "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 - }, - "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, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "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 - } - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "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 - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "7.0.1", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - }, - "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 - }, - "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, - "requires": { - "has-flag": "^4.0.0" - } - }, - "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 - }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "terser": { - "version": "5.12.1", - "dev": true, - "requires": { - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "5.3.1", - "dev": true, - "requires": { - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true - }, - "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, - "requires": { - "is-number": "^7.0.0" - } - }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "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==", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true - }, - "watchpack": { - "version": "2.3.1", - "dev": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webpack": { - "version": "5.70.0", - "dev": true, - "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.2", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", - "webpack-sources": "^3.2.3" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, - "webpack-cli": { - "version": "4.9.2", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.1", - "@webpack-cli/info": "^1.4.1", - "@webpack-cli/serve": "^1.6.1", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - } - } - }, - "webpack-dev-middleware": { - "version": "5.3.1", - "dev": true, - "requires": { - "colorette": "^2.0.10", - "memfs": "^3.4.1", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - } - }, - "webpack-dev-server": { - "version": "4.7.4", - "dev": true, - "requires": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.2.2", - "ansi-html-community": "^0.0.8", - "bonjour": "^3.5.0", - "chokidar": "^3.5.3", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "default-gateway": "^6.0.3", - "del": "^6.0.0", - "express": "^4.17.1", - "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.0", - "ipaddr.js": "^2.0.1", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "portfinder": "^1.0.28", - "schema-utils": "^4.0.0", - "selfsigned": "^2.0.0", - "serve-index": "^1.9.1", - "sockjs": "^0.3.21", - "spdy": "^4.0.2", - "strip-ansi": "^7.0.0", - "webpack-dev-middleware": "^5.3.1", - "ws": "^8.4.2" - }, - "dependencies": { - "ipaddr.js": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", - "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", - "dev": true - } - } - }, - "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - } - }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true - }, - "websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "requires": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, - "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 - }, - "ws": { - "version": "8.5.0", - "dev": true, - "requires": {} - } - } -} diff --git a/clients/webassembly/js-example/package.json b/clients/webassembly/js-example/package.json deleted file mode 100644 index a843e96700..0000000000 --- a/clients/webassembly/js-example/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "create-wasm-app", - "version": "0.1.0", - "description": "create an app to consume rust-generated wasm packages", - "main": "index.js", - "bin": { - "create-wasm-app": ".bin/create-wasm-app.js" - }, - "scripts": { - "build": "webpack --config webpack.config.js", - "start": "webpack-dev-server --port 8001" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/rustwasm/create-wasm-app.git" - }, - "keywords": [ - "webassembly", - "wasm", - "rust", - "webpack" - ], - "author": "Dave Hrycyszyn ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/nymtech/nym/issues" - }, - "homepage": "https://nymtech.net/docs", - "devDependencies": { - "copy-webpack-plugin": "^10.2.4", - "hello-wasm-pack": "^0.1.0", - "webpack": "^5.70.0", - "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.7.4" - }, - "dependencies": { - "@nymproject/nym-client-wasm": "file:../pkg" - } -} \ No newline at end of file diff --git a/clients/webassembly/js-example/webpack.config.js b/clients/webassembly/js-example/webpack.config.js deleted file mode 100644 index e07304fee3..0000000000 --- a/clients/webassembly/js-example/webpack.config.js +++ /dev/null @@ -1,33 +0,0 @@ -const CopyWebpackPlugin = require('copy-webpack-plugin'); -const path = require('path'); - -module.exports = { - performance: { - hints: false, - maxEntrypointSize: 512000, - maxAssetSize: 512000 - }, - entry: { - bootstrap: './bootstrap.js', - worker: './worker.js', - }, - output: { - path: path.resolve(__dirname, 'dist'), - filename: '[name].js', - }, - // mode: 'development', - mode: 'production', - plugins: [ - new CopyWebpackPlugin({ - patterns: [ - 'index.html', - { - from: 'node_modules/@nymproject/nym-client-wasm/*.(js|wasm)', - to: '[name][ext]', - }, - ], - }), - - ], - experiments: { syncWebAssembly: true }, -}; diff --git a/clients/webassembly/js-example/worker.js b/clients/webassembly/js-example/worker.js deleted file mode 100644 index da066d6ea2..0000000000 --- a/clients/webassembly/js-example/worker.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020-2022 Nym Technologies SA -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -importScripts('nym_client_wasm.js'); - -console.log('Initializing worker'); - -// wasm_bindgen creates a global variable (with the exports attached) that is in scope after `importScripts` -const { default_debug, NymClientBuilder, set_panic_hook, Config, GatewayEndpointConfig } = wasm_bindgen; - -let client = null; - -async function main() { - // load WASM package - await wasm_bindgen('nym_client_wasm_bg.wasm'); - - console.log('Loaded WASM'); - - // sets up better stack traces in case of in-rust panics - set_panic_hook(); - - // validator server we will use to get topology from - const validator = 'https://qwerty-validator-api.qa.nymte.ch/api'; - - const gatewayId = 'EVupP2tRUeZo5Y6RpBHAbm8kSntpgNyZNL6yCr7BDEoG'; - const gatewayOwner = 'n1rmlew3euapuq7rs4s4j9apv00whrsazr764kl7'; - const gatewayListener = 'ws://176.58.120.72:9000'; - const gatewayEndpoint = new GatewayEndpointConfig(gatewayId, gatewayOwner, gatewayListener) - - // only really useful if you want to adjust some settings like traffic rate - // (if not needed you can just pass a null) - const debug = default_debug(); - - debug.disable_main_poisson_packet_distribution = true; - debug.disable_loop_cover_traffic_stream = true; - debug.use_extended_packet_size = true; - // debug.average_packet_delay_ms = BigInt(10); - // debug.average_ack_delay_ms = BigInt(10); - // debug.ack_wait_addition_ms = BigInt(3000); - // debug.ack_wait_multiplier = 10; - - debug.topology_refresh_rate_ms = BigInt(60000) - - const config = new Config('my-awesome-wasm-client', validator, gatewayEndpoint, debug); - - const onMessageHandler = (message) => { - self.postMessage({ - kind: 'ReceiveMessage', - args: { - message, - }, - }); - }; - - console.log('Instantiating WASM client...'); - - let clientBuilder = new NymClientBuilder(config, onMessageHandler) - console.log('Web worker creating WASM client...'); - let local_client = await clientBuilder.start_client(); - console.log('WASM client running!'); - - const selfAddress = local_client.self_address(); - - // set the global (I guess we don't have to anymore?) - client = local_client; - - console.log(`Client address is ${selfAddress}`); - self.postMessage({ - kind: 'Ready', - args: { - selfAddress, - }, - }); - - // Set callback to handle messages passed to the worker. - self.onmessage = async event => { - if (event.data && event.data.kind) { - switch (event.data.kind) { - case 'SendMessage': { - const { message, recipient } = event.data.args; - let uint8Array = new TextEncoder().encode(message); - await client.send_regular_message(uint8Array, recipient); - } - } - } - }; -} - -// Let's get started! -main(); \ No newline at end of file diff --git a/clients/webassembly/src/binary_message_helper.rs b/clients/webassembly/src/binary_message_helper.rs deleted file mode 100644 index 5032a87f5c..0000000000 --- a/clients/webassembly/src/binary_message_helper.rs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use serde::{Deserialize, Serialize}; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; - -#[wasm_bindgen(typescript_custom_section)] -const TS_DEFS: &'static str = r#" -export interface BinaryMessage { - kind: number, - payload: Uint8Array; - headers: string, -} - -export interface StringMessage { - kind: number, - payload: string; -} -"#; - -#[wasm_bindgen] -extern "C" { - #[wasm_bindgen(typescript_type = "BinaryMessage")] - pub type IBinaryMessage; - #[wasm_bindgen(typescript_type = "StringMessage")] - pub type IStringMessage; -} - -#[derive(Serialize, Deserialize)] -pub struct BinaryMessage { - pub kind: u8, - pub payload: Vec, - pub headers: String, -} - -#[derive(Serialize, Deserialize)] -pub struct StringMessage { - pub kind: u8, - pub payload: String, -} - -/// Create a new binary message with a user-specified `kind`. -#[wasm_bindgen] -pub fn create_binary_message(kind: u8, payload: Vec) -> Vec { - create_binary_message_with_headers(kind, payload, "".to_string()) -} - -/// Create a new message with a UTF-8 encoded string `payload` and a user-specified `kind`. -#[wasm_bindgen] -pub fn create_binary_message_from_string(kind: u8, payload: String) -> Vec { - create_binary_message_with_headers(kind, payload.as_bytes().to_vec(), "".to_string()) -} - -/// Create a new binary message with a user-specified `kind`, and `headers` as a string. -#[wasm_bindgen] -pub fn create_binary_message_with_headers(kind: u8, payload: Vec, headers: String) -> Vec { - let headers = headers.as_bytes().to_vec(); - let size = (headers.len() as u64).to_be_bytes().to_vec(); - vec![vec![kind], size, headers, payload].concat() -} - -/// Parse the `kind` and byte array `payload` from a byte array -#[wasm_bindgen] -pub async fn parse_binary_message(message: Vec) -> Result { - if message.len() < 2 { - return Err(JsError::new( - "Could not parse message, as less than 2 bytes long", - )); - } - - let (kind, _headers, payload) = parse_binary_payload(&message); - - Ok(serde_wasm_bindgen::to_value(&BinaryMessage { - kind, - payload: payload.to_vec(), - headers: "".to_string(), - }) - .unwrap() - .unchecked_into::()) -} - -/// Parse the `kind` and byte array `payload` from a byte array with headers -#[wasm_bindgen] -pub async fn parse_binary_message_with_headers( - message: Vec, -) -> Result { - if message.len() < 2 { - return Err(JsError::new( - "Could not parse message, as less than 2 bytes long", - )); - } - - let (kind, headers, payload) = parse_binary_payload(&message); - - Ok(serde_wasm_bindgen::to_value(&BinaryMessage { - kind, - payload: payload.to_vec(), - headers, - }) - .unwrap() - .unchecked_into::()) -} - -/// Parse the `kind` and UTF-8 string `payload` from a byte array with headers -#[wasm_bindgen] -pub async fn parse_string_message_with_headers( - message: Vec, -) -> Result { - if message.len() < 2 { - return Err(JsError::new( - "Could not parse message, as less than 2 bytes long", - )); - } - - let (kind, _headers, payload) = parse_binary_payload(&message); - let payload = String::from_utf8_lossy(payload).into_owned(); - - Ok( - serde_wasm_bindgen::to_value(&StringMessage { kind, payload }) - .unwrap() - .unchecked_into::(), - ) -} -pub(crate) fn parse_binary_payload(message: &[u8]) -> (u8, String, &[u8]) { - // 1st byte is the kind - let kind = message[0]; - - // then the size as u64 big endian - let mut size = [0u8; 8]; - size.clone_from_slice(&message[1..9]); - let size = u64::from_be_bytes(size) as usize; - - // then the headers - let headers = String::from_utf8_lossy(&message[9..9 + size]).into_owned(); - - // finally the payload - let payload = &message[9 + size..]; - - (kind, headers, payload) -} - -/// Parse the `kind` and UTF-8 string `payload` from a byte array -#[wasm_bindgen] -pub async fn parse_string_message(message: Vec) -> Result { - if message.len() < 2 { - return Err(JsError::new( - "Could not parse message, as less than 2 bytes long", - )); - } - - let kind = message[0]; - let payload = String::from_utf8_lossy(&message[1..]).into_owned(); - - Ok( - serde_wasm_bindgen::to_value(&StringMessage { kind, payload }) - .unwrap() - .unchecked_into::(), - ) -} - -#[cfg(test)] -mod tests { - use super::{create_binary_message_with_headers, parse_binary_payload}; - use wasm_bindgen_test::*; - - #[wasm_bindgen_test] - fn test_binary_with_headers() { - let message_as_bytes = create_binary_message_with_headers( - 42u8, - vec![0u8, 1u8, 2u8], - "test headers".to_string(), - ); - - // calculate header size - let headers = "test headers".as_bytes().to_vec(); - let size = headers.len(); - - // the expected size - let expected_size = 12; - assert_eq!(size, expected_size); - - assert_eq!(message_as_bytes[0], 42u8); - assert_eq!(message_as_bytes[1..9], 12u64.to_be_bytes()); - assert_eq!( - message_as_bytes[9 + expected_size..9 + expected_size + 3], - vec![0u8, 1u8, 2u8] - ); - - let res = parse_binary_payload(&message_as_bytes); - - assert_eq!(res.0, 42u8); - assert_eq!(res.1, "test headers".to_string()); - assert_eq!(res.2, vec![0u8, 1u8, 2u8]); - } - - #[wasm_bindgen_test] - fn test_binary_with_empty_headers() { - let message_as_bytes = - create_binary_message_with_headers(42u8, vec![0u8, 1u8, 2u8], "".to_string()); - - let expected_size = 0; - - assert_eq!(message_as_bytes[0], 42u8); - assert_eq!(message_as_bytes[1..9], 0u64.to_be_bytes()); - assert_eq!( - message_as_bytes[9 + expected_size..9 + expected_size + 3], - vec![0u8, 1u8, 2u8] - ); - - let res = parse_binary_payload(&message_as_bytes); - - assert_eq!(res.0, 42u8); - assert_eq!(res.1, "".to_string()); - assert_eq!(res.2, vec![0u8, 1u8, 2u8]); - } -} diff --git a/clients/webassembly/src/client/mod.rs b/clients/webassembly/src/client/mod.rs index bd9ceab576..306c2d85ed 100644 --- a/clients/webassembly/src/client/mod.rs +++ b/clients/webassembly/src/client/mod.rs @@ -5,10 +5,13 @@ use self::config::Config; use crate::client::helpers::InputSender; use crate::client::response_pusher::ResponsePusher; use client_connections::TransmissionLane; -use client_core::client::base_client::{BaseClientBuilder, ClientInput, ClientOutput}; +use client_core::client::base_client::{ + BaseClientBuilder, ClientInput, ClientOutput, CredentialsToggle, +}; use client_core::client::replies::reply_storage::browser_backend; use client_core::client::{inbound_messages::InputMessage, key_manager::KeyManager}; use gateway_client::bandwidth::BandwidthController; +use gateway_client::wasm_mockups::SigningNyxdClient; use js_sys::Promise; use nymsphinx::addressing::clients::Recipient; use nymsphinx::anonymous_replies::requests::AnonymousSenderTag; @@ -45,7 +48,7 @@ pub struct NymClientBuilder { on_message: js_sys::Function, // unimplemented: - bandwidth_controller: Option, + bandwidth_controller: Option>, disabled_credentials: bool, } @@ -92,13 +95,19 @@ impl NymClientBuilder { future_to_promise(async move { console_log!("Starting the wasm client"); + let disabled_credentials = if self.disabled_credentials { + CredentialsToggle::Disabled + } else { + CredentialsToggle::Enabled + }; + let base_builder = BaseClientBuilder::new( &self.config.gateway_endpoint, &self.config.debug, self.key_manager, self.bandwidth_controller, self.reply_surb_storage_backend, - self.disabled_credentials, + disabled_credentials, vec![self.config.nym_api_url.clone()], ); diff --git a/clients/webassembly/src/encoded_payload_helper.rs b/clients/webassembly/src/encoded_payload_helper.rs new file mode 100644 index 0000000000..84f463ec58 --- /dev/null +++ b/clients/webassembly/src/encoded_payload_helper.rs @@ -0,0 +1,238 @@ +// Copyright 2022 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use serde::{Deserialize, Serialize}; +use wasm_bindgen::prelude::*; +use wasm_bindgen::JsCast; + +#[wasm_bindgen(typescript_custom_section)] +const TS_DEFS: &'static str = r#" +export interface EncodedPayload { + mimeType: string, + payload: Uint8Array; + headers: string, +} +"#; + +#[wasm_bindgen] +extern "C" { + #[wasm_bindgen(typescript_type = "EncodedPayload")] + pub type IEncodedPayload; +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EncodedPayload { + pub mime_type: String, + pub payload: Vec, + pub headers: Option, +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EncodedPayloadMetadata { + pub mime_type: String, + pub headers: Option, +} + +/// Encode a payload +#[wasm_bindgen] +pub fn encode_payload(mime_type: String, payload: Vec) -> Result, JsValue> { + encode_payload_with_headers(mime_type, payload, None) +} + +/// Create a new binary message with a user-specified `kind`, and `headers` as a string. +#[wasm_bindgen] +pub fn encode_payload_with_headers( + mime_type: String, + payload: Vec, + headers: Option, +) -> Result, JsValue> { + match serde_json::to_string(&EncodedPayloadMetadata { mime_type, headers }) { + Ok(metadata) => { + let metadata = metadata.as_bytes().to_vec(); + let size = (metadata.len() as u64).to_be_bytes().to_vec(); + Ok(vec![size, metadata, payload].concat()) + } + Err(e) => Err(JsValue::from(JsError::new( + format!("Could not encode message: {}", e).as_str(), + ))), + } +} + +/// Parse the `kind` and byte array `payload` from a byte array +#[wasm_bindgen] +pub fn decode_payload(message: Vec) -> Result { + if message.len() < 8 { + return Err(JsValue::from(JsError::new( + "Could not parse message, as less than 8 bytes long", + ))); + } + + match parse_payload(&message) { + Ok((metadata, payload)) => Ok(serde_wasm_bindgen::to_value(&EncodedPayload { + mime_type: metadata.mime_type, + payload: payload.to_vec(), + headers: metadata.headers, + }) + .unwrap() + .unchecked_into::()), + Err(e) => Err(JsValue::from(JsError::new( + format!("Could not parse message: {}", e).as_str(), + ))), + } +} + +pub(crate) fn parse_payload(message: &[u8]) -> anyhow::Result<(EncodedPayloadMetadata, &[u8])> { + // 1st 8 bytes are the size (as u64 big endian) + let mut size = [0u8; 8]; + size.clone_from_slice(&message[0..8]); + let size = u64::from_be_bytes(size) as usize; + + // then the metadata + let metadata = String::from_utf8_lossy(&message[8..8 + size]).into_owned(); + let metadata: EncodedPayloadMetadata = serde_json::from_str(metadata.as_str())?; + + // finally the payload + let payload = &message[8 + size..]; + + Ok((metadata, payload)) +} + +/// Try parse a UTF-8 string from an array of bytes +#[wasm_bindgen] +pub fn parse_utf8_string(payload: Vec) -> String { + String::from_utf8_lossy(&payload).into_owned() +} + +/// Converts a UTF-8 string into an array of bytes +/// +/// This method is provided as a replacement for the mess of `atob` +/// (https://developer.mozilla.org/en-US/docs/Web/API/atob) helpers provided by browsers and NodeJS. +/// +/// Feel free to use `atob` if you know you won't have problems with polyfills or encoding issues. +#[wasm_bindgen] +pub fn utf8_string_to_byte_array(message: String) -> Vec { + message.into_bytes() +} + +#[cfg(test)] +mod tests { + use super::*; + use wasm_bindgen_test::*; + + #[wasm_bindgen_test] + async fn test_encode_payload_with_headers() { + let message_as_bytes = encode_payload_with_headers( + "text/plain".to_string(), + vec![0u8, 1u8, 2u8], + Some("test headers".to_string()), + ) + .unwrap(); + + // the expected message size + let size = message_as_bytes.len(); + let expected_size = 61; + assert_eq!(size, expected_size); + + let expected_header_size = 50usize; + assert_eq!( + message_as_bytes[0..8], + (expected_header_size as u64).to_be_bytes() + ); + + assert_eq!( + message_as_bytes[8 + expected_header_size..8 + expected_header_size + 3], + vec![0u8, 1u8, 2u8] + ); + + let res = parse_payload(&message_as_bytes).unwrap(); + + assert_eq!(res.0.mime_type, "text/plain"); + assert_eq!(res.0.headers.unwrap(), "test headers".to_string()); + assert_eq!(res.1, vec![0u8, 1u8, 2u8]); + } + + #[wasm_bindgen_test] + async fn test_encode_payload_with_empty_headers() { + let message_as_bytes = + encode_payload_with_headers("text/plain".to_string(), vec![0u8, 1u8, 2u8], None) + .unwrap(); + + // the expected message size + let size = message_as_bytes.len(); + let expected_size = 51; + assert_eq!(size, expected_size); + + let expected_header_size = 40usize; + assert_eq!( + message_as_bytes[0..8], + (expected_header_size as u64).to_be_bytes() + ); + + assert_eq!( + message_as_bytes[8 + expected_header_size..8 + expected_header_size + 3], + vec![0u8, 1u8, 2u8] + ); + let res = parse_payload(&message_as_bytes).unwrap(); + + assert_eq!(res.0.mime_type, "text/plain"); + assert_eq!(res.0.headers, None); + assert_eq!(res.1, vec![0u8, 1u8, 2u8]); + } + + #[wasm_bindgen_test] + async fn test_encode_payload_with_empty_headers_and_empty_mime_type() { + let message_as_bytes = + encode_payload_with_headers("".to_string(), vec![0u8, 1u8, 2u8], None).unwrap(); + + // the expected message size + let size = message_as_bytes.len(); + let expected_size = 41; + assert_eq!(size, expected_size); + + let expected_header_size = 30usize; + assert_eq!( + message_as_bytes[0..8], + (expected_header_size as u64).to_be_bytes() + ); + + assert_eq!( + message_as_bytes[8 + expected_header_size..8 + expected_header_size + 3], + vec![0u8, 1u8, 2u8] + ); + let res = parse_payload(&message_as_bytes).unwrap(); + + assert_eq!(res.0.mime_type, ""); + assert_eq!(res.0.headers, None); + assert_eq!(res.1, vec![0u8, 1u8, 2u8]); + } + + #[wasm_bindgen_test] + async fn test_encode_payload_with_all_empty() { + let empty: Vec = vec![]; + let message_as_bytes = + encode_payload_with_headers("".to_string(), empty.clone(), None).unwrap(); + + // the expected message size + let size = message_as_bytes.len(); + let expected_size = 38; + assert_eq!(size, expected_size); + + let expected_header_size = 30usize; + assert_eq!( + message_as_bytes[0..8], + (expected_header_size as u64).to_be_bytes() + ); + + assert_eq!( + message_as_bytes[8 + expected_header_size..8 + expected_header_size], + empty + ); + let res = parse_payload(&message_as_bytes).unwrap(); + + assert_eq!(res.0.mime_type, ""); + assert_eq!(res.0.headers, None); + assert_eq!(res.1, empty); + } +} diff --git a/clients/webassembly/src/lib.rs b/clients/webassembly/src/lib.rs index 869b675829..3a97438249 100644 --- a/clients/webassembly/src/lib.rs +++ b/clients/webassembly/src/lib.rs @@ -3,12 +3,14 @@ use wasm_bindgen::prelude::*; -#[cfg(target_arch = "wasm32")] -pub mod binary_message_helper; #[cfg(target_arch = "wasm32")] mod client; #[cfg(target_arch = "wasm32")] +pub mod encoded_payload_helper; +#[cfg(target_arch = "wasm32")] pub mod gateway_selector; +#[cfg(target_arch = "wasm32")] +pub mod validation; #[wasm_bindgen] pub fn set_panic_hook() { diff --git a/clients/webassembly/src/validation.rs b/clients/webassembly/src/validation.rs new file mode 100644 index 0000000000..c0273f8b61 --- /dev/null +++ b/clients/webassembly/src/validation.rs @@ -0,0 +1,35 @@ +use nymsphinx::addressing::clients::Recipient; +use wasm_bindgen::prelude::*; + +#[wasm_bindgen] +pub fn validate_recipient(recipient: String) -> Result<(), JsError> { + match Recipient::try_from_base58_string(recipient) { + Ok(_) => Ok(()), + Err(e) => Err(JsError::new(format!("{}", e).as_str())), + } +} + +#[cfg(test)] +mod tests { + use super::validate_recipient; + use wasm_bindgen_test::*; + + #[wasm_bindgen_test] + fn test_recipient_validation_ok() { + let res = validate_recipient("DyQmXnst5NGGjzUZxRC5Bjs5bd7CBF3xMpsSmbRiizr2.GH6YTBP2NXU3AVqd8WjiTMVyeMjunXMEsp7gVCMEJqpD@336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9".to_string()); + assert!(res.is_ok()) + } + + #[wasm_bindgen_test] + fn test_recipient_validation_fails() { + assert!(validate_recipient(" DyQmXnst5NGGjzUZxRC5Bjs5bd7CBF3xMpsSmbRiizr2.GH6YTBP2NXU3AVqd8WjiTMVyeMjunXMEsp7gVCMEJqpD@336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9".to_string()).is_err()); + assert!(validate_recipient( + "DyQmXnst5NGGjzUZxRC5BjbRiizr2.GH6YTBP2NXU3AVqd8WD@336yuXAeGEgedRfqTJZQH1bHv1SjCZYarc9" + .to_string() + ) + .is_err()); + assert!(validate_recipient("🙀🙀🙀🙀".to_string()).is_err()); + assert!(validate_recipient("".to_string()).is_err()); + assert!(validate_recipient(" ".to_string()).is_err()); + } +} diff --git a/common/client-connections/Cargo.toml b/common/client-connections/Cargo.toml index 7438be79ba..a3d51b3b54 100644 --- a/common/client-connections/Cargo.toml +++ b/common/client-connections/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] futures = "0.3" -log = "0.4.17" +log = { workspace = true } diff --git a/common/client-libs/gateway-client/Cargo.toml b/common/client-libs/gateway-client/Cargo.toml index a9c14adc70..ff65280643 100644 --- a/common/client-libs/gateway-client/Cargo.toml +++ b/common/client-libs/gateway-client/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" # TODO: (for this and other crates), similarly to 'tokio', import only required "futures" modules rather than # the entire crate futures = "0.3" -log = "0.4" +log = { workspace = true } thiserror = "1.0" url = "2.2" rand = { version = "0.7.3", features = ["wasm-bindgen"] } async-trait = { version = "0.1.51" } -tokio = { version = "1.21.2", features = ["macros"] } +tokio = { version = "1.24.1", features = ["macros"] } # internal coconut-interface = { path = "../../coconut-interface", optional = true } @@ -25,7 +25,7 @@ gateway-requests = { path = "../../../gateway/gateway-requests" } network-defaults = { path = "../../network-defaults" } nymsphinx = { path = "../../nymsphinx" } pemstore = { path = "../../pemstore" } -validator-client = { path = "../validator-client", optional = true } +validator-client = { path = "../validator-client" } task = { path = "../../task" } serde = { version = "1.0", features = ["derive"]} @@ -36,11 +36,11 @@ default-features = false # non-wasm-only dependencies [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] -version = "1.21.2" +version = "1.24.1" features = ["macros", "rt", "net", "sync", "time"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-stream] -version = "0.1.9" +version = "0.1.11" features = ["net", "sync", "time"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-tungstenite] @@ -79,5 +79,5 @@ features = ["js"] #url = "2.1" [features] -coconut = ["gateway-requests/coconut", "coconut-interface", "validator-client", "credentials/coconut"] +coconut = ["gateway-requests/coconut", "coconut-interface", "credentials/coconut"] wasm = [] diff --git a/common/client-libs/gateway-client/src/bandwidth.rs b/common/client-libs/gateway-client/src/bandwidth.rs index d6d1cb04f0..34fc308a48 100644 --- a/common/client-libs/gateway-client/src/bandwidth.rs +++ b/common/client-libs/gateway-client/src/bandwidth.rs @@ -1,23 +1,26 @@ // Copyright 2021 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +#[cfg(feature = "coconut")] use crate::error::GatewayClientError; #[cfg(target_arch = "wasm32")] -use crate::wasm_storage::Storage; +use crate::wasm_mockups::Storage; #[cfg(not(target_arch = "wasm32"))] use credential_storage::storage::Storage; #[cfg(all(target_arch = "wasm32", feature = "coconut"))] -use crate::wasm_storage::StorageError; +use crate::wasm_mockups::StorageError; #[cfg(all(not(target_arch = "wasm32"), feature = "coconut"))] use credential_storage::error::StorageError; +#[cfg(target_arch = "wasm32")] +use crate::wasm_mockups::{Client, CosmWasmClient}; #[cfg(feature = "coconut")] use std::str::FromStr; -#[cfg(feature = "coconut")] -use validator_client::client::CoconutApiClient; +#[cfg(not(target_arch = "wasm32"))] +use validator_client::{nyxd::CosmWasmClient, Client}; #[cfg(feature = "coconut")] use { coconut_interface::Base58, @@ -28,41 +31,34 @@ use { // TODO: make it nicer for wasm (I don't want to touch it for this experiment) #[cfg(target_arch = "wasm32")] -use crate::wasm_storage::PersistentStorage; +use crate::wasm_mockups::PersistentStorage; #[cfg(not(target_arch = "wasm32"))] use credential_storage::PersistentStorage; #[derive(Clone)] -pub struct BandwidthController { - #[allow(dead_code)] +#[allow(dead_code)] +pub struct BandwidthController { storage: St, - #[cfg(feature = "coconut")] - coconut_api_clients: Vec, + nyxd_client: Client, } -impl BandwidthController +impl BandwidthController where + C: CosmWasmClient + Sync + Send + Clone, St: Storage + Clone + 'static, { - #[cfg(feature = "coconut")] - pub fn new(storage: St, coconut_api_clients: Vec) -> Self { + pub fn new(storage: St, nyxd_client: Client) -> Self { BandwidthController { storage, - coconut_api_clients, + nyxd_client, } } - #[cfg(not(feature = "coconut"))] - pub fn new(storage: St) -> Result { - Ok(BandwidthController { storage }) - } - #[cfg(feature = "coconut")] pub async fn prepare_coconut_credential( &self, ) -> Result<(coconut_interface::Credential, i64), GatewayClientError> { - let verification_key = obtain_aggregate_verification_key(&self.coconut_api_clients).await?; let bandwidth_credential = self.storage.get_next_coconut_credential().await?; let voucher_value = u64::from_str(&bandwidth_credential.voucher_value) .map_err(|_| StorageError::InconsistentData)?; @@ -73,6 +69,19 @@ where coconut_interface::Attribute::try_from_bs58(bandwidth_credential.binding_number)?; let signature = coconut_interface::Signature::try_from_bs58(bandwidth_credential.signature)?; + let epoch_id = u64::from_str(&bandwidth_credential.epoch_id) + .map_err(|_| StorageError::InconsistentData)?; + + #[cfg(not(target_arch = "wasm32"))] + let coconut_api_clients = validator_client::CoconutApiClient::all_coconut_api_clients( + &self.nyxd_client, + epoch_id, + ) + .await + .expect("Could not query api clients"); + #[cfg(target_arch = "wasm32")] + let coconut_api_clients = vec![]; + let verification_key = obtain_aggregate_verification_key(&coconut_api_clients).await?; // the below would only be executed once we know where we want to spend it (i.e. which gateway and stuff) Ok(( @@ -81,6 +90,7 @@ where voucher_info, serial_number, binding_number, + epoch_id, &signature, &verification_key, )?, diff --git a/common/client-libs/gateway-client/src/client.rs b/common/client-libs/gateway-client/src/client.rs index 23cae7e4a6..b9e28a3852 100644 --- a/common/client-libs/gateway-client/src/client.rs +++ b/common/client-libs/gateway-client/src/client.rs @@ -32,9 +32,13 @@ use coconut_interface::Credential; use credential_storage::PersistentStorage; #[cfg(not(target_arch = "wasm32"))] use tokio_tungstenite::connect_async; +#[cfg(not(target_arch = "wasm32"))] +use validator_client::nyxd::CosmWasmClient; #[cfg(target_arch = "wasm32")] -use crate::wasm_storage::PersistentStorage; +use crate::wasm_mockups::CosmWasmClient; +#[cfg(target_arch = "wasm32")] +use crate::wasm_mockups::PersistentStorage; #[cfg(target_arch = "wasm32")] use wasm_timer; #[cfg(target_arch = "wasm32")] @@ -43,7 +47,7 @@ use wasm_utils::websocket::JSWebsocket; const DEFAULT_RECONNECTION_ATTEMPTS: usize = 10; const DEFAULT_RECONNECTION_BACKOFF: Duration = Duration::from_secs(5); -pub struct GatewayClient { +pub struct GatewayClient { authenticated: bool, disabled_credentials_mode: bool, bandwidth_remaining: i64, @@ -55,7 +59,7 @@ pub struct GatewayClient { connection: SocketState, packet_router: PacketRouter, response_timeout_duration: Duration, - bandwidth_controller: Option>, + bandwidth_controller: Option>, // reconnection related variables /// Specifies whether client should try to reconnect to gateway on connection failure. @@ -70,7 +74,10 @@ pub struct GatewayClient { shutdown: TaskClient, } -impl GatewayClient { +impl GatewayClient +where + C: CosmWasmClient + Sync + Send + Clone, +{ // TODO: put it all in a Config struct #[allow(clippy::too_many_arguments)] pub fn new( @@ -82,7 +89,7 @@ impl GatewayClient { mixnet_message_sender: MixnetMessageSender, ack_sender: AcknowledgementSender, response_timeout_duration: Duration, - bandwidth_controller: Option>, + bandwidth_controller: Option>, shutdown: TaskClient, ) -> Self { GatewayClient { @@ -138,7 +145,7 @@ impl GatewayClient { let shutdown = TaskClient::dummy(); let packet_router = PacketRouter::new(ack_tx, mix_tx, shutdown.clone()); - GatewayClient { + GatewayClient:: { authenticated: false, disabled_credentials_mode: true, bandwidth_remaining: 0, diff --git a/common/client-libs/gateway-client/src/error.rs b/common/client-libs/gateway-client/src/error.rs index 8a8104658b..61142d64be 100644 --- a/common/client-libs/gateway-client/src/error.rs +++ b/common/client-libs/gateway-client/src/error.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #[cfg(target_arch = "wasm32")] -use crate::wasm_storage::StorageError; +use crate::wasm_mockups::StorageError; #[cfg(not(target_arch = "wasm32"))] use credential_storage::error::StorageError; use gateway_requests::registration::handshake::error::HandshakeError; diff --git a/common/client-libs/gateway-client/src/lib.rs b/common/client-libs/gateway-client/src/lib.rs index ac209f0920..1dc95a71aa 100644 --- a/common/client-libs/gateway-client/src/lib.rs +++ b/common/client-libs/gateway-client/src/lib.rs @@ -17,7 +17,7 @@ pub mod error; pub mod packet_router; pub mod socket_state; #[cfg(target_arch = "wasm32")] -mod wasm_storage; +pub mod wasm_mockups; /// Helper method for reading from websocket stream. Helps to flatten the structure. pub(crate) fn cleanup_socket_message( diff --git a/common/client-libs/gateway-client/src/wasm_storage.rs b/common/client-libs/gateway-client/src/wasm_mockups.rs similarity index 87% rename from common/client-libs/gateway-client/src/wasm_storage.rs rename to common/client-libs/gateway-client/src/wasm_mockups.rs index 644560b9ca..55b07e367c 100644 --- a/common/client-libs/gateway-client/src/wasm_storage.rs +++ b/common/client-libs/gateway-client/src/wasm_mockups.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use async_trait::async_trait; +use std::marker::PhantomData; use thiserror::Error; #[derive(Error, Debug)] @@ -14,6 +15,18 @@ pub enum StorageError { InconsistentData, } +pub trait CosmWasmClient {} + +#[derive(Clone)] +pub struct SigningNyxdClient {} + +impl CosmWasmClient for SigningNyxdClient {} + +#[derive(Clone)] +pub struct Client { + _phantom: PhantomData, +} + #[derive(Clone)] pub struct PersistentStorage {} @@ -24,6 +37,7 @@ pub struct CoconutCredential { pub serial_number: String, pub binding_number: String, pub signature: String, + pub epoch_id: String, } #[async_trait] diff --git a/common/client-libs/mixnet-client/Cargo.toml b/common/client-libs/mixnet-client/Cargo.toml index 5267ecb366..c64da7db48 100644 --- a/common/client-libs/mixnet-client/Cargo.toml +++ b/common/client-libs/mixnet-client/Cargo.toml @@ -8,9 +8,10 @@ edition = "2021" [dependencies] futures = "0.3" -log = "0.4.8" -tokio = { version = "1.21.2", features = ["time", "net", "rt"] } -tokio-util = { version = "0.7.3", features = ["codec"] } +log = { workspace = true } +tokio = { version = "1.24.1", features = ["time", "net", "rt"] } +tokio-util = { version = "0.7.4", features = ["codec"] } # internal -nymsphinx = {path = "../../nymsphinx" } +nymsphinx = { path = "../../nymsphinx" } +task = { path = "../../task" } \ No newline at end of file diff --git a/common/client-libs/mixnet-client/src/forwarder.rs b/common/client-libs/mixnet-client/src/forwarder.rs index 1aa68be8da..43384ba759 100644 --- a/common/client-libs/mixnet-client/src/forwarder.rs +++ b/common/client-libs/mixnet-client/src/forwarder.rs @@ -16,6 +16,7 @@ type MixForwardingReceiver = mpsc::UnboundedReceiver; pub struct PacketForwarder { mixnet_client: Client, packet_receiver: MixForwardingReceiver, + shutdown: task::TaskClient, } impl PacketForwarder { @@ -25,6 +26,7 @@ impl PacketForwarder { initial_connection_timeout: Duration, maximum_connection_buffer_size: usize, use_legacy_version: bool, + shutdown: task::TaskClient, ) -> (PacketForwarder, MixForwardingSender) { let client_config = Config::new( initial_reconnection_backoff, @@ -40,26 +42,35 @@ impl PacketForwarder { PacketForwarder { mixnet_client: Client::new(client_config), packet_receiver, + shutdown, }, packet_sender, ) } pub async fn run(&mut self) { - while let Some(mix_packet) = self.packet_receiver.next().await { - trace!("Going to forward packet to {:?}", mix_packet.next_hop()); + while !self.shutdown.is_shutdown() { + tokio::select! { + biased; + _ = self.shutdown.recv() => { + log::trace!("PacketForwarder: Received shutdown"); + } + Some(mix_packet) = self.packet_receiver.next() => { + trace!("Going to forward packet to {:?}", mix_packet.next_hop()); - let next_hop = mix_packet.next_hop(); - let packet_mode = mix_packet.packet_mode(); - let sphinx_packet = mix_packet.into_sphinx_packet(); - // we don't care about responses, we just want to fire packets - // as quickly as possible + let next_hop = mix_packet.next_hop(); + let packet_mode = mix_packet.packet_mode(); + let sphinx_packet = mix_packet.into_sphinx_packet(); + // we don't care about responses, we just want to fire packets + // as quickly as possible - if let Err(err) = - self.mixnet_client - .send_without_response(next_hop, sphinx_packet, packet_mode) - { - debug!("failed to forward the packet - {err}") + if let Err(err) = + self.mixnet_client + .send_without_response(next_hop, sphinx_packet, packet_mode) + { + debug!("failed to forward the packet - {err}") + } + } } } } diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index 0527db6954..c6d467a0c4 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -17,14 +17,15 @@ mixnet-contract-common = { path= "../../cosmwasm-smart-contracts/mixnet-contract vesting-contract-common = { path= "../../cosmwasm-smart-contracts/vesting-contract" } coconut-bandwidth-contract-common = { path= "../../cosmwasm-smart-contracts/coconut-bandwidth-contract" } multisig-contract-common = { path = "../../cosmwasm-smart-contracts/multisig-contract" } +group-contract-common = { path = "../../cosmwasm-smart-contracts/group-contract" } vesting-contract = { path = "../../../contracts/vesting" } serde = { version = "1", features = ["derive"] } serde_json = "1" reqwest = { version = "0.11", features = ["json"] } thiserror = "1" -log = "0.4" +log = { workspace = true } url = { version = "2.2", features = ["serde"] } -tokio = { version = "1.21.2", features = ["sync", "time"] } +tokio = { version = "1.24.1", features = ["sync", "time"] } futures = "0.3" coconut-interface = { path = "../../coconut-interface" } @@ -39,6 +40,7 @@ bip39 = { version = "1", features = ["rand"], optional = true } config = { path = "../../config", optional = true } cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support", features = ["rpc", "bip32", "cosmwasm"], optional = true} cw3 = { version = "0.13.4", optional = true } +cw4 = { version = "0.13.4", optional = true } prost = { version = "0.10", default-features = false, optional = true } flate2 = { version = "1.0.20", optional = true } sha2 = { version = "0.9.5", optional = true } @@ -56,6 +58,7 @@ nyxd-client = [ "config", "cosmrs", "cw3", + "cw4", "prost", "flate2", "sha2", diff --git a/common/client-libs/validator-client/src/client.rs b/common/client-libs/validator-client/src/client.rs index 9ba5e6319b..d73d323876 100644 --- a/common/client-libs/validator-client/src/client.rs +++ b/common/client-libs/validator-client/src/client.rs @@ -21,7 +21,9 @@ use crate::nyxd::traits::{DkgQueryClient, MixnetQueryClient, MultisigQueryClient use crate::nyxd::{self, CosmWasmClient, NyxdClient, QueryNyxdClient, SigningNyxdClient}; #[cfg(feature = "nyxd-client")] use coconut_dkg_common::{ - dealer::ContractDealing, types::DealerDetails, verification_key::ContractVKShare, + dealer::ContractDealing, + types::{DealerDetails, EpochId}, + verification_key::ContractVKShare, }; #[cfg(feature = "nyxd-client")] use coconut_interface::Base58; @@ -128,7 +130,8 @@ impl Config { } #[cfg(feature = "nyxd-client")] -pub struct Client { +#[derive(Clone)] +pub struct Client { // TODO: we really shouldn't be storing a mnemonic here, but removing it would be // non-trivial amount of work and it's out of scope of the current branch mnemonic: Option, @@ -218,7 +221,10 @@ impl Client { // nyxd wrappers #[cfg(feature = "nyxd-client")] -impl Client { +impl Client +where + C: Clone, +{ // use case: somebody initialised client without a contract in order to upload and initialise one // and now they want to actually use it without making new client @@ -676,6 +682,7 @@ impl Client { pub async fn get_all_nyxd_verification_key_shares( &self, + epoch_id: EpochId, ) -> Result, ValidatorClientError> where C: CosmWasmClient + Sync + Send, @@ -685,7 +692,11 @@ impl Client { loop { let mut paged_response = self .nyxd - .get_vk_shares_paged(start_after.take(), self.verification_key_page_limit) + .get_vk_shares_paged( + epoch_id, + start_after.take(), + self.verification_key_page_limit, + ) .await?; shares.append(&mut paged_response.shares); @@ -730,7 +741,10 @@ impl Client { // validator-api wrappers #[cfg(feature = "nyxd-client")] -impl Client { +impl Client +where + C: Clone, +{ pub fn change_nym_api(&mut self, new_endpoint: Url) { self.nym_api.change_url(new_endpoint) } @@ -792,14 +806,15 @@ pub struct CoconutApiClient { #[cfg(feature = "nyxd-client")] impl CoconutApiClient { - pub async fn all_coconut_api_clients( + pub async fn all_coconut_api_clients( nyxd_client: &Client, + epoch_id: EpochId, ) -> Result, ValidatorClientError> where C: CosmWasmClient + Sync + Send, { Ok(nyxd_client - .get_all_nyxd_verification_key_shares() + .get_all_nyxd_verification_key_shares(epoch_id) .await? .into_iter() .filter_map(Self::try_from) diff --git a/common/client-libs/validator-client/src/error.rs b/common/client-libs/validator-client/src/error.rs index 7b37ed6a14..08da52c626 100644 --- a/common/client-libs/validator-client/src/error.rs +++ b/common/client-libs/validator-client/src/error.rs @@ -6,7 +6,7 @@ use thiserror::Error; #[derive(Error, Debug)] pub enum ValidatorClientError { - #[error("There was an issue with the validator api request - {source}")] + #[error("nym api request failed - {source}")] NymAPIError { #[from] source: nym_api::error::NymAPIError, @@ -16,7 +16,7 @@ pub enum ValidatorClientError { MalformedUrlProvided(#[from] url::ParseError), #[cfg(feature = "nyxd-client")] - #[error("There was an issue with the Nyxd client - {0}")] + #[error("nyxd request failed - {0}")] NyxdError(#[from] crate::nyxd::error::NyxdError), #[error("No validator API url has been provided")] diff --git a/common/client-libs/validator-client/src/lib.rs b/common/client-libs/validator-client/src/lib.rs index 1c1c3a344c..4bdd9275fd 100644 --- a/common/client-libs/validator-client/src/lib.rs +++ b/common/client-libs/validator-client/src/lib.rs @@ -9,10 +9,8 @@ pub mod nym_api; #[cfg(feature = "nyxd-client")] pub mod nyxd; -#[cfg(feature = "nyxd-client")] -pub use crate::client::{CoconutApiClient, NymApiClient}; pub use crate::error::ValidatorClientError; pub use nym_api_requests::*; #[cfg(feature = "nyxd-client")] -pub use client::{Client, Config}; +pub use client::{Client, CoconutApiClient, Config, NymApiClient}; diff --git a/common/client-libs/validator-client/src/nyxd/error.rs b/common/client-libs/validator-client/src/nyxd/error.rs index 846cfd13c4..fab3965217 100644 --- a/common/client-libs/validator-client/src/nyxd/error.rs +++ b/common/client-libs/validator-client/src/nyxd/error.rs @@ -46,25 +46,25 @@ pub enum NyxdError { #[error("{0} is not a valid tx hash")] InvalidTxHash(String), - #[error("There was an issue with a tendermint RPC request - {0}")] + #[error("Tendermint RPC request failed - {0}")] TendermintError(#[from] TendermintRpcError), - #[error("There was an issue when attempting to serialize data ({0})")] + #[error("Failed when attempting to serialize data ({0})")] SerializationError(String), - #[error("There was an issue when attempting to deserialize data ({0})")] + #[error("Failed when attempting to deserialize data ({0})")] DeserializationError(String), - #[error("There was an issue when attempting to encode our protobuf data - {0}")] + #[error("Failed when attempting to encode our protobuf data - {0}")] ProtobufEncodingError(#[from] prost::EncodeError), - #[error("There was an issue when attempting to decode our protobuf data - {0}")] + #[error("Failed to decode our protobuf data - {0}")] ProtobufDecodingError(#[from] prost::DecodeError), #[error("Account {0} does not exist on the chain")] NonExistentAccountError(AccountId), - #[error("There was an issue with the serialization/deserialization - {0}")] + #[error("Failed on json serialization/deserialization - {0}")] SerdeJsonError(#[from] serde_json::Error), #[error("Account {0} is not a valid account address")] diff --git a/common/client-libs/validator-client/src/nyxd/mod.rs b/common/client-libs/validator-client/src/nyxd/mod.rs index df53071851..fa92389e4c 100644 --- a/common/client-libs/validator-client/src/nyxd/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/mod.rs @@ -17,11 +17,13 @@ use cosmrs::rpc::HttpClientUrl; use cosmrs::tx::Msg; use execute::execute; use log::debug; +use mixnet_contract_common::MixId; use network_defaults::{ChainDetails, NymNetworkDetails}; use serde::{Deserialize, Serialize}; use std::convert::TryInto; use std::time::SystemTime; use vesting_contract_common::ExecuteMsg as VestingExecuteMsg; +use vesting_contract_common::PledgeCap; pub use crate::nyxd::cosmwasm_client::client::CosmWasmClient; pub use crate::nyxd::cosmwasm_client::signing_client::SigningCosmWasmClient; @@ -43,10 +45,8 @@ pub use cosmrs::Coin as CosmosCoin; pub use cosmrs::{bip32, AccountId, Decimal, Denom}; pub use cosmwasm_std::Coin as CosmWasmCoin; pub use fee::{gas_price::GasPrice, GasAdjustable, GasAdjustment}; -use mixnet_contract_common::MixId; pub use signing_client::Client as SigningNyxdClient; pub use traits::{VestingQueryClient, VestingSigningClient}; -use vesting_contract_common::PledgeCap; pub mod coin; pub mod cosmwasm_client; @@ -65,6 +65,7 @@ pub struct Config { pub(crate) vesting_contract_address: Option, pub(crate) bandwidth_claim_contract_address: Option, pub(crate) coconut_bandwidth_contract_address: Option, + pub(crate) group_contract_address: Option, pub(crate) multisig_contract_address: Option, pub(crate) coconut_dkg_contract_address: Option, // TODO: add this in later commits @@ -119,6 +120,10 @@ impl Config { .as_ref(), prefix, )?, + group_contract_address: Self::parse_optional_account( + details.contracts.group_contract_address.as_ref(), + prefix, + )?, multisig_contract_address: Self::parse_optional_account( details.contracts.multisig_contract_address.as_ref(), prefix, @@ -131,8 +136,8 @@ impl Config { } } -#[derive(Debug)] -pub struct NyxdClient { +#[derive(Clone, Debug)] +pub struct NyxdClient { client: C, config: Config, client_address: Option>, @@ -209,7 +214,10 @@ impl NyxdClient { } } -impl NyxdClient { +impl NyxdClient +where + C: Clone, +{ pub fn current_config(&self) -> &Config { &self.config } @@ -276,6 +284,10 @@ impl NyxdClient { .unwrap() } + pub fn group_contract_address(&self) -> &AccountId { + self.config.group_contract_address.as_ref().unwrap() + } + // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits // note: what unwrap is doing here is just moving a failure that would have normally // occurred in `connect` when attempting to parse an empty address, diff --git a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs index 73c13d9d41..7cacd57801 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs @@ -18,7 +18,7 @@ pub trait CoconutBandwidthQueryClient { } #[async_trait] -impl CoconutBandwidthQueryClient for NyxdClient { +impl CoconutBandwidthQueryClient for NyxdClient { async fn get_spent_credential( &self, blinded_serial_number: String, diff --git a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs index 0d0e11e9e8..a7d03c9625 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs @@ -30,7 +30,9 @@ pub trait CoconutBandwidthSigningClient { } #[async_trait] -impl CoconutBandwidthSigningClient for NyxdClient { +impl CoconutBandwidthSigningClient + for NyxdClient +{ async fn deposit( &self, amount: Coin, diff --git a/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs index c9477fedd6..3b405caf9e 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs @@ -8,7 +8,7 @@ use coconut_dkg_common::dealer::{ DealerDetailsResponse, PagedDealerResponse, PagedDealingsResponse, }; use coconut_dkg_common::msg::QueryMsg as DkgQueryMsg; -use coconut_dkg_common::types::Epoch; +use coconut_dkg_common::types::{Epoch, EpochId}; use coconut_dkg_common::verification_key::PagedVKSharesResponse; use cosmrs::AccountId; @@ -39,6 +39,7 @@ pub trait DkgQueryClient { ) -> Result; async fn get_vk_shares_paged( &self, + epoch_id: EpochId, start_after: Option, page_limit: Option, ) -> Result; @@ -47,7 +48,7 @@ pub trait DkgQueryClient { #[async_trait] impl DkgQueryClient for NyxdClient where - C: CosmWasmClient + Send + Sync, + C: CosmWasmClient + Send + Sync + Clone, { async fn get_current_epoch(&self) -> Result { let request = DkgQueryMsg::GetCurrentEpochState {}; @@ -119,10 +120,12 @@ where async fn get_vk_shares_paged( &self, + epoch_id: EpochId, start_after: Option, page_limit: Option, ) -> Result { let request = DkgQueryMsg::GetVerificationKeys { + epoch_id, limit: page_limit, start_after, }; diff --git a/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs index f04730adb1..a025a84db0 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs @@ -36,7 +36,7 @@ pub trait DkgSigningClient { #[async_trait] impl DkgSigningClient for NyxdClient where - C: SigningCosmWasmClient + Send + Sync, + C: SigningCosmWasmClient + Send + Sync + Clone, { async fn advance_dkg_epoch_state(&self, fee: Option) -> Result { let req = DkgExecuteMsg::AdvanceEpochState {}; diff --git a/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs new file mode 100644 index 0000000000..57a6f6a98f --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs @@ -0,0 +1,28 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::error::NyxdError; +use crate::nyxd::{CosmWasmClient, NyxdClient}; + +use group_contract_common::msg::QueryMsg; + +use async_trait::async_trait; +use cw4::MemberResponse; + +#[async_trait] +pub trait GroupQueryClient { + async fn member(&self, addr: String) -> Result; +} + +#[async_trait] +impl GroupQueryClient for NyxdClient { + async fn member(&self, addr: String) -> Result { + let request = QueryMsg::Member { + addr, + at_height: None, + }; + self.client + .query_contract_smart(self.group_contract_address(), &request) + .await + } +} diff --git a/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs index e589719fa3..97643bdabb 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs @@ -395,7 +395,7 @@ pub trait MixnetQueryClient { #[async_trait] impl MixnetQueryClient for NyxdClient where - C: CosmWasmClient + Sync + Send, + C: CosmWasmClient + Sync + Send + Clone, { async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result where @@ -410,7 +410,7 @@ where #[async_trait] impl MixnetQueryClient for crate::Client where - C: CosmWasmClient + Sync + Send, + C: CosmWasmClient + Sync + Send + Clone, { async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result where diff --git a/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs index f059674683..0288f73828 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs @@ -627,7 +627,7 @@ pub trait MixnetSigningClient { #[async_trait] impl MixnetSigningClient for NyxdClient where - C: SigningCosmWasmClient + Sync + Send, + C: SigningCosmWasmClient + Sync + Send + Clone, { async fn execute_mixnet_contract( &self, @@ -653,7 +653,7 @@ where #[async_trait] impl MixnetSigningClient for crate::Client where - C: SigningCosmWasmClient + Sync + Send, + C: SigningCosmWasmClient + Sync + Send + Clone, { async fn execute_mixnet_contract( &self, diff --git a/common/client-libs/validator-client/src/nyxd/traits/mod.rs b/common/client-libs/validator-client/src/nyxd/traits/mod.rs index 11e70cd484..90e75adecd 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/mod.rs @@ -5,6 +5,7 @@ mod coconut_bandwidth_query_client; mod coconut_bandwidth_signing_client; mod dkg_query_client; mod dkg_signing_client; +mod group_query_client; mod mixnet_query_client; mod mixnet_signing_client; mod multisig_query_client; @@ -16,6 +17,7 @@ pub use coconut_bandwidth_query_client::CoconutBandwidthQueryClient; pub use coconut_bandwidth_signing_client::CoconutBandwidthSigningClient; pub use dkg_query_client::DkgQueryClient; pub use dkg_signing_client::DkgSigningClient; +pub use group_query_client::GroupQueryClient; pub use mixnet_query_client::MixnetQueryClient; pub use mixnet_signing_client::MixnetSigningClient; pub use multisig_query_client::MultisigQueryClient; diff --git a/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs index 51eac0532b..c396cecec4 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs @@ -20,7 +20,7 @@ pub trait MultisigQueryClient { } #[async_trait] -impl MultisigQueryClient for NyxdClient { +impl MultisigQueryClient for NyxdClient { async fn get_proposal(&self, proposal_id: u64) -> Result { let request = QueryMsg::Proposal { proposal_id }; self.client diff --git a/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs index 9051cfa79d..6e4069c4a2 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs @@ -38,7 +38,7 @@ pub trait MultisigSigningClient { } #[async_trait] -impl MultisigSigningClient for NyxdClient { +impl MultisigSigningClient for NyxdClient { async fn propose_release_funds( &self, title: String, diff --git a/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs index 5aadd0a608..3d753e4bdc 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs @@ -12,8 +12,9 @@ use mixnet_contract_common::MixId; use serde::Deserialize; use vesting_contract::vesting::Account; use vesting_contract_common::{ - messages::QueryMsg as VestingQueryMsg, AllDelegationsResponse, DelegationTimesResponse, - OriginalVestingResponse, Period, PledgeData, VestingDelegation, + messages::QueryMsg as VestingQueryMsg, AccountVestingCoins, AccountsResponse, + AllDelegationsResponse, BaseVestingAccountInfo, DelegationTimesResponse, + OriginalVestingResponse, Period, PledgeData, VestingCoinsResponse, VestingDelegation, }; #[async_trait] @@ -27,74 +28,187 @@ pub trait VestingQueryClient { .await } + async fn get_all_accounts_paged( + &self, + start_next_after: Option, + limit: Option, + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetAccountsPaged { + start_next_after, + limit, + }) + .await + } + + async fn get_all_accounts_vesting_coins_paged( + &self, + start_next_after: Option, + limit: Option, + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetAccountsVestingCoinsPaged { + start_next_after, + limit, + }) + .await + } + async fn locked_coins( &self, - address: &str, + vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::LockedCoins { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } async fn spendable_coins( &self, vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::SpendableCoins { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } async fn vested_coins( &self, vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::GetVestedCoins { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } async fn vesting_coins( &self, vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::GetVestingCoins { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } async fn vesting_start_time( &self, vesting_account_address: &str, - ) -> Result; + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetStartTime { + vesting_account_address: vesting_account_address.to_string(), + }) + .await + } - async fn vesting_end_time(&self, vesting_account_address: &str) - -> Result; + async fn vesting_end_time( + &self, + vesting_account_address: &str, + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetEndTime { + vesting_account_address: vesting_account_address.to_string(), + }) + .await + } async fn original_vesting( &self, vesting_account_address: &str, - ) -> Result; + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetOriginalVesting { + vesting_account_address: vesting_account_address.to_string(), + }) + .await + } async fn delegated_free( &self, vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::GetDelegatedFree { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } + /// Returns the total amount of delegated tokens that have vested async fn delegated_vesting( &self, vesting_account_address: &str, block_time: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract::(VestingQueryMsg::GetDelegatedVesting { + vesting_account_address: vesting_account_address.to_string(), + block_time, + }) + .await + .map(Into::into) + } - async fn get_account(&self, address: &str) -> Result; - async fn get_mixnode_pledge(&self, address: &str) -> Result, NyxdError>; - async fn get_gateway_pledge(&self, address: &str) -> Result, NyxdError>; - async fn get_current_vesting_period( - &self, - vesting_account_address: &str, - ) -> Result; + async fn get_account(&self, address: &str) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetAccount { + address: address.to_string(), + }) + .await + } + + async fn get_mixnode_pledge(&self, address: &str) -> Result, NyxdError> { + self.query_vesting_contract(VestingQueryMsg::GetMixnode { + address: address.to_string(), + }) + .await + } + + async fn get_gateway_pledge(&self, address: &str) -> Result, NyxdError> { + self.query_vesting_contract(VestingQueryMsg::GetGateway { + address: address.to_string(), + }) + .await + } + + async fn get_current_vesting_period(&self, address: &str) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetCurrentVestingPeriod { + address: address.to_string(), + }) + .await + } async fn get_delegation_timestamps( &self, address: &str, mix_id: MixId, - ) -> Result; + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetDelegationTimes { + address: address.to_string(), + mix_id, + }) + .await + } async fn get_all_vesting_delegations_paged( &self, start_after: Option<(u32, MixId, u64)>, limit: Option, - ) -> Result; + ) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetAllDelegations { start_after, limit }) + .await + } async fn get_all_vesting_delegations(&self) -> Result, NyxdError> { let mut delegations = Vec::new(); @@ -114,10 +228,48 @@ pub trait VestingQueryClient { Ok(delegations) } + + async fn get_all_accounts_info(&self) -> Result, NyxdError> { + let mut accounts = Vec::new(); + let mut start_after = None; + loop { + let mut paged_response = self + .get_all_accounts_paged(start_after.take(), None) + .await?; + accounts.append(&mut paged_response.accounts); + + if let Some(start_after_res) = paged_response.start_next_after { + start_after = Some(start_after_res.into_string()) + } else { + break; + } + } + + Ok(accounts) + } + + async fn get_all_accounts_vesting_coins(&self) -> Result, NyxdError> { + let mut accounts = Vec::new(); + let mut start_after = None; + loop { + let mut paged_response = self + .get_all_accounts_vesting_coins_paged(start_after.take(), None) + .await?; + accounts.append(&mut paged_response.accounts); + + if let Some(start_after_res) = paged_response.start_next_after { + start_after = Some(start_after_res.into_string()) + } else { + break; + } + } + + Ok(accounts) + } } #[async_trait] -impl VestingQueryClient for NyxdClient { +impl VestingQueryClient for NyxdClient { async fn query_vesting_contract(&self, query: VestingQueryMsg) -> Result where for<'a> T: Deserialize<'a>, @@ -126,188 +278,4 @@ impl VestingQueryClient for NyxdClient { .query_contract_smart(self.vesting_contract_address(), &query) .await } - - async fn locked_coins( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::LockedCoins { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - - async fn spendable_coins( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::SpendableCoins { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - async fn vested_coins( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::GetVestedCoins { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - async fn vesting_coins( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::GetVestingCoins { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - - async fn vesting_start_time( - &self, - vesting_account_address: &str, - ) -> Result { - let request = VestingQueryMsg::GetStartTime { - vesting_account_address: vesting_account_address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn vesting_end_time( - &self, - vesting_account_address: &str, - ) -> Result { - let request = VestingQueryMsg::GetEndTime { - vesting_account_address: vesting_account_address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn original_vesting( - &self, - vesting_account_address: &str, - ) -> Result { - let request = VestingQueryMsg::GetOriginalVesting { - vesting_account_address: vesting_account_address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn delegated_free( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::GetDelegatedFree { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - - /// Returns the total amount of delegated tokens that have vested - async fn delegated_vesting( - &self, - vesting_account_address: &str, - block_time: Option, - ) -> Result { - let request = VestingQueryMsg::GetDelegatedVesting { - vesting_account_address: vesting_account_address.to_string(), - block_time, - }; - self.client - .query_contract_smart::<_, CosmWasmCoin>(self.vesting_contract_address(), &request) - .await - .map(Into::into) - } - - async fn get_account(&self, address: &str) -> Result { - let request = VestingQueryMsg::GetAccount { - address: address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - async fn get_mixnode_pledge(&self, address: &str) -> Result, NyxdError> { - let request = VestingQueryMsg::GetMixnode { - address: address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - async fn get_gateway_pledge(&self, address: &str) -> Result, NyxdError> { - let request = VestingQueryMsg::GetGateway { - address: address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn get_current_vesting_period(&self, address: &str) -> Result { - let request = VestingQueryMsg::GetCurrentVestingPeriod { - address: address.to_string(), - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn get_delegation_timestamps( - &self, - address: &str, - mix_id: MixId, - ) -> Result { - let request = VestingQueryMsg::GetDelegationTimes { - address: address.to_string(), - mix_id, - }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } - - async fn get_all_vesting_delegations_paged( - &self, - start_after: Option<(u32, MixId, u64)>, - limit: Option, - ) -> Result { - let request = VestingQueryMsg::GetAllDelegations { start_after, limit }; - self.client - .query_contract_smart(self.vesting_contract_address(), &request) - .await - } } diff --git a/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs index 68b4bcc53a..0b34ae362b 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs @@ -106,12 +106,14 @@ pub trait VestingSigningClient { &self, mix_id: MixId, amount: Coin, + on_behalf_of: Option, fee: Option, ) -> Result; async fn vesting_undelegate_from_mixnode( &self, mix_id: MixId, + on_behalf_of: Option, fee: Option, ) -> Result; @@ -127,7 +129,7 @@ pub trait VestingSigningClient { } #[async_trait] -impl VestingSigningClient for NyxdClient { +impl VestingSigningClient for NyxdClient { async fn execute_vesting_contract( &self, fee: Option, @@ -367,6 +369,7 @@ impl VestingSigningClient for NyxdClient &self, mix_id: MixId, amount: Coin, + on_behalf_of: Option, fee: Option, ) -> Result { self.execute_vesting_contract( @@ -374,6 +377,7 @@ impl VestingSigningClient for NyxdClient VestingExecuteMsg::DelegateToMixnode { mix_id, amount: amount.into(), + on_behalf_of, }, vec![], ) @@ -383,11 +387,15 @@ impl VestingSigningClient for NyxdClient async fn vesting_undelegate_from_mixnode( &self, mix_id: MixId, + on_behalf_of: Option, fee: Option, ) -> Result { self.execute_vesting_contract( fee, - VestingExecuteMsg::UndelegateFromMixnode { mix_id }, + VestingExecuteMsg::UndelegateFromMixnode { + mix_id, + on_behalf_of, + }, vec![], ) .await diff --git a/common/coconut-interface/src/lib.rs b/common/coconut-interface/src/lib.rs index 7c4cd72213..e8ea53daed 100644 --- a/common/coconut-interface/src/lib.rs +++ b/common/coconut-interface/src/lib.rs @@ -18,6 +18,8 @@ pub struct Credential { theta: Theta, voucher_value: u64, voucher_info: String, + #[getset(get = "pub")] + epoch_id: u64, } impl Credential { pub fn new( @@ -25,12 +27,14 @@ impl Credential { theta: Theta, voucher_value: u64, voucher_info: String, + epoch_id: u64, ) -> Credential { Credential { n_params, theta, voucher_value, voucher_info, + epoch_id, } } @@ -68,6 +72,7 @@ impl Credential { let theta_bytes = self.theta.to_bytes(); let theta_bytes_len = theta_bytes.len(); let voucher_value_bytes = self.voucher_value.to_be_bytes(); + let epoch_id_bytes = self.epoch_id.to_be_bytes(); let voucher_info_bytes = self.voucher_info.as_bytes(); let voucher_info_len = voucher_info_bytes.len(); @@ -76,6 +81,7 @@ impl Credential { bytes.extend_from_slice(&(theta_bytes_len as u64).to_be_bytes()); bytes.extend_from_slice(&theta_bytes); bytes.extend_from_slice(&voucher_value_bytes); + bytes.extend_from_slice(&epoch_id_bytes); bytes.extend_from_slice(voucher_info_bytes); bytes @@ -103,7 +109,9 @@ impl Credential { .map_err(|e| CoconutError::Deserialization(e.to_string()))?; eight_byte.copy_from_slice(&bytes[12 + theta_len as usize..20 + theta_len as usize]); let voucher_value = u64::from_be_bytes(eight_byte); - let voucher_info = String::from_utf8(bytes[20 + theta_len as usize..].to_vec()) + eight_byte.copy_from_slice(&bytes[20 + theta_len as usize..28 + theta_len as usize]); + let epoch_id = u64::from_be_bytes(eight_byte); + let voucher_info = String::from_utf8(bytes[28 + theta_len as usize..].to_vec()) .map_err(|e| CoconutError::Deserialization(e.to_string()))?; Ok(Credential { @@ -111,6 +119,7 @@ impl Credential { theta, voucher_value, voucher_info, + epoch_id, }) } } @@ -166,7 +175,7 @@ mod tests { binding_number, ) .unwrap(); - let credential = Credential::new(4, theta, voucher_value, voucher_info); + let credential = Credential::new(4, theta, voucher_value, voucher_info, 42); let serialized_credential = credential.as_bytes(); let deserialized_credential = Credential::from_bytes(&serialized_credential).unwrap(); diff --git a/common/commands/Cargo.toml b/common/commands/Cargo.toml index 084f3956cd..e8d9180b06 100644 --- a/common/commands/Cargo.toml +++ b/common/commands/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-cli-commands" version = "1.0.0" -authors = ["Nym Technologies SA"] +authors.workspace = true edition = "2021" [dependencies] @@ -15,7 +15,7 @@ cw-utils = { version = "0.13.4" } handlebars = "3.0.1" humantime-serde = "1.0" k256 = { version = "0.10", features = ["ecdsa", "sha256"] } -log = "0.4" +log = { workspace = true } rand = {version = "0.6", features = ["std"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1" diff --git a/common/commands/src/context/mod.rs b/common/commands/src/context/mod.rs index ff0656e2f4..8a5960dc6e 100644 --- a/common/commands/src/context/mod.rs +++ b/common/commands/src/context/mod.rs @@ -80,7 +80,7 @@ pub fn create_signing_client( match NyxdClient::connect_with_mnemonic(client_config, nyxd_url, mnemonic, None) { Ok(client) => Ok(client), - Err(e) => Err(ContextError::NyxdError(format!("{:?}", e))), + Err(e) => Err(ContextError::NyxdError(format!("{e}"))), } } @@ -99,7 +99,7 @@ pub fn create_query_client( match NyxdClient::connect(client_config, nyxd_url) { Ok(client) => Ok(client), - Err(e) => Err(ContextError::NyxdError(format!("{:?}", e))), + Err(e) => Err(ContextError::NyxdError(format!("{e}"))), } } @@ -122,7 +122,7 @@ pub fn create_signing_client_with_nym_api( match validator_client::client::Client::new_signing(client_config, mnemonic) { Ok(client) => Ok(client), - Err(e) => Err(ContextError::NyxdError(format!("{:?}", e))), + Err(e) => Err(ContextError::NyxdError(format!("{e}"))), } } @@ -134,6 +134,6 @@ pub fn create_query_client_with_nym_api( match validator_client::client::Client::new_query(client_config) { Ok(client) => Ok(client), - Err(e) => Err(ContextError::NyxdError(format!("{:?}", e))), + Err(e) => Err(ContextError::NyxdError(format!("{e}"))), } } diff --git a/common/commands/src/utils.rs b/common/commands/src/utils.rs index 59fee99f4e..682465b010 100644 --- a/common/commands/src/utils.rs +++ b/common/commands/src/utils.rs @@ -15,7 +15,7 @@ pub fn pretty_coin(coin: &Coin) -> String { } else { &coin.denom }; - format!("{} {}", amount, denom) + format!("{amount} {denom}") } pub fn pretty_cosmwasm_coin(coin: &CosmWasmCoin) -> String { @@ -25,12 +25,12 @@ pub fn pretty_cosmwasm_coin(coin: &CosmWasmCoin) -> String { } else { &coin.denom }; - format!("{} {}", amount, denom) + format!("{amount} {denom}") } pub fn pretty_decimal_with_denom(value: Decimal, denom: &str) -> String { // TODO: we might have to truncate the value here (that's why I moved it to separate function) - format!("{} {}", value, denom) + format!("{value} {denom}") } pub fn show_error(e: E) diff --git a/common/commands/src/validator/account/balance.rs b/common/commands/src/validator/account/balance.rs index 3f926891a5..13a00827ce 100644 --- a/common/commands/src/validator/account/balance.rs +++ b/common/commands/src/validator/account/balance.rs @@ -57,7 +57,7 @@ pub async fn query_balance( if denom.is_empty() || denom.eq_ignore_ascii_case(&coin.denom) { if args.raw { if !args.hide_denom { - println!("{}", coin); + println!("{coin}"); } else { println!("{}", coin.amount); } diff --git a/common/commands/src/validator/account/pubkey.rs b/common/commands/src/validator/account/pubkey.rs index 8ecf98c406..46c5186fff 100644 --- a/common/commands/src/validator/account/pubkey.rs +++ b/common/commands/src/validator/account/pubkey.rs @@ -77,12 +77,12 @@ pub async fn get_pubkey_from_chain(address: AccountId, client: &QueryClient) { if let Some(pubkey) = base_account.pubkey { println!("{}", pubkey.to_string()); } else { - println!("No account associated with address {}", address); + println!("No account associated with address {address}"); } } } Ok(None) => { - println!("No account associated with address {}", address); + println!("No account associated with address {address}"); } Err(e) => show_error(e), } diff --git a/common/commands/src/validator/cosmwasm/generators/coconut_bandwidth.rs b/common/commands/src/validator/cosmwasm/generators/coconut_bandwidth.rs index d2703a65ae..e135f5282c 100644 --- a/common/commands/src/validator/cosmwasm/generators/coconut_bandwidth.rs +++ b/common/commands/src/validator/cosmwasm/generators/coconut_bandwidth.rs @@ -43,5 +43,5 @@ pub async fn generate(args: Args) { let res = serde_json::to_string(&instantiate_msg).expect("failed to convert instantiate msg to json"); - println!("{}", res) + println!("{res}") } diff --git a/common/commands/src/validator/cosmwasm/generators/coconut_dkg.rs b/common/commands/src/validator/cosmwasm/generators/coconut_dkg.rs index f3f1b2ffe5..6fe83c4959 100644 --- a/common/commands/src/validator/cosmwasm/generators/coconut_dkg.rs +++ b/common/commands/src/validator/cosmwasm/generators/coconut_dkg.rs @@ -3,8 +3,10 @@ use clap::Parser; use log::{debug, info}; +use std::str::FromStr; use coconut_dkg_common::msg::InstantiateMsg; +use coconut_dkg_common::types::TimeConfiguration; #[derive(Debug, Parser)] pub struct Args { @@ -14,6 +16,24 @@ pub struct Args { #[clap(long)] pub multisig_addr: Option, + #[clap(long)] + pub public_key_submission_time_secs: Option, + + #[clap(long)] + pub dealing_exchange_time_secs: Option, + + #[clap(long)] + pub verification_key_submission_time_secs: Option, + + #[clap(long)] + pub verification_key_validation_time_secs: Option, + + #[clap(long)] + pub verification_key_finalization_time_secs: Option, + + #[clap(long)] + pub in_progress_time_secs: Option, + #[clap(long)] pub mix_denom: Option, } @@ -32,9 +52,42 @@ pub async fn generate(args: Args) { std::env::var(network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set") }); + let mut time_configuration = + if let Ok(config) = std::env::var(network_defaults::var_names::DKG_TIME_CONFIGURATION) { + TimeConfiguration::from_str(&config).expect("Invalid env variable value") + } else { + TimeConfiguration::default() + }; + if let Some(public_key_submission_time_secs) = args.public_key_submission_time_secs { + time_configuration.public_key_submission_time_secs = public_key_submission_time_secs; + } + if let Some(dealing_exchange_time_secs) = args.dealing_exchange_time_secs { + time_configuration.dealing_exchange_time_secs = dealing_exchange_time_secs; + } + if let Some(verification_key_submission_time_secs) = args.verification_key_submission_time_secs + { + time_configuration.verification_key_submission_time_secs = + verification_key_submission_time_secs; + } + if let Some(verification_key_validation_time_secs) = args.verification_key_validation_time_secs + { + time_configuration.verification_key_validation_time_secs = + verification_key_validation_time_secs; + } + if let Some(verification_key_finalization_time_secs) = + args.verification_key_finalization_time_secs + { + time_configuration.verification_key_finalization_time_secs = + verification_key_finalization_time_secs; + } + if let Some(in_progress_time_secs) = args.in_progress_time_secs { + time_configuration.in_progress_time_secs = in_progress_time_secs; + } + let instantiate_msg = InstantiateMsg { group_addr: args.group_addr, multisig_addr, + time_configuration: Some(time_configuration), mix_denom, }; @@ -43,5 +96,5 @@ pub async fn generate(args: Args) { let res = serde_json::to_string(&instantiate_msg).expect("failed to convert instantiate msg to json"); - println!("{}", res) + println!("{res}") } diff --git a/common/commands/src/validator/cosmwasm/generators/mixnet.rs b/common/commands/src/validator/cosmwasm/generators/mixnet.rs index 002b395a88..f5fb1f4c46 100644 --- a/common/commands/src/validator/cosmwasm/generators/mixnet.rs +++ b/common/commands/src/validator/cosmwasm/generators/mixnet.rs @@ -105,5 +105,5 @@ pub async fn generate(args: Args) { let res = serde_json::to_string(&instantiate_msg).expect("failed to convert instantiate msg to json"); - println!("{}", res) + println!("{res}") } diff --git a/common/commands/src/validator/cosmwasm/generators/multisig.rs b/common/commands/src/validator/cosmwasm/generators/multisig.rs index 43fb670e6f..38e645aeae 100644 --- a/common/commands/src/validator/cosmwasm/generators/multisig.rs +++ b/common/commands/src/validator/cosmwasm/generators/multisig.rs @@ -58,5 +58,5 @@ pub async fn generate(args: Args) { let res = serde_json::to_string(&instantiate_msg).expect("failed to convert instantiate msg to json"); - println!("{}", res) + println!("{res}") } diff --git a/common/commands/src/validator/cosmwasm/generators/vesting.rs b/common/commands/src/validator/cosmwasm/generators/vesting.rs index 5b60ea6db6..0b0695ef4c 100644 --- a/common/commands/src/validator/cosmwasm/generators/vesting.rs +++ b/common/commands/src/validator/cosmwasm/generators/vesting.rs @@ -39,5 +39,5 @@ pub async fn generate(args: Args) { let res = serde_json::to_string(&instantiate_msg).expect("failed to convert instantiate msg to json"); - println!("{}", res) + println!("{res}") } diff --git a/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs b/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs index b4cef52bf3..273904122d 100644 --- a/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs @@ -18,6 +18,9 @@ pub struct Args { #[clap(long)] pub identity_key: Option, + #[clap(long)] + pub on_behalf_of: Option, + #[clap(long)] pub amount: u128, } @@ -45,7 +48,7 @@ pub async fn vesting_delegate_to_mixnode(args: Args, client: SigningClient) { let coin = Coin::new(args.amount, denom); let res = client - .vesting_delegate_to_mixnode(mix_id, coin.into(), None) + .vesting_delegate_to_mixnode(mix_id, coin.into(), args.on_behalf_of, None) .await .expect("failed to delegate to mixnode!"); diff --git a/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs b/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs index 29b77c8a3b..2acafae9bd 100644 --- a/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs @@ -16,6 +16,9 @@ pub struct Args { #[clap(long)] pub identity_key: Option, + + #[clap(long)] + pub on_behalf_of: Option, } pub async fn vesting_undelegate_from_mixnode(args: Args, client: SigningClient) { @@ -37,7 +40,7 @@ pub async fn vesting_undelegate_from_mixnode(args: Args, client: SigningClient) }; let res = client - .vesting_undelegate_from_mixnode(mix_id, None) + .vesting_undelegate_from_mixnode(mix_id, args.on_behalf_of, None) .await .expect("failed to remove stake from vesting account on mixnode!"); diff --git a/common/commands/src/validator/mixnet/operators/mixnode/keys/decode_mixnode_key.rs b/common/commands/src/validator/mixnet/operators/mixnode/keys/decode_mixnode_key.rs index 5938a672c4..21b026c85e 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/keys/decode_mixnode_key.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/keys/decode_mixnode_key.rs @@ -13,5 +13,5 @@ pub fn decode_mixnode_key(args: Args) { let b64_decoded = base64::decode(args.key).expect("failed to decode base64 string"); let b58_encoded = bs58::encode(&b64_decoded).into_string(); - println!("{}", b58_encoded) + println!("{b58_encoded}") } diff --git a/common/config/Cargo.toml b/common/config/Cargo.toml index c0db6fe9e4..167286538e 100644 --- a/common/config/Cargo.toml +++ b/common/config/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] cfg-if = "1.0.0" handlebars = "3.0.1" -log = "0.4" +log = { workspace = true } serde = { version = "1.0", features = ["derive"] } toml = "0.5.6" url = "2.2" diff --git a/common/config/src/lib.rs b/common/config/src/lib.rs index 9e778840cd..d0ebecdca3 100644 --- a/common/config/src/lib.rs +++ b/common/config/src/lib.rs @@ -148,6 +148,25 @@ pub trait OptionalSet { } } + fn with_validated_optional( + self, + f: F, + value: Option, + validate: V, + ) -> Result + where + F: Fn(Self, T) -> Self, + V: Fn(&T) -> Result<(), E>, + Self: Sized, + { + if let Some(val) = value { + validate(&val)?; + Ok(f(self, val)) + } else { + Ok(self) + } + } + fn with_optional_env(self, f: F, val: Option, env_var: &str) -> Self where F: Fn(Self, T) -> Self, diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs index 7a85486eb0..d3b59c9f1b 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs @@ -1,7 +1,7 @@ // Copyright 2021 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::types::{ContractSafeBytes, EncodedBTEPublicKeyWithProof}; +use crate::types::{ContractSafeBytes, EncodedBTEPublicKeyWithProof, EpochId, TimeConfiguration}; use crate::verification_key::VerificationKeyShare; use cosmwasm_std::Addr; use schemars::JsonSchema; @@ -11,6 +11,7 @@ use serde::{Deserialize, Serialize}; pub struct InstantiateMsg { pub group_addr: String, pub multisig_addr: String, + pub time_configuration: Option, pub mix_denom: String, } @@ -34,6 +35,8 @@ pub enum ExecuteMsg { owner: Addr, }, + SurpassedThreshold {}, + AdvanceEpochState {}, } @@ -59,6 +62,7 @@ pub enum QueryMsg { start_after: Option, }, GetVerificationKeys { + epoch_id: EpochId, limit: Option, start_after: Option, }, diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs index 4de725cebf..170a8d83f7 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs @@ -1,8 +1,10 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::fmt::{Display, Formatter}; +use std::str::FromStr; pub use crate::dealer::{DealerDetails, PagedDealerResponse}; pub use contracts_common::dealings::ContractSafeBytes; @@ -11,38 +13,96 @@ pub use cosmwasm_std::{Addr, Coin, Timestamp}; pub type EncodedBTEPublicKeyWithProof = String; pub type EncodedBTEPublicKeyWithProofRef<'a> = &'a str; pub type NodeIndex = u64; - -// The time sign-up is open for dealers to join (2 minutes) -pub const PUBLIC_KEY_SUBMISSION_TIME_SECS: u64 = 60 * 2; -pub const DEALING_EXCHANGE_TIME_SECS: u64 = 60 * 5; -pub const VERIFICATION_KEY_SUBMISSION_TIME_SECS: u64 = 60 * 5; -pub const VERIFICATION_KEY_VALIDATION_TIME_SECS: u64 = 60; -pub const VERIFICATION_KEY_FINALIZATION_TIME_SECS: u64 = 60; -// The time an epoch lasts (2 weeks) -pub const IN_PROGRESS_TIME_SECS: u64 = 60 * 60 * 24 * 14; +pub type EpochId = u64; // 2 public attributes, 2 private attributes, 1 fixed for coconut credential pub const TOTAL_DEALINGS: usize = 2 + 2 + 1; +#[derive( + Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, Ord, PartialOrd, JsonSchema, +)] +pub struct TimeConfiguration { + // The time sign-up is open for dealers to join + pub public_key_submission_time_secs: u64, + pub dealing_exchange_time_secs: u64, + pub verification_key_submission_time_secs: u64, + pub verification_key_validation_time_secs: u64, + pub verification_key_finalization_time_secs: u64, + // The time an epoch lasts + pub in_progress_time_secs: u64, +} + +impl FromStr for TimeConfiguration { + type Err = String; + + fn from_str(s: &str) -> Result { + let times = s + .split(',') + .map(|t| t.parse()) + .collect::, _>>() + .map_err(|_| String::from("Could not parse string"))?; + if times.len() != 6 { + Err(String::from("Not enough time specified")) + } else { + Ok(TimeConfiguration { + public_key_submission_time_secs: times[0], + dealing_exchange_time_secs: times[1], + verification_key_submission_time_secs: times[2], + verification_key_validation_time_secs: times[3], + verification_key_finalization_time_secs: times[4], + in_progress_time_secs: times[5], + }) + } + } +} + +impl Default for TimeConfiguration { + fn default() -> Self { + Self { + public_key_submission_time_secs: 60 * 10, // 10 minutes + dealing_exchange_time_secs: 60 * 5, // 5 minutes + verification_key_submission_time_secs: 60 * 5, // 5 minutes + verification_key_validation_time_secs: 60, // 1 minute + verification_key_finalization_time_secs: 60, // 1 minute + in_progress_time_secs: 60 * 60 * 24 * 14, // 2 weeks + } + } +} + #[derive(Serialize, Deserialize, Default, Clone, Copy, Debug, PartialEq, Eq, Ord, PartialOrd)] #[serde(rename_all = "snake_case")] pub struct Epoch { pub state: EpochState, + pub epoch_id: EpochId, + pub time_configuration: TimeConfiguration, pub finish_timestamp: Timestamp, } impl Epoch { - pub fn new(state: EpochState, current_timestamp: Timestamp) -> Self { + pub fn new( + state: EpochState, + epoch_id: u64, + time_configuration: TimeConfiguration, + current_timestamp: Timestamp, + ) -> Self { let duration = match state { - EpochState::PublicKeySubmission => PUBLIC_KEY_SUBMISSION_TIME_SECS, - EpochState::DealingExchange => DEALING_EXCHANGE_TIME_SECS, - EpochState::VerificationKeySubmission => VERIFICATION_KEY_SUBMISSION_TIME_SECS, - EpochState::VerificationKeyValidation => VERIFICATION_KEY_VALIDATION_TIME_SECS, - EpochState::VerificationKeyFinalization => VERIFICATION_KEY_FINALIZATION_TIME_SECS, - EpochState::InProgress => IN_PROGRESS_TIME_SECS, + EpochState::PublicKeySubmission => time_configuration.public_key_submission_time_secs, + EpochState::DealingExchange => time_configuration.dealing_exchange_time_secs, + EpochState::VerificationKeySubmission => { + time_configuration.verification_key_submission_time_secs + } + EpochState::VerificationKeyValidation => { + time_configuration.verification_key_validation_time_secs + } + EpochState::VerificationKeyFinalization => { + time_configuration.verification_key_finalization_time_secs + } + EpochState::InProgress => time_configuration.in_progress_time_secs, }; Epoch { state, + epoch_id, + time_configuration, finish_timestamp: current_timestamp.plus_seconds(duration), } } diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/verification_key.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/verification_key.rs index cfc3ffae03..2dcd222b91 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/verification_key.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/verification_key.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::msg::ExecuteMsg; -use crate::types::NodeIndex; +use crate::types::{EpochId, NodeIndex}; use cosmwasm_std::{from_binary, to_binary, Addr, CosmosMsg, StdResult, Timestamp, WasmMsg}; use cw_utils::Expiration; use multisig_contract_common::msg::ExecuteMsg as MultisigExecuteMsg; @@ -16,6 +16,7 @@ pub struct ContractVKShare { pub announce_address: String, pub node_index: NodeIndex, pub owner: Addr, + pub epoch_id: EpochId, pub verified: bool, } diff --git a/common/cosmwasm-smart-contracts/contracts-common/src/dealings.rs b/common/cosmwasm-smart-contracts/contracts-common/src/dealings.rs index 98e587737e..795c59849f 100644 --- a/common/cosmwasm-smart-contracts/contracts-common/src/dealings.rs +++ b/common/cosmwasm-smart-contracts/contracts-common/src/dealings.rs @@ -31,7 +31,7 @@ impl Display for ContractSafeBytes { write!(f, "0x")?; } for byte in self.0.iter().take(MAX_DISPLAY_SIZE) { - write!(f, "{:02X}", byte)?; + write!(f, "{byte:02X}")?; } // just some sanity safeguards if self.0.len() > MAX_DISPLAY_SIZE { diff --git a/common/cosmwasm-smart-contracts/contracts-common/src/types.rs b/common/cosmwasm-smart-contracts/contracts-common/src/types.rs index b2721d7c6b..8ae7331d15 100644 --- a/common/cosmwasm-smart-contracts/contracts-common/src/types.rs +++ b/common/cosmwasm-smart-contracts/contracts-common/src/types.rs @@ -73,7 +73,7 @@ impl Percent { impl Display for Percent { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { let adjusted = Decimal::from_ratio(100u32, 1u32) * self.0; - write!(f, "{}%", adjusted) + write!(f, "{adjusted}%") } } diff --git a/common/cosmwasm-smart-contracts/group-contract/Cargo.toml b/common/cosmwasm-smart-contracts/group-contract/Cargo.toml new file mode 100644 index 0000000000..6389f8fb3c --- /dev/null +++ b/common/cosmwasm-smart-contracts/group-contract/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "group-contract-common" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cw4 = { version = "0.13.4" } +schemars = "0.8" +serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/common/cosmwasm-smart-contracts/group-contract/src/lib.rs b/common/cosmwasm-smart-contracts/group-contract/src/lib.rs new file mode 100644 index 0000000000..d0e87a0d30 --- /dev/null +++ b/common/cosmwasm-smart-contracts/group-contract/src/lib.rs @@ -0,0 +1 @@ +pub mod msg; diff --git a/contracts/multisig/cw4-group/src/msg.rs b/common/cosmwasm-smart-contracts/group-contract/src/msg.rs similarity index 93% rename from contracts/multisig/cw4-group/src/msg.rs rename to common/cosmwasm-smart-contracts/group-contract/src/msg.rs index d3dd63388c..a5a473135d 100644 --- a/contracts/multisig/cw4-group/src/msg.rs +++ b/common/cosmwasm-smart-contracts/group-contract/src/msg.rs @@ -1,3 +1,6 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml b/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml index 1f3e72af8a..1cc5118582 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml +++ b/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml @@ -19,7 +19,7 @@ serde_json = "1.0.0" humantime-serde = "1.1.1" # TO CHECK WHETHER STILL NEEDED: -log = "0.4.14" +log = { workspace = true } time = { version = "0.3.6", features = ["parsing", "formatting"] } ts-rs = { version = "6.1.2", optional = true } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs index f9f5de1802..7a6ab1ffe6 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs @@ -86,7 +86,7 @@ impl ToString for MixnetEventType { MixnetEventType::DelegationOnUnbonding => "delegation_on_unbonding_node", }; - format!("{}{}", EVENT_VERSION_PREFIX, event_name) + format!("{EVENT_VERSION_PREFIX}{event_name}") } } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/helpers.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/helpers.rs index 5dc06ed9c3..fc0a05892b 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/helpers.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/helpers.rs @@ -6,9 +6,9 @@ use cosmwasm_std::{Decimal, StdError, StdResult, Uint128}; pub fn compare_decimals(a: Decimal, b: Decimal, epsilon: Option) { let epsilon = epsilon.unwrap_or_else(|| Decimal::from_ratio(1u128, 100_000_000u128)); if a > b { - assert!(a - b < epsilon, "{} != {}", a, b) + assert!(a - b < epsilon, "{a} != {b}") } else { - assert!(b - a < epsilon, "{} != {}", a, b) + assert!(b - a < epsilon, "{a} != {b}") } } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs index cc86757367..d1b9fd31e6 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs @@ -241,30 +241,30 @@ impl ExecuteMsg { pub fn default_memo(&self) -> String { match self { ExecuteMsg::AssignNodeLayer { mix_id, layer } => { - format!("assigning mix {} for layer {:?}", mix_id, layer) + format!("assigning mix {mix_id} for layer {layer:?}") } ExecuteMsg::CreateFamily { .. } => "crating node family with".to_string(), ExecuteMsg::JoinFamily { family_head, .. } => { - format!("joining family {}", family_head) + format!("joining family {family_head}") } ExecuteMsg::LeaveFamily { family_head, .. } => { - format!("leaving family {}", family_head) + format!("leaving family {family_head}") } ExecuteMsg::KickFamilyMember { member, .. } => { - format!("kicking {} from family", member) + format!("kicking {member} from family") } ExecuteMsg::CreateFamilyOnBehalf { .. } => "crating node family with".to_string(), ExecuteMsg::JoinFamilyOnBehalf { family_head, .. } => { - format!("joining family {}", family_head) + format!("joining family {family_head}") } ExecuteMsg::LeaveFamilyOnBehalf { family_head, .. } => { - format!("leaving family {}", family_head) + format!("leaving family {family_head}") } ExecuteMsg::KickFamilyMemberOnBehalf { member, .. } => { - format!("kicking {} from family", member) + format!("kicking {member} from family") } ExecuteMsg::UpdateRewardingValidatorAddress { address } => { - format!("updating rewarding validator to {}", address) + format!("updating rewarding validator to {address}") } ExecuteMsg::UpdateContractStateParams { .. } => { "updating mixnet state parameters".into() @@ -273,21 +273,14 @@ impl ExecuteMsg { active_set_size, force_immediately, } => format!( - "updating active set size to {}. forced: {}", - active_set_size, force_immediately + "updating active set size to {active_set_size}. forced: {force_immediately}" ), ExecuteMsg::UpdateRewardingParams { force_immediately, .. - } => format!( - "updating mixnet rewarding parameters. forced: {}", - force_immediately - ), + } => format!("updating mixnet rewarding parameters. forced: {force_immediately}"), ExecuteMsg::UpdateIntervalConfig { force_immediately, .. - } => format!( - "updating mixnet interval configuration. forced: {}", - force_immediately - ), + } => format!("updating mixnet interval configuration. forced: {force_immediately}"), ExecuteMsg::AdvanceCurrentEpoch { .. } => "advancing current epoch".into(), ExecuteMsg::ReconcileEpochEvents { .. } => "reconciling epoch events".into(), ExecuteMsg::BondMixnode { mix_node, .. } => { @@ -316,34 +309,30 @@ impl ExecuteMsg { } ExecuteMsg::UnbondGateway { .. } => "unbonding gateway".into(), ExecuteMsg::UnbondGatewayOnBehalf { .. } => "unbonding gateway on behalf".into(), - ExecuteMsg::DelegateToMixnode { mix_id } => format!("delegating to mixnode {}", mix_id), + ExecuteMsg::DelegateToMixnode { mix_id } => format!("delegating to mixnode {mix_id}"), ExecuteMsg::DelegateToMixnodeOnBehalf { mix_id, .. } => { - format!("delegating to mixnode {} on behalf", mix_id) + format!("delegating to mixnode {mix_id} on behalf") } ExecuteMsg::UndelegateFromMixnode { mix_id } => { - format!("removing delegation from mixnode {}", mix_id) + format!("removing delegation from mixnode {mix_id}") } ExecuteMsg::UndelegateFromMixnodeOnBehalf { mix_id, .. } => { - format!("removing delegation from mixnode {} on behalf", mix_id) + format!("removing delegation from mixnode {mix_id} on behalf") } ExecuteMsg::RewardMixnode { mix_id, performance, - } => format!( - "rewarding mixnode {} for performance {}", - mix_id, performance - ), + } => format!("rewarding mixnode {mix_id} for performance {performance}"), ExecuteMsg::WithdrawOperatorReward { .. } => "withdrawing operator reward".into(), ExecuteMsg::WithdrawOperatorRewardOnBehalf { .. } => { "withdrawing operator reward on behalf".into() } ExecuteMsg::WithdrawDelegatorReward { mix_id } => { - format!("withdrawing delegator reward from mixnode {}", mix_id) + format!("withdrawing delegator reward from mixnode {mix_id}") + } + ExecuteMsg::WithdrawDelegatorRewardOnBehalf { mix_id, .. } => { + format!("withdrawing delegator reward from mixnode {mix_id} on behalf") } - ExecuteMsg::WithdrawDelegatorRewardOnBehalf { mix_id, .. } => format!( - "withdrawing delegator reward from mixnode {} on behalf", - mix_id - ), #[cfg(feature = "contract-testing")] ExecuteMsg::TestingResolveAllPendingEvents { .. } => { "resolving all pending events".into() diff --git a/common/cosmwasm-smart-contracts/vesting-contract/src/lib.rs b/common/cosmwasm-smart-contracts/vesting-contract/src/lib.rs index 0153ec9ad7..75d916ddad 100644 --- a/common/cosmwasm-smart-contracts/vesting-contract/src/lib.rs +++ b/common/cosmwasm-smart-contracts/vesting-contract/src/lib.rs @@ -64,7 +64,7 @@ impl FromStr for PledgeCap { Ok(p) => Ok(PledgeCap::Percent(p)), Err(_) => match cap.parse::() { Ok(i) => Ok(PledgeCap::Absolute(Uint128::from(i))), - Err(_e) => Err(format!("Could not parse {} as Percent or Uint128", cap)), + Err(_e) => Err(format!("Could not parse {cap} as Percent or Uint128")), }, } } @@ -134,6 +134,32 @@ pub struct AllDelegationsResponse { pub start_next_after: Option<(u32, MixId, u64)>, } +#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema)] +pub struct AccountVestingCoins { + pub account_id: u32, + pub owner: Addr, + pub still_vesting: Coin, +} + +#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema)] +pub struct VestingCoinsResponse { + pub accounts: Vec, + pub start_next_after: Option, +} + +#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema)] +pub struct BaseVestingAccountInfo { + pub account_id: u32, + pub owner: Addr, + // TODO: should this particular query/response expose anything else? +} + +#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema)] +pub struct AccountsResponse { + pub accounts: Vec, + pub start_next_after: Option, +} + #[cfg(test)] mod test { use contracts_common::Percent; diff --git a/common/cosmwasm-smart-contracts/vesting-contract/src/messages.rs b/common/cosmwasm-smart-contracts/vesting-contract/src/messages.rs index 3edc6c2303..eff35b4c06 100644 --- a/common/cosmwasm-smart-contracts/vesting-contract/src/messages.rs +++ b/common/cosmwasm-smart-contracts/vesting-contract/src/messages.rs @@ -18,7 +18,8 @@ pub struct InitMsg { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] #[serde(rename_all = "snake_case")] pub struct MigrateMsg { - pub v2_mixnet_contract_address: String, + // I'm making it explicit so that we wouldn't accidentally forget about it + pub manually_verified_no_staking_addresses: bool, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, Default)] @@ -96,9 +97,11 @@ pub enum ExecuteMsg { DelegateToMixnode { mix_id: MixId, amount: Coin, + on_behalf_of: Option, }, UndelegateFromMixnode { mix_id: MixId, + on_behalf_of: Option, }, CreateAccount { owner_address: String, @@ -188,6 +191,14 @@ impl ExecuteMsg { #[serde(rename_all = "snake_case")] pub enum QueryMsg { GetContractVersion {}, + GetAccountsPaged { + start_next_after: Option, + limit: Option, + }, + GetAccountsVestingCoinsPaged { + start_next_after: Option, + limit: Option, + }, LockedCoins { vesting_account_address: String, block_time: Option, diff --git a/common/credential-storage/Cargo.toml b/common/credential-storage/Cargo.toml index 4eacccd531..0c10ef7535 100644 --- a/common/credential-storage/Cargo.toml +++ b/common/credential-storage/Cargo.toml @@ -8,12 +8,12 @@ edition = "2021" [dependencies] async-trait = { version = "0.1.51" } -log = "0.4" +log = { workspace = true } sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"]} thiserror = "1.0" -tokio = { version = "1.21.2", features = [ "rt-multi-thread", "net", "signal", "fs" ] } +tokio = { version = "1.24.1", features = [ "rt-multi-thread", "net", "signal", "fs" ] } [build-dependencies] sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] } -tokio = { version = "1.21.2", features = ["rt-multi-thread", "macros"] } +tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } diff --git a/common/credential-storage/build.rs b/common/credential-storage/build.rs index ad3cfe4bff..4716c65d0d 100644 --- a/common/credential-storage/build.rs +++ b/common/credential-storage/build.rs @@ -9,9 +9,9 @@ use std::env; #[tokio::main] async fn main() { let out_dir = env::var("OUT_DIR").unwrap(); - let database_path = format!("{}/coconut-credential-example.sqlite", out_dir); + let database_path = format!("{out_dir}/coconut-credential-example.sqlite"); - let mut conn = SqliteConnection::connect(&format!("sqlite://{}?mode=rwc", database_path)) + let mut conn = SqliteConnection::connect(&format!("sqlite://{database_path}?mode=rwc")) .await .expect("Failed to create SQLx database connection"); diff --git a/common/credential-storage/migrations/20230117120000_add_epoch_id_to_coconut.sql b/common/credential-storage/migrations/20230117120000_add_epoch_id_to_coconut.sql new file mode 100644 index 0000000000..2ecd81bcee --- /dev/null +++ b/common/credential-storage/migrations/20230117120000_add_epoch_id_to_coconut.sql @@ -0,0 +1,17 @@ +/* + * Copyright 2023 - Nym Technologies SA + * SPDX-License-Identifier: Apache-2.0 + */ + +DROP TABLE coconut_credentials; +CREATE TABLE coconut_credentials +( + id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + voucher_value TEXT NOT NULL, + voucher_info TEXT NOT NULL, + serial_number TEXT NOT NULL, + binding_number TEXT NOT NULL, + signature TEXT NOT NULL UNIQUE, + epoch_id TEXT NOT NULL, + consumed BOOLEAN NOT NULL +); \ No newline at end of file diff --git a/common/credential-storage/src/coconut.rs b/common/credential-storage/src/coconut.rs index 103f8760d2..a6cd968c2e 100644 --- a/common/credential-storage/src/coconut.rs +++ b/common/credential-storage/src/coconut.rs @@ -34,10 +34,11 @@ impl CoconutCredentialManager { serial_number: String, binding_number: String, signature: String, + epoch_id: String, ) -> Result<(), sqlx::Error> { sqlx::query!( - "INSERT INTO coconut_credentials(voucher_value, voucher_info, serial_number, binding_number, signature, consumed) VALUES (?, ?, ?, ?, ?, ?)", - voucher_value, voucher_info, serial_number, binding_number, signature, false + "INSERT INTO coconut_credentials(voucher_value, voucher_info, serial_number, binding_number, signature, epoch_id, consumed) VALUES (?, ?, ?, ?, ?, ?, ?)", + voucher_value, voucher_info, serial_number, binding_number, signature, epoch_id, false ) .execute(&self.connection_pool) .await?; diff --git a/common/credential-storage/src/lib.rs b/common/credential-storage/src/lib.rs index d0a0992894..bf3af1b272 100644 --- a/common/credential-storage/src/lib.rs +++ b/common/credential-storage/src/lib.rs @@ -70,6 +70,7 @@ impl Storage for PersistentStorage { serial_number: String, binding_number: String, signature: String, + epoch_id: String, ) -> Result<(), StorageError> { self.coconut_credential_manager .insert_coconut_credential( @@ -78,6 +79,7 @@ impl Storage for PersistentStorage { serial_number, binding_number, signature, + epoch_id, ) .await?; diff --git a/common/credential-storage/src/models.rs b/common/credential-storage/src/models.rs index 6ce7a9dd4b..67f6e4790c 100644 --- a/common/credential-storage/src/models.rs +++ b/common/credential-storage/src/models.rs @@ -9,5 +9,6 @@ pub struct CoconutCredential { pub serial_number: String, pub binding_number: String, pub signature: String, + pub epoch_id: String, pub consumed: bool, } diff --git a/common/credential-storage/src/storage.rs b/common/credential-storage/src/storage.rs index 77df96f4c8..bf3285cae6 100644 --- a/common/credential-storage/src/storage.rs +++ b/common/credential-storage/src/storage.rs @@ -12,7 +12,12 @@ pub trait Storage: Send + Sync { /// /// # Arguments /// + /// * `voucher_value`: How much bandwidth is in the credential. + /// * `voucher_info`: What type of credential it is. + /// * `serial_number`: Serial number of the credential. + /// * `binding_number`: Binding number of the credential. /// * `signature`: Coconut credential in the form of a signature. + /// * `epoch_id`: The epoch when it was signed. async fn insert_coconut_credential( &self, voucher_value: String, @@ -20,6 +25,7 @@ pub trait Storage: Send + Sync { serial_number: String, binding_number: String, signature: String, + epoch_id: String, ) -> Result<(), StorageError>; /// Tries to retrieve one of the stored, unused credentials. diff --git a/common/credentials/src/coconut/bandwidth.rs b/common/credentials/src/coconut/bandwidth.rs index ed38fbb14c..53e9c5ed41 100644 --- a/common/credentials/src/coconut/bandwidth.rs +++ b/common/credentials/src/coconut/bandwidth.rs @@ -168,6 +168,7 @@ pub fn prepare_for_spending( voucher_info: String, serial_number: PrivateAttribute, binding_number: PrivateAttribute, + epoch_id: u64, signature: &Signature, verification_key: &VerificationKey, ) -> Result { @@ -179,6 +180,7 @@ pub fn prepare_for_spending( voucher_info, serial_number, binding_number, + epoch_id, signature, verification_key, ) diff --git a/common/credentials/src/coconut/utils.rs b/common/credentials/src/coconut/utils.rs index 53e01437af..12edebc3df 100644 --- a/common/credentials/src/coconut/utils.rs +++ b/common/credentials/src/coconut/utils.rs @@ -137,12 +137,14 @@ pub async fn obtain_aggregate_signature( } // TODO: better type flow +#[allow(clippy::too_many_arguments)] pub fn prepare_credential_for_spending( params: &Parameters, voucher_value: u64, voucher_info: String, serial_number: Attribute, binding_number: Attribute, + epoch_id: u64, signature: &Signature, verification_key: &VerificationKey, ) -> Result { @@ -159,5 +161,6 @@ pub fn prepare_credential_for_spending( theta, voucher_value, voucher_info, + epoch_id, )) } diff --git a/common/crypto/dkg/src/bte/keys.rs b/common/crypto/dkg/src/bte/keys.rs index 098e9638c7..a2ed0c534d 100644 --- a/common/crypto/dkg/src/bte/keys.rs +++ b/common/crypto/dkg/src/bte/keys.rs @@ -224,10 +224,7 @@ impl DecryptionKey { let mut dh = Vec::with_capacity(dh_len); for j in 0..dh_len { let dh_i = deserialize_g2(&bytes[i..i + 96]).ok_or_else(|| { - DkgError::new_deserialization_failure( - format!("Node.dh_{}", j), - "invalid curve point", - ) + DkgError::new_deserialization_failure(format!("Node.dh_{j}"), "invalid curve point") })?; dh.push(dh_i); diff --git a/common/crypto/dkg/src/bte/mod.rs b/common/crypto/dkg/src/bte/mod.rs index 2eca744cf1..0bb18dc082 100644 --- a/common/crypto/dkg/src/bte/mod.rs +++ b/common/crypto/dkg/src/bte/mod.rs @@ -60,7 +60,7 @@ pub fn setup() -> Params { let f0 = hash_g2(b"f0", SETUP_DOMAIN); let fh = (0..HASH_SECURITY_PARAM) - .map(|i| hash_g2(format!("fh{}", i), SETUP_DOMAIN)) + .map(|i| hash_g2(format!("fh{i}"), SETUP_DOMAIN)) .collect(); let h = hash_g2(b"h", SETUP_DOMAIN); diff --git a/common/crypto/src/bech32_address_validation.rs b/common/crypto/src/bech32_address_validation.rs index f432daab4c..de6e298c66 100644 --- a/common/crypto/src/bech32_address_validation.rs +++ b/common/crypto/src/bech32_address_validation.rs @@ -21,8 +21,7 @@ pub fn validate_bech32_prefix(bech32_prefix: &str, address: &str) -> Result<(), Ok(()) } else { Err(Bech32Error::WrongPrefix(format!( - "your bech32 address prefix should be {}, not {}", - bech32_prefix, prefix + "your bech32 address prefix should be {bech32_prefix}, not {prefix}" ))) } } @@ -70,8 +69,7 @@ mod tests { fn wrong_prefix_fails() { assert_eq!( Err(Bech32Error::WrongPrefix(format!( - "your bech32 address prefix should be {}, not punk", - TEST_BECH32_PREFIX + "your bech32 address prefix should be {TEST_BECH32_PREFIX}, not punk" ))), validate_bech32_prefix( TEST_BECH32_PREFIX, diff --git a/common/inclusion-probability/Cargo.toml b/common/inclusion-probability/Cargo.toml index 73eedb75a0..d6cd2dae19 100644 --- a/common/inclusion-probability/Cargo.toml +++ b/common/inclusion-probability/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -log = "0.4.17" +log = { workspace = true } rand = "0.8.5" thiserror = "1.0.32" diff --git a/common/logging/Cargo.toml b/common/logging/Cargo.toml index 14d2e3a737..491caa6b74 100644 --- a/common/logging/Cargo.toml +++ b/common/logging/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -log = "0.4.0" -pretty_env_logger = "0.4.0" \ No newline at end of file +log = { workspace = true } +pretty_env_logger = "0.4.0" diff --git a/common/logging/src/lib.rs b/common/logging/src/lib.rs index 6c026e9b90..27f7711e80 100644 --- a/common/logging/src/lib.rs +++ b/common/logging/src/lib.rs @@ -23,3 +23,19 @@ pub fn setup_logging() { .filter_module("sled", log::LevelFilter::Warn) .init(); } + +pub fn banner(crate_name: &str, crate_version: &str) -> String { + format!( + r#" + + _ __ _ _ _ __ ___ + | '_ \| | | | '_ \ _ \ + | | | | |_| | | | | | | + |_| |_|\__, |_| |_| |_| + |___/ + + ({crate_name} - version {crate_version}) + + "# + ) +} diff --git a/common/mixnode-common/Cargo.toml b/common/mixnode-common/Cargo.toml index f2cc32465e..04d225fac9 100644 --- a/common/mixnode-common/Cargo.toml +++ b/common/mixnode-common/Cargo.toml @@ -10,11 +10,11 @@ edition = "2021" bytes = "1.0" futures = "0.3" humantime-serde = "1.0" -log = "0.4" +log = { workspace = true } rand = "0.8" serde = { version = "1.0", features = ["derive"] } -tokio = { version = "1.21.2", features = ["time", "macros", "rt", "net", "io-util"] } -tokio-util = { version = "0.7.3", features = ["codec"] } +tokio = { version = "1.24.1", features = ["time", "macros", "rt", "net", "io-util"] } +tokio-util = { version = "0.7.4", features = ["codec"] } url = "2.2" thiserror = "1.0.37" diff --git a/common/mixnode-common/src/verloc/error.rs b/common/mixnode-common/src/verloc/error.rs index 0268059d7c..4bfe0da48e 100644 --- a/common/mixnode-common/src/verloc/error.rs +++ b/common/mixnode-common/src/verloc/error.rs @@ -53,19 +53,19 @@ impl Display for RttError { write!(f, "The received reply packet had invalid signature") } RttError::UnreachableNode(id, err) => { - write!(f, "Could not establish connection to {} - {err}", id) + write!(f, "Could not establish connection to {id} - {err}") } RttError::UnexpectedConnectionFailureWrite(id, err) => { - write!(f, "Failed to write echo packet to {} - {err}", id) + write!(f, "Failed to write echo packet to {id} - {err}") } RttError::UnexpectedConnectionFailureRead(id, err) => { - write!(f, "Failed to read reply packet from {} - {err}", id) + write!(f, "Failed to read reply packet from {id} - {err}") } RttError::ConnectionReadTimeout(id) => { - write!(f, "Timed out while trying to read reply packet from {}", id) + write!(f, "Timed out while trying to read reply packet from {id}") } RttError::ConnectionWriteTimeout(id) => { - write!(f, "Timed out while trying to write echo packet to {}", id) + write!(f, "Timed out while trying to write echo packet to {id}") } RttError::UnexpectedReplySequence => write!( f, diff --git a/common/mixnode-common/src/verloc/mod.rs b/common/mixnode-common/src/verloc/mod.rs index cbcf590625..69e2df9480 100644 --- a/common/mixnode-common/src/verloc/mod.rs +++ b/common/mixnode-common/src/verloc/mod.rs @@ -153,7 +153,7 @@ impl Default for ConfigBuilder { fn default() -> Self { ConfigBuilder(Config { minimum_compatible_node_version: parse_version(MINIMUM_NODE_VERSION).unwrap(), - listening_address: format!("[::]:{}", DEFAULT_VERLOC_PORT).parse().unwrap(), + listening_address: format!("[::]:{DEFAULT_VERLOC_PORT}").parse().unwrap(), packets_per_node: DEFAULT_PACKETS_PER_NODE, packet_timeout: DEFAULT_PACKET_TIMEOUT, connection_timeout: DEFAULT_CONNECTION_TIMEOUT, diff --git a/common/network-defaults/src/lib.rs b/common/network-defaults/src/lib.rs index dd16eb18d7..857177411e 100644 --- a/common/network-defaults/src/lib.rs +++ b/common/network-defaults/src/lib.rs @@ -36,6 +36,7 @@ pub struct NymContracts { pub vesting_contract_address: Option, pub bandwidth_claim_contract_address: Option, pub coconut_bandwidth_contract_address: Option, + pub group_contract_address: Option, pub multisig_contract_address: Option, pub coconut_dkg_contract_address: Option, } @@ -95,6 +96,9 @@ impl NymNetworkDetails { var(var_names::COCONUT_BANDWIDTH_CONTRACT_ADDRESS) .expect("coconut bandwidth contract not set"), )) + .with_group_contract(Some( + var(var_names::GROUP_CONTRACT_ADDRESS).expect("group contract not set"), + )) .with_multisig_contract(Some( var(var_names::MULTISIG_CONTRACT_ADDRESS).expect("multisig contract not set"), )) @@ -125,6 +129,7 @@ impl NymNetworkDetails { coconut_bandwidth_contract_address: parse_optional_str( mainnet::COCONUT_BANDWIDTH_CONTRACT_ADDRESS, ), + group_contract_address: parse_optional_str(mainnet::GROUP_CONTRACT_ADDRESS), multisig_contract_address: parse_optional_str(mainnet::MULTISIG_CONTRACT_ADDRESS), coconut_dkg_contract_address: parse_optional_str( mainnet::COCONUT_DKG_CONTRACT_ADDRESS, @@ -193,6 +198,12 @@ impl NymNetworkDetails { self } + #[must_use] + pub fn with_group_contract>(mut self, contract: Option) -> Self { + self.contracts.multisig_contract_address = contract.map(Into::into); + self + } + #[must_use] pub fn with_multisig_contract>(mut self, contract: Option) -> Self { self.contracts.multisig_contract_address = contract.map(Into::into); diff --git a/common/network-defaults/src/mainnet.rs b/common/network-defaults/src/mainnet.rs index 4f8352c1c6..3e37633b3f 100644 --- a/common/network-defaults/src/mainnet.rs +++ b/common/network-defaults/src/mainnet.rs @@ -11,12 +11,13 @@ pub const STAKE_DENOM: DenomDetails = DenomDetails::new("unyx", "nyx", 6); pub const MIXNET_CONTRACT_ADDRESS: &str = "n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0cznr"; -pub(crate) const VESTING_CONTRACT_ADDRESS: &str = +pub const VESTING_CONTRACT_ADDRESS: &str = "n1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq73f2nw"; pub(crate) const BANDWIDTH_CLAIM_CONTRACT_ADDRESS: &str = "n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0"; pub(crate) const COCONUT_BANDWIDTH_CONTRACT_ADDRESS: &str = "n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0"; +pub(crate) const GROUP_CONTRACT_ADDRESS: &str = "n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0"; pub(crate) const MULTISIG_CONTRACT_ADDRESS: &str = "n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0"; pub(crate) const COCONUT_DKG_CONTRACT_ADDRESS: &str = "n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0"; pub(crate) const _ETH_CONTRACT_ADDRESS: [u8; 20] = @@ -36,7 +37,7 @@ const DEFAULT_SUFFIX: &str = "_MAINNET_DEFAULT"; fn set_var_to_default(var: &str, value: &str) { std::env::set_var(var, value); - std::env::set_var(format!("{}{}", var, DEFAULT_SUFFIX), "1") + std::env::set_var(format!("{var}{DEFAULT_SUFFIX}"), "1") } fn set_var_conditionally_to_default(var: &str, value: &str) { @@ -46,7 +47,7 @@ fn set_var_conditionally_to_default(var: &str, value: &str) { } pub fn uses_default(var: &str) -> bool { - std::env::var(format!("{}{}", var, DEFAULT_SUFFIX)).is_ok() + std::env::var(format!("{var}{DEFAULT_SUFFIX}")).is_ok() } pub fn read_var_if_not_default(var: &str) -> Option { @@ -81,6 +82,7 @@ pub fn export_to_env() { var_names::COCONUT_BANDWIDTH_CONTRACT_ADDRESS, COCONUT_BANDWIDTH_CONTRACT_ADDRESS, ); + set_var_to_default(var_names::GROUP_CONTRACT_ADDRESS, GROUP_CONTRACT_ADDRESS); set_var_to_default( var_names::MULTISIG_CONTRACT_ADDRESS, MULTISIG_CONTRACT_ADDRESS, @@ -125,6 +127,7 @@ pub fn export_to_env_if_not_set() { var_names::COCONUT_BANDWIDTH_CONTRACT_ADDRESS, COCONUT_BANDWIDTH_CONTRACT_ADDRESS, ); + set_var_conditionally_to_default(var_names::GROUP_CONTRACT_ADDRESS, GROUP_CONTRACT_ADDRESS); set_var_conditionally_to_default( var_names::MULTISIG_CONTRACT_ADDRESS, MULTISIG_CONTRACT_ADDRESS, diff --git a/common/network-defaults/src/var_names.rs b/common/network-defaults/src/var_names.rs index c6e4a450a2..0fd5506ddc 100644 --- a/common/network-defaults/src/var_names.rs +++ b/common/network-defaults/src/var_names.rs @@ -14,6 +14,7 @@ pub const MIXNET_CONTRACT_ADDRESS: &str = "MIXNET_CONTRACT_ADDRESS"; pub const VESTING_CONTRACT_ADDRESS: &str = "VESTING_CONTRACT_ADDRESS"; pub const BANDWIDTH_CLAIM_CONTRACT_ADDRESS: &str = "BANDWIDTH_CLAIM_CONTRACT_ADDRESS"; pub const COCONUT_BANDWIDTH_CONTRACT_ADDRESS: &str = "COCONUT_BANDWIDTH_CONTRACT_ADDRESS"; +pub const GROUP_CONTRACT_ADDRESS: &str = "GROUP_CONTRACT_ADDRESS"; pub const MULTISIG_CONTRACT_ADDRESS: &str = "MULTISIG_CONTRACT_ADDRESS"; pub const COCONUT_DKG_CONTRACT_ADDRESS: &str = "COCONUT_DKG_CONTRACT_ADDRESS"; pub const REWARDING_VALIDATOR_ADDRESS: &str = "REWARDING_VALIDATOR_ADDRESS"; @@ -21,6 +22,8 @@ pub const STATISTICS_SERVICE_DOMAIN_ADDRESS: &str = "STATISTICS_SERVICE_DOMAIN_A pub const NYXD: &str = "NYXD"; pub const NYM_API: &str = "NYM_API"; +pub const DKG_TIME_CONFIGURATION: &str = "DKG_TIME_CONFIGURATION"; + // we don't want to explicitly tag those with `#[deprecated]` because then our CI would be red and sad : ( pub const DEPRECATED_NYMD_VALIDATOR: &str = "NYMD_VALIDATOR"; pub const DEPRECATED_API_VALIDATOR: &str = "API_VALIDATOR"; diff --git a/common/nonexhaustive-delayqueue/Cargo.toml b/common/nonexhaustive-delayqueue/Cargo.toml index 74c1776e95..9cc7a8d2a7 100644 --- a/common/nonexhaustive-delayqueue/Cargo.toml +++ b/common/nonexhaustive-delayqueue/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { version = "1.21.2", features = [] } -tokio-stream = "0.1.9" # this one seems to be a thing until `Stream` trait is stabilised in stdlib -tokio-util = { version = "0.7.3", features = ["time"] } +tokio = { version = "1.24.1", features = [] } +tokio-stream = "0.1.11" # this one seems to be a thing until `Stream` trait is stabilised in stdlib +tokio-util = { version = "0.7.4", features = ["time"] } [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-timer] git = "https://github.com/mmsinclair/wasm-timer" diff --git a/common/nymcoconut/src/scheme/keygen.rs b/common/nymcoconut/src/scheme/keygen.rs index ea9c88aa65..d80779381a 100644 --- a/common/nymcoconut/src/scheme/keygen.rs +++ b/common/nymcoconut/src/scheme/keygen.rs @@ -68,8 +68,7 @@ impl TryFrom<&[u8]> for SecretKey { if ys_len as usize != actual_ys_len { return Err(CoconutError::Deserialization(format!( - "Tried to deserialize secret key with inconsistent ys len (expected {}, got {})", - ys_len, actual_ys_len + "Tried to deserialize secret key with inconsistent ys len (expected {ys_len}, got {actual_ys_len})" ))); } @@ -185,8 +184,7 @@ impl TryFrom<&[u8]> for VerificationKey { if betas_len as usize != actual_betas_len { return Err( CoconutError::Deserialization( - format!("Tried to deserialize verification key with inconsistent betas len (expected {}, got {})", - betas_len, actual_betas_len + format!("Tried to deserialize verification key with inconsistent betas len (expected {betas_len}, got {actual_betas_len})" ))); } diff --git a/common/nymcoconut/src/scheme/setup.rs b/common/nymcoconut/src/scheme/setup.rs index a328ede31c..926d8f5ed0 100644 --- a/common/nymcoconut/src/scheme/setup.rs +++ b/common/nymcoconut/src/scheme/setup.rs @@ -33,7 +33,7 @@ impl Parameters { } let hs = (1..=num_attributes) - .map(|i| hash_g1(format!("h{}", i)).to_affine()) + .map(|i| hash_g1(format!("h{i}")).to_affine()) .collect(); Ok(Parameters { diff --git a/common/nymcoconut/src/tests/helpers.rs b/common/nymcoconut/src/tests/helpers.rs index ee7e418788..bae9efa36d 100644 --- a/common/nymcoconut/src/tests/helpers.rs +++ b/common/nymcoconut/src/tests/helpers.rs @@ -89,6 +89,9 @@ pub fn theta_from_keys_and_attributes( } pub fn transpose_matrix(matrix: Vec>) -> Vec> { + if matrix.is_empty() { + return vec![]; + } let len = matrix[0].len(); let mut iters: Vec<_> = matrix.into_iter().map(|d| d.into_iter()).collect(); (0..len) diff --git a/common/nymsphinx/Cargo.toml b/common/nymsphinx/Cargo.toml index d9d81aecd4..0513575ccc 100644 --- a/common/nymsphinx/Cargo.toml +++ b/common/nymsphinx/Cargo.toml @@ -34,5 +34,5 @@ mixnet-contract-common = { path = "../cosmwasm-smart-contracts/mixnet-contract" path = "framing" [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] -version = "1.21.2" +version = "1.24.1" features = ["sync"] diff --git a/common/nymsphinx/chunking/Cargo.toml b/common/nymsphinx/chunking/Cargo.toml index 3d6bacab61..42b0bfdf7d 100644 --- a/common/nymsphinx/chunking/Cargo.toml +++ b/common/nymsphinx/chunking/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -log = "0.4.8" +log = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } thiserror = "1.0.37" diff --git a/common/nymsphinx/framing/Cargo.toml b/common/nymsphinx/framing/Cargo.toml index fc46ece44a..6652d8faf8 100644 --- a/common/nymsphinx/framing/Cargo.toml +++ b/common/nymsphinx/framing/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] bytes = "1.0" -tokio-util = { version = "0.7.3", features = ["codec"] } +tokio-util = { version = "0.7.4", features = ["codec"] } thiserror = "1.0.37" nymsphinx-types = { path = "../types" } diff --git a/common/nymsphinx/params/src/packet_modes.rs b/common/nymsphinx/params/src/packet_modes.rs index 3fb7ac6358..87a0c80caf 100644 --- a/common/nymsphinx/params/src/packet_modes.rs +++ b/common/nymsphinx/params/src/packet_modes.rs @@ -11,10 +11,11 @@ pub struct InvalidPacketMode { } #[repr(u8)] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub enum PacketMode { /// Represents 'normal' packet sent through the network that should be delayed by an appropriate /// value at each hop. + #[default] Mix = 0, /// Represents a VPN packet that should not be delayed and ideally cached pre-computed keys @@ -43,9 +44,3 @@ impl TryFrom for PacketMode { } } } - -impl Default for PacketMode { - fn default() -> Self { - PacketMode::Mix - } -} diff --git a/common/nymsphinx/params/src/packet_sizes.rs b/common/nymsphinx/params/src/packet_sizes.rs index ef9976bd92..63cdc1eaa2 100644 --- a/common/nymsphinx/params/src/packet_sizes.rs +++ b/common/nymsphinx/params/src/packet_sizes.rs @@ -34,9 +34,10 @@ pub enum InvalidPacketSize { } #[repr(u8)] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub enum PacketSize { // for example instant messaging use case + #[default] RegularPacket = 1, // for sending SURB-ACKs @@ -136,9 +137,3 @@ impl PacketSize { } } } - -impl Default for PacketSize { - fn default() -> Self { - PacketSize::RegularPacket - } -} diff --git a/common/socks5/ordered-buffer/Cargo.toml b/common/socks5/ordered-buffer/Cargo.toml index 58dd09b263..d7207eaf9c 100644 --- a/common/socks5/ordered-buffer/Cargo.toml +++ b/common/socks5/ordered-buffer/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -log = "0.4" +log = { workspace = true } thiserror = "1.0.37" \ No newline at end of file diff --git a/common/socks5/proxy-helpers/Cargo.toml b/common/socks5/proxy-helpers/Cargo.toml index 2ecd2a0507..cfe89a0f12 100644 --- a/common/socks5/proxy-helpers/Cargo.toml +++ b/common/socks5/proxy-helpers/Cargo.toml @@ -8,12 +8,12 @@ edition = "2021" [dependencies] bytes = "1.0" -tokio = { version = "1.21.2", features = [ "net", "io-util", "sync", "macros", "time", "rt-multi-thread" ] } -tokio-util = { version = "0.7.3", features = [ "io" ] } # reason for getting this guy is to to able to port to tokio 1.X more quickly by being able to use +tokio = { version = "1.24.1", features = [ "net", "io-util", "sync", "macros", "time", "rt-multi-thread" ] } +tokio-util = { version = "0.7.4", features = [ "io" ] } # reason for getting this guy is to to able to port to tokio 1.X more quickly by being able to use # their `read_buf` [from the util crate] replacement rather than having to rethink/reimplement `AvailableReader` with the new AsyncRead trait definition. # In the long run, the dependency should probably get removed in favour of pure-tokio implementation, but for time being it's fine. futures = "0.3" -log = "0.4" +log = { workspace = true } # internal client-connections = { path = "../../client-connections" } diff --git a/common/socks5/proxy-helpers/src/connection_controller.rs b/common/socks5/proxy-helpers/src/connection_controller.rs index 66c8b94a7a..bfe0fbae55 100644 --- a/common/socks5/proxy-helpers/src/connection_controller.rs +++ b/common/socks5/proxy-helpers/src/connection_controller.rs @@ -254,11 +254,7 @@ impl Controller { }, } } - #[cfg(not(target_arch = "wasm32"))] - tokio::time::timeout(Duration::from_secs(5), self.shutdown.recv()) - .await - .expect("Task stopped without shutdown called"); - assert!(self.shutdown.is_shutdown_poll()); + self.shutdown.recv_timeout().await; log::debug!("SOCKS5 Controller: Exiting"); } } diff --git a/common/socks5/proxy-helpers/src/proxy_runner/inbound.rs b/common/socks5/proxy-helpers/src/proxy_runner/inbound.rs index 2065f7770b..c00e2ae8e5 100644 --- a/common/socks5/proxy-helpers/src/proxy_runner/inbound.rs +++ b/common/socks5/proxy-helpers/src/proxy_runner/inbound.rs @@ -54,7 +54,7 @@ where Some(data) => match data { Ok(data) => (data, false), Err(err) => { - error!(target: &*format!("({}) socks5 inbound", connection_id), "failed to read request from the socket - {err}"); + error!(target: &*format!("({connection_id}) socks5 inbound"), "failed to read request from the socket - {err}"); (Default::default(), true) } }, @@ -62,7 +62,7 @@ where }; debug!( - target: &*format!("({}) socks5 inbound", connection_id), + target: &*format!("({connection_id}) socks5 inbound"), "[{} bytes]\t{} → local → mixnet → remote → {}. Local closed: {}", read_data.len(), local_destination_address, @@ -103,7 +103,7 @@ where // Technically we already informed it when we sent the message to mixnet above debug!( - target: &*format!("({}) socks5 inbound", connection_id), + target: &*format!("({connection_id}) socks5 inbound"), "The local socket is closed - won't receive any more data. Informing remote about that..." ); } diff --git a/common/socks5/proxy-helpers/src/proxy_runner/outbound.rs b/common/socks5/proxy-helpers/src/proxy_runner/outbound.rs index ed7f8d74c6..826fb9b769 100644 --- a/common/socks5/proxy-helpers/src/proxy_runner/outbound.rs +++ b/common/socks5/proxy-helpers/src/proxy_runner/outbound.rs @@ -23,7 +23,7 @@ async fn deal_with_message( connection_id: ConnectionId, ) -> bool { debug!( - target: &*format!("({}) socks5 outbound", connection_id), + target: &*format!("({connection_id}) socks5 outbound"), "[{} bytes]\t{} → remote → mixnet → local → {} Remote closed: {}", connection_message.payload.len(), remote_source_address, @@ -33,11 +33,11 @@ async fn deal_with_message( if let Err(err) = writer.write_all(&connection_message.payload).await { // the other half is probably going to blow up too (if not, this task also needs to notify the other one!!) - error!(target: &*format!("({}) socks5 outbound", connection_id), "failed to write response back to the socket - {err}"); + error!(target: &*format!("({connection_id}) socks5 outbound"), "failed to write response back to the socket - {err}"); return true; } if connection_message.socket_closed { - debug!(target: &*format!("({}) socks5 outbound", connection_id), + debug!(target: &*format!("({connection_id}) socks5 outbound"), "Remote socket got closed - closing the local socket too"); return true; } diff --git a/common/statistics/Cargo.toml b/common/statistics/Cargo.toml index 4b0a27dcae..65004dbc40 100644 --- a/common/statistics/Cargo.toml +++ b/common/statistics/Cargo.toml @@ -10,10 +10,10 @@ edition = "2021" [dependencies] async-trait = { version = "0.1.51" } -log = "0.4" +log = { workspace = true } reqwest = { version = "0.11", features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1" sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "chrono"]} thiserror = "1" -tokio = { version = "1.21.2", features = [ "time" ] } +tokio = { version = "1.24.1", features = [ "time" ] } diff --git a/common/statistics/src/api.rs b/common/statistics/src/api.rs index 6f43436432..6d88cb8234 100644 --- a/common/statistics/src/api.rs +++ b/common/statistics/src/api.rs @@ -16,8 +16,7 @@ pub async fn build_and_send_statistics_request( ) -> Result<(), StatsError> { reqwest::Client::new() .post(format!( - "{}{}/{}", - url, STATISTICS_SERVICE_VERSION, STATISTICS_SERVICE_API_STATISTICS + "{url}{STATISTICS_SERVICE_VERSION}/{STATISTICS_SERVICE_API_STATISTICS}" )) .json(&msg) .send() @@ -32,11 +31,7 @@ pub fn build_statistics_request_bytes(msg: StatsMessage) -> Result, Stat let req = reqwest::Request::new( reqwest::Method::POST, reqwest::Url::parse(&format!( - "http://{}:{}{}/{}", - DEFAULT_STATISTICS_SERVICE_ADDRESS, - DEFAULT_STATISTICS_SERVICE_PORT, - STATISTICS_SERVICE_VERSION, - STATISTICS_SERVICE_API_STATISTICS + "http://{DEFAULT_STATISTICS_SERVICE_ADDRESS}:{DEFAULT_STATISTICS_SERVICE_PORT}{STATISTICS_SERVICE_VERSION}/{STATISTICS_SERVICE_API_STATISTICS}" )) .unwrap(), ); diff --git a/common/task/Cargo.toml b/common/task/Cargo.toml index ee83423f5f..ab822e9341 100644 --- a/common/task/Cargo.toml +++ b/common/task/Cargo.toml @@ -7,12 +7,12 @@ edition = "2021" [dependencies] futures = "0.3" -log = "0.4" +log = { workspace = true } thiserror = "1.0.37" -tokio = { version = "1.21.2", features = ["macros", "sync"] } +tokio = { version = "1.24.1", features = ["macros", "sync"] } [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] -version = "1.21.2" +version = "1.24.1" features = ["signal", "time"] [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures] @@ -22,4 +22,4 @@ version = "0.4" version = "0.2.83" [dev-dependencies] -tokio = { version = "1.21.2", features = ["rt-multi-thread", "net", "signal", "test-util", "macros"] } +tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal", "test-util", "macros"] } diff --git a/common/task/src/lib.rs b/common/task/src/lib.rs index 7ac5ab8431..eab1fc2177 100644 --- a/common/task/src/lib.rs +++ b/common/task/src/lib.rs @@ -8,6 +8,6 @@ pub mod spawn; pub use manager::{StatusReceiver, StatusSender, TaskClient, TaskManager}; #[cfg(not(target_arch = "wasm32"))] -pub use signal::{wait_for_signal, wait_for_signal_and_error}; +pub use signal::wait_for_signal_and_error; pub use spawn::spawn_with_report_error; diff --git a/common/task/src/manager.rs b/common/task/src/manager.rs index f40a525527..f16cabb54b 100644 --- a/common/task/src/manager.rs +++ b/common/task/src/manager.rs @@ -1,6 +1,7 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use std::future::Future; use std::{error::Error, time::Duration}; use futures::{future::pending, FutureExt, SinkExt, StreamExt}; @@ -92,6 +93,19 @@ impl TaskManager { } } + #[cfg(not(target_arch = "wasm32"))] + pub async fn catch_interrupt(mut self) -> Result<(), SentError> { + let res = crate::wait_for_signal_and_error(&mut self).await; + + log::info!("Sending shutdown"); + self.signal_shutdown().ok(); + + log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); + self.wait_for_shutdown().await; + + res + } + pub fn subscribe(&self) -> TaskClient { TaskClient::new( self.notify_rx @@ -208,7 +222,7 @@ pub struct TaskClient { impl TaskClient { #[cfg(not(target_arch = "wasm32"))] - const SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5); + const SHUTDOWN_TIMEOUT_WAITING_FOR_SIGNAL_ON_EXIT: Duration = Duration::from_secs(5); fn new( notify: watch::Receiver<()>, @@ -226,12 +240,22 @@ impl TaskClient { } } + pub async fn run_future(&mut self, fut: Fut) -> Option + where + Fut: Future, + { + tokio::select! { + biased; + _ = self.recv() => None, + res = fut => Some(res) + } + } + // Create a dummy that will never report that we should shutdown. pub fn dummy() -> TaskClient { let (_notify_tx, notify_rx) = watch::channel(()); let (task_halt_tx, _task_halt_rx) = mpsc::unbounded_channel(); let (task_drop_tx, _task_drop_rx) = mpsc::unbounded_channel(); - //let (task_status_tx, _task_status_rx) = futures::channel::mpsc::unbounded(); let (task_status_tx, _task_status_rx) = futures::channel::mpsc::channel(128); TaskClient { shutdown: false, @@ -280,9 +304,12 @@ impl TaskClient { return pending().await; } #[cfg(not(target_arch = "wasm32"))] - tokio::time::timeout(Self::SHUTDOWN_TIMEOUT, self.recv()) - .await - .expect("Task stopped without shutdown called"); + tokio::time::timeout( + Self::SHUTDOWN_TIMEOUT_WAITING_FOR_SIGNAL_ON_EXIT, + self.recv(), + ) + .await + .expect("Task stopped without shutdown called"); } pub fn is_shutdown_poll(&mut self) -> bool { @@ -300,8 +327,8 @@ impl TaskClient { has_changed } Err(err) => { - log::debug!("Polling shutdown failed: {err}"); - log::debug!("Assuming this means we should shutdown..."); + log::error!("Polling shutdown failed: {err}"); + log::error!("Assuming this means we should shutdown..."); true } } diff --git a/common/task/src/signal.rs b/common/task/src/signal.rs index 483c7c630b..e3fb3786a2 100644 --- a/common/task/src/signal.rs +++ b/common/task/src/signal.rs @@ -1,6 +1,7 @@ use crate::{manager::SentError, TaskManager}; #[cfg(unix)] +#[deprecated] pub async fn wait_for_signal() { use tokio::signal::unix::{signal, SignalKind}; let mut sigterm = signal(SignalKind::terminate()).expect("Failed to setup SIGTERM channel"); diff --git a/common/topology/Cargo.toml b/common/topology/Cargo.toml index 2996aeb639..42480168cc 100644 --- a/common/topology/Cargo.toml +++ b/common/topology/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] bs58 = "0.4" -log = "0.4" +log = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } thiserror = "1.0.37" diff --git a/common/types/Cargo.toml b/common/types/Cargo.toml index 798303d9a8..04030da607 100644 --- a/common/types/Cargo.toml +++ b/common/types/Cargo.toml @@ -2,13 +2,13 @@ name = "nym-types" version = "1.0.0" description = "Nym common types" -authors = ["Nym Technologies SA"] +authors.workspace = true edition = "2021" rust-version = "1.58" [dependencies] eyre = "0.6.5" -log = "0.4" +log = { workspace = true } itertools = "0.10" reqwest = "0.11.9" schemars = "0.8" diff --git a/common/types/src/mixnode.rs b/common/types/src/mixnode.rs index fe8dd848bb..6e27c6f8d7 100644 --- a/common/types/src/mixnode.rs +++ b/common/types/src/mixnode.rs @@ -194,10 +194,6 @@ impl fmt::Display for MixnodeNodeDetailsResponse { "Mix Port: {}, Verloc port: {}, Http Port: {}\n", self.mix_port, self.verloc_port, self.http_api_port )?; - writeln!( - f, - "You are bonding to wallet address: {}\n\n", - wallet_address - ) + writeln!(f, "You are bonding to wallet address: {wallet_address}\n\n") } } diff --git a/contracts/.DS_Store b/contracts/.DS_Store new file mode 100644 index 0000000000..9fd855f537 Binary files /dev/null and b/contracts/.DS_Store differ diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index d52edc427d..bf594ae209 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -1,5 +1,11 @@ ## Unreleased +### Added + +- vesting-contract: `GetAccountsPaged` and `GetAccountsVestingCoinsPaged` queries for querying multiple accounts simultaneously ([#2791]) + +[#2791]: https://github.com/nymtech/nym/pull/2791 + ## [nym-contracts-v1.1.2](https://github.com/nymtech/nym/tree/nym-contracts-v1.1.2) (2022-12-07) ### Added diff --git a/contracts/coconut-dkg/Cargo.toml b/contracts/coconut-dkg/Cargo.toml index fe4440cf2f..7d3abea20b 100644 --- a/contracts/coconut-dkg/Cargo.toml +++ b/contracts/coconut-dkg/Cargo.toml @@ -23,4 +23,7 @@ thiserror = "1.0.23" [dev-dependencies] cw-multi-test = { version = "0.13.4" } -cw4-group = { path = "../multisig/cw4-group" } \ No newline at end of file +cw4-group = { path = "../multisig/cw4-group" } +group-contract-common = { path = "../../common/cosmwasm-smart-contracts/group-contract" } +lazy_static = "1.4" +rusty-fork = "0.3" \ No newline at end of file diff --git a/contracts/coconut-dkg/src/constants.rs b/contracts/coconut-dkg/src/constants.rs index 249a96c696..ef7c79e13a 100644 --- a/contracts/coconut-dkg/src/constants.rs +++ b/contracts/coconut-dkg/src/constants.rs @@ -3,3 +3,6 @@ // Wait time for the verification to take place (currently 24h) pub(crate) const BLOCK_TIME_FOR_VERIFICATION_SECS: u64 = 86400; + +pub(crate) const VK_SHARES_PK_NAMESPACE: &str = "vksp"; +pub(crate) const VK_SHARES_EPOCH_ID_IDX_NAMESPACE: &str = "vkse"; diff --git a/contracts/coconut-dkg/src/contract.rs b/contracts/coconut-dkg/src/contract.rs index 650cf312f0..c2d16d51c6 100644 --- a/contracts/coconut-dkg/src/contract.rs +++ b/contracts/coconut-dkg/src/contract.rs @@ -9,7 +9,7 @@ use crate::dealings::queries::query_dealings_paged; use crate::dealings::transactions::try_commit_dealings; use crate::epoch_state::queries::{query_current_epoch, query_current_epoch_threshold}; use crate::epoch_state::storage::CURRENT_EPOCH; -use crate::epoch_state::transactions::advance_epoch_state; +use crate::epoch_state::transactions::{advance_epoch_state, try_surpassed_threshold}; use crate::error::ContractError; use crate::state::{State, MULTISIG, STATE}; use crate::verification_key_shares::queries::query_vk_shares_paged; @@ -52,7 +52,12 @@ pub fn instantiate( CURRENT_EPOCH.save( deps.storage, - &Epoch::new(EpochState::default(), env.block.time), + &Epoch::new( + EpochState::default(), + 0, + msg.time_configuration.unwrap_or_default(), + env.block.time, + ), )?; Ok(Response::default()) @@ -80,6 +85,7 @@ pub fn execute( ExecuteMsg::VerifyVerificationKeyShare { owner } => { try_verify_verification_key_share(deps, info, owner) } + ExecuteMsg::SurpassedThreshold {} => try_surpassed_threshold(deps, env), ExecuteMsg::AdvanceEpochState {} => advance_epoch_state(deps, env), } } @@ -105,9 +111,11 @@ pub fn query(deps: Deps<'_>, _env: Env, msg: QueryMsg) -> Result to_binary(&query_dealings_paged(deps, idx, start_after, limit)?)?, - QueryMsg::GetVerificationKeys { limit, start_after } => { - to_binary(&query_vk_shares_paged(deps, start_after, limit)?)? - } + QueryMsg::GetVerificationKeys { + epoch_id, + limit, + start_after, + } => to_binary(&query_vk_shares_paged(deps, epoch_id, start_after, limit)?)?, }; Ok(response) @@ -128,8 +136,8 @@ mod tests { use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{coins, Addr}; use cw4::Member; - use cw4_group::msg::InstantiateMsg as GroupInstantiateMsg; use cw_multi_test::{App, AppBuilder, AppResponse, ContractWrapper, Executor}; + use group_contract_common::msg::InstantiateMsg as GroupInstantiateMsg; fn instantiate_with_group(app: &mut App, members: &[Addr]) -> Addr { let group_code_id = app.store_code(Box::new(ContractWrapper::new( @@ -163,6 +171,7 @@ mod tests { let msg = InstantiateMsg { group_addr: group_contract_addr.to_string(), multisig_addr: MULTISIG_CONTRACT.to_string(), + time_configuration: None, mix_denom: TEST_MIX_DENOM.to_string(), }; app.instantiate_contract( @@ -197,6 +206,7 @@ mod tests { let msg = InstantiateMsg { group_addr: "group_addr".to_string(), multisig_addr: "multisig_addr".to_string(), + time_configuration: None, mix_denom: "nym".to_string(), }; let info = mock_info("creator", &[]); diff --git a/contracts/coconut-dkg/src/dealers/transactions.rs b/contracts/coconut-dkg/src/dealers/transactions.rs index 6566581221..44cc19d9b5 100644 --- a/contracts/coconut-dkg/src/dealers/transactions.rs +++ b/contracts/coconut-dkg/src/dealers/transactions.rs @@ -71,7 +71,7 @@ pub(crate) mod tests { use super::*; use crate::epoch_state::transactions::advance_epoch_state; use crate::support::tests::helpers; - use coconut_dkg_common::types::PUBLIC_KEY_SUBMISSION_TIME_SECS; + use coconut_dkg_common::types::TimeConfiguration; use cosmwasm_std::testing::{mock_env, mock_info}; #[test] @@ -83,7 +83,10 @@ pub(crate) mod tests { let bte_key_with_proof = String::from("bte_key_with_proof"); let announce_address = String::from("localhost:8000"); - env.block.time = env.block.time.plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env).unwrap(); let ret = try_add_dealer( diff --git a/contracts/coconut-dkg/src/dealings/transactions.rs b/contracts/coconut-dkg/src/dealings/transactions.rs index fe2e5544cb..9cca53cb02 100644 --- a/contracts/coconut-dkg/src/dealings/transactions.rs +++ b/contracts/coconut-dkg/src/dealings/transactions.rs @@ -43,7 +43,7 @@ pub(crate) mod tests { use crate::support::tests::fixtures::dealing_bytes_fixture; use crate::support::tests::helpers; use coconut_dkg_common::dealer::DealerDetails; - use coconut_dkg_common::types::PUBLIC_KEY_SUBMISSION_TIME_SECS; + use coconut_dkg_common::types::TimeConfiguration; use cosmwasm_std::testing::{mock_env, mock_info}; use cosmwasm_std::Addr; @@ -65,7 +65,10 @@ pub(crate) mod tests { } ); - env.block.time = env.block.time.plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env).unwrap(); let ret = diff --git a/contracts/coconut-dkg/src/epoch_state/queries.rs b/contracts/coconut-dkg/src/epoch_state/queries.rs index 3a68e0117c..386e9000c9 100644 --- a/contracts/coconut-dkg/src/epoch_state/queries.rs +++ b/contracts/coconut-dkg/src/epoch_state/queries.rs @@ -22,7 +22,7 @@ pub(crate) fn query_current_epoch_threshold( pub(crate) mod test { use super::*; use crate::support::tests::helpers::init_contract; - use coconut_dkg_common::types::{EpochState, PUBLIC_KEY_SUBMISSION_TIME_SECS}; + use coconut_dkg_common::types::{EpochState, TimeConfiguration}; use cosmwasm_std::testing::mock_env; #[test] @@ -35,7 +35,7 @@ pub(crate) mod test { mock_env() .block .time - .plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS) + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs) ); } diff --git a/contracts/coconut-dkg/src/epoch_state/transactions.rs b/contracts/coconut-dkg/src/epoch_state/transactions.rs index e2e75a1678..31e3916021 100644 --- a/contracts/coconut-dkg/src/epoch_state/transactions.rs +++ b/contracts/coconut-dkg/src/epoch_state/transactions.rs @@ -1,11 +1,49 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::dealers::storage::current_dealers; +use crate::dealers::storage::{current_dealers, past_dealers}; +use crate::dealings::storage::DEALINGS_BYTES; use crate::epoch_state::storage::{CURRENT_EPOCH, THRESHOLD}; +use crate::epoch_state::utils::check_epoch_state; use crate::error::ContractError; +use crate::state::STATE; use coconut_dkg_common::types::{Epoch, EpochState}; -use cosmwasm_std::{DepsMut, Env, Order, Response}; +use cosmwasm_std::{DepsMut, Env, Order, Response, Storage}; + +fn reset_epoch_state(storage: &mut dyn Storage) -> Result<(), ContractError> { + THRESHOLD.remove(storage); + let dealers: Vec<_> = current_dealers() + .keys(storage, None, None, Order::Ascending) + .collect::>()?; + + for dealer_addr in dealers { + let details = current_dealers().load(storage, &dealer_addr)?; + for dealings in DEALINGS_BYTES { + dealings.remove(storage, &details.address); + } + current_dealers().remove(storage, &dealer_addr)?; + past_dealers().save(storage, &dealer_addr, &details)?; + } + Ok(()) +} + +fn dealers_still_active(deps: &DepsMut<'_>) -> Result { + let state = STATE.load(deps.storage)?; + let mut still_active = 0; + for dealer_addr in current_dealers() + .keys(deps.storage, None, None, Order::Ascending) + .flatten() + { + if state + .group_addr + .is_voting_member(&deps.querier, &dealer_addr, None)? + .is_some() + { + still_active += 1; + } + } + Ok(still_active) +} pub(crate) fn advance_epoch_state(deps: DepsMut<'_>, env: Env) -> Result { let epoch = CURRENT_EPOCH.load(deps.storage)?; @@ -18,20 +56,71 @@ pub(crate) fn advance_epoch_state(deps: DepsMut<'_>, env: Env) -> Result(deps.storage, |mut epoch| { - // TODO: When defaulting to the first state, some action will probably need to be taken on the - // rest of the contract, as we're starting with a new set of signers - epoch = Epoch::new(epoch.state.next().unwrap_or_default(), env.block.time); - Ok(epoch) - })?; - if current_epoch.state == EpochState::DealingExchange { - let current_dealer_count = current_dealers() - .keys(deps.storage, None, None, Order::Ascending) - .count(); - // note: ceiling in integer division can be achieved via q = (x + y - 1) / y; - let threshold = (2 * current_dealer_count as u64 + 3 - 1) / 3; - THRESHOLD.save(deps.storage, &threshold)?; + let current_epoch = CURRENT_EPOCH.load(deps.storage)?; + let next_epoch = if let Some(state) = current_epoch.state.next() { + // We are during DKG process + if state == EpochState::DealingExchange { + let current_dealer_count = current_dealers() + .keys(deps.storage, None, None, Order::Ascending) + .count(); + // note: ceiling in integer division can be achieved via q = (x + y - 1) / y; + let threshold = (2 * current_dealer_count as u64 + 3 - 1) / 3; + THRESHOLD.save(deps.storage, &threshold)?; + } + Epoch::new( + state, + current_epoch.epoch_id, + current_epoch.time_configuration, + env.block.time, + ) + } else if dealers_still_active(&deps)? + == STATE + .load(deps.storage)? + .group_addr + .list_members(&deps.querier, None, None)? + .len() + { + // The dealer set hasn't changed, so we only extend the finish timestamp + Epoch::new( + current_epoch.state, + current_epoch.epoch_id, + current_epoch.time_configuration, + env.block.time, + ) + } else { + // Dealer set changed, we need to redo DKG from scratch + reset_epoch_state(deps.storage)?; + Epoch::new( + EpochState::default(), + current_epoch.epoch_id + 1, + current_epoch.time_configuration, + env.block.time, + ) + }; + CURRENT_EPOCH.save(deps.storage, &next_epoch)?; + + Ok(Response::default()) +} + +pub(crate) fn try_surpassed_threshold( + deps: DepsMut<'_>, + env: Env, +) -> Result { + check_epoch_state(deps.storage, EpochState::InProgress)?; + + let threshold = THRESHOLD.load(deps.storage)?; + if dealers_still_active(&deps)? < threshold as usize { + reset_epoch_state(deps.storage)?; + CURRENT_EPOCH.update::<_, ContractError>(deps.storage, |epoch| { + Ok(Epoch::new( + EpochState::default(), + epoch.epoch_id + 1, + epoch.time_configuration, + env.block.time, + )) + })?; } + Ok(Response::default()) } @@ -39,140 +128,375 @@ pub(crate) fn advance_epoch_state(deps: DepsMut<'_>, env: Env) -> Result ContractVKShare { +pub fn vk_share_fixture(owner: &str, index: u64) -> ContractVKShare { ContractVKShare { share: format!("share{}", index), announce_address: format!("localhost:{}", index), node_index: index, - owner: Addr::unchecked(format!("owner{}", index)), + owner: Addr::unchecked(owner), + epoch_id: index, verified: index % 2 == 0, } } diff --git a/contracts/coconut-dkg/src/support/tests/helpers.rs b/contracts/coconut-dkg/src/support/tests/helpers.rs index b59ee40bcf..d5451e1ee1 100644 --- a/contracts/coconut-dkg/src/support/tests/helpers.rs +++ b/contracts/coconut-dkg/src/support/tests/helpers.rs @@ -4,7 +4,13 @@ use crate::contract::instantiate; use coconut_dkg_common::msg::InstantiateMsg; use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info, MockApi, MockQuerier}; -use cosmwasm_std::{Empty, MemoryStorage, OwnedDeps}; +use cosmwasm_std::{ + from_binary, to_binary, ContractResult, Empty, MemoryStorage, OwnedDeps, QuerierResult, + SystemResult, WasmQuery, +}; +use cw4::{Cw4QueryMsg, Member, MemberListResponse, MemberResponse}; +use lazy_static::lazy_static; +use std::sync::Mutex; use super::fixtures::TEST_MIX_DENOM; @@ -12,11 +18,46 @@ pub const ADMIN_ADDRESS: &str = "admin address"; pub const GROUP_CONTRACT: &str = "group contract address"; pub const MULTISIG_CONTRACT: &str = "multisig contract address"; +lazy_static! { + pub static ref GROUP_MEMBERS: Mutex> = Mutex::new(vec![]); +} + +fn querier_handler(query: &WasmQuery) -> QuerierResult { + let bin = match query { + WasmQuery::Smart { contract_addr, msg } => { + if contract_addr != GROUP_CONTRACT { + panic!("Not supported"); + } + match from_binary(msg) { + Ok(Cw4QueryMsg::Member { addr, .. }) => { + let weight = GROUP_MEMBERS.lock().unwrap().iter().find_map(|m| { + if m.addr == addr { + Some(m.weight) + } else { + None + } + }); + to_binary(&MemberResponse { weight }).unwrap() + } + Ok(Cw4QueryMsg::ListMembers { .. }) => { + let members = GROUP_MEMBERS.lock().unwrap().to_vec(); + to_binary(&MemberListResponse { members }).unwrap() + } + _ => panic!("Not supported"), + } + } + _ => panic!("Not supported"), + }; + SystemResult::Ok(ContractResult::Ok(bin)) +} + pub fn init_contract() -> OwnedDeps> { let mut deps = mock_dependencies(); + deps.querier.update_wasm(querier_handler); let msg = InstantiateMsg { group_addr: String::from(GROUP_CONTRACT), multisig_addr: String::from(MULTISIG_CONTRACT), + time_configuration: None, mix_denom: TEST_MIX_DENOM.to_string(), }; let env = mock_env(); diff --git a/contracts/coconut-dkg/src/verification_key_shares/queries.rs b/contracts/coconut-dkg/src/verification_key_shares/queries.rs index 331c42e58a..e3300330ea 100644 --- a/contracts/coconut-dkg/src/verification_key_shares/queries.rs +++ b/contracts/coconut-dkg/src/verification_key_shares/queries.rs @@ -2,13 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 use crate::verification_key_shares::storage; -use crate::verification_key_shares::storage::VK_SHARES; +use crate::verification_key_shares::storage::vk_shares; +use coconut_dkg_common::types::EpochId; use coconut_dkg_common::verification_key::PagedVKSharesResponse; use cosmwasm_std::{Deps, Order, StdResult}; use cw_storage_plus::Bound; pub fn query_vk_shares_paged( deps: Deps<'_>, + epoch_id: EpochId, start_after: Option, limit: Option, ) -> StdResult { @@ -20,9 +22,12 @@ pub fn query_vk_shares_paged( .map(|addr| deps.api.addr_validate(&addr)) .transpose()?; - let start = addr.as_ref().map(Bound::exclusive); + let start = addr.as_ref().map(|addr| Bound::exclusive((addr, epoch_id))); - let shares = VK_SHARES + let shares = vk_shares() + .idx + .epoch_id + .prefix(epoch_id) .range(deps.storage, start, None, Order::Ascending) .take(limit) .map(|res| res.map(|(_, share)| share)) @@ -47,10 +52,29 @@ pub(crate) mod tests { }; use cosmwasm_std::Addr; + #[test] + fn separate_epoch_ids() { + let mut deps = init_contract(); + let vk_share1 = vk_share_fixture("owner", 1); + let vk_share2 = vk_share_fixture("owner", 2); + let sender = Addr::unchecked("owner"); + vk_shares() + .save(&mut deps.storage, (&sender, 2), &vk_share2) + .unwrap(); + + let response = query_vk_shares_paged(deps.as_ref(), 1, None, None).unwrap(); + assert_eq!(0, response.shares.len()); + vk_shares() + .save(&mut deps.storage, (&sender, 1), &vk_share1) + .unwrap(); + let response = query_vk_shares_paged(deps.as_ref(), 1, None, None).unwrap(); + assert_eq!(1, response.shares.len()); + } + #[test] fn vk_shares_empty_on_init() { let deps = init_contract(); - let response = query_vk_shares_paged(deps.as_ref(), None, Option::from(2)).unwrap(); + let response = query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(2)).unwrap(); assert_eq!(0, response.shares.len()); } @@ -59,14 +83,15 @@ pub(crate) mod tests { let mut deps = init_contract(); let limit = 2; for n in 0..1000 { - let vk_share = vk_share_fixture(n); - let sender = Addr::unchecked(format!("owner{}", n)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", n); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); } - let page1 = query_vk_shares_paged(deps.as_ref(), None, Option::from(limit)).unwrap(); + let page1 = query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(limit)).unwrap(); assert_eq!(limit, page1.shares.len() as u32); } @@ -74,15 +99,16 @@ pub(crate) mod tests { fn vk_shares_paged_retrieval_has_default_limit() { let mut deps = init_contract(); for n in 0..1000 { - let vk_share = vk_share_fixture(n); - let sender = Addr::unchecked(format!("owner{}", n)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", n); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); } // query without explicitly setting a limit - let page1 = query_vk_shares_paged(deps.as_ref(), None, None).unwrap(); + let page1 = query_vk_shares_paged(deps.as_ref(), 0, None, None).unwrap(); assert_eq!( VERIFICATION_KEY_SHARES_PAGE_DEFAULT_LIMIT, @@ -94,16 +120,18 @@ pub(crate) mod tests { fn vk_shares_paged_retrieval_has_max_limit() { let mut deps = init_contract(); for n in 0..1000 { - let vk_share = vk_share_fixture(n); - let sender = Addr::unchecked(format!("owner{}", n)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", n); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); } // query with a crazily high limit in an attempt to use too many resources let crazy_limit = 1000 * VERIFICATION_KEY_SHARES_PAGE_MAX_LIMIT; - let page1 = query_vk_shares_paged(deps.as_ref(), None, Option::from(crazy_limit)).unwrap(); + let page1 = + query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(crazy_limit)).unwrap(); // we default to a decent sized upper bound instead let expected_limit = VERIFICATION_KEY_SHARES_PAGE_MAX_LIMIT; @@ -114,43 +142,47 @@ pub(crate) mod tests { fn vk_shares_pagination_works() { let mut deps = init_contract(); - let vk_share = vk_share_fixture(1); - let sender = Addr::unchecked(format!("owner{}", 1)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", 1); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); let per_page = 2; - let page1 = query_vk_shares_paged(deps.as_ref(), None, Option::from(per_page)).unwrap(); + let page1 = query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(per_page)).unwrap(); // page should have 1 result on it assert_eq!(1, page1.shares.len()); // save another - let vk_share = vk_share_fixture(2); - let sender = Addr::unchecked(format!("owner{}", 2)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", 2); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); // page1 should have 2 results on it - let page1 = query_vk_shares_paged(deps.as_ref(), None, Option::from(per_page)).unwrap(); + let page1 = query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(per_page)).unwrap(); assert_eq!(2, page1.shares.len()); - let vk_share = vk_share_fixture(3); - let sender = Addr::unchecked(format!("owner{}", 3)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", 3); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); // page1 still has 2 results - let page1 = query_vk_shares_paged(deps.as_ref(), None, Option::from(per_page)).unwrap(); + let page1 = query_vk_shares_paged(deps.as_ref(), 0, None, Option::from(per_page)).unwrap(); assert_eq!(2, page1.shares.len()); // retrieving the next page should start after the last key on this page let start_after = page1.start_next_after.unwrap(); let page2 = query_vk_shares_paged( deps.as_ref(), + 0, Option::from(start_after.to_string()), Option::from(per_page), ) @@ -158,14 +190,16 @@ pub(crate) mod tests { assert_eq!(1, page2.shares.len()); - let vk_share = vk_share_fixture(4); - let sender = Addr::unchecked(format!("owner{}", 4)); - VK_SHARES - .save(&mut deps.storage, &sender, &vk_share) + let owner = format!("owner{}", 4); + let vk_share = vk_share_fixture(&owner, 0); + let sender = Addr::unchecked(owner); + vk_shares() + .save(&mut deps.storage, (&sender, 0), &vk_share) .unwrap(); let page2 = query_vk_shares_paged( deps.as_ref(), + 0, Option::from(start_after.to_string()), Option::from(per_page), ) diff --git a/contracts/coconut-dkg/src/verification_key_shares/storage.rs b/contracts/coconut-dkg/src/verification_key_shares/storage.rs index 761736367c..13ecd5370a 100644 --- a/contracts/coconut-dkg/src/verification_key_shares/storage.rs +++ b/contracts/coconut-dkg/src/verification_key_shares/storage.rs @@ -3,13 +3,35 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use crate::constants::{VK_SHARES_EPOCH_ID_IDX_NAMESPACE, VK_SHARES_PK_NAMESPACE}; +use coconut_dkg_common::types::EpochId; use coconut_dkg_common::verification_key::ContractVKShare; use cosmwasm_std::Addr; -use cw_storage_plus::Map; +use cw_storage_plus::{Index, IndexList, IndexedMap, MultiIndex}; pub(crate) const VERIFICATION_KEY_SHARES_PAGE_MAX_LIMIT: u32 = 75; pub(crate) const VERIFICATION_KEY_SHARES_PAGE_DEFAULT_LIMIT: u32 = 50; -type VKShareKey<'a> = &'a Addr; +type VKShareKey<'a> = (&'a Addr, EpochId); -pub(crate) const VK_SHARES: Map<'_, VKShareKey<'_>, ContractVKShare> = Map::new("vks"); +pub(crate) struct VkShareIndex<'a> { + pub(crate) epoch_id: MultiIndex<'a, EpochId, ContractVKShare, VKShareKey<'a>>, +} + +impl<'a> IndexList for VkShareIndex<'a> { + fn get_indexes(&'_ self) -> Box> + '_> { + let v: Vec<&dyn Index> = vec![&self.epoch_id]; + Box::new(v.into_iter()) + } +} + +pub(crate) fn vk_shares<'a>() -> IndexedMap<'a, VKShareKey<'a>, ContractVKShare, VkShareIndex<'a>> { + let indexes = VkShareIndex { + epoch_id: MultiIndex::new( + |d| d.epoch_id, + VK_SHARES_PK_NAMESPACE, + VK_SHARES_EPOCH_ID_IDX_NAMESPACE, + ), + }; + IndexedMap::new(VK_SHARES_PK_NAMESPACE, indexes) +} diff --git a/contracts/coconut-dkg/src/verification_key_shares/transactions.rs b/contracts/coconut-dkg/src/verification_key_shares/transactions.rs index 69df1bad7b..45bbe529d2 100644 --- a/contracts/coconut-dkg/src/verification_key_shares/transactions.rs +++ b/contracts/coconut-dkg/src/verification_key_shares/transactions.rs @@ -3,10 +3,11 @@ use crate::constants::BLOCK_TIME_FOR_VERIFICATION_SECS; use crate::dealers::storage as dealers_storage; +use crate::epoch_state::storage::CURRENT_EPOCH; use crate::epoch_state::utils::check_epoch_state; use crate::error::ContractError; use crate::state::{MULTISIG, STATE}; -use crate::verification_key_shares::storage::VK_SHARES; +use crate::verification_key_shares::storage::vk_shares; use coconut_dkg_common::types::EpochState; use coconut_dkg_common::verification_key::{to_cosmos_msg, ContractVKShare, VerificationKeyShare}; use cosmwasm_std::{Addr, DepsMut, Env, MessageInfo, Response}; @@ -22,7 +23,11 @@ pub fn try_commit_verification_key_share( let details = dealers_storage::current_dealers() .load(deps.storage, &info.sender) .map_err(|_| ContractError::NotADealer)?; - if VK_SHARES.may_load(deps.storage, &info.sender)?.is_some() { + let epoch_id = CURRENT_EPOCH.load(deps.storage)?.epoch_id; + if vk_shares() + .may_load(deps.storage, (&info.sender, epoch_id))? + .is_some() + { return Err(ContractError::AlreadyCommitted { commitment: String::from("verification key share"), }); @@ -33,9 +38,10 @@ pub fn try_commit_verification_key_share( node_index: details.assigned_index, announce_address: details.announce_address, owner: info.sender.clone(), + epoch_id: CURRENT_EPOCH.load(deps.storage)?.epoch_id, verified: false, }; - VK_SHARES.save(deps.storage, &info.sender, &data)?; + vk_shares().save(deps.storage, (&info.sender, epoch_id), &data)?; let msg = to_cosmos_msg( info.sender, @@ -55,8 +61,9 @@ pub fn try_verify_verification_key_share( owner: Addr, ) -> Result { check_epoch_state(deps.storage, EpochState::VerificationKeyFinalization)?; + let epoch_id = CURRENT_EPOCH.load(deps.storage)?.epoch_id; MULTISIG.assert_admin(deps.as_ref(), &info.sender)?; - VK_SHARES.update(deps.storage, &owner, |vk_share| { + vk_shares().update(deps.storage, (&owner, epoch_id), |vk_share| { vk_share .map(|mut share| { share.verified = true; @@ -77,13 +84,55 @@ mod tests { use crate::support::tests::helpers; use crate::support::tests::helpers::MULTISIG_CONTRACT; use coconut_dkg_common::dealer::DealerDetails; - use coconut_dkg_common::types::{ - EpochState, DEALING_EXCHANGE_TIME_SECS, PUBLIC_KEY_SUBMISSION_TIME_SECS, - VERIFICATION_KEY_SUBMISSION_TIME_SECS, VERIFICATION_KEY_VALIDATION_TIME_SECS, - }; + use coconut_dkg_common::types::{EpochState, TimeConfiguration}; use cosmwasm_std::testing::{mock_env, mock_info}; use cw_controllers::AdminError; + #[test] + fn current_epoch_id() { + let mut deps = helpers::init_contract(); + let mut env = mock_env(); + let info = mock_info("requester", &[]); + let share = "share".to_string(); + + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); + advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().dealing_exchange_time_secs); + advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); + let dealer = Addr::unchecked("requester"); + let announce_address = String::from("localhost"); + let dealer_details = DealerDetails { + address: dealer.clone(), + bte_public_key_with_proof: String::new(), + announce_address: announce_address.clone(), + assigned_index: 1, + }; + dealers_storage::current_dealers() + .save(deps.as_mut().storage, &dealer, &dealer_details) + .unwrap(); + + try_commit_verification_key_share(deps.as_mut(), env.clone(), info.clone(), share.clone()) + .unwrap(); + let vk_share = vk_shares().load(&deps.storage, (&info.sender, 0)).unwrap(); + assert_eq!( + vk_share, + ContractVKShare { + share, + announce_address, + node_index: 1, + owner: dealer, + epoch_id: 0, + verified: false, + } + ); + } + #[test] fn commit_vk_share() { let mut deps = helpers::init_contract(); @@ -105,9 +154,15 @@ mod tests { expected_state: EpochState::VerificationKeySubmission.to_string() } ); - env.block.time = env.block.time.plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); - env.block.time = env.block.time.plus_seconds(DEALING_EXCHANGE_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().dealing_exchange_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); let ret = try_commit_verification_key_share( deps.as_mut(), @@ -165,19 +220,25 @@ mod tests { } ); - env.block.time = env.block.time.plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS); - advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); - env.block.time = env.block.time.plus_seconds(DEALING_EXCHANGE_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); env.block.time = env .block .time - .plus_seconds(VERIFICATION_KEY_SUBMISSION_TIME_SECS); + .plus_seconds(TimeConfiguration::default().dealing_exchange_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); env.block.time = env .block .time - .plus_seconds(VERIFICATION_KEY_VALIDATION_TIME_SECS); + .plus_seconds(TimeConfiguration::default().verification_key_submission_time_secs); + advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().verification_key_validation_time_secs); advance_epoch_state(deps.as_mut(), env).unwrap(); let ret = @@ -203,9 +264,15 @@ mod tests { let share = "share".to_string(); let multisig_info = mock_info(MULTISIG_CONTRACT, &[]); - env.block.time = env.block.time.plus_seconds(PUBLIC_KEY_SUBMISSION_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().public_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); - env.block.time = env.block.time.plus_seconds(DEALING_EXCHANGE_TIME_SECS); + env.block.time = env + .block + .time + .plus_seconds(TimeConfiguration::default().dealing_exchange_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); let dealer_details = DealerDetails { @@ -223,12 +290,12 @@ mod tests { env.block.time = env .block .time - .plus_seconds(VERIFICATION_KEY_SUBMISSION_TIME_SECS); + .plus_seconds(TimeConfiguration::default().verification_key_submission_time_secs); advance_epoch_state(deps.as_mut(), env.clone()).unwrap(); env.block.time = env .block .time - .plus_seconds(VERIFICATION_KEY_VALIDATION_TIME_SECS); + .plus_seconds(TimeConfiguration::default().verification_key_validation_time_secs); advance_epoch_state(deps.as_mut(), env).unwrap(); try_verify_verification_key_share(deps.as_mut(), multisig_info, owner.clone()).unwrap(); diff --git a/contracts/coconut-test/Cargo.toml b/contracts/coconut-test/Cargo.toml index f9dd795e4b..7eaa724fd0 100644 --- a/contracts/coconut-test/Cargo.toml +++ b/contracts/coconut-test/Cargo.toml @@ -10,6 +10,7 @@ bandwidth-claim-contract = { path = "../../common/bandwidth-claim-contract" } coconut-bandwidth-contract-common = { path = "../../common/cosmwasm-smart-contracts/coconut-bandwidth-contract" } coconut-dkg-common = { path = "../../common/cosmwasm-smart-contracts/coconut-dkg" } multisig-contract-common = { path = "../../common/cosmwasm-smart-contracts/multisig-contract" } +group-contract-common = { path = "../../common/cosmwasm-smart-contracts/group-contract" } cosmwasm-std = "1.0.0" cosmwasm-storage = "1.0.0" diff --git a/contracts/coconut-test/src/spend_credential_creates_proposal.rs b/contracts/coconut-test/src/spend_credential_creates_proposal.rs index 3d382f493b..7d68073b40 100644 --- a/contracts/coconut-test/src/spend_credential_creates_proposal.rs +++ b/contracts/coconut-test/src/spend_credential_creates_proposal.rs @@ -7,9 +7,9 @@ use coconut_bandwidth_contract_common::{ spend_credential::SpendCredentialData, }; use cosmwasm_std::{coins, Addr, Coin, Decimal}; -use cw4_group::msg::InstantiateMsg as GroupInstantiateMsg; use cw_multi_test::Executor; use cw_utils::{Duration, Threshold}; +use group_contract_common::msg::InstantiateMsg as GroupInstantiateMsg; use multisig_contract_common::msg::InstantiateMsg as MultisigInstantiateMsg; pub const TEST_COIN_DENOM: &str = "unym"; diff --git a/contracts/coconut-test/src/submit_vk_creates_proposal.rs b/contracts/coconut-test/src/submit_vk_creates_proposal.rs index 1122115b6d..c2f09d4bb2 100644 --- a/contracts/coconut-test/src/submit_vk_creates_proposal.rs +++ b/contracts/coconut-test/src/submit_vk_creates_proposal.rs @@ -15,9 +15,9 @@ use coconut_dkg_common::msg::QueryMsg::GetVerificationKeys; use coconut_dkg_common::verification_key::PagedVKSharesResponse; use cosmwasm_std::{coins, Addr, Decimal}; use cw4::Member; -use cw4_group::msg::InstantiateMsg as GroupInstantiateMsg; use cw_multi_test::Executor; use cw_utils::{Duration, Threshold}; +use group_contract_common::msg::InstantiateMsg as GroupInstantiateMsg; use multisig_contract_common::msg::ExecuteMsg::{Execute, Vote}; use multisig_contract_common::msg::InstantiateMsg as MultisigInstantiateMsg; @@ -71,6 +71,7 @@ fn dkg_proposal() { let msg = DkgInstantiateMsg { group_addr: group_contract_addr.to_string(), multisig_addr: multisig_contract_addr.to_string(), + time_configuration: None, mix_denom: TEST_COIN_DENOM.to_string(), }; let coconut_dkg_contract_addr = app @@ -151,6 +152,7 @@ fn dkg_proposal() { .query_wasm_smart( coconut_dkg_contract_addr.clone(), &GetVerificationKeys { + epoch_id: 0, limit: None, start_after: None, }, @@ -198,6 +200,7 @@ fn dkg_proposal() { .query_wasm_smart( coconut_dkg_contract_addr, &GetVerificationKeys { + epoch_id: 0, limit: None, start_after: None, }, diff --git a/contracts/multisig/cw3-flex-multisig/Cargo.toml b/contracts/multisig/cw3-flex-multisig/Cargo.toml index 8afa71f251..e014c728b7 100644 --- a/contracts/multisig/cw3-flex-multisig/Cargo.toml +++ b/contracts/multisig/cw3-flex-multisig/Cargo.toml @@ -28,6 +28,7 @@ schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } +group-contract-common = { path = "../../../common/cosmwasm-smart-contracts/group-contract" } multisig-contract-common = { path= "../../../common/cosmwasm-smart-contracts/multisig-contract" } [dev-dependencies] diff --git a/contracts/multisig/cw3-flex-multisig/src/contract.rs b/contracts/multisig/cw3-flex-multisig/src/contract.rs index 5a56ea9745..677006daf4 100644 --- a/contracts/multisig/cw3-flex-multisig/src/contract.rs +++ b/contracts/multisig/cw3-flex-multisig/src/contract.rs @@ -502,7 +502,7 @@ mod tests { // uploads code and returns address of group contract fn instantiate_group(app: &mut App, members: Vec) -> Addr { let group_id = app.store_code(contract_group()); - let msg = cw4_group::msg::InstantiateMsg { + let msg = group_contract_common::msg::InstantiateMsg { admin: Some(OWNER.into()), members, }; @@ -1410,7 +1410,7 @@ mod tests { // adds NEWBIE with 2 power -> with snapshot, invalid vote // removes VOTER3 -> with snapshot, can vote on proposal let newbie: &str = "newbie"; - let update_msg = cw4_group::msg::ExecuteMsg::UpdateMembers { + let update_msg = group_contract_common::msg::ExecuteMsg::UpdateMembers { remove: vec![VOTER3.into()], add: vec![member(VOTER2, 21), member(newbie, 2)], }; @@ -1623,7 +1623,7 @@ mod tests { // admin changes the group (3 -> 0, 2 -> 9, 0 -> 29) - total = 56, require 29 to pass let newbie: &str = "newbie"; - let update_msg = cw4_group::msg::ExecuteMsg::UpdateMembers { + let update_msg = group_contract_common::msg::ExecuteMsg::UpdateMembers { remove: vec![VOTER3.into()], add: vec![member(VOTER2, 9), member(newbie, 29)], }; @@ -1702,7 +1702,7 @@ mod tests { // admin changes the group (3 -> 0, 2 -> 9, 0 -> 28) - total = 55, require 28 to pass let newbie: &str = "newbie"; - let update_msg = cw4_group::msg::ExecuteMsg::UpdateMembers { + let update_msg = group_contract_common::msg::ExecuteMsg::UpdateMembers { remove: vec![VOTER3.into()], add: vec![member(VOTER2, 9), member(newbie, 29)], }; diff --git a/contracts/multisig/cw4-group/Cargo.toml b/contracts/multisig/cw4-group/Cargo.toml index 235cfeed70..7c98f4c991 100644 --- a/contracts/multisig/cw4-group/Cargo.toml +++ b/contracts/multisig/cw4-group/Cargo.toml @@ -24,6 +24,8 @@ crate-type = ["cdylib", "rlib"] library = [] [dependencies] +group-contract-common = { path = "../../../common/cosmwasm-smart-contracts/group-contract" } + cw-utils = { version = "0.13.4" } cw2 = { version = "0.13.4" } cw4 = { version = "0.13.4" } diff --git a/contracts/multisig/cw4-group/src/contract.rs b/contracts/multisig/cw4-group/src/contract.rs index 913d427f6a..cb9c4f2787 100644 --- a/contracts/multisig/cw4-group/src/contract.rs +++ b/contracts/multisig/cw4-group/src/contract.rs @@ -13,8 +13,8 @@ use cw_storage_plus::Bound; use cw_utils::maybe_addr; use crate::error::ContractError; -use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; use crate::state::{ADMIN, HOOKS, MEMBERS, TOTAL}; +use group_contract_common::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; // version info for migration info const CONTRACT_NAME: &str = "crates.io:cw4-group"; diff --git a/contracts/multisig/cw4-group/src/helpers.rs b/contracts/multisig/cw4-group/src/helpers.rs index add7451a43..ac0e56f42b 100644 --- a/contracts/multisig/cw4-group/src/helpers.rs +++ b/contracts/multisig/cw4-group/src/helpers.rs @@ -5,7 +5,7 @@ use std::ops::Deref; use cosmwasm_std::{to_binary, Addr, CosmosMsg, StdResult, WasmMsg}; use cw4::{Cw4Contract, Member}; -use crate::msg::ExecuteMsg; +use group_contract_common::msg::ExecuteMsg; /// Cw4GroupContract is a wrapper around Cw4Contract that provides a lot of helpers /// for working with cw4-group contracts. diff --git a/contracts/multisig/cw4-group/src/lib.rs b/contracts/multisig/cw4-group/src/lib.rs index 98208b782f..3870baf04b 100644 --- a/contracts/multisig/cw4-group/src/lib.rs +++ b/contracts/multisig/cw4-group/src/lib.rs @@ -1,7 +1,6 @@ pub mod contract; pub mod error; pub mod helpers; -pub mod msg; pub mod state; pub use crate::error::ContractError; diff --git a/contracts/vesting/Cargo.toml b/contracts/vesting/Cargo.toml index dd8d2966f0..4eb800599a 100644 --- a/contracts/vesting/Cargo.toml +++ b/contracts/vesting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vesting-contract" -version = "1.1.2" +version = "1.1.3" authors = ["Drazen Urch "] edition = "2021" diff --git a/contracts/vesting/src/contract.rs b/contracts/vesting/src/contract.rs index 4a528b41d9..edf82c2968 100644 --- a/contracts/vesting/src/contract.rs +++ b/contracts/vesting/src/contract.rs @@ -1,7 +1,6 @@ use crate::errors::ContractError; -use crate::queued_migrations::migrate_to_v2_mixnet_contract; use crate::storage::{ - account_from_address, save_account, BlockTimestampSecs, ADMIN, DELEGATIONS, + account_from_address, save_account, BlockTimestampSecs, ACCOUNTS, ADMIN, DELEGATIONS, MIXNET_CONTRACT_ADDRESS, MIX_DENOM, }; use crate::traits::{ @@ -10,7 +9,7 @@ use crate::traits::{ use crate::vesting::{populate_vesting_periods, Account}; use contracts_common::ContractBuildInformation; use cosmwasm_std::{ - coin, entry_point, to_binary, BankMsg, Coin, Deps, DepsMut, Env, MessageInfo, Order, + coin, entry_point, to_binary, Addr, BankMsg, Coin, Deps, DepsMut, Env, MessageInfo, Order, QueryResponse, Response, StdResult, Timestamp, Uint128, }; use cw_storage_plus::Bound; @@ -26,8 +25,9 @@ use vesting_contract_common::messages::{ ExecuteMsg, InitMsg, MigrateMsg, QueryMsg, VestingSpecification, }; use vesting_contract_common::{ - AllDelegationsResponse, DelegationTimesResponse, OriginalVestingResponse, Period, PledgeCap, - PledgeData, VestingDelegation, + AccountVestingCoins, AccountsResponse, AllDelegationsResponse, BaseVestingAccountInfo, + DelegationTimesResponse, OriginalVestingResponse, Period, PledgeCap, PledgeData, + VestingCoinsResponse, VestingDelegation, }; pub const INITIAL_LOCKED_PLEDGE_CAP: Uint128 = Uint128::new(100_000_000_000); @@ -40,16 +40,28 @@ pub fn instantiate( info: MessageInfo, msg: InitMsg, ) -> Result { - //! ADMIN is set to the address that instantiated the contract - ADMIN.save(deps.storage, &info.sender.to_string())?; - MIXNET_CONTRACT_ADDRESS.save(deps.storage, &msg.mixnet_contract_address)?; + // validate the received mixnet contract address + let mixnet_contract_address = deps.api.addr_validate(&msg.mixnet_contract_address)?; + + // ADMIN is set to the address that instantiated the contract + ADMIN.save(deps.storage, &info.sender)?; + MIXNET_CONTRACT_ADDRESS.save(deps.storage, &mixnet_contract_address)?; MIX_DENOM.save(deps.storage, &msg.mix_denom)?; Ok(Response::default()) } #[entry_point] -pub fn migrate(deps: DepsMut<'_>, _env: Env, msg: MigrateMsg) -> Result { - migrate_to_v2_mixnet_contract(deps, msg) +pub fn migrate(_deps: DepsMut<'_>, _env: Env, msg: MigrateMsg) -> Result { + // we can't perform this check inside the migrate function since there are 12k addresses to check + // and this invariant MUST hold, otherwise we're gonna have bad time + if !msg.manually_verified_no_staking_addresses { + return Err(ContractError::Other { + message: + "the assumption that nobody has set a staking address hasn't been manually verified" + .to_string(), + }); + } + Ok(Response::new()) } #[entry_point] @@ -94,12 +106,15 @@ pub fn execute( ExecuteMsg::UpdateMixnetAddress { address } => { try_update_mixnet_address(address, info, deps) } - ExecuteMsg::DelegateToMixnode { mix_id, amount } => { - try_delegate_to_mixnode(mix_id, amount, info, env, deps) - } - ExecuteMsg::UndelegateFromMixnode { mix_id } => { - try_undelegate_from_mixnode(mix_id, info, deps) - } + ExecuteMsg::DelegateToMixnode { + mix_id, + amount, + on_behalf_of, + } => try_delegate_to_mixnode(mix_id, amount, on_behalf_of, info, env, deps), + ExecuteMsg::UndelegateFromMixnode { + mix_id, + on_behalf_of, + } => try_undelegate_from_mixnode(mix_id, on_behalf_of, info, deps), ExecuteMsg::CreateAccount { owner_address, staking_address, @@ -245,7 +260,9 @@ pub fn try_update_mixnet_address( if info.sender != ADMIN.load(deps.storage)? { return Err(ContractError::NotAdmin(info.sender.as_str().to_string())); } - MIXNET_CONTRACT_ADDRESS.save(deps.storage, &address)?; + let mixnet_contract_address = deps.api.addr_validate(&address)?; + + MIXNET_CONTRACT_ADDRESS.save(deps.storage, &mixnet_contract_address)?; Ok(Response::default()) } @@ -313,6 +330,13 @@ fn try_update_staking_address( info: MessageInfo, deps: DepsMut<'_>, ) -> Result { + if let Some(ref to_address) = to_address { + if account_from_address(to_address, deps.storage, deps.api).is_ok() { + // do not allow setting staking address to an existing account's address + return Err(ContractError::StakingAccountExists(to_address.to_string())); + } + } + let address = info.sender.clone(); let to_address = to_address.and_then(|x| deps.api.addr_validate(&x).ok()); let mut account = account_from_address(info.sender.as_str(), deps.storage, deps.api)?; @@ -454,13 +478,23 @@ fn try_track_undelegation( fn try_delegate_to_mixnode( mix_id: MixId, amount: Coin, + on_behalf_of: Option, info: MessageInfo, env: Env, deps: DepsMut<'_>, ) -> Result { let mix_denom = MIX_DENOM.load(deps.storage)?; let amount = validate_funds(&[amount], mix_denom)?; - let account = account_from_address(info.sender.as_str(), deps.storage, deps.api)?; + + let account = match on_behalf_of { + Some(account_owner) => { + let account = account_from_address(&account_owner, deps.storage, deps.api)?; + ensure_staking_permission(&info.sender, &account)?; + account + } + // you're the owner, you can do what you want + None => account_from_address(info.sender.as_str(), deps.storage, deps.api)?, + }; account.try_delegate_to_mixnode(mix_id, amount, &env, deps.storage) } @@ -488,10 +522,19 @@ fn try_claim_delegator_reward( /// Undelegates from a mixnode, sends [mixnet_contract_common::ExecuteMsg::UndelegateFromMixnodeOnBehalf] to [crate::storage::MIXNET_CONTRACT_ADDRESS]. fn try_undelegate_from_mixnode( mix_id: MixId, + on_behalf_of: Option, info: MessageInfo, deps: DepsMut<'_>, ) -> Result { - let account = account_from_address(info.sender.as_str(), deps.storage, deps.api)?; + let account = match on_behalf_of { + Some(account_owner) => { + let account = account_from_address(&account_owner, deps.storage, deps.api)?; + ensure_staking_permission(&info.sender, &account)?; + account + } + // you're the owner, you can do what you want + None => account_from_address(info.sender.as_str(), deps.storage, deps.api)?, + }; account.try_undelegate_from_mixnode(mix_id, deps.storage) } @@ -568,6 +611,19 @@ fn try_create_periodic_vesting_account( pub fn query(deps: Deps<'_>, env: Env, msg: QueryMsg) -> Result { let query_res = match msg { QueryMsg::GetContractVersion {} => to_binary(&get_contract_version()), + QueryMsg::GetAccountsPaged { + start_next_after, + limit, + } => to_binary(&try_get_all_accounts(deps, start_next_after, limit)?), + QueryMsg::GetAccountsVestingCoinsPaged { + start_next_after, + limit, + } => to_binary(&try_get_all_accounts_vesting_coins( + deps, + env, + start_next_after, + limit, + )?), QueryMsg::LockedCoins { vesting_account_address, block_time, @@ -689,6 +745,72 @@ pub fn get_contract_version() -> ContractBuildInformation { } } +pub fn try_get_all_accounts( + deps: Deps<'_>, + start_after: Option, + limit: Option, +) -> Result { + let limit = limit.unwrap_or(150).min(250) as usize; + + let start = start_after + .map(|raw| deps.api.addr_validate(&raw).map(Bound::exclusive)) + .transpose()?; + + let accounts = ACCOUNTS + .range(deps.storage, start, None, Order::Ascending) + .take(limit) + .map(|res| { + res.map(|(_, account)| BaseVestingAccountInfo { + account_id: account.storage_key(), + owner: account.owner_address, + }) + }) + .collect::>>()?; + + let start_next_after = accounts.last().map(|acc| acc.owner.clone()); + + Ok(AccountsResponse { + accounts, + start_next_after, + }) +} + +pub fn try_get_all_accounts_vesting_coins( + deps: Deps<'_>, + env: Env, + start_after: Option, + limit: Option, +) -> Result { + let limit = limit.unwrap_or(150).min(250) as usize; + + let start = start_after + .map(|raw| deps.api.addr_validate(&raw).map(Bound::exclusive)) + .transpose()?; + + let accounts = ACCOUNTS + .range(deps.storage, start, None, Order::Ascending) + .take(limit) + .map(|res| { + res.map(|(_, account)| { + account + .get_vesting_coins(None, &env, deps.storage) + .map(|still_vesting| AccountVestingCoins { + account_id: account.storage_key(), + owner: account.owner_address, + still_vesting, + }) + }) + }) + .collect::, _>>>()??; + + let start_next_after = accounts.last().map(|acc| acc.owner.clone()); + + Ok(VestingCoinsResponse { + accounts, + start_next_after, + }) +} + /// Gets currently locked coins, see [crate::traits::VestingAccount::locked_coins] pub fn try_get_locked_coins( vesting_account_address: &str, @@ -855,3 +977,15 @@ fn validate_funds(funds: &[Coin], mix_denom: String) -> Result Result<(), ContractError> { + if let Some(staking_address) = account.staking_address() { + if staking_address == addr { + return Ok(()); + } + } + Err(ContractError::InvalidStakingAccount { + address: addr.clone(), + for_account: account.owner_address(), + }) +} diff --git a/contracts/vesting/src/errors.rs b/contracts/vesting/src/errors.rs index 5244f4330d..822d30b1b5 100644 --- a/contracts/vesting/src/errors.rs +++ b/contracts/vesting/src/errors.rs @@ -6,50 +6,81 @@ use thiserror::Error; pub enum ContractError { #[error("VESTING ({}): {0}", line!())] Std(#[from] StdError), + #[error("VESTING ({}): Account does not exist - {0}", line!())] NoAccountForAddress(String), + #[error("VESTING ({}): Only admin can perform this action, {0} is not admin", line!())] NotAdmin(String), + #[error("VESTING ({}): Balance not found for existing account ({0}), this is a bug", line!())] NoBalanceForAddress(String), + #[error("VESTING ({}): Insufficient balance for address {0} -> {1}", line!())] InsufficientBalance(String, u128), + #[error("VESTING ({}): Insufficient spendable balance for address {0} -> {1}", line!())] InsufficientSpendable(String, u128), + #[error( "VESTING ({}):Only delegation owner can perform delegation actions, {0} is not the delegation owner" , line!())] NotDelegate(String), + #[error("VESTING ({}): Total vesting amount is inprobably low -> {0}, this is likely an error", line!())] ImprobableVestingAmount(u128), + #[error("VESTING ({}): Address {0} has already bonded a node", line!())] AlreadyBonded(String), + #[error("VESTING ({}): Received empty funds vector", line!())] EmptyFunds, + #[error("VESTING ({}): Received wrong denom: {0}, expected {1}", line!())] WrongDenom(String, String), + #[error("VESTING ({}): Received multiple denoms, expected 1", line!())] MultipleDenoms, + #[error("VESTING ({}): No delegations found for account {0}, mix_identity {1}", line!())] NoSuchDelegation(Addr, MixId), + #[error("VESTING ({}): Only mixnet contract can perform this operation, got {0}", line!())] NotMixnetContract(Addr), + #[error("VESTING ({}): Calculation underflowed", line!())] Underflow, + #[error("VESTING ({}): No bond found for account {0}", line!())] NoBondFound(String), + #[error("VESTING ({}): Action can only be executed by account owner -> {0}", line!())] NotOwner(String), + #[error("VESTING ({}): Invalid address: {0}", line!())] InvalidAddress(String), + #[error("VESTING ({}): Account already exists: {0}", line!())] AccountAlreadyExists(String), + #[error("VESTING ({}): Staking account already exists: {0}", line!())] StakingAccountAlreadyExists(String), + #[error("VESTING ({}): Too few coins sent for vesting account creation, sent {sent}, need at least {need}", line!())] MinVestingFunds { sent: u128, need: u128 }, + #[error("VESTING ({}): Maximum amount of locked coins has already been pledged: {current}, cap is {cap}", line!())] LockedPledgeCapReached { current: Uint128, cap: Uint128 }, + #[error("VESTING: ({}: Account owned by {owner} has unpopulated vesting periods!", line!())] UnpopulatedVestingPeriods { owner: Addr }, + + #[error("VESTING: Vesting account associated with {0} already exists, only addresses with not existing vesting accounts can be added as staking addresses")] + StakingAccountExists(String), + + #[error("VESTING: {address} is not permitted to perform staking on behalf of {for_account}")] + InvalidStakingAccount { address: Addr, for_account: Addr }, + + #[error("VESTING: {message}")] + Other { message: String }, } diff --git a/contracts/vesting/src/queued_migrations.rs b/contracts/vesting/src/queued_migrations.rs index 9bb44331a1..87d5c392c8 100644 --- a/contracts/vesting/src/queued_migrations.rs +++ b/contracts/vesting/src/queued_migrations.rs @@ -1,15 +1,2 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 - -use crate::errors::ContractError; -use crate::storage::MIXNET_CONTRACT_ADDRESS; -use cosmwasm_std::{DepsMut, Response}; -use vesting_contract_common::MigrateMsg; - -pub fn migrate_to_v2_mixnet_contract( - deps: DepsMut<'_>, - msg: MigrateMsg, -) -> Result { - MIXNET_CONTRACT_ADDRESS.save(deps.storage, &msg.v2_mixnet_contract_address)?; - Ok(Response::new()) -} diff --git a/contracts/vesting/src/storage.rs b/contracts/vesting/src/storage.rs index a1216fa87e..a0b5b36ac7 100644 --- a/contracts/vesting/src/storage.rs +++ b/contracts/vesting/src/storage.rs @@ -6,23 +6,52 @@ use mixnet_contract_common::{IdentityKey, MixId}; use vesting_contract_common::PledgeData; pub(crate) type BlockTimestampSecs = u64; +pub(crate) type AccountStorageKey = u32; -pub const KEY: Item<'_, u32> = Item::new("key"); -const ACCOUNTS: Map<'_, String, Account> = Map::new("acc"); -// Holds data related to individual accounts -const BALANCES: Map<'_, u32, Uint128> = Map::new("blc"); -const WITHDRAWNS: Map<'_, u32, Uint128> = Map::new("wthd"); -const BOND_PLEDGES: Map<'_, u32, PledgeData> = Map::new("bnd"); -const GATEWAY_PLEDGES: Map<'_, u32, PledgeData> = Map::new("gtw"); -pub const _OLD_DELEGATIONS: Map<'_, (u32, IdentityKey, BlockTimestampSecs), Uint128> = +/// Counter for the unique, monotonically increasing storage key id for the vesting account data. +pub const KEY: Item<'_, AccountStorageKey> = Item::new("key"); + +/// Storage map containing vesting account information associated with particular owner address. +pub const ACCOUNTS: Map<'_, Addr, Account> = Map::new("acc"); + +/// Storage map containing information about amount of tokens associated with particular vesting account +/// that are currently present in the contract (and have not been withdrawn or staked in the mixnet contract) +// note: this assumes I understood the intent behind this correctly +const BALANCES: Map<'_, AccountStorageKey, Uint128> = Map::new("blc"); + +/// Storage map containing information about amount of tokens withdrawn from the contract by a particular vesting account. +const WITHDRAWNS: Map<'_, AccountStorageKey, Uint128> = Map::new("wthd"); + +/// Storage map containing information about amount of tokens pledged towards bonding mixnodes +/// in the mixnet contract using a particular vesting account. +const BOND_PLEDGES: Map<'_, AccountStorageKey, PledgeData> = Map::new("bnd"); + +/// Storage map containing information about amount of tokens pledged towards bonding gateways +/// in the mixnet contract using a particular vesting account. +const GATEWAY_PLEDGES: Map<'_, AccountStorageKey, PledgeData> = Map::new("gtw"); + +/// Old, pre-v2 migration, storage map that used to contain information about tokens delegated +/// towards particular mixnodes in the mixnet contract with given vesting account. +/// It should be completely empty. +pub const _OLD_DELEGATIONS: Map<'_, (AccountStorageKey, IdentityKey, BlockTimestampSecs), Uint128> = Map::new("dlg"); -pub const DELEGATIONS: Map<'_, (u32, MixId, BlockTimestampSecs), Uint128> = Map::new("dlg_v2"); -pub const ADMIN: Item<'_, String> = Item::new("adm"); -pub const MIXNET_CONTRACT_ADDRESS: Item<'_, String> = Item::new("mix"); + +/// Storage map containing information about tokens delegated towards particular mixnodes +/// in the mixnet contract with given vesting account. +pub const DELEGATIONS: Map<'_, (AccountStorageKey, MixId, BlockTimestampSecs), Uint128> = + Map::new("dlg_v2"); + +/// Explicit contract admin that is allowed, among other things, to create new vesting accounts. +pub const ADMIN: Item<'_, Addr> = Item::new("adm"); + +/// Address of the mixnet contract. +pub const MIXNET_CONTRACT_ADDRESS: Item<'_, Addr> = Item::new("mix"); + +/// The denomination of coin used for staking. pub const MIX_DENOM: Item<'_, String> = Item::new("den"); pub fn save_delegation( - key: (u32, MixId, BlockTimestampSecs), + key: (AccountStorageKey, MixId, BlockTimestampSecs), amount: Uint128, storage: &mut dyn Storage, ) -> Result<(), ContractError> { @@ -31,26 +60,27 @@ pub fn save_delegation( } pub fn remove_delegation( - key: (u32, MixId, BlockTimestampSecs), + key: (AccountStorageKey, MixId, BlockTimestampSecs), storage: &mut dyn Storage, ) -> Result<(), ContractError> { DELEGATIONS.remove(storage, key); Ok(()) } -pub fn delete_account(address: &Addr, storage: &mut dyn Storage) -> Result<(), ContractError> { - ACCOUNTS.remove(storage, address.to_owned().to_string()); - Ok(()) -} - -pub fn load_withdrawn(key: u32, storage: &dyn Storage) -> Result { +pub fn load_withdrawn( + key: AccountStorageKey, + storage: &dyn Storage, +) -> Result { Ok(WITHDRAWNS .may_load(storage, key) .unwrap_or(None) .unwrap_or_else(Uint128::zero)) } -pub fn load_balance(key: u32, storage: &dyn Storage) -> Result { +pub fn load_balance( + key: AccountStorageKey, + storage: &dyn Storage, +) -> Result { Ok(BALANCES .may_load(storage, key) .unwrap_or(None) @@ -58,7 +88,7 @@ pub fn load_balance(key: u32, storage: &dyn Storage) -> Result Result<(), ContractError> { @@ -67,7 +97,7 @@ pub fn save_balance( } pub fn save_withdrawn( - key: u32, + key: AccountStorageKey, value: Uint128, storage: &mut dyn Storage, ) -> Result<(), ContractError> { @@ -76,19 +106,22 @@ pub fn save_withdrawn( } pub fn load_bond_pledge( - key: u32, + key: AccountStorageKey, storage: &dyn Storage, ) -> Result, ContractError> { Ok(BOND_PLEDGES.may_load(storage, key).unwrap_or(None)) } -pub fn remove_bond_pledge(key: u32, storage: &mut dyn Storage) -> Result<(), ContractError> { +pub fn remove_bond_pledge( + key: AccountStorageKey, + storage: &mut dyn Storage, +) -> Result<(), ContractError> { BOND_PLEDGES.remove(storage, key); Ok(()) } pub fn save_bond_pledge( - key: u32, + key: AccountStorageKey, value: &PledgeData, storage: &mut dyn Storage, ) -> Result<(), ContractError> { @@ -97,14 +130,14 @@ pub fn save_bond_pledge( } pub fn load_gateway_pledge( - key: u32, + key: AccountStorageKey, storage: &dyn Storage, ) -> Result, ContractError> { Ok(GATEWAY_PLEDGES.may_load(storage, key).unwrap_or(None)) } pub fn save_gateway_pledge( - key: u32, + key: AccountStorageKey, value: &PledgeData, storage: &mut dyn Storage, ) -> Result<(), ContractError> { @@ -112,32 +145,34 @@ pub fn save_gateway_pledge( Ok(()) } -pub fn remove_gateway_pledge(key: u32, storage: &mut dyn Storage) -> Result<(), ContractError> { +pub fn remove_gateway_pledge( + key: AccountStorageKey, + storage: &mut dyn Storage, +) -> Result<(), ContractError> { GATEWAY_PLEDGES.remove(storage, key); Ok(()) } pub fn save_account(account: &Account, storage: &mut dyn Storage) -> Result<(), ContractError> { - // This is a bit dirty, but its a simple way to allow for both staking account and owner to load it from storage - if let Some(staking_address) = account.staking_address() { - ACCOUNTS.save(storage, staking_address.to_owned().to_string(), account)?; - } - ACCOUNTS.save(storage, account.owner_address().to_string(), account)?; + ACCOUNTS.save(storage, account.owner_address(), account)?; Ok(()) } pub fn load_account( - address: &Addr, + address: Addr, storage: &dyn Storage, ) -> Result, ContractError> { - Ok(ACCOUNTS - .may_load(storage, address.to_owned().to_string()) - .unwrap_or(None)) + Ok(ACCOUNTS.may_load(storage, address).unwrap_or(None)) } -fn validate_account(address: &Addr, storage: &dyn Storage) -> Result { - load_account(address, storage)? - .ok_or_else(|| ContractError::NoAccountForAddress(address.as_str().to_string())) +pub fn delete_account(address: Addr, storage: &mut dyn Storage) -> Result<(), ContractError> { + ACCOUNTS.remove(storage, address); + Ok(()) +} + +fn validate_account(address: Addr, storage: &dyn Storage) -> Result { + load_account(address.clone(), storage)? + .ok_or_else(|| ContractError::NoAccountForAddress(address.into_string())) } pub fn account_from_address( @@ -145,5 +180,5 @@ pub fn account_from_address( storage: &dyn Storage, api: &dyn Api, ) -> Result { - validate_account(&api.addr_validate(address)?, storage) + validate_account(api.addr_validate(address)?, storage) } diff --git a/contracts/vesting/src/vesting/account/mod.rs b/contracts/vesting/src/vesting/account/mod.rs index a368431689..7ba2ec0251 100644 --- a/contracts/vesting/src/vesting/account/mod.rs +++ b/contracts/vesting/src/vesting/account/mod.rs @@ -3,7 +3,7 @@ use crate::errors::ContractError; use crate::storage::{ load_balance, load_bond_pledge, load_gateway_pledge, load_withdrawn, remove_bond_pledge, remove_delegation, remove_gateway_pledge, save_account, save_balance, save_bond_pledge, - save_gateway_pledge, save_withdrawn, BlockTimestampSecs, DELEGATIONS, KEY, + save_gateway_pledge, save_withdrawn, AccountStorageKey, BlockTimestampSecs, DELEGATIONS, KEY, }; use crate::traits::VestingAccount; use cosmwasm_std::{Addr, Coin, Order, Storage, Timestamp, Uint128}; @@ -19,7 +19,7 @@ mod mixnode_bonding_account; mod node_families; mod vesting_account; -fn generate_storage_key(storage: &mut dyn Storage) -> Result { +fn generate_storage_key(storage: &mut dyn Storage) -> Result { let key = KEY.may_load(storage)?.unwrap_or(0) + 1; KEY.save(storage, &key)?; Ok(key) @@ -32,7 +32,7 @@ pub struct Account { pub start_time: Timestamp, pub periods: Vec, pub coin: Coin, - storage_key: u32, + storage_key: AccountStorageKey, #[serde(default)] pub pledge_cap: Option, } diff --git a/contracts/vesting/src/vesting/account/vesting_account.rs b/contracts/vesting/src/vesting/account/vesting_account.rs index 97c02c0214..e015fd1352 100644 --- a/contracts/vesting/src/vesting/account/vesting_account.rs +++ b/contracts/vesting/src/vesting/account/vesting_account.rs @@ -233,7 +233,7 @@ impl VestingAccount for Account { to_address: &Addr, storage: &mut dyn Storage, ) -> Result<(), ContractError> { - delete_account(&self.owner_address(), storage)?; + delete_account(self.owner_address(), storage)?; self.owner_address = to_address.to_owned(); save_account(self, storage)?; Ok(()) @@ -245,7 +245,7 @@ impl VestingAccount for Account { storage: &mut dyn Storage, ) -> Result<(), ContractError> { if let Some(staking_address) = self.staking_address() { - delete_account(staking_address, storage)?; + delete_account(staking_address.to_owned(), storage)?; } self.staking_address = to_address; save_account(self, storage)?; diff --git a/contracts/vesting/src/vesting/mod.rs b/contracts/vesting/src/vesting/mod.rs index 3eb6134e4e..4f9c5efbfa 100644 --- a/contracts/vesting/src/vesting/mod.rs +++ b/contracts/vesting/src/vesting/mod.rs @@ -37,6 +37,7 @@ pub fn populate_vesting_periods( #[cfg(test)] mod tests { use crate::contract::*; + use crate::errors::ContractError; use crate::storage::*; use crate::support::tests::helpers::vesting_account_percent_fixture; use crate::support::tests::helpers::{ @@ -47,7 +48,7 @@ mod tests { use crate::traits::{GatewayBondingAccount, MixnodeBondingAccount}; use crate::vesting::{populate_vesting_periods, Account}; use cosmwasm_std::testing::{mock_env, mock_info}; - use cosmwasm_std::{coins, Addr, Coin, Timestamp, Uint128}; + use cosmwasm_std::{coin, coins, Addr, Coin, Timestamp, Uint128}; use mixnet_contract_common::mixnode::MixNodeCostParams; use mixnet_contract_common::{Gateway, MixNode, Percent}; use vesting_contract_common::messages::{ExecuteMsg, VestingSpecification}; @@ -71,21 +72,44 @@ mod tests { let info = mock_info("admin", &coins(1_000_000_000_000, TEST_COIN_DENOM)); let _response = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); - let created_account = load_account(&Addr::unchecked("owner"), &deps.storage) + let created_account = load_account(Addr::unchecked("owner"), &deps.storage) .unwrap() .unwrap(); - let created_account_test_by_staking = - load_account(&Addr::unchecked("staking"), &deps.storage) - .unwrap() - .unwrap(); - assert_eq!(created_account_test_by_staking, created_account); + assert_eq!( created_account.load_balance(&deps.storage).unwrap(), // One was liquidated Uint128::new(1_000_000_000_000) ); + + // nothing is saved for "staking" account! + let created_account_test_by_staking = + load_account(Addr::unchecked("staking"), &deps.storage).unwrap(); + assert!(created_account_test_by_staking.is_none()); + + // but we can stake on its behalf! + let stake_msg = ExecuteMsg::DelegateToMixnode { + on_behalf_of: Some("owner".to_string()), + mix_id: 42, + amount: coin(500, TEST_COIN_DENOM), + }; + + let response = execute( + deps.as_mut(), + env.clone(), + mock_info("staking", &[]), + stake_msg, + ); + assert!(response.is_ok()); + + assert_eq!( + created_account.load_balance(&deps.storage).unwrap(), + // One was liquidated + Uint128::new(999_999_999_500) + ); + // Try create the same account again - let _response = execute(deps.as_mut(), env.clone(), info, msg.clone()); + let response = execute(deps.as_mut(), env.clone(), info, msg); assert!(response.is_err()); let account_again = vesting_account_new_fixture(&mut deps.storage, &env); @@ -99,11 +123,12 @@ mod tests { let mut env = mock_env(); let info = mock_info("owner", &[]); let account = vesting_account_new_fixture(&mut deps.storage, &env); + let staker = account.staking_address().unwrap(); let msg = ExecuteMsg::TransferOwnership { to_address: "new_owner".to_string(), }; let _response = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()).unwrap(); - let new_owner_account = load_account(&Addr::unchecked("new_owner"), &deps.storage) + let new_owner_account = load_account(Addr::unchecked("new_owner"), &deps.storage) .unwrap() .unwrap(); assert_eq!( @@ -112,25 +137,45 @@ mod tests { ); // Check old account is gone - let old_owner_account = load_account(&Addr::unchecked("owner"), &deps.storage).unwrap(); + let old_owner_account = load_account(Addr::unchecked("owner"), &deps.storage).unwrap(); assert!(old_owner_account.is_none()); // Not the owner let response = execute(deps.as_mut(), env.clone(), info.clone(), msg); assert!(response.is_err()); + // can't stake on behalf of the original owner anymore, but we can do it for the new one! + let stake_msg = ExecuteMsg::DelegateToMixnode { + on_behalf_of: Some("owner".to_string()), + mix_id: 42, + amount: coin(500, TEST_COIN_DENOM), + }; + let response = execute( + deps.as_mut(), + env.clone(), + mock_info(staker.as_ref(), &[]), + stake_msg, + ); + assert!(response.is_err()); + + let new_stake_msg = ExecuteMsg::DelegateToMixnode { + on_behalf_of: Some("new_owner".to_string()), + mix_id: 42, + amount: coin(500, TEST_COIN_DENOM), + }; + let response = execute( + deps.as_mut(), + env.clone(), + mock_info(staker.as_ref(), &[]), + new_stake_msg, + ); + assert!(response.is_ok()); + let info = mock_info("new_owner", &[]); let msg = ExecuteMsg::UpdateStakingAddress { to_address: Some("new_staking".to_string()), }; let _response = execute(deps.as_mut(), env.clone(), info, msg).unwrap(); - let new_staking_account = load_account(&Addr::unchecked("new_staking"), &deps.storage) - .unwrap() - .unwrap(); - assert_eq!(new_staking_account.owner_address(), "new_owner".to_string()); - - let old_staking_account = load_account(&Addr::unchecked("staking"), &deps.storage).unwrap(); - assert!(old_staking_account.is_none()); let msg = ExecuteMsg::WithdrawVestedCoins { amount: Coin { @@ -172,6 +217,117 @@ mod tests { assert!(response.is_err()); } + #[test] + fn test_staking_address_change() { + let mut deps = init_contract(); + let env = mock_env(); + let account = vesting_account_new_fixture(&mut deps.storage, &env); + let original_staker = account.staking_address().unwrap(); + + // can stake on behalf without an issue + let stake_msg = ExecuteMsg::DelegateToMixnode { + on_behalf_of: Some("owner".to_string()), + mix_id: 42, + amount: coin(500, TEST_COIN_DENOM), + }; + let response = execute( + deps.as_mut(), + env.clone(), + mock_info(original_staker.as_ref(), &[]), + stake_msg.clone(), + ); + assert!(response.is_ok()); + + let info = mock_info("owner", &[]); + let msg = ExecuteMsg::UpdateStakingAddress { + to_address: Some("new_staking".to_string()), + }; + let _response = execute(deps.as_mut(), env.clone(), info, msg).unwrap(); + + // the old staking account can't do any staking anymore! + let response = execute( + deps.as_mut(), + env.clone(), + mock_info(original_staker.as_ref(), &[]), + stake_msg.clone(), + ); + assert!(response.is_err()); + + // but the new one can + let response = execute( + deps.as_mut(), + env.clone(), + mock_info("new_staking", &[]), + stake_msg, + ); + assert!(response.is_ok()); + } + + #[test] + fn test_staking_account_transfer() { + let mut deps = init_contract(); + let env = mock_env(); + + let amount1 = coin(1000000000, "unym"); + let amount2 = coin(100, "unym"); + + // create the accounts + let msg1 = ExecuteMsg::CreateAccount { + owner_address: "vesting1".to_string(), + staking_address: None, + vesting_spec: None, + cap: None, + }; + let res1 = execute( + deps.as_mut(), + env.clone(), + mock_info("admin", &[amount1.clone()]), + msg1, + ); + assert!(res1.is_ok()); + + let msg2 = ExecuteMsg::CreateAccount { + owner_address: "vesting2".to_string(), + staking_address: None, + vesting_spec: None, + cap: None, + }; + let res2 = execute( + deps.as_mut(), + env.clone(), + mock_info("admin", &[amount2.clone()]), + msg2, + ); + assert!(res2.is_ok()); + + let vesting1 = try_get_vesting_coins("vesting1", None, env.clone(), deps.as_ref()).unwrap(); + assert_eq!(vesting1, amount1); + + let vesting2 = try_get_vesting_coins("vesting2", None, env.clone(), deps.as_ref()).unwrap(); + assert_eq!(vesting2, amount2); + + let staking_address_change = ExecuteMsg::UpdateStakingAddress { + to_address: Some("vesting1".to_string()), + }; + let res = execute( + deps.as_mut(), + env.clone(), + mock_info("vesting2", &[]), + staking_address_change, + ); + assert_eq!( + Err(ContractError::StakingAccountExists("vesting1".to_string())), + res + ); + + // ensure nothing has changed! + let vesting1 = try_get_vesting_coins("vesting1", None, env.clone(), deps.as_ref()).unwrap(); + assert_eq!(vesting1, amount1); + + let vesting2 = try_get_vesting_coins("vesting2", None, env, deps.as_ref()).unwrap(); + assert_eq!(vesting2, amount2); + } + #[test] fn test_period_logic() { let mut deps = init_contract(); @@ -461,7 +617,7 @@ mod tests { let info = mock_info("admin", &coins(1_000_000_000_000, TEST_COIN_DENOM)); let _response = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); - let account = load_account(&Addr::unchecked("owner"), &deps.storage) + let account = load_account(Addr::unchecked("owner"), &deps.storage) .unwrap() .unwrap(); @@ -518,7 +674,7 @@ mod tests { let total_delegations = account.total_delegations_for_mix(1, &deps.storage).unwrap(); assert_eq!(Uint128::new(90_000_000_000), total_delegations); - let account = load_account(&Addr::unchecked("owner"), &deps.storage) + let account = load_account(Addr::unchecked("owner"), &deps.storage) .unwrap() .unwrap(); diff --git a/envs/local.env b/envs/local.env new file mode 100644 index 0000000000..c7121762d0 --- /dev/null +++ b/envs/local.env @@ -0,0 +1,24 @@ +CONFIGURED=true + +RUST_LOG=info +RUST_BACKTRACE=1 + +BECH32_PREFIX=n +MIX_DENOM=unym +MIX_DENOM_DISPLAY=nym +STAKE_DENOM=unyx +STAKE_DENOM_DISPLAY=nyx +DENOMS_EXPONENT=6 +MIXNET_CONTRACT_ADDRESS=n1xsml6tm6pnx8nsuz3a54cznh55g6nuwu9ug9t92ucjkq5ewp5w9syxeqsv +VESTING_CONTRACT_ADDRESS=n1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3sjkxkav +BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 +COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n1lp5zex6685kd22agzskhqsylpnssxnweyuvsz4edr4p4ta92qf3q3dhmsx +GROUP_CONTRACT_ADDRESS=n1rw8fw2mpcpzzq3jpa4e52ufawnmj5a4u68p35umvgskewuw0nlzsaa5w4m +MULTISIG_CONTRACT_ADDRESS=n1rw8fw2mpcpzzq3jpa4e52ufawnmj5a4u68p35umvgskewuw0nlzsaa5w4m +COCONUT_DKG_CONTRACT_ADDRESS=n1vwtgazgpancsfel04y7syc95ausmat47cjtldqzkdmx6phyrwx2qvkv32p +REWARDING_VALIDATOR_ADDRESS=n1tfzd4qz3a45u8p4mr5zmzv66457uwjgcl05jdq +STATISTICS_SERVICE_DOMAIN_ADDRESS="http://0.0.0.0" +NYXD="http://127.0.0.1:26657" +NYM_API="http://127.0.0.1:8000" + +DKG_TIME_CONFIGURATION="600,300,300,60,60,1209600" diff --git a/envs/mainnet.env b/envs/mainnet.env index 3a8ec4b17c..6d3d65f14f 100644 --- a/envs/mainnet.env +++ b/envs/mainnet.env @@ -13,9 +13,12 @@ MIXNET_CONTRACT_ADDRESS=n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0 VESTING_CONTRACT_ADDRESS=n1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq73f2nw BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 +GROUP_CONTRACT_ADDRESS=n1rw8fw2mpcpzzq3jpa4e52ufawnmj5a4u68p35umvgskewuw0nlzsaa5w4m MULTISIG_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 COCONUT_DKG_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 REWARDING_VALIDATOR_ADDRESS=n10yyd98e2tuwu0f7ypz9dy3hhjw7v772q6287gy STATISTICS_SERVICE_DOMAIN_ADDRESS="https://mainnet-stats.nymte.ch:8090" -nyxd_VALIDATOR="https://rpc.nymtech.net"; -API_VALIDATOR="https://validator.nymtech.net/api/" +NYXD="https://rpc.nymtech.net"; +NYM_API="https://validator.nymtech.net/api/" + +DKG_TIME_CONFIGURATION="259200,300,300,60,60,1209600" diff --git a/envs/qa-qwerty.env b/envs/qa-qwerty.env index 6bb6895d72..30130fd6e9 100644 --- a/envs/qa-qwerty.env +++ b/envs/qa-qwerty.env @@ -13,9 +13,12 @@ MIXNET_CONTRACT_ADDRESS=n14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sjy VESTING_CONTRACT_ADDRESS=n1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq73f2nw BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n12ckdkm3q7eytefs7rwu4ue3t9hxgvl9v08jddmtwgct2ve0pv50q0t8dlt +GROUP_CONTRACT_ADDRESS=n1rw8fw2mpcpzzq3jpa4e52ufawnmj5a4u68p35umvgskewuw0nlzsaa5w4m MULTISIG_CONTRACT_ADDRESS=n14krxe8ukzagwhvec0rmteexu62w8k9kp9sra9ww6em2hnmzcukqsa0utc8 COCONUT_DKG_CONTRACT_ADDRESS=n1rl5n6cxuz2hdy3f7d9hsnw8zn0zwwwr0r4dxfz7tktgpgkcnz9zshmvksc REWARDING_VALIDATOR_ADDRESS=n10yyd98e2tuwu0f7ypz9dy3hhjw7v772q6287gy STATISTICS_SERVICE_DOMAIN_ADDRESS="https://mainnet-stats.nymte.ch:8090" -NYXD_VALIDATOR="https://qwerty-validator.qa.nymte.ch/" -API_VALIDATOR="https://qwerty-validator-api.qa.nymte.ch/api" +NYXD="https://qwerty-validator.qa.nymte.ch/" +NYM_API="https://qwerty-validator-api.qa.nymte.ch/api" + +DKG_TIME_CONFIGURATION="600,300,300,60,60,1209600" diff --git a/envs/qa.env b/envs/qa.env index 999850f798..a5442b7600 100644 --- a/envs/qa.env +++ b/envs/qa.env @@ -13,9 +13,12 @@ MIXNET_CONTRACT_ADDRESS=n1rjzps6qrmdqmf0xz4cn4x4rcmqeqzq6hnzqg4wcvd0r2lyasdq5sep VESTING_CONTRACT_ADDRESS=n1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3sjkxkav BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0 COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n1ghd753shjuwexxywmgs4xz7x2q732vcn7ty4yw +GROUP_CONTRACT_ADDRESS=n1rw8fw2mpcpzzq3jpa4e52ufawnmj5a4u68p35umvgskewuw0nlzsaa5w4m MULTISIG_CONTRACT_ADDRESS=n17p9rzwnnfxcjp32un9ug7yhhzgtkhvl988qccs COCONUT_DKG_CONTRACT_ADDRESS=n17p9rzwnnfxcjp32un9ug7yhhzgtkhvl988qccs REWARDING_VALIDATOR_ADDRESS=n1tfzd4qz3a45u8p4mr5zmzv66457uwjgcl05jdq STATISTICS_SERVICE_DOMAIN_ADDRESS="http://0.0.0.0" -NYXD_VALIDATOR="https://qa-validator.nymtech.net" -API_VALIDATOR="https://qa-validator-api.nymtech.net/api" +NYXD="https://qa-validator.nymtech.net" +NYM_API="https://qa-validator-api.nymtech.net/api" + +DKG_TIME_CONFIGURATION="600,300,300,60,60,1209600" \ No newline at end of file diff --git a/examples/cli/commands/verify-signature/Cargo.lock b/examples/cli/commands/verify-signature/Cargo.lock deleted file mode 100644 index fb341ab657..0000000000 --- a/examples/cli/commands/verify-signature/Cargo.lock +++ /dev/null @@ -1,3204 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "anyhow" -version = "1.0.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" - -[[package]] -name = "async-trait" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "az" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "base64ct" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474" - -[[package]] -name = "bip32" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873faa4363bfc54c36a48321da034c92a0645a363eed34d948683ffc1706e37f" -dependencies = [ - "bs58", - "hmac", - "k256", - "once_cell", - "pbkdf2", - "rand_core 0.6.3", - "ripemd160", - "sha2", - "subtle", - "zeroize", -] - -[[package]] -name = "bip39" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e89470017230c38e52b82b3ee3f530db1856ba1d434e3a67a3456a8a8dec5f" -dependencies = [ - "bitcoin_hashes", - "rand 0.6.5", - "rand_core 0.4.2", - "serde", - "unicode-normalization", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce18265ec2324ad075345d5814fbeed4f41f0a660055dc78840b74d19b874b1" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bls12_381" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54757888b09a69be70b5ec303e382a74227392086ba808cb01eeca29233a2397" -dependencies = [ - "digest 0.9.0", - "ff 0.10.1", - "group 0.10.0", - "pairing", - "rand_core 0.6.3", - "subtle", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -dependencies = [ - "sha2", -] - -[[package]] -name = "bumpalo" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" - -[[package]] -name = "bytemuck" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "3.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e724a68d9319343bb3328c9cc2dfde263f4b3142ee1059a9980580171c954b" -dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_derive" -version = "3.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13547f7012c01ab4a0e8f8967730ada8f9fdf419e8b6c792788f39cf4e46eefa" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "coconut-bandwidth-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cosmwasm-std", - "multisig-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "coconut-interface" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "bs58", - "getset", - "nymcoconut", - "serde", - "thiserror", -] - -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - -[[package]] -name = "comfy-table" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85914173c2f558d61613bfbbf1911f14e630895087a7ed2fafc0f5319e1536e7" -dependencies = [ - "crossterm", - "strum", - "strum_macros", - "unicode-width", -] - -[[package]] -name = "config" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cfg-if", - "handlebars", - "humantime-serde", - "log", - "network-defaults", - "serde", - "toml", - "url", -] - -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "contracts-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cosmwasm-std", -] - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cosmos-sdk-proto" -version = "0.12.3" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", -] - -[[package]] -name = "cosmrs" -version = "0.7.1" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "getrandom 0.2.7", - "k256", - "prost", - "prost-types", - "rand_core 0.6.3", - "serde", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-rpc", - "thiserror", -] - -[[package]] -name = "cosmwasm-crypto" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb0afef2325df81aadbf9be1233f522ed8f6e91df870c764bc44cca2b1415bd" -dependencies = [ - "digest 0.9.0", - "ed25519-zebra", - "k256", - "rand_core 0.6.3", - "thiserror", -] - -[[package]] -name = "cosmwasm-derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b36e527620a2a3e00e46b6e731ab6c9b68d11069c986f7d7be8eba79ef081a4" -dependencies = [ - "syn", -] - -[[package]] -name = "cosmwasm-std" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875994993c2082a6fcd406937bf0fca21c349e4a624f3810253a14fa83a3a195" -dependencies = [ - "base64", - "cosmwasm-crypto", - "cosmwasm-derive", - "forward_ref", - "schemars", - "serde", - "serde-json-wasm", - "thiserror", - "uint", -] - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" -dependencies = [ - "winapi", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array", - "rand_core 0.6.3", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "cw-storage-plus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648b1507290bbc03a8d88463d7cd9b04b1fa0155e5eef366c4fa052b9caaac7a" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-utils" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbaecb78c8e8abfd6b4258c7f4fbeb5c49a5e45ee4d910d3240ee8e1d714e1b" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw3" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe19462a7f644ba60c19d3443cb90d00c50d9b6b3b0a3a7fca93df8261af979b" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "schemars", - "serde", -] - -[[package]] -name = "cw4" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acc3549d5ce11c6901b3a676f2e2628684722197054d97cd0101ea174ed5cbd" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" -dependencies = [ - "block-buffer 0.10.2", - "crypto-common", -] - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dyn-clone" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" - -[[package]] -name = "ecdsa" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - -[[package]] -name = "ed25519" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "sha2", - "zeroize", -] - -[[package]] -name = "ed25519-zebra" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" -dependencies = [ - "curve25519-dalek", - "hex", - "rand_core 0.6.3", - "serde", - "sha2", - "thiserror", - "zeroize", -] - -[[package]] -name = "either" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" - -[[package]] -name = "elliptic-curve" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "ff 0.11.1", - "generic-array", - "group 0.11.0", - "rand_core 0.6.3", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "encoding_rs" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "example-verify-signature" -version = "0.1.0" -dependencies = [ - "nym-cli-commands", -] - -[[package]] -name = "execute" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "eyre" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" -dependencies = [ - "rand_core 0.6.3", - "subtle", -] - -[[package]] -name = "ff" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" -dependencies = [ - "rand_core 0.6.3", - "subtle", -] - -[[package]] -name = "fixed" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8c4fbf8cd36f2a96740c31320902abbf0acbd733049b758707d842490c98c4" -dependencies = [ - "az", - "bytemuck", - "half", - "serde", - "typenum", -] - -[[package]] -name = "flate2" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "eyre", - "paste", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "forward_ref" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "futures" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" - -[[package]] -name = "futures-executor" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" - -[[package]] -name = "futures-macro" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" - -[[package]] -name = "futures-task" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" - -[[package]] -name = "futures-util" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "group" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" -dependencies = [ - "byteorder", - "ff 0.10.1", - "rand_core 0.6.3", - "subtle", -] - -[[package]] -name = "group" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" -dependencies = [ - "ff 0.11.1", - "rand_core 0.6.3", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" -dependencies = [ - "crunchy", -] - -[[package]] -name = "handlebars" -version = "3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error", - "serde", - "serde_json", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "headers" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" -dependencies = [ - "base64", - "bitflags", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha-1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "http" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime", - "serde", -] - -[[package]] -name = "hyper" -version = "0.14.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "tower-service", - "webpki", -] - -[[package]] -name = "hyper-rustls" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -dependencies = [ - "ct-logs", - "futures-util", - "hyper", - "log", - "rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "webpki", - "webpki-roots", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "idna" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -dependencies = [ - "autocfg 1.1.0", - "hashbrown", - "serde", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipnet" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" - -[[package]] -name = "itertools" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" - -[[package]] -name = "js-sys" -version = "0.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sec1", - "sha2", - "sha3", -] - -[[package]] -name = "keccak" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" - -[[package]] -name = "lock_api" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" -dependencies = [ - "autocfg 1.1.0", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "miniz_oxide" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", -] - -[[package]] -name = "mixnet-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "az", - "contracts-common", - "cosmwasm-std", - "fixed", - "log", - "schemars", - "serde", - "serde_repr", - "thiserror", - "time", - "ts-rs", -] - -[[package]] -name = "multisig-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "cw3", - "cw4", - "schemars", - "serde", -] - -[[package]] -name = "native-tls" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "network-defaults" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cfg-if", - "dotenv", - "hex-literal", - "once_cell", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - -[[package]] -name = "nym-cli-commands" -version = "1.0.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "base64", - "bip39", - "bs58", - "cfg-if", - "clap", - "comfy-table", - "cosmrs", - "cosmwasm-std", - "handlebars", - "humantime-serde", - "k256", - "log", - "mixnet-contract-common", - "network-defaults", - "rand 0.6.5", - "serde", - "serde_json", - "thiserror", - "time", - "toml", - "url", - "validator-client", - "vesting-contract-common", -] - -[[package]] -name = "nymcoconut" -version = "0.5.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "bls12_381", - "bs58", - "digest 0.9.0", - "ff 0.10.1", - "getrandom 0.2.7", - "group 0.10.0", - "itertools", - "rand 0.8.5", - "serde", - "serde_derive", - "sha2", - "thiserror", -] - -[[package]] -name = "once_cell" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" -dependencies = [ - "autocfg 1.1.0", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "os_str_bytes" -version = "6.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" - -[[package]] -name = "pairing" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de9d09263c9966e8196fe0380c9dbbc7ea114b5cf371ba29004bc1f9c6db7f3" -dependencies = [ - "group 0.10.0", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec 1.9.0", - "windows-sys", -] - -[[package]] -name = "paste" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" - -[[package]] -name = "pbkdf2" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "peg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" -dependencies = [ - "peg-macros", - "peg-runtime", -] - -[[package]] -name = "peg-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" -dependencies = [ - "peg-runtime", - "proc-macro2", - "quote", -] - -[[package]] -name = "peg-runtime" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pest" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0560d531d1febc25a3c9398a62a71256c0178f2e3443baedd9ad4bb8c9deb4" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905708f7f674518498c1f8d644481440f476d39ca6ecae83319bba7c6c12da91" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5803d8284a629cc999094ecd630f55e91b561a1d1ba75e233b00ae13b91a69ad" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1538eb784f07615c6d9a8ab061089c6c54a344c5b4301db51990ca1c241e8c04" -dependencies = [ - "once_cell", - "pest", - "sha-1", -] - -[[package]] -name = "pin-project" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" -dependencies = [ - "der", - "spki", - "zeroize", -] - -[[package]] -name = "pkg-config" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quote" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.7", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "reqwest" -version = "0.11.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" -dependencies = [ - "crypto-bigint", - "hmac", - "zeroize", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls", - "schannel", - "security-framework", -] - -[[package]] -name = "rustversion" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" - -[[package]] -name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" -dependencies = [ - "lazy_static", - "windows-sys", -] - -[[package]] -name = "schemars" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" -dependencies = [ - "dyn-clone", - "indexmap", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" -dependencies = [ - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "serde" -version = "1.0.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-json-wasm" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.3", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[package]] -name = "signal-hook" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -dependencies = [ - "digest 0.9.0", - "rand_core 0.6.3", -] - -[[package]] -name = "slab" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "smallvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" - -[[package]] -name = "socket2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spki" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - -[[package]] -name = "syn" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "tendermint" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca881fa4dedd2b46334f13be7fbc8cc1549ba4be5a833fe4e73d1a1baaf7949" -dependencies = [ - "async-trait", - "bytes", - "ed25519", - "ed25519-dalek", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd160", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto", - "time", - "zeroize", -] - -[[package]] -name = "tendermint-config" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c56ee93f4e9b7e7daba86d171f44572e91b741084384d0ae00df7991873dfd" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint", - "toml", - "url", -] - -[[package]] -name = "tendermint-proto" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71f925d74903f4abbdc4af0110635a307b3cb05b175fdff4a7247c14a4d0874" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-rpc" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63f57ee05a1e927887191c76d1b139de9fa40c180b9f8727ee44377242a6" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom 0.2.7", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", - "peg", - "pin-project", - "serde", - "serde_bytes", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-config", - "tendermint-proto", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - -[[package]] -name = "thiserror" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45" -dependencies = [ - "itoa", - "libc", - "num_threads", - "time-macros", -] - -[[package]] -name = "time-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" - -[[package]] -name = "tokio" -version = "1.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" -dependencies = [ - "autocfg 1.1.0", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "once_cell", - "pin-project-lite", - "socket2", - "tokio-macros", - "winapi", -] - -[[package]] -name = "tokio-macros" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-util" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "ts-rs" -version = "6.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59f479df54269b400dd95bc3b7e81623b3e4b9c70c8ca7125ab8341eafa64e" -dependencies = [ - "thiserror", - "ts-rs-macros", -] - -[[package]] -name = "ts-rs-macros" -version = "6.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f807fdb3151fee75df7485b901a89624358cd07a67a8fb1a5831bf5a07681ff" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn", - "termcolor", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "ucd-trie" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" - -[[package]] -name = "uint" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" - -[[package]] -name = "unicode-ident" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" - -[[package]] -name = "unicode-normalization" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" -dependencies = [ - "smallvec 0.6.14", -] - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", - "serde", -] - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - -[[package]] -name = "validator-api-requests" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "bs58", - "coconut-interface", - "cosmrs", - "getset", - "mixnet-contract-common", - "schemars", - "serde", - "ts-rs", -] - -[[package]] -name = "validator-client" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "async-trait", - "base64", - "bip39", - "coconut-bandwidth-contract-common", - "coconut-interface", - "colored", - "config", - "cosmrs", - "cosmwasm-std", - "cw3", - "execute", - "flate2", - "futures", - "itertools", - "log", - "mixnet-contract-common", - "multisig-contract-common", - "network-defaults", - "prost", - "reqwest", - "serde", - "serde_json", - "sha2", - "thiserror", - "tokio", - "url", - "validator-api-requests", - "vesting-contract", - "vesting-contract-common", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "vesting-contract" -version = "1.0.2" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "mixnet-contract-common", - "schemars", - "serde", - "thiserror", - "vesting-contract-common", -] - -[[package]] -name = "vesting-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=develop#124103d51b8fdd66552c27575234d810e80ec6c8" -dependencies = [ - "config", - "cosmwasm-std", - "cw-storage-plus", - "mixnet-contract-common", - "schemars", - "serde", - "ts-rs", -] - -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" - -[[package]] -name = "web-sys" -version = "0.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] diff --git a/explorer-api/Cargo.toml b/explorer-api/Cargo.toml index eb4b6ac83f..3d4e48f1ab 100644 --- a/explorer-api/Cargo.toml +++ b/explorer-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "explorer-api" -version = "1.1.2" +version = "1.1.7" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,7 +11,7 @@ clap = { version = "4.0", features = ["cargo", "derive"] } humantime-serde = "1.0" isocountry = "0.3.2" itertools = "0.10.3" -log = "0.4.0" +log = { workspace = true } okapi = { version = "0.7.0-rc.1", features = ["impl_json_schema"] } pretty_env_logger = "0.4.0" reqwest = "0.11.4" diff --git a/explorer-api/src/main.rs b/explorer-api/src/main.rs index 7f0195394d..8bf96be15f 100644 --- a/explorer-api/src/main.rs +++ b/explorer-api/src/main.rs @@ -8,7 +8,7 @@ use dotenv::dotenv; use log::info; use logging::setup_logging; use network_defaults::setup_env; -use task::{wait_for_signal, TaskManager}; +use task::TaskManager; pub(crate) mod cache; mod client; @@ -77,13 +77,8 @@ impl ExplorerApi { self.wait_for_interrupt(shutdown).await } - async fn wait_for_interrupt(&self, mut shutdown: TaskManager) { - wait_for_signal().await; - - log::info!("Sending shutdown"); - shutdown.signal_shutdown().ok(); - log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); - shutdown.wait_for_shutdown().await; + async fn wait_for_interrupt(&self, shutdown: TaskManager) { + let _res = shutdown.catch_interrupt().await; log::info!("Stopping explorer API"); } } diff --git a/explorer-api/src/mix_node/http.rs b/explorer-api/src/mix_node/http.rs index 00d9b9fd70..035e51bc95 100644 --- a/explorer-api/src/mix_node/http.rs +++ b/explorer-api/src/mix_node/http.rs @@ -30,14 +30,14 @@ pub fn mix_node_make_default_routes(settings: &OpenApiSettings) -> (Vec, } async fn get_mix_node_description(host: &str, port: u16) -> Result { - reqwest::get(format!("http://{}:{}/description", host, port)) + reqwest::get(format!("http://{host}:{port}/description")) .await? .json::() .await } async fn get_mix_node_stats(host: &str, port: u16) -> Result { - reqwest::get(format!("http://{}:{}/stats", host, port)) + reqwest::get(format!("http://{host}:{port}/stats")) .await? .json::() .await diff --git a/explorer-api/src/ping/http.rs b/explorer-api/src/ping/http.rs index 7e7ebea06d..e8e89ac218 100644 --- a/explorer-api/src/ping/http.rs +++ b/explorer-api/src/ping/http.rs @@ -95,7 +95,7 @@ fn sanitize_and_resolve_host(host: &str, port: u16) -> Option { } // the host string should hopefully parse and resolve into a valid socket address - let parsed_host = format!("{}:{}", trimmed_host, port); + let parsed_host = format!("{trimmed_host}:{port}"); match parsed_host.to_socket_addrs() { Ok(mut addrs) => addrs.next(), Err(e) => { diff --git a/explorer/CHANGELOG.md b/explorer/CHANGELOG.md index fc1cf8a756..b021d3babc 100644 --- a/explorer/CHANGELOG.md +++ b/explorer/CHANGELOG.md @@ -1,5 +1,13 @@ ## UNRELEASED +## [nym-explorer-v1.0.3](https://github.com/nymtech/nym/tree/nym-explorer-v1.0.3) (2023-01-24) + +- Stake Saturation tooltip on node list and node pages updated ([#2877]) +- Sandbox Upgrade : Name change from "Network Explorer" to "Sandbox Explorer", button to mainnet explorer and link to faucet ([#2332)]) + +[#2877]: https://github.com/nymtech/nym/issues/2877 +[#2332]: https://github.com/nymtech/nym/issues/2332 + ## [nym-explorer-v1.0.2](https://github.com/nymtech/nym/tree/nym-explorer-v1.0.2) (2023-01-17) - changing the explorers guru link ([#2820]) diff --git a/explorer/package.json b/explorer/package.json index 4c4c892ed6..3ca03f5b56 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -1,6 +1,6 @@ { "name": "@nym/network-explorer", - "version": "1.0.2", + "version": "1.0.3", "private": true, "license": "Apache-2.0", "dependencies": { @@ -18,8 +18,8 @@ "d3-scale": "^4.0.0", "date-fns": "^2.24.0", "i18n-iso-countries": "^6.8.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-error-boundary": "^3.1.4", "react-google-charts": "^3.0.15", "react-identicons": "^1.2.5", @@ -37,7 +37,7 @@ "@storybook/addon-essentials": "^6.5.8", "@storybook/addon-interactions": "^6.5.8", "@storybook/addon-links": "^6.5.8", - "@storybook/react": "^6.5.8", + "@storybook/react": "^6.5.15", "@storybook/testing-library": "^0.0.9", "@svgr/webpack": "^6.1.1", "@testing-library/jest-dom": "^5.14.1", @@ -48,17 +48,17 @@ "@types/geojson": "^7946.0.8", "@types/jest": "^27.0.1", "@types/node": "^16.7.13", - "@types/react": "^17.0.34", - "@types/react-dom": "^17.0.9", + "@types/react": "^18.0.26", + "@types/react-dom": "^18.0.10", "@types/react-simple-maps": "^1.0.6", "@types/react-tooltip": "^4.2.4", "@types/topojson-client": "^3.1.0", "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", - "babel-loader": "^8.2.2", + "babel-loader": "^8.3.0", "babel-plugin-root-import": "^6.6.0", "clean-webpack-plugin": "^4.0.0", - "css-loader": "^6.2.0", + "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^3.0.2", "dotenv-webpack": "^7.0.3", "eslint": "^8.10.0", @@ -82,13 +82,13 @@ "prettier": "2.3.2", "react-refresh": "^0.10.0", "react-refresh-typescript": "^2.0.2", - "style-loader": "^3.2.1", + "style-loader": "^3.3.1", "ts-jest": "^27.0.5", - "ts-loader": "^9.2.5", + "ts-loader": "^9.4.2", "tsconfig-paths-webpack-plugin": "^3.5.2", "typescript": "^4.6.2", "url-loader": "^4.1.1", - "webpack": "^5.64.3", + "webpack": "^5.75.0", "webpack-cli": "^4.8.0", "webpack-dev-server": "^4.5.0", "webpack-favicons": "^1.3.8", diff --git a/explorer/src/App.tsx b/explorer/src/App.tsx index 9ce60f06f9..4e6fcc41e8 100644 --- a/explorer/src/App.tsx +++ b/explorer/src/App.tsx @@ -4,7 +4,7 @@ import { MobileNav } from './components/MobileNav'; import { Routes } from './routes/index'; import { useIsMobile } from './hooks/useIsMobile'; -export const App: React.FC = () => { +export const App: FCWithChildren = () => { const isMobile = useIsMobile(); if (isMobile) { diff --git a/explorer/src/components/ComponentError.tsx b/explorer/src/components/ComponentError.tsx index 34ca4b9d19..00b448fb9e 100644 --- a/explorer/src/components/ComponentError.tsx +++ b/explorer/src/components/ComponentError.tsx @@ -1,7 +1,7 @@ import { Typography } from '@mui/material'; import * as React from 'react'; -export const ComponentError: React.FC<{ text: string }> = ({ text }) => ( +export const ComponentError: FCWithChildren<{ text: string }> = ({ text }) => ( = ({ +export const ContentCard: FCWithChildren = ({ title, Icon, Action, diff --git a/explorer/src/components/CustomColumnHeading.tsx b/explorer/src/components/CustomColumnHeading.tsx index 4adcda4540..c15ef27f9b 100644 --- a/explorer/src/components/CustomColumnHeading.tsx +++ b/explorer/src/components/CustomColumnHeading.tsx @@ -4,7 +4,7 @@ import { ExpandLess, ExpandMore } from '@mui/icons-material'; import { useTheme } from '@mui/material/styles'; import { Tooltip } from '@nymproject/react/tooltip/Tooltip'; -export const CustomColumnHeading: React.FC<{ headingTitle: string; tooltipInfo?: string }> = ({ +export const CustomColumnHeading: FCWithChildren<{ headingTitle: string; tooltipInfo?: string }> = ({ headingTitle, tooltipInfo, }) => { diff --git a/explorer/src/components/DetailTable.tsx b/explorer/src/components/DetailTable.tsx index 75aaae36ab..17418de4f3 100644 --- a/explorer/src/components/DetailTable.tsx +++ b/explorer/src/components/DetailTable.tsx @@ -43,7 +43,7 @@ function formatCellValues(val: string | number, field: string) { return val; } -export const DetailTable: React.FC<{ +export const DetailTable: FCWithChildren<{ tableName: string; columnsData: ColumnsType[]; rows: MixnodeRowType[] | GatewayEnrichedRowType[]; diff --git a/explorer/src/components/Footer.tsx b/explorer/src/components/Footer.tsx index 2ee7c77198..c85ba47be4 100644 --- a/explorer/src/components/Footer.tsx +++ b/explorer/src/components/Footer.tsx @@ -4,7 +4,7 @@ import { Typography } from '@mui/material'; import { Socials } from './Socials'; import { useIsMobile } from '../hooks/useIsMobile'; -export const Footer: React.FC = () => { +export const Footer: FCWithChildren = () => { const isMobile = useIsMobile(); return ( diff --git a/explorer/src/components/MixNodes/BondBreakdown.tsx b/explorer/src/components/MixNodes/BondBreakdown.tsx index 06009be05d..d7faa163fc 100644 --- a/explorer/src/components/MixNodes/BondBreakdown.tsx +++ b/explorer/src/components/MixNodes/BondBreakdown.tsx @@ -13,7 +13,7 @@ import { currencyToString } from '../../utils/currency'; import { useMixnodeContext } from '../../context/mixnode'; import { useIsMobile } from '../../hooks/useIsMobile'; -export const BondBreakdownTable: React.FC = () => { +export const BondBreakdownTable: FCWithChildren = () => { const { mixNode, delegations, uniqDelegations } = useMixnodeContext(); const [showDelegations, toggleShowDelegations] = React.useState(false); diff --git a/explorer/src/components/MixNodes/DetailSection.tsx b/explorer/src/components/MixNodes/DetailSection.tsx index b338487fd2..dcf0f830b5 100644 --- a/explorer/src/components/MixNodes/DetailSection.tsx +++ b/explorer/src/components/MixNodes/DetailSection.tsx @@ -11,7 +11,7 @@ interface MixNodeDetailProps { mixnodeDescription: MixNodeDescriptionResponse; } -export const MixNodeDetailSection: React.FC = ({ mixNodeRow, mixnodeDescription }) => { +export const MixNodeDetailSection: FCWithChildren = ({ mixNodeRow, mixnodeDescription }) => { const theme = useTheme(); const palette = [theme.palette.text.primary]; const isMobile = useIsMobile(); diff --git a/explorer/src/components/MixNodes/Economics/Columns.ts b/explorer/src/components/MixNodes/Economics/Columns.ts index 133551bcc6..3c20e0eebd 100644 --- a/explorer/src/components/MixNodes/Economics/Columns.ts +++ b/explorer/src/components/MixNodes/Economics/Columns.ts @@ -31,7 +31,7 @@ export const EconomicsInfoColumns: ColumnsType[] = [ flex: 1, headerAlign: 'left', tooltipInfo: - 'Level of stake saturation for this node. Nodes receive more rewards the higher their saturation level, up to 100%. Beyond 100% no additional rewards are granted. The current stake saturation level is: 750k NYM, computed as S/K where S is total amount of tokens available to stakeholders and K is the number of nodes in the reward set.', + 'Level of stake saturation for this node. Nodes receive more rewards the higher their saturation level, up to 100%. Beyond 100% no additional rewards are granted. The current stake saturation level is 730k NYM, computed as S/K where S is target amount of tokens staked in the network and K is the number of nodes in the reward set.', }, { field: 'profitMargin', diff --git a/explorer/src/components/MixNodes/Economics/EconomicsProgress.tsx b/explorer/src/components/MixNodes/Economics/EconomicsProgress.tsx index 1779d8d18f..9f8525a754 100644 --- a/explorer/src/components/MixNodes/Economics/EconomicsProgress.tsx +++ b/explorer/src/components/MixNodes/Economics/EconomicsProgress.tsx @@ -6,7 +6,7 @@ import { Box } from '@mui/system'; const parseToNumber = (value: number | undefined | string) => typeof value === 'string' ? parseInt(value || '', 10) : value || 0; -export const EconomicsProgress: React.FC< +export const EconomicsProgress: FCWithChildren< LinearProgressProps & { threshold?: number; } diff --git a/explorer/src/components/MixNodes/Economics/Table.tsx b/explorer/src/components/MixNodes/Economics/Table.tsx index 5977847436..929445254a 100644 --- a/explorer/src/components/MixNodes/Economics/Table.tsx +++ b/explorer/src/components/MixNodes/Economics/Table.tsx @@ -66,7 +66,7 @@ const formatCellValues = (value: EconomicsRowsType, field: string) => { ); }; -export const DelegatorsInfoTable: React.FC> = ({ +export const DelegatorsInfoTable: FCWithChildren> = ({ tableName, columnsData, rows, diff --git a/explorer/src/components/MixNodes/Status.tsx b/explorer/src/components/MixNodes/Status.tsx index 88cfe6c1eb..a2da302c87 100644 --- a/explorer/src/components/MixNodes/Status.tsx +++ b/explorer/src/components/MixNodes/Status.tsx @@ -36,7 +36,7 @@ export const getMixNodeStatusText = (status: MixnodeStatus) => { } }; -export const MixNodeStatus: React.FC = ({ status }) => { +export const MixNodeStatus: FCWithChildren = ({ status }) => { const theme = useTheme(); const Icon = React.useMemo(() => getMixNodeIcon(status), [status]); const color = React.useMemo(() => getMixNodeStatusColor(theme, status), [status, theme]); diff --git a/explorer/src/components/MixNodes/StatusDropdown.tsx b/explorer/src/components/MixNodes/StatusDropdown.tsx index 18263edf6e..9cb34a2f0c 100644 --- a/explorer/src/components/MixNodes/StatusDropdown.tsx +++ b/explorer/src/components/MixNodes/StatusDropdown.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { MenuItem } from '@mui/material'; import Select from '@mui/material/Select'; -import { SelectInputProps } from '@mui/material/Select/SelectInput'; +import { SelectChangeEvent } from '@mui/material/Select/SelectInput'; import { SxProps } from '@mui/system'; import { MixNodeStatus } from './Status'; import { MixnodeStatus, MixnodeStatusWithAll } from '../../typeDefs/explorer-api'; @@ -16,14 +16,18 @@ interface MixNodeStatusDropdownProps { onSelectionChanged?: (status?: MixnodeStatusWithAll) => void; } -export const MixNodeStatusDropdown: React.FC = ({ status, onSelectionChanged, sx }) => { +export const MixNodeStatusDropdown: FCWithChildren = ({ + status, + onSelectionChanged, + sx, +}) => { const isMobile = useIsMobile(); const [statusValue, setStatusValue] = React.useState(status || MixnodeStatusWithAll.all); - const onChange: SelectInputProps['onChange'] = React.useCallback( - ({ target: { value } }) => { - setStatusValue(value); + const onChange = React.useCallback( + (event: SelectChangeEvent) => { + setStatusValue(event.target.value as MixnodeStatusWithAll); if (onSelectionChanged) { - onSelectionChanged(value); + onSelectionChanged(event.target.value as MixnodeStatusWithAll); } }, [onSelectionChanged], diff --git a/explorer/src/components/MobileNav.tsx b/explorer/src/components/MobileNav.tsx index cb44210e9d..ac03cb9c80 100644 --- a/explorer/src/components/MobileNav.tsx +++ b/explorer/src/components/MobileNav.tsx @@ -25,11 +25,7 @@ import { NYM_WEBSITE } from '../api/constants'; import { ExpandableButton } from './Nav'; import { DarkLightSwitchMobile } from './Switch'; -type MobileNavProps = { - children: React.ReactNode; -}; - -export const MobileNav: React.FC<{ children: React.ReactNode }> = ({ children }: MobileNavProps) => { +export const MobileNav: FCWithChildren = ({ children }) => { const theme = useTheme(); const { navState, updateNavState } = useMainContext(); const [drawerOpen, setDrawerOpen] = React.useState(false); diff --git a/explorer/src/components/Nav.tsx b/explorer/src/components/Nav.tsx index e2808871a0..2461263ff5 100644 --- a/explorer/src/components/Nav.tsx +++ b/explorer/src/components/Nav.tsx @@ -87,7 +87,7 @@ type ExpandableButtonType = { setToActive: (num: number) => void; }; -export const ExpandableButton: React.FC = ({ +export const ExpandableButton: FCWithChildren = ({ id, url, setToActive, @@ -230,7 +230,7 @@ ExpandableButton.defaultProps = { closeDrawer: undefined, }; -export const Nav: React.FC = ({ children }) => { +export const Nav: FCWithChildren = ({ children }) => { const { updateNavState, navState } = useMainContext(); const [drawerIsOpen, setDrawerToOpen] = React.useState(false); const [fixedOpen, setFixedOpen] = React.useState(false); diff --git a/explorer/src/components/Socials.tsx b/explorer/src/components/Socials.tsx index f359a24ac1..138b0e18eb 100644 --- a/explorer/src/components/Socials.tsx +++ b/explorer/src/components/Socials.tsx @@ -12,7 +12,7 @@ export const TWITTER_LINK = 'https://twitter.com/nymproject'; export const GITHUB_LINK = 'https://github.com/nymtech'; export const DISCORD_LINK = 'https://discord.gg/nym'; -export const Socials: React.FC<{ isFooter?: boolean }> = ({ isFooter }) => { +export const Socials: FCWithChildren<{ isFooter?: boolean }> = ({ isFooter }) => { const theme = useTheme(); const color = isFooter ? theme.palette.nym.networkExplorer.footer.socialIcons diff --git a/explorer/src/components/StatsCard.tsx b/explorer/src/components/StatsCard.tsx index a571441015..36355b1759 100644 --- a/explorer/src/components/StatsCard.tsx +++ b/explorer/src/components/StatsCard.tsx @@ -11,7 +11,14 @@ interface StatsCardProps { onClick?: () => void; color?: string; } -export const StatsCard: React.FC = ({ icon, title, count, onClick, errorMsg, color: colorProp }) => { +export const StatsCard: FCWithChildren = ({ + icon, + title, + count, + onClick, + errorMsg, + color: colorProp, +}) => { const theme = useTheme(); const color = colorProp || theme.palette.text.primary; return ( diff --git a/explorer/src/components/Switch.tsx b/explorer/src/components/Switch.tsx index 835100a1db..e5cbd47385 100644 --- a/explorer/src/components/Switch.tsx +++ b/explorer/src/components/Switch.tsx @@ -51,7 +51,7 @@ export const DarkLightSwitch = styled(Switch)(({ theme }) => ({ }, })); -export const DarkLightSwitchMobile: React.FC = () => { +export const DarkLightSwitchMobile: FCWithChildren = () => { const { toggleMode } = useMainContext(); return (