diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1107b96d0..b658086e8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,7 @@ jobs: defaults: run: working-directory: indexers - name: Run codegen and build + name: Indexers - Run codegen and build steps: - name: Checkout 🛎️ uses: actions/checkout@v3 @@ -34,7 +34,7 @@ jobs: defaults: run: working-directory: explorer - name: Run eslint and code style check + name: Explorer - Run eslint and code style check steps: - name: Checkout 🛎️ uses: actions/checkout@v3 @@ -57,26 +57,3 @@ jobs: env: NEXT_PUBLIC_GEMINI_3H_INDEXERS: ${{ secrets.NEXT_PUBLIC_GEMINI_3H_INDEXERS }} run: yarn build - ts-lint-and-build-health-check: - runs-on: ubuntu-latest - defaults: - run: - working-directory: health-check - name: Run eslint, check typescript - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - - - name: Set up Node.js 📦 - uses: actions/setup-node@v2 - with: - node-version: "16" - - - name: Install dependencies 📦 - run: npm ci - - - name: Run linter 🔍 - run: npm run lint - - - name: Build project 🔧 - run: npm run build diff --git a/.github/workflows/gh-deploy-subql.yml b/.github/workflows/gh-deploy-subql.yml deleted file mode 100644 index a30a82652..000000000 --- a/.github/workflows/gh-deploy-subql.yml +++ /dev/null @@ -1,86 +0,0 @@ -# name: Deploy Subql Green (staging) - -# on: -# push: -# branches: -# - main -# paths: -# - "indexers/**" -# env: -# DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SUBQL_HOST }} -# DEPLOY_PATH: /home/${{ secrets.SSH_USER }}/astral -# BRANCH_NAME: ${{ github.ref_name }} - -# jobs: -# deploy: -# runs-on: ubuntu-latest - -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 - -# - name: Set Hasura secret -# id: set_secret -# run: echo "hasura_secret=${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}" >> $GITHUB_ENV - -# - name: Install SSH key -# uses: webfactory/ssh-agent@v0.9.0 -# with: -# ssh-private-key: ${{ secrets.SERVER_SSH_PRIVATE_KEY }} - -# - name: Add SSH host key fingerprint -# run: | -# ssh-keyscan -H ${{ secrets.SUBQL_HOST }} >> ~/.ssh/known_hosts - -# - name: Deploy with Docker Compose -# env: -# SSH_USER: ${{ secrets.SSH_USER }} -# HASURA_GRAPHQL_ADMIN_SECRET: ${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }} -# HASURA_GRAPHQL_JWT_SECRET: ${{ secrets.HASURA_GRAPHQL_JWT_SECRET }} -# run: | -# mkdir -p ~/.ssh -# ssh-keyscan -H ${{ secrets.SUBQL_HOST }} >> ~/.ssh/known_hosts -# ssh ${SSH_USER}@${{ secrets.SUBQL_HOST }} " - -# if [ ! -d ${DEPLOY_PATH} ]; then -# git clone https://github.com/autonomys/astral.git ${DEPLOY_PATH} -# else -# cd ${DEPLOY_PATH} -# git pull -# fi -# git checkout ${BRANCH_NAME} - -# # Securely update the .env file -# if [ ! -f .env ]; then -# echo 'HASURA_GRAPHQL_ADMIN_SECRET=${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}' > .env -# echo 'HASURA_GRAPHQL_JWT_SECRET=${{ secrets.HASURA_GRAPHQL_JWT_SECRET }}' >> .env -# else -# sed -i '/^HASURA_GRAPHQL_ADMIN_SECRET=/d' .env -# echo 'HASURA_GRAPHQL_ADMIN_SECRET=${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}' >> .env -# sed -i '/^HASURA_GRAPHQL_JWT_SECRET=/d' .env -# echo 'HASURA_GRAPHQL_JWT_SECRET=${{ secrets.HASURA_GRAPHQL_JWT_SECRET }}' >> .env -# fi - -# export $(grep -v '^#' /home/${{ secrets.SSH_USER }}/astral/.env | xargs) -# cd /home/${{ secrets.SSH_USER }}/astral/indexers -# yarn build-dictionary -# npx lerna run codegen -# npx lerna run build -# sudo docker compose -p prod-astral-indexers -f /home/${{ secrets.SSH_USER }}/astral/docker-compose.yml -f /home/${{ secrets.SSH_USER }}/astral/docker-compose.prod.yml --profile dictionary --profile task --profile taurus up -d --remove-orphans -# echo 'Installation Complete' -# " - -# - name: Notify on failure -# if: failure() -# env: -# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} -# uses: 8398a7/action-slack@v3 -# with: -# status: ${{ job.status }} -# fields: repo,message,commit,author,action,eventName,ref,workflow,job -# author_name: Deployment failed -# mention: here -# if_mention: failure,cancelled -# job_name: Deploy Subql Green (staging) -# channel: alerts -# icon_emoji: ":github:" diff --git a/README.md b/README.md index 9aee15402..fd7ea22ae 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ - [Explorer](./explorer/README.md) - Next.js app based on React and Tailwind CSS, uses Apollo Client to fetch data from Astral Indexers - [Indexers](./indexers/README.md) - Includes various SubQuery indexers organized by network and functionality -- [Health check](./health-check/README.md) - utility service to check health status of an internal service and expose it as a REST API endpoint ## Development diff --git a/docker-compose.yml b/docker-compose.yml index 8e0c0f98b..c34c23f78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ volumes: redis_db: {} caddy_config: {} caddy_data: {} + api_dependencies: {} services: # Caddy Reverse Proxy with CORS enabled @@ -448,6 +449,10 @@ services: condition: service_healthy hasura: condition: service_started + volumes: + - ./indexers/api:/app + - api_dependencies:/app/node_modules + hostname: api restart: unless-stopped ports: - "${API_PORT}:3000" @@ -458,7 +463,3 @@ services: DB_USER: ${DB_USER} DB_PASSWORD: ${DB_PASSWORD} DB_DATABASE: ${DB_DATABASE} - hostname: api - volumes: - - ./indexers/api:/app - - /app/node_modules diff --git a/explorer/.env.sample b/explorer/.env.sample index dfa6b6582..f0b241f05 100644 --- a/explorer/.env.sample +++ b/explorer/.env.sample @@ -23,9 +23,13 @@ NEXT_PUBLIC_DISCORD_INVITE_URL="https://discord.gg/" DISCORD_BOT_TOKEN="" # Subspace Discord Server Role ID's -DISCORD_GUILD_ROLE_ID_FARMER="" -DISCORD_GUILD_ROLE_ID_OPERATOR="" -DISCORD_GUILD_ROLE_ID_NOMINATOR="" +MAINNET_DISCORD_GUILD_ROLE_ID_FARMER="" +MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR="" +MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR="" + +TAURUS_DISCORD_GUILD_ROLE_ID_FARMER="" +TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR="" +TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR="" SLACK_TOKEN="" SLACK_CONVERSATION_ID="" diff --git a/explorer/gql/graphql.tsx b/explorer/gql/graphql.tsx index 56db3a1b1..ae8e24fbc 100644 --- a/explorer/gql/graphql.tsx +++ b/explorer/gql/graphql.tsx @@ -19,6 +19,7 @@ export type Scalars = { jsonb: { input: any; output: any; } numeric: { input: any; output: any; } timestamp: { input: any; output: any; } + timestamptz: { input: any; output: any; } uuid: { input: any; output: any; } }; @@ -10581,14 +10582,10 @@ export type Query_Root = { staking_deposits_by_pk?: Maybe; /** fetch data from the table: "staking.domain_block_histories" */ staking_domain_block_histories: Array; - /** fetch data from the table: "staking.domain_blocks" */ - staking_domain_blocks: Array; - /** fetch data from the table: "staking.domain_blocks" using primary key columns */ - staking_domain_blocks_by_pk?: Maybe; - /** fetch data from the table: "staking.domain_epoches" */ - staking_domain_epoches: Array; - /** fetch data from the table: "staking.domain_epoches" using primary key columns */ - staking_domain_epoches_by_pk?: Maybe; + /** fetch data from the table: "staking.domain_epochs" */ + staking_domain_epochs: Array; + /** fetch data from the table: "staking.domain_epochs" using primary key columns */ + staking_domain_epochs_by_pk?: Maybe; /** fetch data from the table: "staking.domain_instantiations" */ staking_domain_instantiations: Array; /** fetch data from the table: "staking.domain_instantiations" using primary key columns */ @@ -10609,6 +10606,10 @@ export type Query_Root = { staking_nominators_aggregate: Staking_Nominators_Aggregate; /** fetch data from the table: "staking.nominators" using primary key columns */ staking_nominators_by_pk?: Maybe; + /** fetch data from the table: "staking.operator_deregistrations" */ + staking_operator_deregistrations: Array; + /** fetch data from the table: "staking.operator_deregistrations" using primary key columns */ + staking_operator_deregistrations_by_pk?: Maybe; /** fetch data from the table: "staking.operator_registrations" */ staking_operator_registrations: Array; /** fetch data from the table: "staking.operator_registrations" using primary key columns */ @@ -10621,6 +10622,10 @@ export type Query_Root = { staking_operator_staking_histories: Array; /** fetch data from the table: "staking.operator_staking_histories" using primary key columns */ staking_operator_staking_histories_by_pk?: Maybe; + /** fetch data from the table: "staking.operator_tax_collections" */ + staking_operator_tax_collections: Array; + /** fetch data from the table: "staking.operator_tax_collections" using primary key columns */ + staking_operator_tax_collections_by_pk?: Maybe; /** fetch data from the table: "staking.operators" */ staking_operators: Array; /** fetch aggregated fields from the table: "staking.operators" */ @@ -10631,6 +10636,14 @@ export type Query_Root = { staking_runtime_creations: Array; /** fetch data from the table: "staking.runtime_creations" using primary key columns */ staking_runtime_creations_by_pk?: Maybe; + /** fetch data from the table: "staking.unlocked_events" */ + staking_unlocked_events: Array; + /** fetch data from the table: "staking.unlocked_events" using primary key columns */ + staking_unlocked_events_by_pk?: Maybe; + /** fetch data from the table: "staking.withdraw_events" */ + staking_withdraw_events: Array; + /** fetch data from the table: "staking.withdraw_events" using primary key columns */ + staking_withdraw_events_by_pk?: Maybe; /** fetch data from the table: "staking.withdrawal_histories" */ staking_withdrawal_histories: Array; /** fetch data from the table: "staking.withdrawal_histories" using primary key columns */ @@ -11877,30 +11890,16 @@ export type Query_RootStaking_Domain_Block_HistoriesArgs = { }; -export type Query_RootStaking_Domain_BlocksArgs = { - distinct_on?: InputMaybe>; +export type Query_RootStaking_Domain_EpochsArgs = { + distinct_on?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; -export type Query_RootStaking_Domain_Blocks_By_PkArgs = { - id: Scalars['String']['input']; -}; - - -export type Query_RootStaking_Domain_EpochesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootStaking_Domain_Epoches_By_PkArgs = { +export type Query_RootStaking_Domain_Epochs_By_PkArgs = { id: Scalars['String']['input']; }; @@ -11979,6 +11978,20 @@ export type Query_RootStaking_Nominators_By_PkArgs = { }; +export type Query_RootStaking_Operator_DeregistrationsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootStaking_Operator_Deregistrations_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + export type Query_RootStaking_Operator_RegistrationsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -12021,6 +12034,20 @@ export type Query_RootStaking_Operator_Staking_Histories_By_PkArgs = { }; +export type Query_RootStaking_Operator_Tax_CollectionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootStaking_Operator_Tax_Collections_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + export type Query_RootStaking_OperatorsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -12058,6 +12085,34 @@ export type Query_RootStaking_Runtime_Creations_By_PkArgs = { }; +export type Query_RootStaking_Unlocked_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootStaking_Unlocked_Events_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + +export type Query_RootStaking_Withdraw_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootStaking_Withdraw_Events_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + export type Query_RootStaking_Withdrawal_HistoriesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -12737,11 +12792,34 @@ export type Staking_Deposit_Events = { operator_id: Scalars['String']['output']; sort_id: Scalars['String']['output']; storage_fee_deposit: Scalars['numeric']['output']; - timestamp: Scalars['timestamp']['output']; + timestamp: Scalars['timestamptz']['output']; total_amount: Scalars['numeric']['output']; uuid: Scalars['uuid']['output']; }; +/** order by aggregate values of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Avg_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "staking.deposit_events". All fields are combined with a logical 'AND'. */ export type Staking_Deposit_Events_Bool_Exp = { _and?: InputMaybe>; @@ -12759,11 +12837,47 @@ export type Staking_Deposit_Events_Bool_Exp = { operator_id?: InputMaybe; sort_id?: InputMaybe; storage_fee_deposit?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; uuid?: InputMaybe; }; +/** order by max() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Max_Order_By = { + account_id?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + sort_id?: InputMaybe; + storage_fee_deposit?: InputMaybe; + timestamp?: InputMaybe; + total_amount?: InputMaybe; + uuid?: InputMaybe; +}; + +/** order by min() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Min_Order_By = { + account_id?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + sort_id?: InputMaybe; + storage_fee_deposit?: InputMaybe; + timestamp?: InputMaybe; + total_amount?: InputMaybe; + uuid?: InputMaybe; +}; + /** Ordering options when selecting data from "staking.deposit_events". */ export type Staking_Deposit_Events_Order_By = { _block_range?: InputMaybe; @@ -12817,6 +12931,30 @@ export enum Staking_Deposit_Events_Select_Column { Uuid = 'uuid' } +/** order by stddev() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Stddev_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Stddev_Pop_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Stddev_Samp_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + /** Streaming cursor of the table "staking_deposit_events" */ export type Staking_Deposit_Events_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -12839,11 +12977,43 @@ export type Staking_Deposit_Events_Stream_Cursor_Value_Input = { operator_id?: InputMaybe; sort_id?: InputMaybe; storage_fee_deposit?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; uuid?: InputMaybe; }; +/** order by sum() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Sum_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by var_pop() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Var_Pop_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by var_samp() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Var_Samp_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by variance() on columns of table "staking.deposit_events" */ +export type Staking_Deposit_Events_Variance_Order_By = { + amount?: InputMaybe; + block_height?: InputMaybe; + storage_fee_deposit?: InputMaybe; + total_amount?: InputMaybe; +}; + /** columns and relationships of "staking.deposit_histories" */ export type Staking_Deposit_Histories = { __typename?: 'staking_deposit_histories'; @@ -12864,6 +13034,34 @@ export type Staking_Deposit_Histories = { uuid: Scalars['uuid']['output']; }; +/** order by aggregate values of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Avg_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "staking.deposit_histories". All fields are combined with a logical 'AND'. */ export type Staking_Deposit_Histories_Bool_Exp = { _and?: InputMaybe>; @@ -12886,6 +13084,42 @@ export type Staking_Deposit_Histories_Bool_Exp = { uuid?: InputMaybe; }; +/** order by max() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Max_Order_By = { + account_id?: InputMaybe; + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; + uuid?: InputMaybe; +}; + +/** order by min() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Min_Order_By = { + account_id?: InputMaybe; + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; + uuid?: InputMaybe; +}; + /** Ordering options when selecting data from "staking.deposit_histories". */ export type Staking_Deposit_Histories_Order_By = { _block_range?: InputMaybe; @@ -12939,6 +13173,45 @@ export enum Staking_Deposit_Histories_Select_Column { Uuid = 'uuid' } +/** order by stddev() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Stddev_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Stddev_Pop_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Stddev_Samp_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + /** Streaming cursor of the table "staking_deposit_histories" */ export type Staking_Deposit_Histories_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -12966,6 +13239,58 @@ export type Staking_Deposit_Histories_Stream_Cursor_Value_Input = { uuid?: InputMaybe; }; +/** order by sum() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Sum_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + +/** order by var_pop() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Var_Pop_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + +/** order by var_samp() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Var_Samp_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + +/** order by variance() on columns of table "staking.deposit_histories" */ +export type Staking_Deposit_Histories_Variance_Order_By = { + amount_pending?: InputMaybe; + block_height?: InputMaybe; + effective_domain_epoch_pending?: InputMaybe; + effective_domain_id_pending?: InputMaybe; + shares?: InputMaybe; + shares_known?: InputMaybe; + storage_fee_deposit?: InputMaybe; + storage_fee_deposit_known?: InputMaybe; + storage_fee_deposit_pending?: InputMaybe; +}; + /** columns and relationships of "staking.deposits" */ export type Staking_Deposits = { __typename?: 'staking_deposits'; @@ -12985,7 +13310,7 @@ export type Staking_Deposits = { operator_id: Scalars['String']['output']; status: Scalars['String']['output']; storage_fee_deposit: Scalars['numeric']['output']; - timestamp: Scalars['timestamp']['output']; + timestamp: Scalars['timestamptz']['output']; total_amount: Scalars['numeric']['output']; total_withdrawn: Scalars['numeric']['output']; updated_at: Scalars['numeric']['output']; @@ -13086,7 +13411,7 @@ export type Staking_Deposits_Bool_Exp = { operator_id?: InputMaybe; status?: InputMaybe; storage_fee_deposit?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; total_withdrawn?: InputMaybe; updated_at?: InputMaybe; @@ -13105,7 +13430,7 @@ export type Staking_Deposits_Max_Fields = { operator_id?: Maybe; status?: Maybe; storage_fee_deposit?: Maybe; - timestamp?: Maybe; + timestamp?: Maybe; total_amount?: Maybe; total_withdrawn?: Maybe; updated_at?: Maybe; @@ -13142,7 +13467,7 @@ export type Staking_Deposits_Min_Fields = { operator_id?: Maybe; status?: Maybe; storage_fee_deposit?: Maybe; - timestamp?: Maybe; + timestamp?: Maybe; total_amount?: Maybe; total_withdrawn?: Maybe; updated_at?: Maybe; @@ -13302,7 +13627,7 @@ export type Staking_Deposits_Stream_Cursor_Value_Input = { operator_id?: InputMaybe; status?: InputMaybe; storage_fee_deposit?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; total_withdrawn?: InputMaybe; updated_at?: InputMaybe; @@ -13400,6 +13725,7 @@ export type Staking_Domain_Block_Histories = { domain_block_number: Scalars['numeric']['output']; domain_id: Scalars['String']['output']; id: Scalars['String']['output']; + timestamp: Scalars['timestamptz']['output']; uuid: Scalars['uuid']['output']; }; @@ -13413,6 +13739,7 @@ export type Staking_Domain_Block_Histories_Bool_Exp = { domain_block_number?: InputMaybe; domain_id?: InputMaybe; id?: InputMaybe; + timestamp?: InputMaybe; uuid?: InputMaybe; }; @@ -13423,6 +13750,7 @@ export type Staking_Domain_Block_Histories_Order_By = { domain_block_number?: InputMaybe; domain_id?: InputMaybe; id?: InputMaybe; + timestamp?: InputMaybe; uuid?: InputMaybe; }; @@ -13439,6 +13767,8 @@ export enum Staking_Domain_Block_Histories_Select_Column { /** column name */ Id = 'id', /** column name */ + Timestamp = 'timestamp', + /** column name */ Uuid = 'uuid' } @@ -13457,124 +13787,20 @@ export type Staking_Domain_Block_Histories_Stream_Cursor_Value_Input = { domain_block_number?: InputMaybe; domain_id?: InputMaybe; id?: InputMaybe; + timestamp?: InputMaybe; uuid?: InputMaybe; }; -/** columns and relationships of "staking.domain_blocks" */ -export type Staking_Domain_Blocks = { - __typename?: 'staking_domain_blocks'; - block_hash: Scalars['String']['output']; - block_number: Scalars['numeric']['output']; - consensus_block_hash: Scalars['String']['output']; - consensus_block_number: Scalars['numeric']['output']; - created_at: Scalars['numeric']['output']; - domain_epoch_id: Scalars['String']['output']; - domain_id: Scalars['String']['output']; - epoch: Scalars['numeric']['output']; - extrinsic_root: Scalars['String']['output']; - id: Scalars['String']['output']; - timestamp: Scalars['timestamp']['output']; - updated_at: Scalars['numeric']['output']; -}; - -/** Boolean expression to filter rows from the table "staking.domain_blocks". All fields are combined with a logical 'AND'. */ -export type Staking_Domain_Blocks_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - block_hash?: InputMaybe; - block_number?: InputMaybe; - consensus_block_hash?: InputMaybe; - consensus_block_number?: InputMaybe; - created_at?: InputMaybe; - domain_epoch_id?: InputMaybe; - domain_id?: InputMaybe; - epoch?: InputMaybe; - extrinsic_root?: InputMaybe; - id?: InputMaybe; - timestamp?: InputMaybe; - updated_at?: InputMaybe; -}; - -/** Ordering options when selecting data from "staking.domain_blocks". */ -export type Staking_Domain_Blocks_Order_By = { - block_hash?: InputMaybe; - block_number?: InputMaybe; - consensus_block_hash?: InputMaybe; - consensus_block_number?: InputMaybe; - created_at?: InputMaybe; - domain_epoch_id?: InputMaybe; - domain_id?: InputMaybe; - epoch?: InputMaybe; - extrinsic_root?: InputMaybe; - id?: InputMaybe; - timestamp?: InputMaybe; - updated_at?: InputMaybe; -}; - -/** select columns of table "staking.domain_blocks" */ -export enum Staking_Domain_Blocks_Select_Column { - /** column name */ - BlockHash = 'block_hash', - /** column name */ - BlockNumber = 'block_number', - /** column name */ - ConsensusBlockHash = 'consensus_block_hash', - /** column name */ - ConsensusBlockNumber = 'consensus_block_number', - /** column name */ - CreatedAt = 'created_at', - /** column name */ - DomainEpochId = 'domain_epoch_id', - /** column name */ - DomainId = 'domain_id', - /** column name */ - Epoch = 'epoch', - /** column name */ - ExtrinsicRoot = 'extrinsic_root', - /** column name */ - Id = 'id', - /** column name */ - Timestamp = 'timestamp', - /** column name */ - UpdatedAt = 'updated_at' -} - -/** Streaming cursor of the table "staking_domain_blocks" */ -export type Staking_Domain_Blocks_Stream_Cursor_Input = { - /** Stream column input with initial value */ - initial_value: Staking_Domain_Blocks_Stream_Cursor_Value_Input; - /** cursor ordering */ - ordering?: InputMaybe; -}; - -/** Initial value of the column from where the streaming should start */ -export type Staking_Domain_Blocks_Stream_Cursor_Value_Input = { - block_hash?: InputMaybe; - block_number?: InputMaybe; - consensus_block_hash?: InputMaybe; - consensus_block_number?: InputMaybe; - created_at?: InputMaybe; - domain_epoch_id?: InputMaybe; - domain_id?: InputMaybe; - epoch?: InputMaybe; - extrinsic_root?: InputMaybe; - id?: InputMaybe; - timestamp?: InputMaybe; - updated_at?: InputMaybe; -}; - -/** columns and relationships of "staking.domain_epoches" */ -export type Staking_Domain_Epoches = { - __typename?: 'staking_domain_epoches'; - block_count: Scalars['numeric']['output']; - block_number_end: Scalars['numeric']['output']; - block_number_start: Scalars['numeric']['output']; - consensus_block_hash_end: Scalars['String']['output']; - consensus_block_hash_start: Scalars['String']['output']; +/** columns and relationships of "staking.domain_epochs" */ +export type Staking_Domain_Epochs = { + __typename?: 'staking_domain_epochs'; + consensus_block_count: Scalars['numeric']['output']; consensus_block_number_end: Scalars['numeric']['output']; consensus_block_number_start: Scalars['numeric']['output']; created_at: Scalars['numeric']['output']; + domain_block_count: Scalars['numeric']['output']; + domain_block_number_end: Scalars['numeric']['output']; + domain_block_number_start: Scalars['numeric']['output']; domain_id: Scalars['String']['output']; epoch: Scalars['numeric']['output']; epoch_duration: Scalars['numeric']['output']; @@ -13584,19 +13810,18 @@ export type Staking_Domain_Epoches = { updated_at: Scalars['numeric']['output']; }; -/** Boolean expression to filter rows from the table "staking.domain_epoches". All fields are combined with a logical 'AND'. */ -export type Staking_Domain_Epoches_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - block_count?: InputMaybe; - block_number_end?: InputMaybe; - block_number_start?: InputMaybe; - consensus_block_hash_end?: InputMaybe; - consensus_block_hash_start?: InputMaybe; +/** Boolean expression to filter rows from the table "staking.domain_epochs". All fields are combined with a logical 'AND'. */ +export type Staking_Domain_Epochs_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + consensus_block_count?: InputMaybe; consensus_block_number_end?: InputMaybe; consensus_block_number_start?: InputMaybe; created_at?: InputMaybe; + domain_block_count?: InputMaybe; + domain_block_number_end?: InputMaybe; + domain_block_number_start?: InputMaybe; domain_id?: InputMaybe; epoch?: InputMaybe; epoch_duration?: InputMaybe; @@ -13606,16 +13831,15 @@ export type Staking_Domain_Epoches_Bool_Exp = { updated_at?: InputMaybe; }; -/** Ordering options when selecting data from "staking.domain_epoches". */ -export type Staking_Domain_Epoches_Order_By = { - block_count?: InputMaybe; - block_number_end?: InputMaybe; - block_number_start?: InputMaybe; - consensus_block_hash_end?: InputMaybe; - consensus_block_hash_start?: InputMaybe; +/** Ordering options when selecting data from "staking.domain_epochs". */ +export type Staking_Domain_Epochs_Order_By = { + consensus_block_count?: InputMaybe; consensus_block_number_end?: InputMaybe; consensus_block_number_start?: InputMaybe; created_at?: InputMaybe; + domain_block_count?: InputMaybe; + domain_block_number_end?: InputMaybe; + domain_block_number_start?: InputMaybe; domain_id?: InputMaybe; epoch?: InputMaybe; epoch_duration?: InputMaybe; @@ -13625,18 +13849,10 @@ export type Staking_Domain_Epoches_Order_By = { updated_at?: InputMaybe; }; -/** select columns of table "staking.domain_epoches" */ -export enum Staking_Domain_Epoches_Select_Column { - /** column name */ - BlockCount = 'block_count', - /** column name */ - BlockNumberEnd = 'block_number_end', - /** column name */ - BlockNumberStart = 'block_number_start', - /** column name */ - ConsensusBlockHashEnd = 'consensus_block_hash_end', +/** select columns of table "staking.domain_epochs" */ +export enum Staking_Domain_Epochs_Select_Column { /** column name */ - ConsensusBlockHashStart = 'consensus_block_hash_start', + ConsensusBlockCount = 'consensus_block_count', /** column name */ ConsensusBlockNumberEnd = 'consensus_block_number_end', /** column name */ @@ -13644,6 +13860,12 @@ export enum Staking_Domain_Epoches_Select_Column { /** column name */ CreatedAt = 'created_at', /** column name */ + DomainBlockCount = 'domain_block_count', + /** column name */ + DomainBlockNumberEnd = 'domain_block_number_end', + /** column name */ + DomainBlockNumberStart = 'domain_block_number_start', + /** column name */ DomainId = 'domain_id', /** column name */ Epoch = 'epoch', @@ -13659,24 +13881,23 @@ export enum Staking_Domain_Epoches_Select_Column { UpdatedAt = 'updated_at' } -/** Streaming cursor of the table "staking_domain_epoches" */ -export type Staking_Domain_Epoches_Stream_Cursor_Input = { +/** Streaming cursor of the table "staking_domain_epochs" */ +export type Staking_Domain_Epochs_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Staking_Domain_Epoches_Stream_Cursor_Value_Input; + initial_value: Staking_Domain_Epochs_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Staking_Domain_Epoches_Stream_Cursor_Value_Input = { - block_count?: InputMaybe; - block_number_end?: InputMaybe; - block_number_start?: InputMaybe; - consensus_block_hash_end?: InputMaybe; - consensus_block_hash_start?: InputMaybe; +export type Staking_Domain_Epochs_Stream_Cursor_Value_Input = { + consensus_block_count?: InputMaybe; consensus_block_number_end?: InputMaybe; consensus_block_number_start?: InputMaybe; created_at?: InputMaybe; + domain_block_count?: InputMaybe; + domain_block_number_end?: InputMaybe; + domain_block_number_start?: InputMaybe; domain_id?: InputMaybe; epoch?: InputMaybe; epoch_duration?: InputMaybe; @@ -13883,6 +14104,8 @@ export type Staking_Domains = { current_total_shares: Scalars['numeric']['output']; current_total_stake: Scalars['numeric']['output']; /** An array relationship */ + deposit_events: Array; + /** An array relationship */ deposits: Array; /** An aggregate relationship */ deposits_aggregate: Staking_Deposits_Aggregate; @@ -13926,12 +14149,24 @@ export type Staking_Domains = { transfers_rejected_count: Scalars['numeric']['output']; updated_at: Scalars['numeric']['output']; /** An array relationship */ + withdraw_events: Array; + /** An array relationship */ withdrawals: Array; /** An aggregate relationship */ withdrawals_aggregate: Staking_Withdrawals_Aggregate; }; +/** columns and relationships of "staking.domains" */ +export type Staking_DomainsDeposit_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.domains" */ export type Staking_DomainsDepositsArgs = { distinct_on?: InputMaybe>; @@ -13992,6 +14227,16 @@ export type Staking_DomainsOperators_AggregateArgs = { }; +/** columns and relationships of "staking.domains" */ +export type Staking_DomainsWithdraw_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.domains" */ export type Staking_DomainsWithdrawalsArgs = { distinct_on?: InputMaybe>; @@ -14101,6 +14346,7 @@ export type Staking_Domains_Bool_Exp = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events?: InputMaybe; deposits?: InputMaybe; deposits_aggregate?: InputMaybe; extrinsic_id?: InputMaybe; @@ -14138,6 +14384,7 @@ export type Staking_Domains_Bool_Exp = { transfers_out_count?: InputMaybe; transfers_rejected_count?: InputMaybe; updated_at?: InputMaybe; + withdraw_events?: InputMaybe; withdrawals?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -14256,6 +14503,7 @@ export type Staking_Domains_Order_By = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events_aggregate?: InputMaybe; deposits_aggregate?: InputMaybe; extrinsic_id?: InputMaybe; id?: InputMaybe; @@ -14290,6 +14538,7 @@ export type Staking_Domains_Order_By = { transfers_out_count?: InputMaybe; transfers_rejected_count?: InputMaybe; updated_at?: InputMaybe; + withdraw_events_aggregate?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -14744,6 +14993,10 @@ export type Staking_Nominators = { current_total_shares: Scalars['numeric']['output']; current_total_stake: Scalars['numeric']['output']; /** An array relationship */ + deposit_events: Array; + /** An array relationship */ + deposit_histories: Array; + /** An array relationship */ deposits: Array; /** An aggregate relationship */ deposits_aggregate: Staking_Deposits_Aggregate; @@ -14773,12 +15026,36 @@ export type Staking_Nominators = { unlock_at_confirmed_domain_block_number: Scalars['jsonb']['output']; updated_at: Scalars['numeric']['output']; /** An array relationship */ + withdraw_events: Array; + /** An array relationship */ + withdrawal_histories: Array; + /** An array relationship */ withdrawals: Array; /** An aggregate relationship */ withdrawals_aggregate: Staking_Withdrawals_Aggregate; }; +/** columns and relationships of "staking.nominators" */ +export type Staking_NominatorsDeposit_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "staking.nominators" */ +export type Staking_NominatorsDeposit_HistoriesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.nominators" */ export type Staking_NominatorsDepositsArgs = { distinct_on?: InputMaybe>; @@ -14805,6 +15082,26 @@ export type Staking_NominatorsUnlock_At_Confirmed_Domain_Block_NumberArgs = { }; +/** columns and relationships of "staking.nominators" */ +export type Staking_NominatorsWithdraw_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "staking.nominators" */ +export type Staking_NominatorsWithdrawal_HistoriesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.nominators" */ export type Staking_NominatorsWithdrawalsArgs = { distinct_on?: InputMaybe>; @@ -14953,6 +15250,8 @@ export type Staking_Nominators_Bool_Exp = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events?: InputMaybe; + deposit_histories?: InputMaybe; deposits?: InputMaybe; deposits_aggregate?: InputMaybe; domain?: InputMaybe; @@ -14978,6 +15277,8 @@ export type Staking_Nominators_Bool_Exp = { total_withdrawals_count?: InputMaybe; unlock_at_confirmed_domain_block_number?: InputMaybe; updated_at?: InputMaybe; + withdraw_events?: InputMaybe; + withdrawal_histories?: InputMaybe; withdrawals?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -15133,6 +15434,8 @@ export type Staking_Nominators_Order_By = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events_aggregate?: InputMaybe; + deposit_histories_aggregate?: InputMaybe; deposits_aggregate?: InputMaybe; domain?: InputMaybe; domain_id?: InputMaybe; @@ -15157,6 +15460,8 @@ export type Staking_Nominators_Order_By = { total_withdrawals_count?: InputMaybe; unlock_at_confirmed_domain_block_number?: InputMaybe; updated_at?: InputMaybe; + withdraw_events_aggregate?: InputMaybe; + withdrawal_histories_aggregate?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -15668,6 +15973,86 @@ export type Staking_Nominators_Variance_Order_By = { updated_at?: InputMaybe; }; +/** columns and relationships of "staking.operator_deregistrations" */ +export type Staking_Operator_Deregistrations = { + __typename?: 'staking_operator_deregistrations'; + _block_range: Scalars['int8range']['output']; + block_height: Scalars['numeric']['output']; + domain_id: Scalars['String']['output']; + event_id: Scalars['String']['output']; + extrinsic_id: Scalars['String']['output']; + id: Scalars['String']['output']; + owner: Scalars['String']['output']; + uuid: Scalars['uuid']['output']; +}; + +/** Boolean expression to filter rows from the table "staking.operator_deregistrations". All fields are combined with a logical 'AND'. */ +export type Staking_Operator_Deregistrations_Bool_Exp = { + _and?: InputMaybe>; + _block_range?: InputMaybe; + _not?: InputMaybe; + _or?: InputMaybe>; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + owner?: InputMaybe; + uuid?: InputMaybe; +}; + +/** Ordering options when selecting data from "staking.operator_deregistrations". */ +export type Staking_Operator_Deregistrations_Order_By = { + _block_range?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + owner?: InputMaybe; + uuid?: InputMaybe; +}; + +/** select columns of table "staking.operator_deregistrations" */ +export enum Staking_Operator_Deregistrations_Select_Column { + /** column name */ + BlockRange = '_block_range', + /** column name */ + BlockHeight = 'block_height', + /** column name */ + DomainId = 'domain_id', + /** column name */ + EventId = 'event_id', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + Owner = 'owner', + /** column name */ + Uuid = 'uuid' +} + +/** Streaming cursor of the table "staking_operator_deregistrations" */ +export type Staking_Operator_Deregistrations_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Staking_Operator_Deregistrations_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Staking_Operator_Deregistrations_Stream_Cursor_Value_Input = { + _block_range?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + owner?: InputMaybe; + uuid?: InputMaybe; +}; + /** columns and relationships of "staking.operator_registrations" */ export type Staking_Operator_Registrations = { __typename?: 'staking_operator_registrations'; @@ -15986,6 +16371,92 @@ export type Staking_Operator_Staking_Histories_Stream_Cursor_Value_Input = { withdrawals_in_epoch?: InputMaybe; }; +/** columns and relationships of "staking.operator_tax_collections" */ +export type Staking_Operator_Tax_Collections = { + __typename?: 'staking_operator_tax_collections'; + _block_range: Scalars['int8range']['output']; + amount: Scalars['numeric']['output']; + block_height: Scalars['numeric']['output']; + domain_id: Scalars['String']['output']; + event_id: Scalars['String']['output']; + extrinsic_id: Scalars['String']['output']; + id: Scalars['String']['output']; + operator_id: Scalars['String']['output']; + uuid: Scalars['uuid']['output']; +}; + +/** Boolean expression to filter rows from the table "staking.operator_tax_collections". All fields are combined with a logical 'AND'. */ +export type Staking_Operator_Tax_Collections_Bool_Exp = { + _and?: InputMaybe>; + _block_range?: InputMaybe; + _not?: InputMaybe; + _or?: InputMaybe>; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + uuid?: InputMaybe; +}; + +/** Ordering options when selecting data from "staking.operator_tax_collections". */ +export type Staking_Operator_Tax_Collections_Order_By = { + _block_range?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + uuid?: InputMaybe; +}; + +/** select columns of table "staking.operator_tax_collections" */ +export enum Staking_Operator_Tax_Collections_Select_Column { + /** column name */ + BlockRange = '_block_range', + /** column name */ + Amount = 'amount', + /** column name */ + BlockHeight = 'block_height', + /** column name */ + DomainId = 'domain_id', + /** column name */ + EventId = 'event_id', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + OperatorId = 'operator_id', + /** column name */ + Uuid = 'uuid' +} + +/** Streaming cursor of the table "staking_operator_tax_collections" */ +export type Staking_Operator_Tax_Collections_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Staking_Operator_Tax_Collections_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Staking_Operator_Tax_Collections_Stream_Cursor_Value_Input = { + _block_range?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + uuid?: InputMaybe; +}; + /** columns and relationships of "staking.operators" */ export type Staking_Operators = { __typename?: 'staking_operators'; @@ -16005,6 +16476,10 @@ export type Staking_Operators = { current_total_shares: Scalars['numeric']['output']; current_total_stake: Scalars['numeric']['output']; /** An array relationship */ + deposit_events: Array; + /** An array relationship */ + deposit_histories: Array; + /** An array relationship */ deposits: Array; /** An aggregate relationship */ deposits_aggregate: Staking_Deposits_Aggregate; @@ -16044,12 +16519,36 @@ export type Staking_Operators = { transfers_rejected_count: Scalars['numeric']['output']; updated_at: Scalars['numeric']['output']; /** An array relationship */ + withdraw_events: Array; + /** An array relationship */ + withdrawal_histories: Array; + /** An array relationship */ withdrawals: Array; /** An aggregate relationship */ withdrawals_aggregate: Staking_Withdrawals_Aggregate; }; +/** columns and relationships of "staking.operators" */ +export type Staking_OperatorsDeposit_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "staking.operators" */ +export type Staking_OperatorsDeposit_HistoriesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.operators" */ export type Staking_OperatorsDepositsArgs = { distinct_on?: InputMaybe>; @@ -16090,6 +16589,26 @@ export type Staking_OperatorsNominators_AggregateArgs = { }; +/** columns and relationships of "staking.operators" */ +export type Staking_OperatorsWithdraw_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "staking.operators" */ +export type Staking_OperatorsWithdrawal_HistoriesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "staking.operators" */ export type Staking_OperatorsWithdrawalsArgs = { distinct_on?: InputMaybe>; @@ -16259,6 +16778,8 @@ export type Staking_Operators_Bool_Exp = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events?: InputMaybe; + deposit_histories?: InputMaybe; deposits?: InputMaybe; deposits_aggregate?: InputMaybe; domain?: InputMaybe; @@ -16293,6 +16814,8 @@ export type Staking_Operators_Bool_Exp = { transfers_out_count?: InputMaybe; transfers_rejected_count?: InputMaybe; updated_at?: InputMaybe; + withdraw_events?: InputMaybe; + withdrawal_histories?: InputMaybe; withdrawals?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -16499,6 +17022,8 @@ export type Staking_Operators_Order_By = { current_storage_fee_deposit?: InputMaybe; current_total_shares?: InputMaybe; current_total_stake?: InputMaybe; + deposit_events_aggregate?: InputMaybe; + deposit_histories_aggregate?: InputMaybe; deposits_aggregate?: InputMaybe; domain?: InputMaybe; domain_id?: InputMaybe; @@ -16531,6 +17056,8 @@ export type Staking_Operators_Order_By = { transfers_out_count?: InputMaybe; transfers_rejected_count?: InputMaybe; updated_at?: InputMaybe; + withdraw_events_aggregate?: InputMaybe; + withdrawal_histories_aggregate?: InputMaybe; withdrawals_aggregate?: InputMaybe; }; @@ -17233,28 +17760,303 @@ export type Staking_Runtime_Creations_Bool_Exp = { uuid?: InputMaybe; }; -/** Ordering options when selecting data from "staking.runtime_creations". */ -export type Staking_Runtime_Creations_Order_By = { +/** Ordering options when selecting data from "staking.runtime_creations". */ +export type Staking_Runtime_Creations_Order_By = { + _block_range?: InputMaybe; + block_height?: InputMaybe; + created_by?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + sort_id?: InputMaybe; + type?: InputMaybe; + uuid?: InputMaybe; +}; + +/** select columns of table "staking.runtime_creations" */ +export enum Staking_Runtime_Creations_Select_Column { + /** column name */ + BlockRange = '_block_range', + /** column name */ + BlockHeight = 'block_height', + /** column name */ + CreatedBy = 'created_by', + /** column name */ + EventId = 'event_id', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + Name = 'name', + /** column name */ + SortId = 'sort_id', + /** column name */ + Type = 'type', + /** column name */ + Uuid = 'uuid' +} + +/** Streaming cursor of the table "staking_runtime_creations" */ +export type Staking_Runtime_Creations_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Staking_Runtime_Creations_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Staking_Runtime_Creations_Stream_Cursor_Value_Input = { + _block_range?: InputMaybe; + block_height?: InputMaybe; + created_by?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + sort_id?: InputMaybe; + type?: InputMaybe; + uuid?: InputMaybe; +}; + +/** columns and relationships of "staking.unlocked_events" */ +export type Staking_Unlocked_Events = { + __typename?: 'staking_unlocked_events'; + _block_range: Scalars['int8range']['output']; + account_id: Scalars['String']['output']; + amount: Scalars['numeric']['output']; + block_height: Scalars['numeric']['output']; + domain_id: Scalars['String']['output']; + event_id: Scalars['String']['output']; + extrinsic_id: Scalars['String']['output']; + id: Scalars['String']['output']; + operator_id: Scalars['String']['output']; + storage_fee: Scalars['numeric']['output']; + uuid: Scalars['uuid']['output']; +}; + +/** Boolean expression to filter rows from the table "staking.unlocked_events". All fields are combined with a logical 'AND'. */ +export type Staking_Unlocked_Events_Bool_Exp = { + _and?: InputMaybe>; + _block_range?: InputMaybe; + _not?: InputMaybe; + _or?: InputMaybe>; + account_id?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + storage_fee?: InputMaybe; + uuid?: InputMaybe; +}; + +/** Ordering options when selecting data from "staking.unlocked_events". */ +export type Staking_Unlocked_Events_Order_By = { + _block_range?: InputMaybe; + account_id?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + storage_fee?: InputMaybe; + uuid?: InputMaybe; +}; + +/** select columns of table "staking.unlocked_events" */ +export enum Staking_Unlocked_Events_Select_Column { + /** column name */ + BlockRange = '_block_range', + /** column name */ + AccountId = 'account_id', + /** column name */ + Amount = 'amount', + /** column name */ + BlockHeight = 'block_height', + /** column name */ + DomainId = 'domain_id', + /** column name */ + EventId = 'event_id', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + OperatorId = 'operator_id', + /** column name */ + StorageFee = 'storage_fee', + /** column name */ + Uuid = 'uuid' +} + +/** Streaming cursor of the table "staking_unlocked_events" */ +export type Staking_Unlocked_Events_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Staking_Unlocked_Events_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Staking_Unlocked_Events_Stream_Cursor_Value_Input = { + _block_range?: InputMaybe; + account_id?: InputMaybe; + amount?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + operator_id?: InputMaybe; + storage_fee?: InputMaybe; + uuid?: InputMaybe; +}; + +/** columns and relationships of "staking.withdraw_events" */ +export type Staking_Withdraw_Events = { + __typename?: 'staking_withdraw_events'; + _block_range: Scalars['int8range']['output']; + account_id: Scalars['String']['output']; + amount1: Scalars['numeric']['output']; + amount2: Scalars['numeric']['output']; + block_height: Scalars['numeric']['output']; + domain_id: Scalars['String']['output']; + event_id: Scalars['String']['output']; + extrinsic_id: Scalars['String']['output']; + id: Scalars['String']['output']; + nominator_id: Scalars['String']['output']; + operator_id: Scalars['String']['output']; + sort_id: Scalars['String']['output']; + timestamp: Scalars['timestamptz']['output']; + to_withdraw: Scalars['String']['output']; + total_amount: Scalars['numeric']['output']; + uuid: Scalars['uuid']['output']; +}; + +/** order by aggregate values of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Avg_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** Boolean expression to filter rows from the table "staking.withdraw_events". All fields are combined with a logical 'AND'. */ +export type Staking_Withdraw_Events_Bool_Exp = { + _and?: InputMaybe>; + _block_range?: InputMaybe; + _not?: InputMaybe; + _or?: InputMaybe>; + account_id?: InputMaybe; + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + sort_id?: InputMaybe; + timestamp?: InputMaybe; + to_withdraw?: InputMaybe; + total_amount?: InputMaybe; + uuid?: InputMaybe; +}; + +/** order by max() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Max_Order_By = { + account_id?: InputMaybe; + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + sort_id?: InputMaybe; + timestamp?: InputMaybe; + to_withdraw?: InputMaybe; + total_amount?: InputMaybe; + uuid?: InputMaybe; +}; + +/** order by min() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Min_Order_By = { + account_id?: InputMaybe; + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + domain_id?: InputMaybe; + event_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + sort_id?: InputMaybe; + timestamp?: InputMaybe; + to_withdraw?: InputMaybe; + total_amount?: InputMaybe; + uuid?: InputMaybe; +}; + +/** Ordering options when selecting data from "staking.withdraw_events". */ +export type Staking_Withdraw_Events_Order_By = { _block_range?: InputMaybe; + account_id?: InputMaybe; + amount1?: InputMaybe; + amount2?: InputMaybe; block_height?: InputMaybe; - created_by?: InputMaybe; + domain_id?: InputMaybe; event_id?: InputMaybe; extrinsic_id?: InputMaybe; id?: InputMaybe; - name?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; sort_id?: InputMaybe; - type?: InputMaybe; + timestamp?: InputMaybe; + to_withdraw?: InputMaybe; + total_amount?: InputMaybe; uuid?: InputMaybe; }; -/** select columns of table "staking.runtime_creations" */ -export enum Staking_Runtime_Creations_Select_Column { +/** select columns of table "staking.withdraw_events" */ +export enum Staking_Withdraw_Events_Select_Column { /** column name */ BlockRange = '_block_range', /** column name */ + AccountId = 'account_id', + /** column name */ + Amount1 = 'amount1', + /** column name */ + Amount2 = 'amount2', + /** column name */ BlockHeight = 'block_height', /** column name */ - CreatedBy = 'created_by', + DomainId = 'domain_id', /** column name */ EventId = 'event_id', /** column name */ @@ -17262,62 +18064,214 @@ export enum Staking_Runtime_Creations_Select_Column { /** column name */ Id = 'id', /** column name */ - Name = 'name', + NominatorId = 'nominator_id', + /** column name */ + OperatorId = 'operator_id', /** column name */ SortId = 'sort_id', /** column name */ - Type = 'type', + Timestamp = 'timestamp', + /** column name */ + ToWithdraw = 'to_withdraw', + /** column name */ + TotalAmount = 'total_amount', /** column name */ Uuid = 'uuid' } -/** Streaming cursor of the table "staking_runtime_creations" */ -export type Staking_Runtime_Creations_Stream_Cursor_Input = { +/** order by stddev() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Stddev_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Stddev_Pop_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Stddev_Samp_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** Streaming cursor of the table "staking_withdraw_events" */ +export type Staking_Withdraw_Events_Stream_Cursor_Input = { /** Stream column input with initial value */ - initial_value: Staking_Runtime_Creations_Stream_Cursor_Value_Input; + initial_value: Staking_Withdraw_Events_Stream_Cursor_Value_Input; /** cursor ordering */ ordering?: InputMaybe; }; /** Initial value of the column from where the streaming should start */ -export type Staking_Runtime_Creations_Stream_Cursor_Value_Input = { +export type Staking_Withdraw_Events_Stream_Cursor_Value_Input = { _block_range?: InputMaybe; + account_id?: InputMaybe; + amount1?: InputMaybe; + amount2?: InputMaybe; block_height?: InputMaybe; - created_by?: InputMaybe; + domain_id?: InputMaybe; event_id?: InputMaybe; extrinsic_id?: InputMaybe; id?: InputMaybe; - name?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; sort_id?: InputMaybe; - type?: InputMaybe; + timestamp?: InputMaybe; + to_withdraw?: InputMaybe; + total_amount?: InputMaybe; uuid?: InputMaybe; }; +/** order by sum() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Sum_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by var_pop() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Var_Pop_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by var_samp() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Var_Samp_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** order by variance() on columns of table "staking.withdraw_events" */ +export type Staking_Withdraw_Events_Variance_Order_By = { + amount1?: InputMaybe; + amount2?: InputMaybe; + block_height?: InputMaybe; + total_amount?: InputMaybe; +}; + /** columns and relationships of "staking.withdrawal_histories" */ export type Staking_Withdrawal_Histories = { __typename?: 'staking_withdrawal_histories'; _block_range: Scalars['int8range']['output']; + account_id: Scalars['String']['output']; block_height: Scalars['numeric']['output']; + domain_epoch: Scalars['Int']['output']; + domain_id: Scalars['String']['output']; id: Scalars['String']['output']; + nominator_id: Scalars['String']['output']; + operator_id: Scalars['String']['output']; + shares: Scalars['numeric']['output']; + storage_fee_refund: Scalars['numeric']['output']; + total_withdrawal_amount: Scalars['numeric']['output']; + unlock_at_confirmed_domain_block_number: Scalars['numeric']['output']; uuid: Scalars['uuid']['output']; }; +/** order by aggregate values of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Avg_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "staking.withdrawal_histories". All fields are combined with a logical 'AND'. */ export type Staking_Withdrawal_Histories_Bool_Exp = { _and?: InputMaybe>; _block_range?: InputMaybe; _not?: InputMaybe; _or?: InputMaybe>; + account_id?: InputMaybe; block_height?: InputMaybe; + domain_epoch?: InputMaybe; + domain_id?: InputMaybe; id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; uuid?: InputMaybe; }; +/** order by max() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Max_Order_By = { + account_id?: InputMaybe; + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + domain_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; + uuid?: InputMaybe; +}; + +/** order by min() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Min_Order_By = { + account_id?: InputMaybe; + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + domain_id?: InputMaybe; + id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; + uuid?: InputMaybe; +}; + /** Ordering options when selecting data from "staking.withdrawal_histories". */ export type Staking_Withdrawal_Histories_Order_By = { _block_range?: InputMaybe; + account_id?: InputMaybe; block_height?: InputMaybe; + domain_epoch?: InputMaybe; + domain_id?: InputMaybe; id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; uuid?: InputMaybe; }; @@ -17326,13 +18280,61 @@ export enum Staking_Withdrawal_Histories_Select_Column { /** column name */ BlockRange = '_block_range', /** column name */ + AccountId = 'account_id', + /** column name */ BlockHeight = 'block_height', /** column name */ + DomainEpoch = 'domain_epoch', + /** column name */ + DomainId = 'domain_id', + /** column name */ Id = 'id', /** column name */ + NominatorId = 'nominator_id', + /** column name */ + OperatorId = 'operator_id', + /** column name */ + Shares = 'shares', + /** column name */ + StorageFeeRefund = 'storage_fee_refund', + /** column name */ + TotalWithdrawalAmount = 'total_withdrawal_amount', + /** column name */ + UnlockAtConfirmedDomainBlockNumber = 'unlock_at_confirmed_domain_block_number', + /** column name */ Uuid = 'uuid' } +/** order by stddev() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Stddev_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Stddev_Pop_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Stddev_Samp_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + /** Streaming cursor of the table "staking_withdrawal_histories" */ export type Staking_Withdrawal_Histories_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -17344,11 +18346,60 @@ export type Staking_Withdrawal_Histories_Stream_Cursor_Input = { /** Initial value of the column from where the streaming should start */ export type Staking_Withdrawal_Histories_Stream_Cursor_Value_Input = { _block_range?: InputMaybe; + account_id?: InputMaybe; block_height?: InputMaybe; + domain_epoch?: InputMaybe; + domain_id?: InputMaybe; id?: InputMaybe; + nominator_id?: InputMaybe; + operator_id?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; uuid?: InputMaybe; }; +/** order by sum() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Sum_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + +/** order by var_pop() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Var_Pop_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + +/** order by var_samp() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Var_Samp_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + +/** order by variance() on columns of table "staking.withdrawal_histories" */ +export type Staking_Withdrawal_Histories_Variance_Order_By = { + block_height?: InputMaybe; + domain_epoch?: InputMaybe; + shares?: InputMaybe; + storage_fee_refund?: InputMaybe; + total_withdrawal_amount?: InputMaybe; + unlock_at_confirmed_domain_block_number?: InputMaybe; +}; + /** columns and relationships of "staking.withdrawals" */ export type Staking_Withdrawals = { __typename?: 'staking_withdrawals'; @@ -17370,7 +18421,7 @@ export type Staking_Withdrawals = { ready_at: Scalars['numeric']['output']; shares: Scalars['numeric']['output']; status: Scalars['String']['output']; - timestamp: Scalars['timestamp']['output']; + timestamp: Scalars['timestamptz']['output']; total_amount: Scalars['numeric']['output']; unlock_extrinsic_hash: Scalars['String']['output']; unlocked_amount: Scalars['numeric']['output']; @@ -17487,7 +18538,7 @@ export type Staking_Withdrawals_Bool_Exp = { ready_at?: InputMaybe; shares?: InputMaybe; status?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; unlock_extrinsic_hash?: InputMaybe; unlocked_amount?: InputMaybe; @@ -17512,7 +18563,7 @@ export type Staking_Withdrawals_Max_Fields = { ready_at?: Maybe; shares?: Maybe; status?: Maybe; - timestamp?: Maybe; + timestamp?: Maybe; total_amount?: Maybe; unlock_extrinsic_hash?: Maybe; unlocked_amount?: Maybe; @@ -17561,7 +18612,7 @@ export type Staking_Withdrawals_Min_Fields = { ready_at?: Maybe; shares?: Maybe; status?: Maybe; - timestamp?: Maybe; + timestamp?: Maybe; total_amount?: Maybe; unlock_extrinsic_hash?: Maybe; unlocked_amount?: Maybe; @@ -17781,7 +18832,7 @@ export type Staking_Withdrawals_Stream_Cursor_Value_Input = { ready_at?: InputMaybe; shares?: InputMaybe; status?: InputMaybe; - timestamp?: InputMaybe; + timestamp?: InputMaybe; total_amount?: InputMaybe; unlock_extrinsic_hash?: InputMaybe; unlocked_amount?: InputMaybe; @@ -18677,18 +19728,12 @@ export type Subscription_Root = { staking_domain_block_histories: Array; /** fetch data from the table in a streaming manner: "staking.domain_block_histories" */ staking_domain_block_histories_stream: Array; - /** fetch data from the table: "staking.domain_blocks" */ - staking_domain_blocks: Array; - /** fetch data from the table: "staking.domain_blocks" using primary key columns */ - staking_domain_blocks_by_pk?: Maybe; - /** fetch data from the table in a streaming manner: "staking.domain_blocks" */ - staking_domain_blocks_stream: Array; - /** fetch data from the table: "staking.domain_epoches" */ - staking_domain_epoches: Array; - /** fetch data from the table: "staking.domain_epoches" using primary key columns */ - staking_domain_epoches_by_pk?: Maybe; - /** fetch data from the table in a streaming manner: "staking.domain_epoches" */ - staking_domain_epoches_stream: Array; + /** fetch data from the table: "staking.domain_epochs" */ + staking_domain_epochs: Array; + /** fetch data from the table: "staking.domain_epochs" using primary key columns */ + staking_domain_epochs_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "staking.domain_epochs" */ + staking_domain_epochs_stream: Array; /** fetch data from the table: "staking.domain_instantiations" */ staking_domain_instantiations: Array; /** fetch data from the table: "staking.domain_instantiations" using primary key columns */ @@ -18717,6 +19762,12 @@ export type Subscription_Root = { staking_nominators_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "staking.nominators" */ staking_nominators_stream: Array; + /** fetch data from the table: "staking.operator_deregistrations" */ + staking_operator_deregistrations: Array; + /** fetch data from the table: "staking.operator_deregistrations" using primary key columns */ + staking_operator_deregistrations_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "staking.operator_deregistrations" */ + staking_operator_deregistrations_stream: Array; /** fetch data from the table: "staking.operator_registrations" */ staking_operator_registrations: Array; /** fetch data from the table: "staking.operator_registrations" using primary key columns */ @@ -18735,6 +19786,12 @@ export type Subscription_Root = { staking_operator_staking_histories_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "staking.operator_staking_histories" */ staking_operator_staking_histories_stream: Array; + /** fetch data from the table: "staking.operator_tax_collections" */ + staking_operator_tax_collections: Array; + /** fetch data from the table: "staking.operator_tax_collections" using primary key columns */ + staking_operator_tax_collections_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "staking.operator_tax_collections" */ + staking_operator_tax_collections_stream: Array; /** fetch data from the table: "staking.operators" */ staking_operators: Array; /** fetch aggregated fields from the table: "staking.operators" */ @@ -18749,6 +19806,18 @@ export type Subscription_Root = { staking_runtime_creations_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "staking.runtime_creations" */ staking_runtime_creations_stream: Array; + /** fetch data from the table: "staking.unlocked_events" */ + staking_unlocked_events: Array; + /** fetch data from the table: "staking.unlocked_events" using primary key columns */ + staking_unlocked_events_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "staking.unlocked_events" */ + staking_unlocked_events_stream: Array; + /** fetch data from the table: "staking.withdraw_events" */ + staking_withdraw_events: Array; + /** fetch data from the table: "staking.withdraw_events" using primary key columns */ + staking_withdraw_events_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "staking.withdraw_events" */ + staking_withdraw_events_stream: Array; /** fetch data from the table: "staking.withdrawal_histories" */ staking_withdrawal_histories: Array; /** fetch data from the table: "staking.withdrawal_histories" using primary key columns */ @@ -20420,45 +21489,24 @@ export type Subscription_RootStaking_Domain_Block_Histories_StreamArgs = { }; -export type Subscription_RootStaking_Domain_BlocksArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootStaking_Domain_Blocks_By_PkArgs = { - id: Scalars['String']['input']; -}; - - -export type Subscription_RootStaking_Domain_Blocks_StreamArgs = { - batch_size: Scalars['Int']['input']; - cursor: Array>; - where?: InputMaybe; -}; - - -export type Subscription_RootStaking_Domain_EpochesArgs = { - distinct_on?: InputMaybe>; +export type Subscription_RootStaking_Domain_EpochsArgs = { + distinct_on?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; -export type Subscription_RootStaking_Domain_Epoches_By_PkArgs = { +export type Subscription_RootStaking_Domain_Epochs_By_PkArgs = { id: Scalars['String']['input']; }; -export type Subscription_RootStaking_Domain_Epoches_StreamArgs = { +export type Subscription_RootStaking_Domain_Epochs_StreamArgs = { batch_size: Scalars['Int']['input']; - cursor: Array>; - where?: InputMaybe; + cursor: Array>; + where?: InputMaybe; }; @@ -20564,6 +21612,27 @@ export type Subscription_RootStaking_Nominators_StreamArgs = { }; +export type Subscription_RootStaking_Operator_DeregistrationsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootStaking_Operator_Deregistrations_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + +export type Subscription_RootStaking_Operator_Deregistrations_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + + export type Subscription_RootStaking_Operator_RegistrationsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -20627,6 +21696,27 @@ export type Subscription_RootStaking_Operator_Staking_Histories_StreamArgs = { }; +export type Subscription_RootStaking_Operator_Tax_CollectionsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootStaking_Operator_Tax_Collections_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + +export type Subscription_RootStaking_Operator_Tax_Collections_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + + export type Subscription_RootStaking_OperatorsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -20678,6 +21768,48 @@ export type Subscription_RootStaking_Runtime_Creations_StreamArgs = { }; +export type Subscription_RootStaking_Unlocked_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootStaking_Unlocked_Events_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + +export type Subscription_RootStaking_Unlocked_Events_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + + +export type Subscription_RootStaking_Withdraw_EventsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootStaking_Withdraw_Events_By_PkArgs = { + uuid: Scalars['uuid']['input']; +}; + + +export type Subscription_RootStaking_Withdraw_Events_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + + export type Subscription_RootStaking_Withdrawal_HistoriesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -20825,6 +21957,19 @@ export type Timestamp_Comparison_Exp = { _nin?: InputMaybe>; }; +/** Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. */ +export type Timestamptz_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** Boolean expression to compare columns of type "uuid". All fields are combined with logical 'AND'. */ export type Uuid_Comparison_Exp = { _eq?: InputMaybe; @@ -21302,10 +22447,11 @@ export type OperatorsListQueryVariables = Exact<{ offset?: InputMaybe; orderBy: Array | Staking_Operators_Order_By; where?: InputMaybe; + accountId: Scalars['String']['input']; }>; -export type OperatorsListQuery = { __typename?: 'query_root', staking_operators_aggregate: { __typename?: 'staking_operators_aggregate', aggregate?: { __typename?: 'staking_operators_aggregate_fields', count: number } | null }, staking_operators: Array<{ __typename?: 'staking_operators', id: string, status: string, sortId: string, accountId: string, domainId: string, currentEpochRewards: any, currentTotalStake: any, currentTotalShares: any, currentSharePrice: any, currentStorageFeeDeposit: any, minimumNominatorStake: any, nominationTax: number, signingKey: string, rawStatus: string, pendingAction: string, totalDeposits: any, totalEstimatedWithdrawals: any, totalWithdrawals: any, totalTaxCollected: any, totalRewardsCollected: any, totalTransfersIn: any, transfersInCount: any, totalTransfersOut: any, transfersOutCount: any, totalRejectedTransfersClaimed: any, rejectedTransfersClaimedCount: any, totalTransfersRejected: any, transfersRejectedCount: any, totalVolume: any, totalConsensusStorageFee: any, totalDomainExecutionFee: any, totalBurnedBalance: any, accumulatedEpochShares: any, accumulatedEpochStorageFeeDeposit: any, activeEpochCount: any, bundleCount: any, lastBundleAt: any, createdAt: any, updatedAt: any, domain?: { __typename?: 'staking_domains', id: string, sort_id: string, last_domain_block_number: any } | null, nominatorsAggregate: { __typename?: 'staking_nominators_aggregate', aggregate?: { __typename?: 'staking_nominators_aggregate_fields', count: number } | null }, depositsAggregate: { __typename?: 'staking_deposits_aggregate', aggregate?: { __typename?: 'staking_deposits_aggregate_fields', count: number } | null }, nominators: Array<{ __typename?: 'staking_nominators', id: string, account_id: string, known_shares: any, unlock_at_confirmed_domain_block_number: any }> }> }; +export type OperatorsListQuery = { __typename?: 'query_root', staking_operators_aggregate: { __typename?: 'staking_operators_aggregate', aggregate?: { __typename?: 'staking_operators_aggregate_fields', count: number } | null }, staking_operators: Array<{ __typename?: 'staking_operators', id: string, status: string, sortId: string, accountId: string, domainId: string, currentEpochRewards: any, currentTotalStake: any, currentTotalShares: any, currentSharePrice: any, currentStorageFeeDeposit: any, minimumNominatorStake: any, nominationTax: number, signingKey: string, rawStatus: string, pendingAction: string, totalDeposits: any, totalEstimatedWithdrawals: any, totalWithdrawals: any, totalTaxCollected: any, totalRewardsCollected: any, totalTransfersIn: any, transfersInCount: any, totalTransfersOut: any, transfersOutCount: any, totalRejectedTransfersClaimed: any, rejectedTransfersClaimedCount: any, totalTransfersRejected: any, transfersRejectedCount: any, totalVolume: any, totalConsensusStorageFee: any, totalDomainExecutionFee: any, totalBurnedBalance: any, accumulatedEpochShares: any, accumulatedEpochStorageFeeDeposit: any, activeEpochCount: any, bundleCount: any, lastBundleAt: any, createdAt: any, updatedAt: any, domain?: { __typename?: 'staking_domains', id: string, sort_id: string, last_domain_block_number: any } | null, nominatorsAggregate: { __typename?: 'staking_nominators_aggregate', aggregate?: { __typename?: 'staking_nominators_aggregate_fields', count: number } | null }, depositsAggregate: { __typename?: 'staking_deposits_aggregate', aggregate?: { __typename?: 'staking_deposits_aggregate_fields', count: number } | null }, nominators: Array<{ __typename?: 'staking_nominators', id: string, account_id: string, known_shares: any, unlock_at_confirmed_domain_block_number: any, current_total_stake: any, current_storage_fee_deposit: any }> }> }; export type OperatorByIdQueryVariables = Exact<{ operatorId: Scalars['String']['input']; @@ -21322,7 +22468,7 @@ export type OperatorNominatorsByIdQueryVariables = Exact<{ }>; -export type OperatorNominatorsByIdQuery = { __typename?: 'query_root', staking_nominators_aggregate: { __typename?: 'staking_nominators_aggregate', aggregate?: { __typename?: 'staking_nominators_aggregate_fields', count: number } | null }, staking_nominators: Array<{ __typename?: 'staking_nominators', id: string, known_shares: any, account_id: string, domain_id: string }> }; +export type OperatorNominatorsByIdQuery = { __typename?: 'query_root', staking_nominators_aggregate: { __typename?: 'staking_nominators_aggregate', aggregate?: { __typename?: 'staking_nominators_aggregate_fields', count: number } | null }, staking_nominators: Array<{ __typename?: 'staking_nominators', id: string, account_id: string, domain_id: string, known_shares: any, current_total_stake: any, current_storage_fee_deposit: any, total_deposits: any, total_withdrawals: any }> }; export type NominatorsConnectionQueryVariables = Exact<{ limit: Scalars['Int']['input']; @@ -24349,7 +25495,7 @@ export type NominationsListLazyQueryHookResult = ReturnType; export type NominationsListQueryResult = Apollo.QueryResult; export const OperatorsListDocument = gql` - query OperatorsList($limit: Int!, $offset: Int, $orderBy: [staking_operators_order_by!]!, $where: staking_operators_bool_exp) { + query OperatorsList($limit: Int!, $offset: Int, $orderBy: [staking_operators_order_by!]!, $where: staking_operators_bool_exp, $accountId: String!) { staking_operators_aggregate(where: $where) { aggregate { count @@ -24413,11 +25559,13 @@ export const OperatorsListDocument = gql` count } } - nominators(limit: 256) { + nominators(limit: 256, where: {account_id: {_eq: $accountId}}) { id account_id known_shares unlock_at_confirmed_domain_block_number + current_total_stake + current_storage_fee_deposit } createdAt: created_at updatedAt: updated_at @@ -24441,6 +25589,7 @@ export const OperatorsListDocument = gql` * offset: // value for 'offset' * orderBy: // value for 'orderBy' * where: // value for 'where' + * accountId: // value for 'accountId' * }, * }); */ @@ -24554,9 +25703,13 @@ export const OperatorNominatorsByIdDocument = gql` where: $where ) { id - known_shares account_id domain_id + known_shares + current_total_stake + current_storage_fee_deposit + total_deposits + total_withdrawals } } `; diff --git a/explorer/package.json b/explorer/package.json index 4d70f66c2..7df57aa02 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -31,9 +31,9 @@ "dependencies": { "@apollo/client": "^3.10.4", "@apollo/experimental-nextjs-app-support": "^0.11.6", - "@autonomys/auto-consensus": "^1.2.5", - "@autonomys/auto-drive": "^1.2.5", - "@autonomys/auto-utils": "^1.2.5", + "@autonomys/auto-consensus": "^1.3.1", + "@autonomys/auto-drive": "^1.3.1", + "@autonomys/auto-utils": "^1.3.1", "@floating-ui/react": "^0.27.4", "@headlessui/react": "^1.7.18", "@headlessui/tailwindcss": "^0.2.0", diff --git a/explorer/public/images/wallets/talisman.svg b/explorer/public/images/wallets/talisman.svg new file mode 100644 index 000000000..aef5d6a32 --- /dev/null +++ b/explorer/public/images/wallets/talisman.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/explorer/src/components/Consensus/Account/AccountRewardList.tsx b/explorer/src/components/Consensus/Account/AccountRewardList.tsx index 8060a07c2..cf4be2d46 100644 --- a/explorer/src/components/Consensus/Account/AccountRewardList.tsx +++ b/explorer/src/components/Consensus/Account/AccountRewardList.tsx @@ -48,8 +48,9 @@ export const AccountRewardList: FC = () => { }) const isLargeLaptop = useMediaQuery('(min-width: 1440px)') - const { accountId } = useParams() + const { accountId: rawAccountId } = useParams() const inFocus = useWindowFocus() + const accountId = formatAddress(rawAccountId) const lastNetworkBlockNumber = useConsensusStates((state) => state.lastBlockNumber) const lastBlockNumber = useMemo( () => lastNetworkBlockNumber[network], @@ -109,7 +110,6 @@ export const AccountRewardList: FC = () => { : undefined, [rewards], ) - const convertedAddress = useMemo(() => (account ? formatAddress(account.id) : ''), [account]) const columns = useMemo( () => [ @@ -229,9 +229,7 @@ export const AccountRewardList: FC = () => { return (
- {convertedAddress && ( - - )} + {accountId && }
{`Rewards (${totalLabel})`}
diff --git a/explorer/src/components/Consensus/Home/HomeChainInfo.tsx b/explorer/src/components/Consensus/Home/HomeChainInfo.tsx index 4ff16ab99..8f01e6c35 100644 --- a/explorer/src/components/Consensus/Home/HomeChainInfo.tsx +++ b/explorer/src/components/Consensus/Home/HomeChainInfo.tsx @@ -1,5 +1,5 @@ import HomeInfoCardSkeleton from '@/components/common/HomeInfoCardSkeleton' -import { formatSpaceToDecimal } from '@autonomys/auto-consensus' +import { formatSpaceToDecimalAsObject } from '@autonomys/auto-consensus' import type { HomeQuery } from 'gql/graphql' import useIndexers from 'hooks/useIndexers' import useMediaQuery from 'hooks/useMediaQuery' @@ -21,9 +21,8 @@ type Props = { export const HomeChainInfo: FC = ({ data, loading }) => { const { indexerSet } = useIndexers() - const [telemetryData, setTelemetryData] = useState([]) - const isDesktop = useMediaQuery('(min-width: 1536px)') + const [telemetryData, setTelemetryData] = useState([]) const getTelemetryData = useCallback(async () => { if (!process.env.NEXT_PUBLIC_TELEMETRY_URL) return @@ -67,9 +66,9 @@ export const HomeChainInfo: FC = ({ data, loading }) => { }, [telemetryData, indexerSet.telemetryNetworkName]) const spacePledgedVal = data ? Number(data.consensus_blocks[0].space_pledged) : 0 - const spacePledged = formatSpaceToDecimal(spacePledgedVal) + const spacePledged = formatSpaceToDecimalAsObject(spacePledgedVal) const historySizeVal = data ? Number(data.consensus_blocks[0].blockchain_size) : 0 - const historySize = formatSpaceToDecimal(historySizeVal) + const historySize = formatSpaceToDecimalAsObject(historySizeVal) const blocksCount = data ? Number(data.consensus_blocks[0].height) : 'error' const accountsCount = data ? Number(data.consensus_accounts_aggregate?.aggregate?.count) : 'error' const extrinsicsCount = data @@ -99,13 +98,17 @@ export const HomeChainInfo: FC = ({ data, loading }) => { { title: 'Total Space Pledged', imagePath: '/images/icons/total-space-pledged.webp', - value: spacePledged, + value: spacePledged.value, + unit: spacePledged.unit, + decimal: 2, darkBgClass: 'dark:bg-boxDark', }, { title: 'Archived History Size', imagePath: '/images/icons/archived-history-size.webp', - value: historySize, + value: historySize.value, + unit: historySize.unit, + decimal: 2, darkBgClass: 'dark:bg-boxDark', }, { @@ -159,11 +162,13 @@ export const HomeChainInfo: FC = ({ data, loading }) => { )) - : listOfCards.map(({ title, value, imagePath, darkBgClass }, index) => ( + : listOfCards.map(({ title, value, unit, decimal, imagePath, darkBgClass }, index) => ( diff --git a/explorer/src/components/Consensus/Home/HomeChainInfoExtra.tsx b/explorer/src/components/Consensus/Home/HomeChainInfoExtra.tsx index 8c9499136..c7b6eaf1e 100644 --- a/explorer/src/components/Consensus/Home/HomeChainInfoExtra.tsx +++ b/explorer/src/components/Consensus/Home/HomeChainInfoExtra.tsx @@ -8,7 +8,7 @@ import 'swiper/css' import 'swiper/css/pagination' import { Pagination } from 'swiper/modules' import { Swiper, SwiperSlide } from 'swiper/react' -import { bigNumberToNumber, numberWithCommas } from 'utils/number' +import { bigNumberToNumber, formatNumberWithUnit, safeDivide } from 'utils/number' import { HomeInfoCard } from './HomeInfoCard' type Props = { @@ -18,7 +18,6 @@ type Props = { export const HomeChainInfoExtra: FC = ({ data, loading }) => { const { tokenSymbol } = useIndexers() - const isDesktop = useMediaQuery('(min-width: 1536px)') const eventsCount = data @@ -28,18 +27,17 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { ? Number(data.consensus_blocks[0].cumulative?.cumulative_transfers_count) : 'error' const transferValue = data - ? numberWithCommas( - bigNumberToNumber(data.consensus_blocks[0].cumulative?.cumulative_transfer_value), - ) + ` ${tokenSymbol}` + ? bigNumberToNumber(data.consensus_blocks[0].cumulative?.cumulative_transfer_value) : 'error' const rewardsCount = data ? Number(data.consensus_blocks[0].cumulative?.cumulative_rewards_count) : 'error' const rewardsValue = data - ? numberWithCommas( - bigNumberToNumber(data.consensus_blocks[0].cumulative?.cumulative_reward_value), - ) + ` ${tokenSymbol}` + ? bigNumberToNumber(data.consensus_blocks[0].cumulative?.cumulative_reward_value) : 'error' + const spacePledgedVal = data ? Number(data.consensus_blocks[0].space_pledged) : 0 + const historySizeVal = data ? Number(data.consensus_blocks[0].blockchain_size) : 0 + const replicationFactor = formatNumberWithUnit(safeDivide(spacePledgedVal, historySizeVal)) const listOfCards = useMemo( () => [ @@ -57,6 +55,7 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { title: 'Total Transfers Value', value: transferValue, darkBgClass: 'dark:bg-boxDark', + unit: tokenSymbol, }, { title: 'Total Rewards', @@ -67,9 +66,26 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { title: 'Total Rewards Value', value: rewardsValue, darkBgClass: 'dark:bg-boxDark', + unit: tokenSymbol, + decimal: 2, }, + { + title: 'Data Replication Factor', + value: replicationFactor.value, + darkBgClass: 'dark:bg-boxDark', + unit: replicationFactor.unit, + decimal: 2, + }, + ], + [ + eventsCount, + transfersCount, + transferValue, + rewardsCount, + rewardsValue, + tokenSymbol, + replicationFactor, ], - [eventsCount, transfersCount, transferValue, rewardsCount, rewardsValue], ) return ( @@ -79,7 +95,7 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { pagination={{ clickable: true, renderBullet: (index, className) => - ``, + ``, }} breakpoints={{ 460: { @@ -95,7 +111,7 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { spaceBetween: 20, }, 1536: { - slidesPerView: 5, + slidesPerView: 6, spaceBetween: 20, }, }} @@ -103,7 +119,7 @@ export const HomeChainInfoExtra: FC = ({ data, loading }) => { className={cn('flex w-full items-center gap-5', isDesktop ? '!p-0' : '!pb-10')} > {!data || loading - ? Array.from({ length: 5 }).map((_, index) => ( + ? Array.from({ length: 6 }).map((_, index) => ( = ({ data, loading }) => { /> )) - : listOfCards.map(({ title, value, darkBgClass }, index) => ( + : listOfCards.map(({ title, value, unit, decimal, darkBgClass }, index) => ( diff --git a/explorer/src/components/Consensus/Home/HomeInfoCard.tsx b/explorer/src/components/Consensus/Home/HomeInfoCard.tsx index e7be64d2f..4d6c55664 100644 --- a/explorer/src/components/Consensus/Home/HomeInfoCard.tsx +++ b/explorer/src/components/Consensus/Home/HomeInfoCard.tsx @@ -5,6 +5,8 @@ import { FC, ReactElement, useMemo } from 'react' type Props = { title: string value: number | string + unit?: string + decimal?: number icon?: ReactElement imagePath?: string tooltip?: string | React.ReactNode @@ -17,6 +19,8 @@ export const HomeInfoCard: FC = ({ icon, imagePath, value, + unit, + decimal, darkBgClass, additionalClass = '', }) => { @@ -26,6 +30,7 @@ export const HomeInfoCard: FC = ({ ), [value], ) + return (
= ({ {title} - {typeof value === 'string' ? text : } + {typeof value === 'string' ? ( + text + ) : ( + + )}
diff --git a/explorer/src/components/Domain/DomainProgress.tsx b/explorer/src/components/Domain/DomainProgress.tsx index 560c65927..ff8d6d0a5 100644 --- a/explorer/src/components/Domain/DomainProgress.tsx +++ b/explorer/src/components/Domain/DomainProgress.tsx @@ -73,10 +73,7 @@ export const DomainProgress: FC = () => { currentEpoch: domain.completed_epoch, lastBlock: domain.last_domain_block_number, progress, - estimatedRemainingTime: - progress < 100 - ? (BigInt(domain.last_epoch_duration) / BigInt(100 * 1000)) * BigInt(100 - progress) - : BigInt(0), + estimatedRemainingTime: progress < 100 ? BigInt(100 - progress) * BigInt(6) : BigInt(0), } }) }, [data, loading, error, network]) diff --git a/explorer/src/components/Domain/DomainsList.tsx b/explorer/src/components/Domain/DomainsList.tsx index 289b920e2..22d08256c 100644 --- a/explorer/src/components/Domain/DomainsList.tsx +++ b/explorer/src/components/Domain/DomainsList.tsx @@ -360,10 +360,11 @@ export const DomainsList: FC = () => { const fullDataDownloader = useCallback( () => - downloadFullData(apolloClient, DomainsListDocument, TABLE, { + downloadFullData(apolloClient, DomainsListDocument, 'staking_' + TABLE, { orderBy, + where, }), - [apolloClient, orderBy], + [apolloClient, orderBy, where], ) const domainsList = useMemo( diff --git a/explorer/src/components/Staking/MyWithdrawals.tsx b/explorer/src/components/Staking/MyWithdrawals.tsx index 4011ec7a3..11109f552 100644 --- a/explorer/src/components/Staking/MyWithdrawals.tsx +++ b/explorer/src/components/Staking/MyWithdrawals.tsx @@ -188,7 +188,12 @@ export const MyPendingWithdrawals: FC = () => { const myPendingWithdrawals = useMemo( () => withdrawals - .filter((w) => w.account === subspaceAccount && w.withdrawalInShares.shares > BIGINT_ZERO) + .filter( + (w) => + w.account === subspaceAccount && + w.withdrawalInShares && + w.withdrawalInShares.shares > BIGINT_ZERO, + ) .map((w) => { const op = operators.find((o) => o.id === w.operatorId.toString()) const sharesValue = @@ -197,14 +202,21 @@ export const MyPendingWithdrawals: FC = () => { BigInt(op.currentTotalShares) : BIGINT_ZERO const sharesWithdrawAmount = bigNumberToFormattedString( - (w.withdrawalInShares.shares * sharesValue) / SHARES_CALCULATION_MULTIPLIER, + w.withdrawalInShares + ? (w.withdrawalInShares.shares * sharesValue) / SHARES_CALCULATION_MULTIPLIER + : BIGINT_ZERO, ) const storageFeeWithdrawAmount = bigNumberToFormattedString( - (w.withdrawalInShares.storageFeeRefund * sharesValue) / SHARES_CALCULATION_MULTIPLIER, + w.withdrawalInShares + ? (w.withdrawalInShares.storageFeeRefund * sharesValue) / + SHARES_CALCULATION_MULTIPLIER + : BIGINT_ZERO, ) - const total = - ((w.withdrawalInShares.shares + w.withdrawalInShares.storageFeeRefund) * sharesValue) / - SHARES_CALCULATION_MULTIPLIER + const total = w.withdrawalInShares + ? ((w.withdrawalInShares.shares + w.withdrawalInShares.storageFeeRefund) * + sharesValue) / + SHARES_CALCULATION_MULTIPLIER + : BIGINT_ZERO return { operatorId: { @@ -213,21 +225,29 @@ export const MyPendingWithdrawals: FC = () => { }, shares: { value: `${sharesWithdrawAmount} ${tokenSymbol}`, - tooltip: `Shares: ${w.withdrawalInShares.shares.toString()} - Share value: ${sharesValue} - Total: ${sharesWithdrawAmount}`, - sortValue: w.withdrawalInShares.shares, + tooltip: w.withdrawalInShares + ? `Shares: ${w.withdrawalInShares.shares.toString()} - Share value: ${sharesValue} - Total: ${sharesWithdrawAmount}` + : '', + sortValue: w.withdrawalInShares ? w.withdrawalInShares.shares : BIGINT_ZERO, }, storageFeeRefund: { value: `${storageFeeWithdrawAmount} ${tokenSymbol}`, - tooltip: `Storage Fee Refund: ${w.withdrawalInShares.storageFeeRefund.toString()} - Share value: ${sharesValue} - Total: ${storageFeeWithdrawAmount}`, - sortValue: w.withdrawalInShares.storageFeeRefund, + tooltip: w.withdrawalInShares + ? `Storage Fee Refund: ${w.withdrawalInShares.storageFeeRefund.toString()} - Share value: ${sharesValue} - Total: ${storageFeeWithdrawAmount}` + : '', + sortValue: w.withdrawalInShares ? w.withdrawalInShares.storageFeeRefund : BIGINT_ZERO, }, total: { value: `${bigNumberToFormattedString(total.toString())} ${tokenSymbol}`, sortValue: total, }, unlockAtConfirmedDomainBlockNumber: { - value: w.withdrawalInShares.unlockAtConfirmedDomainBlockNumber.toString(), - sortValue: w.withdrawalInShares.unlockAtConfirmedDomainBlockNumber, + value: w.withdrawalInShares + ? w.withdrawalInShares.unlockAtConfirmedDomainBlockNumber.toString() + : '', + sortValue: w.withdrawalInShares + ? w.withdrawalInShares.unlockAtConfirmedDomainBlockNumber + : BIGINT_ZERO, }, } }), diff --git a/explorer/src/components/Staking/NominationsTable.tsx b/explorer/src/components/Staking/NominationsTable.tsx index aa4f6bb05..7f4abd550 100644 --- a/explorer/src/components/Staking/NominationsTable.tsx +++ b/explorer/src/components/Staking/NominationsTable.tsx @@ -21,10 +21,8 @@ import useWallet from 'hooks/useWallet' import Link from 'next/link' import { FC, useCallback, useEffect, useMemo, useState } from 'react' import { useInView } from 'react-intersection-observer' -import { useViewStates } from 'states/view' import { bigNumberToFormattedString, numberWithCommas } from 'utils/number' import { utcToLocalRelativeTime } from 'utils/time' -import { MyPositionSwitch } from '../common/MyPositionSwitch' import { ActionsDropdown, ActionsDropdownRow } from './ActionsDropdown' import { ActionsModal, OperatorAction, OperatorActionType } from './ActionsModal' @@ -37,7 +35,6 @@ export const NominationsTable: FC = () => { const [isOpen, setIsOpen] = useState(false) const { network, tokenSymbol } = useIndexers() const [sorting] = useState([{ id: 'operator_id', desc: false }]) - const { myPositionOnly } = useViewStates() const [action, setAction] = useState({ type: OperatorActionType.None, @@ -69,9 +66,9 @@ export const NominationsTable: FC = () => { offset: undefined, orderBy, // eslint-disable-next-line camelcase - where: myPositionOnly && subspaceAccount ? { account_id: { _eq: subspaceAccount } } : {}, + where: subspaceAccount ? { account_id: { _eq: subspaceAccount } } : {}, }), - [myPositionOnly, orderBy, subspaceAccount], + [orderBy, subspaceAccount], ) const { loading, data, setIsVisible } = useIndexersQuery< @@ -174,11 +171,6 @@ export const NominationsTable: FC = () => { Nominations ({totalLabel}) - {subspaceAccount && ( -
- -
- )}
{!loading ? ( diff --git a/explorer/src/components/Staking/OperatorNominatorTable.tsx b/explorer/src/components/Staking/OperatorNominatorTable.tsx index 44e131b2a..1efd05b1d 100644 --- a/explorer/src/components/Staking/OperatorNominatorTable.tsx +++ b/explorer/src/components/Staking/OperatorNominatorTable.tsx @@ -20,7 +20,7 @@ import { useConsensusStates } from 'states/consensus' import { hasValue, useQueryStates } from 'states/query' import { useViewStates } from 'states/view' import type { Cell } from 'types/table' -import { bigNumberToNumber, limitNumberDecimals, numberWithCommas } from 'utils/number' +import { bigNumberToFormattedString, bigNumberToNumber, numberWithCommas } from 'utils/number' import { countTablePages } from 'utils/table' import { AccountIconWithLink } from '../common/AccountIcon' import { Spinner } from '../common/Spinner' @@ -66,48 +66,40 @@ export const OperatorNominatorTable: FC = ({ operator }) => { ), }, { - accessorKey: 'shares', - header: 'Stakes', + accessorKey: 'current_total_stake', + header: 'Current Stake', enableSorting: true, cell: ({ row }: Cell) => { return (
- {numberWithCommas( - limitNumberDecimals( - Number( - Number( - (BigInt(operator.current_total_stake) / - BigInt(operator.current_total_shares)) * - BigInt(row.original.known_shares), - ) / - 10 ** 18, - ), - ), - )}{' '} - {tokenSymbol} + {bigNumberToFormattedString(row.original.current_total_stake) + ' ' + tokenSymbol}
) }, }, { - accessorKey: 'shares', - header: 'Shares', + accessorKey: 'current_storage_fee_deposit', + header: 'Current Storage Fee Deposit', enableSorting: true, - cell: ({ row }: Cell) => ( -
- {numberWithCommas( - limitNumberDecimals( - Number( - Number( - (BigInt(row.original.known_shares) * BigInt(1000000000)) / - BigInt(operator.current_total_shares), - ) / 1000000000, - ) * 100, - ), - )}{' '} - % -
- ), + cell: ({ row }: Cell) => { + return ( +
+ {bigNumberToFormattedString(row.original.current_storage_fee_deposit) + + ' ' + + tokenSymbol} +
+ ) + }, + }, + { + accessorKey: 'total_deposits', + header: 'Total Deposits', + enableSorting: true, + cell: ({ row }: Cell) => { + return ( +
{bigNumberToFormattedString(row.original.total_deposits) + ' ' + tokenSymbol}
+ ) + }, }, { accessorKey: 'owner', diff --git a/explorer/src/components/Staking/OperatorsList.tsx b/explorer/src/components/Staking/OperatorsList.tsx index e9144deac..a21e38168 100644 --- a/explorer/src/components/Staking/OperatorsList.tsx +++ b/explorer/src/components/Staking/OperatorsList.tsx @@ -33,7 +33,7 @@ import { MyPositionSwitch } from '../common/MyPositionSwitch' import { TableSettings } from '../common/TableSettings' import { Tooltip } from '../common/Tooltip' // import { DomainBlockTime } from '../Domain/DomainBlockTime' -// import { DomainProgress } from '../Domain/DomainProgress' +import { DomainProgress } from '../Domain/DomainProgress' import { NotFound } from '../layout/NotFound' import { ActionsDropdown, ActionsDropdownRow } from './ActionsDropdown' import { ActionsModal, OperatorAction, OperatorActionType } from './ActionsModal' @@ -92,7 +92,7 @@ export const OperatorsList: FC = ({ domainId }) => { TABLE, selectedColumns, { - id: ({ row }: Cell) => ( + sortId: ({ row }: Cell) => ( = ({ domainId }) => { address={row.original.accountId} network={network} section={Routes.consensus} + forceShortString /> ), domainId: ({ row }: Cell) => { @@ -289,6 +290,19 @@ export const OperatorsList: FC = ({ domainId }) => {
) }, + yourStake: ({ row }: Cell) => { + const nominator = row.original.nominators.find( + (nominator) => nominator.account_id === subspaceAccount, + ) + if (!nominator) return <> + const totalStake = + BigInt(nominator.current_total_stake) + BigInt(nominator.current_storage_fee_deposit) + return ( +
+ {bigNumberToFormattedString(totalStake)} {tokenSymbol} +
+ ) + }, actions: ({ row }: Cell) => { const isOperator = row.original.accountId === subspaceAccount const nominator = row.original.nominators.find( @@ -358,7 +372,7 @@ export const OperatorsList: FC = ({ domainId }) => { // eslint-disable-next-line camelcase { nominators: { account_id: { _eq: subspaceAccount } } }, ] - } + } else if (conditions._or) delete conditions._or // Total Stake if (filters.totalStakeMin || filters.totalStakeMax) { @@ -478,8 +492,9 @@ export const OperatorsList: FC = ({ domainId }) => { offset: pagination.pageIndex > 0 ? pagination.pageIndex * pagination.pageSize : undefined, orderBy, where, + accountId: subspaceAccount ?? '', }), - [pagination, orderBy, where], + [pagination, orderBy, where, subspaceAccount], ) const { loading, setIsVisible } = useIndexersQuery< @@ -501,10 +516,11 @@ export const OperatorsList: FC = ({ domainId }) => { const fullDataDownloader = useCallback( () => - downloadFullData(apolloClient, OperatorsListDocument, 'operator', { + downloadFullData(apolloClient, OperatorsListDocument, 'staking_' + TABLE, { orderBy, + where, }), - [apolloClient, orderBy], + [apolloClient, orderBy, where], ) const operatorsList = useMemo(() => { @@ -540,14 +556,14 @@ export const OperatorsList: FC = ({ domainId }) => { return (
- {/*
-
+
+ {/*
-
+
*/}
-
*/} +
{
- {session?.user?.discord?.vcs.roles.farmer && ( - 🌾 + {session?.user?.discord?.vcs.roles.mainnetFarmer && ( + + 🌾 + )} - {session?.user?.discord?.vcs.roles.operator && ( - 🌐 + {session?.user?.discord?.vcs.roles.mainnetOperator && ( + + 🌐 + )} - {session?.user?.discord?.vcs.roles.nominator && ( - 🤝 + {session?.user?.discord?.vcs.roles.mainnetNominator && ( + + 🤝 + + )} + {session?.user?.discord?.vcs.roles.taurusFarmer && ( + + 🌾 + + )} + {session?.user?.discord?.vcs.roles.taurusOperator && ( + + 🌐 + + )} + {session?.user?.discord?.vcs.roles.taurusNominator && ( + + 🤝 + )} diff --git a/explorer/src/components/common/AnimatedCount.tsx b/explorer/src/components/common/AnimatedCount.tsx index a5be3d29b..39482e18f 100644 --- a/explorer/src/components/common/AnimatedCount.tsx +++ b/explorer/src/components/common/AnimatedCount.tsx @@ -5,11 +5,17 @@ import CountUp from 'react-countup' interface AnimatedCountProps { value: number + unit?: string duration?: number decimals?: number } -export default function AnimatedCount({ value, duration = 0.5, decimals = 0 }: AnimatedCountProps) { +export default function AnimatedCount({ + value, + unit, + duration = 0.5, + decimals = 0, +}: AnimatedCountProps) { const prevValueRef = useRef(value) useEffect(() => { @@ -19,7 +25,14 @@ export default function AnimatedCount({ value, duration = 0.5, decimals = 0 }: A const prevValue = prevValueRef.current return ( - + {({ countUpRef }) => (

= ({ path }) => { const href = useMemo( - () => (path ? EXTERNAL_ROUTES.novaExplorer + path : EXTERNAL_ROUTES.novaExplorer), + () => (path ? EXTERNAL_ROUTES.taurusEvmExplorer + path : EXTERNAL_ROUTES.taurusEvmExplorer), [path], ) return ( diff --git a/explorer/src/components/layout/PreferredExtensionModal.tsx b/explorer/src/components/layout/PreferredExtensionModal.tsx index 5796f7766..35fc53cb5 100644 --- a/explorer/src/components/layout/PreferredExtensionModal.tsx +++ b/explorer/src/components/layout/PreferredExtensionModal.tsx @@ -36,6 +36,8 @@ const WalletOption: FC = ({ wallet, index, onClose }) => { return '/images/wallets/polkadot.svg' case SupportedWalletExtension.SubwalletJs: return '/images/wallets/subwallet.svg' + case SupportedWalletExtension.Talisman: + return '/images/wallets/talisman.svg' case SupportedWalletExtension.Nova: return '/images/wallets/nova.svg' default: diff --git a/explorer/src/constants/routes.ts b/explorer/src/constants/routes.ts index dc451c93d..243552811 100644 --- a/explorer/src/constants/routes.ts +++ b/explorer/src/constants/routes.ts @@ -116,7 +116,7 @@ export const ROUTES: Route[] = [ { name: RoutesStaking.nominations, title: 'Nominations', - networks: [], + networks: [NetworkId.TAURUS], }, ], }, @@ -188,7 +188,7 @@ export const EXTERNAL_ROUTES = { linkedin: 'https://www.linkedin.com/company/autonomys/', subSocial: 'https://app.subsocial.network/@NetworkSubspace', }, - novaExplorer: 'https://nova.subspace.network/', + taurusEvmExplorer: 'https://blockscout.taurus.autonomys.xyz/', polkadot: (network: NetworkId): string => `https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-0.${network}.subspace.network%2Fws#/explorer`, subscan: 'https://autonomys.subscan.io/', diff --git a/explorer/src/constants/session.ts b/explorer/src/constants/session.ts index c10e3af71..f6e68ac0b 100644 --- a/explorer/src/constants/session.ts +++ b/explorer/src/constants/session.ts @@ -13,9 +13,12 @@ export const DEFAULT_SUBSPACE_TOKEN: SubspaceToken = { message: '', signature: '', vcs: { - farmer: false, - operator: false, - nominator: false, + mainnetFarmer: false, + mainnetOperator: false, + mainnetNominator: false, + taurusFarmer: false, + taurusOperator: false, + taurusNominator: false, }, disbursements: { stakeWars2: false, @@ -28,9 +31,12 @@ export const DEFAULT_DISCORD_TOKEN: DiscordToken = { vcs: { member: false, roles: { - farmer: false, - operator: false, - nominator: false, + mainnetFarmer: false, + mainnetOperator: false, + mainnetNominator: false, + taurusFarmer: false, + taurusOperator: false, + taurusNominator: false, }, }, } diff --git a/explorer/src/constants/tables.ts b/explorer/src/constants/tables.ts index 7e20bc49f..1f2ef8264 100644 --- a/explorer/src/constants/tables.ts +++ b/explorer/src/constants/tables.ts @@ -128,7 +128,7 @@ export const AVAILABLE_COLUMNS: AvailableColumns = { }, { name: 'totalWithdrawals', label: 'Total Withdrawals', isSelected: false }, { name: 'totalTaxCollected', label: 'Total Tax Collected', isSelected: false }, - { name: 'totalRewardsCollected', label: 'Total Rewards Collected', isSelected: true }, + { name: 'totalRewardsCollected', label: 'Total Rewards', isSelected: true }, { name: 'totalTransfersIn', label: 'Total Transfers In', isSelected: false }, { name: 'transfersInCount', label: 'Transfers In Count', isSelected: false }, { name: 'totalTransfersOut', label: 'Total Transfers Out', isSelected: false }, @@ -180,10 +180,10 @@ export const AVAILABLE_COLUMNS: AvailableColumns = { { name: 'updatedAt', label: 'Updated At', isSelected: false }, ], operators: [ - { name: 'id', label: 'Id', isSelected: true, searchable: true }, + { name: 'sortId', label: 'Id', isSelected: true, searchable: true }, { name: 'accountId', label: 'Owner', isSelected: true, searchable: true }, { name: 'domainId', label: 'Domain', isSelected: true, searchable: true }, - { name: 'signingKey', label: 'Signing Key', isSelected: true, searchable: true }, + { name: 'signingKey', label: 'Signing Key', isSelected: false, searchable: true }, { name: 'minimumNominatorStake', label: 'Minimum Nominator Stake', isSelected: true }, { name: 'nominationTax', label: 'Nomination Tax', isSelected: true }, // { name: 'name', label: 'Name', isSelected: true }, @@ -214,7 +214,11 @@ export const AVAILABLE_COLUMNS: AvailableColumns = { }, { name: 'totalWithdrawals', label: 'Total Withdrawals', isSelected: false }, { name: 'totalTaxCollected', label: 'Total Tax Collected', isSelected: false }, - { name: 'totalRewardsCollected', label: 'Total Rewards Collected', isSelected: true }, + { + name: 'totalRewardsCollected', + label: 'Total Rewards', + isSelected: true, + }, { name: 'totalTransfersIn', label: 'Total Transfers In', isSelected: false }, { name: 'transfersInCount', label: 'Transfers In Count', isSelected: false }, { name: 'totalTransfersOut', label: 'Total Transfers Out', isSelected: false }, @@ -257,6 +261,8 @@ export const AVAILABLE_COLUMNS: AvailableColumns = { { name: 'depositsAggregate', label: 'Deposit Count', isSelected: false }, { name: 'createdAt', label: 'Created At', isSelected: false }, { name: 'updatedAt', label: 'Updated At', isSelected: false }, + { name: 'myStake', label: 'My Stake', isSelected: true }, + { name: 'yourStake', label: 'Your Stake', isSelected: true }, { name: 'actions', label: 'Actions', isSelected: true }, ], leaderboard: [ diff --git a/explorer/src/constants/wallet.ts b/explorer/src/constants/wallet.ts index 083bcad41..0e9fcb609 100644 --- a/explorer/src/constants/wallet.ts +++ b/explorer/src/constants/wallet.ts @@ -31,6 +31,7 @@ export enum ExtrinsicsSupportedModule { export enum SupportedWalletExtension { PolkadotJs = 'polkadot-js', SubwalletJs = 'subwallet-js', + Talisman = 'talisman', Nova = 'nova', } diff --git a/explorer/src/hooks/useDomainsData.ts b/explorer/src/hooks/useDomainsData.ts index 78c7833da..478f95c88 100644 --- a/explorer/src/hooks/useDomainsData.ts +++ b/explorer/src/hooks/useDomainsData.ts @@ -15,7 +15,7 @@ export const useDomainsData = () => { try { const domainsLastBlockNumbers = new Map() const domainsBlocks = await Promise.all( - Object.values(domainsApis).map((d) => d.rpc.chain.getBlock()), + Object.values(domainsApis).map((d) => d.api.rpc.chain.getBlock()), ) domainsBlocks.map((block, index) => domainsLastBlockNumbers.set( diff --git a/explorer/src/providers/WalletProvider.tsx b/explorer/src/providers/WalletProvider.tsx index 0e2899b69..f94754cf0 100644 --- a/explorer/src/providers/WalletProvider.tsx +++ b/explorer/src/providers/WalletProvider.tsx @@ -1,12 +1,7 @@ 'use client' -import { - activate, - ApiPromise, - createConnection, - DomainRuntime, - networks, -} from '@autonomys/auto-utils' +import { activate, ApiPromise, createConnection, networks } from '@autonomys/auto-utils' +import { Domain } from '@autonomys/auto-utils/dist/types/domain' import { sendGAEvent } from '@next/third-parties/google' import { InjectedExtension } from '@polkadot/extension-inject/types' import { getWalletBySource } from '@subwallet/wallet-connect/dotsama/wallets' @@ -19,7 +14,10 @@ import type { ChainParam } from 'types/app' import type { WalletAccountWithType } from 'types/wallet' import { formatAddress } from 'utils/formatAddress' -export type DomainsApis = { [key: string]: ApiPromise } +interface DomainWithApi extends Domain { + api: ApiPromise +} +export type DomainsApis = { [key: string]: DomainWithApi } export type WalletContextValue = { api: ApiPromise | undefined @@ -73,25 +71,22 @@ export const WalletProvider: FC = ({ children }) => { const prepareDomainsApis = useCallback(async () => { try { const network = networks.find((network) => network.id === chain) - if (!network) return - - const autoEvmRpc = network.domains.find((domain) => domain.runtime === DomainRuntime.AUTO_EVM) - ?.rpcUrls[0] - const autoIdRpc = network.domains.find((domain) => domain.runtime === DomainRuntime.AUTO_ID) - ?.rpcUrls[0] - if (!autoEvmRpc || !autoIdRpc) return + if (!network || !network.domains || network.domains.length === 0) return + const domains = network.domains - const domainsRpcs = network.domains.map((domain) => - domain.rpcUrls[0].replace('https://', 'wss://'), + const domainApis = await Promise.all( + domains.map((d) => + createConnection(d.rpcUrls.map((rpc) => rpc.replace('https://', 'wss://'))), + ), ) - const [autoEvm, autoId] = await Promise.all( - domainsRpcs.flatMap((rpc) => createConnection(rpc)), + return domains.reduce( + (acc, d, index) => ({ + ...acc, + [d.name]: { ...d, api: domainApis[index] }, + }), + {}, ) - return { - autoEvm, - autoId, - } } catch (error) { console.error('Failed to prepare domains API for chain', chain, 'error:', error) } diff --git a/explorer/src/states/tables.ts b/explorer/src/states/tables.ts index 93a0fc5c1..26f2e72cf 100644 --- a/explorer/src/states/tables.ts +++ b/explorer/src/states/tables.ts @@ -1,10 +1,10 @@ import { PaginationState, SortingState } from '@tanstack/react-table' import { INITIAL_TABLES } from 'constants/tables' -import { Order_By as OrderBy } from 'gql/graphql' import { snakeCase } from 'lodash' import { useCallback, useMemo } from 'react' import { Filters, Table, TableSettingsTabs } from 'types/table' import { bigIntDeserializer, bigIntSerializer } from 'utils/number' +import { sortBy, sortByAggregate } from 'utils/table' import { create } from 'zustand' import { createJSONStorage, persist } from 'zustand/middleware' @@ -219,7 +219,7 @@ export const usePersistentTableStates = create()( }), { name: 'table-storage', - version: 9, + version: 10, storage: createJSONStorage(() => localStorage), serialize: (state) => JSON.stringify(state, bigIntSerializer), deserialize: (str) => JSON.parse(str, bigIntDeserializer), @@ -275,13 +275,10 @@ export const useTableSettings = (table: TableName) => { const resetSettings = usePersistentTableStates((state) => state.resetSettings) const _showReset = usePersistentTableStates((state) => state.showReset) - const orderBy = useMemo( - () => - sorting[0].id.endsWith('aggregate') - ? { [sorting[0].id]: sorting[0].desc ? { count: OrderBy.Desc } : { count: OrderBy.Asc } } - : { [sorting[0].id]: sorting[0].desc ? OrderBy.Desc : OrderBy.Asc }, - [sorting], - ) + const orderBy = useMemo(() => { + if (!sorting || sorting.length === 0) return sortBy(INITIAL_TABLES[table].sorting) + return sorting[0].id.endsWith('aggregate') ? sortByAggregate(sorting) : sortBy(sorting) + }, [sorting, table]) const whereForSearch = useMemo( () => diff --git a/explorer/src/types/jwt.ts b/explorer/src/types/jwt.ts index 2798c51e2..11a6dac48 100644 --- a/explorer/src/types/jwt.ts +++ b/explorer/src/types/jwt.ts @@ -3,9 +3,12 @@ export type SubspaceToken = { message: string signature: string vcs: { - farmer: boolean - operator: boolean - nominator: boolean + mainnetFarmer: boolean + mainnetOperator: boolean + mainnetNominator: boolean + taurusFarmer: boolean + taurusOperator: boolean + taurusNominator: boolean } disbursements?: { stakeWars2: boolean @@ -18,9 +21,12 @@ export type DiscordToken = { vcs: { member: boolean roles: { - farmer: boolean - operator: boolean - nominator: boolean + mainnetFarmer: boolean + mainnetOperator: boolean + mainnetNominator: boolean + taurusFarmer: boolean + taurusOperator: boolean + taurusNominator: boolean } } } diff --git a/explorer/src/utils/auth/providers/discord.ts b/explorer/src/utils/auth/providers/discord.ts index 23a915a3d..45cfcabea 100644 --- a/explorer/src/utils/auth/providers/discord.ts +++ b/explorer/src/utils/auth/providers/discord.ts @@ -6,13 +6,19 @@ import DiscordProvider from 'next-auth/providers/discord' import { findUserByID, saveUser, updateUser } from 'utils/fauna' import { getUserRoles, - giveDiscordFarmerRole, - giveDiscordNominatorRole, - giveDiscordOperatorRole, - verifyDiscordFarmerRole, + giveMainnetDiscordFarmerRole, + giveMainnetDiscordNominatorRole, + giveMainnetDiscordOperatorRole, + giveTaurusDiscordFarmerRole, + giveTaurusDiscordNominatorRole, + giveTaurusDiscordOperatorRole, verifyDiscordGuildMember, - verifyDiscordNominatorRole, - verifyDiscordOperatorRole, + verifyMainnetDiscordFarmerRole, + verifyMainnetDiscordNominatorRole, + verifyMainnetDiscordOperatorRole, + verifyTaurusDiscordFarmerRole, + verifyTaurusDiscordNominatorRole, + verifyTaurusDiscordOperatorRole, } from '../vcs/discord' import { verifyToken } from '../verifyToken' @@ -37,9 +43,12 @@ export const Discord = () => { const member = await verifyDiscordGuildMember(token.access_token) const roles = await getUserRoles(token.access_token) - let farmer = await verifyDiscordFarmerRole(roles) - let operator = await verifyDiscordOperatorRole(roles) - let nominator = await verifyDiscordNominatorRole(roles) + let mainnetFarmer = await verifyMainnetDiscordFarmerRole(roles) + let mainnetOperator = await verifyMainnetDiscordOperatorRole(roles) + let mainnetNominator = await verifyMainnetDiscordNominatorRole(roles) + let taurusFarmer = await verifyTaurusDiscordFarmerRole(roles) + let taurusOperator = await verifyTaurusDiscordOperatorRole(roles) + let taurusNominator = await verifyTaurusDiscordNominatorRole(roles) let newRolesAdded = false const savedUser = await findUserByID(did) @@ -47,23 +56,38 @@ export const Discord = () => { if (savedUser && savedUser[0].data.discord?.id !== profile.id) throw new Error('Discord ID does not match') - if (session.subspace?.vcs.farmer && !farmer) { - await giveDiscordFarmerRole(profile.id) + if (session.subspace?.vcs.mainnetFarmer && !mainnetFarmer) { + await giveMainnetDiscordFarmerRole(profile.id) newRolesAdded = true } - if (session.subspace?.vcs.operator && !operator) { - await giveDiscordOperatorRole(profile.id) + if (session.subspace?.vcs.mainnetOperator && !mainnetOperator) { + await giveMainnetDiscordOperatorRole(profile.id) newRolesAdded = true } - if (session.subspace?.vcs.nominator && !nominator) { - await giveDiscordNominatorRole(profile.id) + if (session.subspace?.vcs.mainnetNominator && !mainnetNominator) { + await giveMainnetDiscordNominatorRole(profile.id) + newRolesAdded = true + } + if (session.subspace?.vcs.taurusFarmer && !taurusFarmer) { + await giveTaurusDiscordFarmerRole(profile.id) + newRolesAdded = true + } + if (session.subspace?.vcs.taurusOperator && !taurusOperator) { + await giveTaurusDiscordOperatorRole(profile.id) + newRolesAdded = true + } + if (session.subspace?.vcs.taurusNominator && !taurusNominator) { + await giveTaurusDiscordNominatorRole(profile.id) newRolesAdded = true } if (newRolesAdded) { const newRoles = await getUserRoles(token.access_token) - farmer = await verifyDiscordFarmerRole(newRoles) - operator = await verifyDiscordOperatorRole(newRoles) - nominator = await verifyDiscordNominatorRole(newRoles) + mainnetFarmer = await verifyMainnetDiscordFarmerRole(newRoles) + mainnetOperator = await verifyMainnetDiscordOperatorRole(newRoles) + mainnetNominator = await verifyMainnetDiscordNominatorRole(newRoles) + taurusFarmer = await verifyTaurusDiscordFarmerRole(newRoles) + taurusOperator = await verifyTaurusDiscordOperatorRole(newRoles) + taurusNominator = await verifyTaurusDiscordNominatorRole(newRoles) } const user: User = { @@ -76,9 +100,12 @@ export const Discord = () => { vcs: { member, roles: { - farmer, - operator, - nominator, + mainnetFarmer, + mainnetOperator, + mainnetNominator, + taurusFarmer, + taurusOperator, + taurusNominator, }, }, }, diff --git a/explorer/src/utils/auth/providers/subspace.ts b/explorer/src/utils/auth/providers/subspace.ts index dd61389ac..b4d029463 100644 --- a/explorer/src/utils/auth/providers/subspace.ts +++ b/explorer/src/utils/auth/providers/subspace.ts @@ -4,7 +4,10 @@ import { User } from 'next-auth' import type { Provider } from 'next-auth/providers' import CredentialsProvider from 'next-auth/providers/credentials' import { findUserByID, saveUser, updateUser } from 'utils/fauna' -import { verifySubspaceAccountRoles } from '../vcs/subspace' +import { + verifySubspaceMainnetAccountRoles, + verifySubspaceTaurusAccountRoles, +} from '../vcs/subspace' export const Subspace = () => { return CredentialsProvider({ @@ -35,8 +38,19 @@ export const Subspace = () => { const did = `did:subspace:${account}` - // Verify Subspace VCs - const { farmer, operator, nominator } = await verifySubspaceAccountRoles(account) + // Verify Subspace VCs for mainnet + const { + farmer: mainnetFarmer, + operator: mainnetOperator, + nominator: mainnetNominator, + } = await verifySubspaceMainnetAccountRoles(account) + + // Verify Subspace VCs for testnet + const { + farmer: taurusFarmer, + operator: taurusOperator, + nominator: taurusNominator, + } = await verifySubspaceTaurusAccountRoles(account) const savedUser = await findUserByID(did) @@ -49,9 +63,12 @@ export const Subspace = () => { message, signature, vcs: { - farmer, - operator, - nominator, + mainnetFarmer, + mainnetOperator, + mainnetNominator, + taurusFarmer, + taurusOperator, + taurusNominator, }, }, discord: DEFAULT_DISCORD_TOKEN, diff --git a/explorer/src/utils/auth/vcs/discord/index.ts b/explorer/src/utils/auth/vcs/discord/index.ts index 20db1f7a4..07f20ebf2 100644 --- a/explorer/src/utils/auth/vcs/discord/index.ts +++ b/explorer/src/utils/auth/vcs/discord/index.ts @@ -1,16 +1,37 @@ import { verifyDiscordGuildMember } from './member' -import { giveDiscordFarmerRole, verifyDiscordFarmerRole } from './role-farmer' -import { giveDiscordNominatorRole, verifyDiscordNominatorRole } from './role-nominator' -import { giveDiscordOperatorRole, verifyDiscordOperatorRole } from './role-operator' +import { + giveMainnetDiscordFarmerRole, + giveTaurusDiscordFarmerRole, + verifyMainnetDiscordFarmerRole, + verifyTaurusDiscordFarmerRole, +} from './role-farmer' +import { + giveMainnetDiscordNominatorRole, + giveTaurusDiscordNominatorRole, + verifyMainnetDiscordNominatorRole, + verifyTaurusDiscordNominatorRole, +} from './role-nominator' +import { + giveMainnetDiscordOperatorRole, + giveTaurusDiscordOperatorRole, + verifyMainnetDiscordOperatorRole, + verifyTaurusDiscordOperatorRole, +} from './role-operator' import { getUserRoles } from './utils' export { getUserRoles, - giveDiscordFarmerRole, - giveDiscordNominatorRole, - giveDiscordOperatorRole, - verifyDiscordFarmerRole, + giveMainnetDiscordFarmerRole, + giveMainnetDiscordNominatorRole, + giveMainnetDiscordOperatorRole, + giveTaurusDiscordFarmerRole, + giveTaurusDiscordNominatorRole, + giveTaurusDiscordOperatorRole, verifyDiscordGuildMember, - verifyDiscordNominatorRole, - verifyDiscordOperatorRole, + verifyMainnetDiscordFarmerRole, + verifyMainnetDiscordNominatorRole, + verifyMainnetDiscordOperatorRole, + verifyTaurusDiscordFarmerRole, + verifyTaurusDiscordNominatorRole, + verifyTaurusDiscordOperatorRole, } diff --git a/explorer/src/utils/auth/vcs/discord/role-farmer.ts b/explorer/src/utils/auth/vcs/discord/role-farmer.ts index cc87103a7..7d1e62563 100644 --- a/explorer/src/utils/auth/vcs/discord/role-farmer.ts +++ b/explorer/src/utils/auth/vcs/discord/role-farmer.ts @@ -1,19 +1,45 @@ import { giveDiscordRole } from './utils' -export const verifyDiscordFarmerRole = async (roles: string[]) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_FARMER) +export const verifyMainnetDiscordFarmerRole = async (roles: string[]) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_FARMER) throw new Error('No Discord guild role ID for farmer') - const { DISCORD_GUILD_ROLE_ID_FARMER } = process.env + const { MAINNET_DISCORD_GUILD_ROLE_ID_FARMER } = process.env // Check if the user has the farmer role - return roles.includes(DISCORD_GUILD_ROLE_ID_FARMER) + return roles.includes(MAINNET_DISCORD_GUILD_ROLE_ID_FARMER) } -export const giveDiscordFarmerRole = async (userId: string) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_FARMER) +export const verifyTaurusDiscordFarmerRole = async (roles: string[]) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_FARMER) throw new Error('No Discord guild role ID for farmer') - const { DISCORD_GUILD_ROLE_ID_FARMER } = process.env + const { TAURUS_DISCORD_GUILD_ROLE_ID_FARMER } = process.env + + // Check if the user has the farmer role + return roles.includes(TAURUS_DISCORD_GUILD_ROLE_ID_FARMER) +} + +export const giveMainnetDiscordFarmerRole = async (userId: string) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_FARMER) + throw new Error('No Discord guild role ID for farmer') + const { MAINNET_DISCORD_GUILD_ROLE_ID_FARMER } = process.env + + // Add the farmer role to the user + await giveDiscordRole( + userId, + MAINNET_DISCORD_GUILD_ROLE_ID_FARMER, + 'Give the user the farmer role', + ) +} + +export const giveTaurusDiscordFarmerRole = async (userId: string) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_FARMER) + throw new Error('No Discord guild role ID for farmer') + const { TAURUS_DISCORD_GUILD_ROLE_ID_FARMER } = process.env // Add the farmer role to the user - await giveDiscordRole(userId, DISCORD_GUILD_ROLE_ID_FARMER, 'Give the user the farmer role') + await giveDiscordRole( + userId, + TAURUS_DISCORD_GUILD_ROLE_ID_FARMER, + 'Give the user the farmer role', + ) } diff --git a/explorer/src/utils/auth/vcs/discord/role-nominator.ts b/explorer/src/utils/auth/vcs/discord/role-nominator.ts index 85e18ca62..aff6fbcaa 100644 --- a/explorer/src/utils/auth/vcs/discord/role-nominator.ts +++ b/explorer/src/utils/auth/vcs/discord/role-nominator.ts @@ -1,19 +1,45 @@ import { giveDiscordRole } from './utils' -export const verifyDiscordNominatorRole = async (roles: string[]) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_NOMINATOR) +export const verifyMainnetDiscordNominatorRole = async (roles: string[]) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR) throw new Error('No Discord guild role ID for nominator') - const { DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env + const { MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env // Check if the user has the nominator role - return roles.includes(DISCORD_GUILD_ROLE_ID_NOMINATOR) + return roles.includes(MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR) } -export const giveDiscordNominatorRole = async (userId: string) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_NOMINATOR) +export const verifyTaurusDiscordNominatorRole = async (roles: string[]) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR) throw new Error('No Discord guild role ID for nominator') - const { DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env + const { TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env + + // Check if the user has the nominator role + return roles.includes(TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR) +} + +export const giveMainnetDiscordNominatorRole = async (userId: string) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR) + throw new Error('No Discord guild role ID for nominator') + const { MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env + + // Add the nominator role to the user + await giveDiscordRole( + userId, + MAINNET_DISCORD_GUILD_ROLE_ID_NOMINATOR, + 'Give the user the nominator role', + ) +} + +export const giveTaurusDiscordNominatorRole = async (userId: string) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR) + throw new Error('No Discord guild role ID for nominator') + const { TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR } = process.env // Add the nominator role to the user - await giveDiscordRole(userId, DISCORD_GUILD_ROLE_ID_NOMINATOR, 'Give the user the nominator role') + await giveDiscordRole( + userId, + TAURUS_DISCORD_GUILD_ROLE_ID_NOMINATOR, + 'Give the user the nominator role', + ) } diff --git a/explorer/src/utils/auth/vcs/discord/role-operator.ts b/explorer/src/utils/auth/vcs/discord/role-operator.ts index 09122e697..2c82fd5b8 100644 --- a/explorer/src/utils/auth/vcs/discord/role-operator.ts +++ b/explorer/src/utils/auth/vcs/discord/role-operator.ts @@ -1,19 +1,45 @@ import { giveDiscordRole } from './utils' -export const verifyDiscordOperatorRole = async (roles: string[]) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_OPERATOR) +export const verifyMainnetDiscordOperatorRole = async (roles: string[]) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR) throw new Error('No Discord guild role ID for operator') - const { DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env + const { MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env // Check if the user has the operator role - return roles.includes(DISCORD_GUILD_ROLE_ID_OPERATOR) + return roles.includes(MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR) } -export const giveDiscordOperatorRole = async (userId: string) => { - if (!process.env.DISCORD_GUILD_ROLE_ID_OPERATOR) +export const verifyTaurusDiscordOperatorRole = async (roles: string[]) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR) throw new Error('No Discord guild role ID for operator') - const { DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env + const { TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env + + // Check if the user has the operator role + return roles.includes(TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR) +} + +export const giveMainnetDiscordOperatorRole = async (userId: string) => { + if (!process.env.MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR) + throw new Error('No Discord guild role ID for operator') + const { MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env + + // Add the operator role to the user + await giveDiscordRole( + userId, + MAINNET_DISCORD_GUILD_ROLE_ID_OPERATOR, + 'Give the user the operator role', + ) +} + +export const giveTaurusDiscordOperatorRole = async (userId: string) => { + if (!process.env.TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR) + throw new Error('No Discord guild role ID for operator') + const { TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR } = process.env // Add the operator role to the user - await giveDiscordRole(userId, DISCORD_GUILD_ROLE_ID_OPERATOR, 'Give the user the operator role') + await giveDiscordRole( + userId, + TAURUS_DISCORD_GUILD_ROLE_ID_OPERATOR, + 'Give the user the operator role', + ) } diff --git a/explorer/src/utils/auth/vcs/subspace/index.ts b/explorer/src/utils/auth/vcs/subspace/index.ts index 6efb73473..8dba3d654 100644 --- a/explorer/src/utils/auth/vcs/subspace/index.ts +++ b/explorer/src/utils/auth/vcs/subspace/index.ts @@ -1,13 +1,21 @@ +import { NetworkId } from '@autonomys/auto-utils' import { CheckRoleDocument } from 'gql/graphql' import { queryGraphqlServer } from 'utils/queryGraphqlServer' -export const verifySubspaceAccountRoles = async (subspaceAccount: string) => { +const verifySubspaceAccountRolesForNetwork = async ( + subspaceAccount: string, + network: NetworkId, +) => { try { if (!CheckRoleDocument.loc) throw new Error('No query') - const data = await queryGraphqlServer(CheckRoleDocument.loc.source.body, { - subspaceAccount, - }) + const data = await queryGraphqlServer( + CheckRoleDocument.loc.source.body, + { + subspaceAccount, + }, + network, + ) return { farmer: data.farmer.length > 0, @@ -19,3 +27,9 @@ export const verifySubspaceAccountRoles = async (subspaceAccount: string) => { throw new Error('Failed to fetch if user has any related events') } } + +export const verifySubspaceMainnetAccountRoles = async (subspaceAccount: string) => + verifySubspaceAccountRolesForNetwork(subspaceAccount, NetworkId.MAINNET) + +export const verifySubspaceTaurusAccountRoles = async (subspaceAccount: string) => + verifySubspaceAccountRolesForNetwork(subspaceAccount, NetworkId.TAURUS) diff --git a/explorer/src/utils/number.ts b/explorer/src/utils/number.ts index f49d471a8..6890bb2d8 100644 --- a/explorer/src/utils/number.ts +++ b/explorer/src/utils/number.ts @@ -104,3 +104,32 @@ export const bigIntDeserializer = (key: string, value: string | unknown): bigint typeof value === 'string' && /^\d+n$/.test(value as string) ? BigInt(value.toString().slice(0, -1)) : value + +export const safeDivide = (numerator: number, denominator: number): number => { + if (numerator === 0 || denominator === 0) { + return 0 + } + return numerator / denominator +} + +export const formatNumberWithUnit = (value: number): { value: number; unit: string } => { + let unit = '' + let formattedValue: number = value + + switch (true) { + case value >= 1_000_000_000: + formattedValue = parseFloat((value / 1_000_000_000).toFixed(2)) + unit = 'B' + break + case value >= 1_000_000: + formattedValue = parseFloat((value / 1_000_000).toFixed(2)) + unit = 'M' + break + case value >= 1_000: + formattedValue = parseFloat((value / 1_000).toFixed(2)) + unit = 'K' + break + } + + return { value: formattedValue, unit } +} diff --git a/explorer/src/utils/table.ts b/explorer/src/utils/table.ts index 2f5e1d8e2..eace8f289 100644 --- a/explorer/src/utils/table.ts +++ b/explorer/src/utils/table.ts @@ -1,5 +1,6 @@ -import { ColumnDef } from '@tanstack/react-table' +import { ColumnDef, SortingState } from '@tanstack/react-table' import { AVAILABLE_COLUMNS } from 'constants/tables' +import { Order_By as OrderBy } from 'gql/graphql' import type { Cell } from 'types/table' import { camelToSnake } from './string' @@ -33,3 +34,10 @@ export const getTableColumns = ( ): ColumnDef[] => { return columns.map((c) => getTableColumn(table, c, cells[c], headers?.[c], enableSorting?.[c])) } + +export const sortBy = (sorting: SortingState) => + Object.fromEntries(sorting.map((sort) => [sort.id, sort.desc ? OrderBy.Desc : OrderBy.Asc])) + +export const sortByAggregate = (sorting: SortingState) => ({ + [sorting[0].id]: { count: sorting[0].desc ? OrderBy.Desc : OrderBy.Asc }, +}) diff --git a/explorer/tailwind.config.ts b/explorer/tailwind.config.ts index e11364fa1..a7469ed69 100644 --- a/explorer/tailwind.config.ts +++ b/explorer/tailwind.config.ts @@ -233,7 +233,7 @@ const config: Config = { fontWeight: '300', }, h2: { - fontFamily: 'var(--font-roboto-serif), serif', + fontFamily: 'var(--font-libre-franklin), sans-serif', fontSize: '2.938rem', lineHeight: '120%', letterSpacing: '-0.02em', diff --git a/explorer/yarn.lock b/explorer/yarn.lock index ff48e0e3c..3654adde2 100644 --- a/explorer/yarn.lock +++ b/explorer/yarn.lock @@ -103,17 +103,17 @@ dependencies: node-fetch "^2.6.1" -"@autonomys/auto-consensus@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-consensus/-/auto-consensus-1.2.5.tgz#d5d8607e2a06b950f46c25ad09f8e444a84278e2" - integrity sha512-b4e2LeR0ZduHWQltZNVNxQX/b295vFM04kt7GpYWgOcTCsAw5FBHaqkjm46nxyScbHDKyd5GpdD1D+bm/Ec/eQ== +"@autonomys/auto-consensus@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-consensus/-/auto-consensus-1.3.1.tgz#f52321f0584d50bb53a6c09b674cc27b8223f18e" + integrity sha512-28eP+aqLbwsMw4lOFUxPpIpZ9a0p7FqyrC27lHN8SUhaZ6KmDTK0BT7tIjb60QVzyzprZk7KEUvHfi77TNp6Yg== dependencies: - "@autonomys/auto-utils" "^1.2.5" + "@autonomys/auto-utils" "^1.3.1" -"@autonomys/auto-dag-data@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-dag-data/-/auto-dag-data-1.2.5.tgz#41319d1d6734fc99fb16d800f058697c341d6e84" - integrity sha512-AMS5LvdBf4ahSBH06MaApLJPjZcCAhMcouxuBhIwuuBF5ufyePcGQQuy9a7QvFJ0bis0TfTutjGZKZqfnyjRYA== +"@autonomys/auto-dag-data@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-dag-data/-/auto-dag-data-1.3.1.tgz#1af9bfddf3e873d8fd01f3385487ec7113669a3e" + integrity sha512-s7xmmLGHm//i4jF7jUz7pQFu39nk8uGUAqYrJbYK84lisIwHK03ESWm5aRJGNDyeWFFk49+BoxyJ14TEGr5JFQ== dependencies: "@ipld/dag-pb" "^4.1.2" "@peculiar/webcrypto" "^1.5.0" @@ -126,22 +126,23 @@ protons "^7.6.0" protons-runtime "^5.5.0" -"@autonomys/auto-drive@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-drive/-/auto-drive-1.2.5.tgz#ece128313b44e0a559da7ee6c0a5668521aa5157" - integrity sha512-uerlG4817HtVsFX2sH0cX66hAMVNoJ7hwv8ZjWY9wsILJ/fffQOqx1mhZB8uF6vpzKCFLa3HYwa09X/CxhEHbg== +"@autonomys/auto-drive@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-drive/-/auto-drive-1.3.1.tgz#08d7d9c8e46cd473bbc3102e77d700d6f0854eb2" + integrity sha512-HhUDfYReou7mf13PP4MeyyvI1gaisSB6mrsW/JPAghj8S9Edftcl4yTLmjlibiKIbcGylYD292PnXmKfR2Hv0A== dependencies: - "@autonomys/auto-dag-data" "^1.2.5" + "@autonomys/auto-dag-data" "^1.3.1" + "@autonomys/auto-utils" "^1.3.1" jszip "^3.10.1" mime-types "^2.1.35" process "^0.11.10" stream "^0.0.3" zod "^3.23.8" -"@autonomys/auto-utils@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-utils/-/auto-utils-1.2.5.tgz#81b6694de1dc141cf9f05fe436e4c35fe823ff62" - integrity sha512-LuG8POLzQ+Q9HiQK4jM5KYnxuKKJFFygERX/oQqS+CvMxxQL9zBYkoBti8jAw9HhC8QOExkTJD4/NcjKbl/QuQ== +"@autonomys/auto-utils@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-utils/-/auto-utils-1.3.1.tgz#72c5a2500dcc6f2f8262d842246a81cc6252a0f4" + integrity sha512-9PwOmHtm8c/wLDipyyi+v3rJM1UVFQsrGIyf7er+mGjZpN5ToLbSE6okf6wjCz3FV/M+yr0YmO3AC5EFQB8ZVw== dependencies: "@polkadot/api" "^14.3.1" "@polkadot/extension-dapp" "^0.56.2" diff --git a/health-check/.dockerignore b/health-check/.dockerignore deleted file mode 100644 index 124b192ca..000000000 --- a/health-check/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -## Ignore all files -* -## Do not ignore -!src/ -!package.json -!package-lock.json -!tsconfig.json -!entrypoint.sh diff --git a/health-check/.env b/health-check/.env deleted file mode 100644 index 8e1cbebaa..000000000 --- a/health-check/.env +++ /dev/null @@ -1,5 +0,0 @@ -PROMETHEUS_HOST: localhost -PORT: 3000 -POSTGRES_HOST: localhost -POSTGRES_PORT: 5432 -SECRET: diff --git a/health-check/.eslintignore b/health-check/.eslintignore deleted file mode 100644 index 7aebd30c6..000000000 --- a/health-check/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -dist -.nyc_output diff --git a/health-check/.eslintrc b/health-check/.eslintrc deleted file mode 100644 index 0baa0c8b4..000000000 --- a/health-check/.eslintrc +++ /dev/null @@ -1,38 +0,0 @@ -{ - "root": true, - "env": { - "es2021": true, - "node": true - }, - "plugins": [ - "eslint-plugin", - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "overrides": [ - { - "files": [ - "*.ts", - "*.tsx" - ], - "parserOptions": { - "project": [ - "**/tsconfig.json" - ] - } - } - ], - "parser": "@typescript-eslint/parser", - "rules": { - "@typescript-eslint/prefer-readonly": [ - 1, - { - "onlyInlineLambdas": true - } - ] - } -} diff --git a/health-check/.gitignore b/health-check/.gitignore deleted file mode 100644 index 7aebd30c6..000000000 --- a/health-check/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -dist -.nyc_output diff --git a/health-check/Dockerfile b/health-check/Dockerfile deleted file mode 100644 index 66038bad7..000000000 --- a/health-check/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# Install dependencies -FROM node:16 as dependencies - -WORKDIR /app - -COPY package.json package.json -COPY package-lock.json package-lock.json - -RUN npm ci - -# Prune dependencies -FROM dependencies as prune - -RUN npm prune --production - -# Build -FROM dependencies as build - -COPY tsconfig.json tsconfig.json -COPY src src - -RUN npm run build - -# Release -FROM node:16 - -# Install PostgreSQL client tools to be able to call pg_isready -RUN apt-get update && apt-get install -y postgresql-client - -COPY --from=prune /app/node_modules /node_modules -COPY --from=build /app/dist /dist -COPY entrypoint.sh /entrypoint.sh - -USER nobody:nogroup - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/health-check/README.md b/health-check/README.md deleted file mode 100644 index d30ebd180..000000000 --- a/health-check/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Health Check - -[Astral](../README.md) - -Utility to check health status of an internal service and expose it as a REST API endpoint. Currently supports following services: - -- Postgres -- Services using Prometheus metrics: - - `ingest` (Archive) - - `processor` (Squid) - -## Available scripts - -- `prometheus` - start health check server for a service using Prometheus metrics -- `pg` - start health check server for `pg` service -- `build` - transpile TypeScript to ES6 -- `lint` - check codebase using ESLint - -## Running as Docker container - -Example `docker-compose.yml` including `health-check` services for Postgres and service with Prometheus: - -```yml -version: "3.7" - -services: - pg-health-check: - image: ghcr.io/autonomys/health-check:latest - environment: - POSTGRES_HOST: db - POSTGRES_PORT: 5432 - PORT: 8080 - # provide secret, which is going to be used in 'Authorization' header - SECRET: MY_SECRET - command: "postgres" - ports: - - 8080:8080 - - prom-health-check: - image: ghcr.io/autonomys/health-check:latest - environment: - # assuming we're running `ingest` service within same docker-compose.yml - PROMETHEUS_HOST: http://ingest:9090 - PORT: 7070 - # provide secret, which is going to be used in 'Authorization' header - SECRET: MY_SECRET - command: "prometheus" - ports: - - 7070:7070 -``` diff --git a/health-check/entrypoint.sh b/health-check/entrypoint.sh deleted file mode 100755 index 6c59be512..000000000 --- a/health-check/entrypoint.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -if [ "$1" = "postgres" ]; then - echo "Starting Postgres health check" - node dist/pg.js -elif [ "$1" = "prometheus" ]; then - echo "Starting health check for a service with Prometheus" - node dist/prometheus.js -else - echo "You have to specify type of service: 'pg' or 'prometheus'" -fi diff --git a/health-check/package-lock.json b/health-check/package-lock.json deleted file mode 100644 index a04265030..000000000 --- a/health-check/package-lock.json +++ /dev/null @@ -1,2841 +0,0 @@ -{ - "name": "health-check", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "health-check", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "dotenv": "^16.0.3", - "prom-client": "^14.2.0", - "undici": "^5.21.0" - }, - "devDependencies": { - "@types/node": "^18.14.0", - "@typescript-eslint/eslint-plugin": "^5.53.0", - "@typescript-eslint/parser": "^5.53.0", - "eslint": "^8.34.0", - "eslint-plugin-eslint-plugin": "^5.0.8", - "typescript": "^4.9.5" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "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, - "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, - "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, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.14.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", - "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz", - "integrity": "sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/type-utils": "5.53.0", - "@typescript-eslint/utils": "5.53.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz", - "integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/typescript-estree": "5.53.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz", - "integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/visitor-keys": "5.53.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz", - "integrity": "sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.53.0", - "@typescript-eslint/utils": "5.53.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz", - "integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz", - "integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/visitor-keys": "5.53.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.53.0.tgz", - "integrity": "sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/typescript-estree": "5.53.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz", - "integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.53.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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 - }, - "node_modules/bintrees": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", - "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "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, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "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, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", - "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-eslint-plugin": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-5.0.8.tgz", - "integrity": "sha512-bxPMZ3L/+5YypErWQMKUI9XdkLpgqOOO0CgbtHjk5Zxzcg4EVsWYPy8duvGSLxSyR60LBIoXNzVMueEZ3/j0AQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^3.0.0", - "estraverse": "^5.3.0" - }, - "engines": { - "node": "^14.17.0 || ^16.0.0 || >= 18.0.0" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "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, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-scope/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "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, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "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, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "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, - "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 - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.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, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "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 - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "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 - }, - "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, - "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, - "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, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/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 - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "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, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "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, - "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, - "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, - "engines": { - "node": ">=8" - } - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prom-client": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-14.2.0.tgz", - "integrity": "sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==", - "dependencies": { - "tdigest": "^0.1.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "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" - } - ] - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "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, - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tdigest": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", - "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", - "dependencies": { - "bintrees": "1.0.2" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "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, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/undici": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", - "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", - "dependencies": { - "busboy": "^1.6.0" - }, - "engines": { - "node": ">=12.18" - } - }, - "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, - "dependencies": { - "punycode": "^2.1.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, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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 - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "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" - } - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/node": { - "version": "18.14.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", - "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==", - "dev": true - }, - "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz", - "integrity": "sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/type-utils": "5.53.0", - "@typescript-eslint/utils": "5.53.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz", - "integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/typescript-estree": "5.53.0", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz", - "integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/visitor-keys": "5.53.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz", - "integrity": "sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "5.53.0", - "@typescript-eslint/utils": "5.53.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz", - "integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz", - "integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/visitor-keys": "5.53.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.53.0.tgz", - "integrity": "sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.53.0", - "@typescript-eslint/types": "5.53.0", - "@typescript-eslint/typescript-estree": "5.53.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz", - "integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.53.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "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" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "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 - }, - "bintrees": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", - "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" - }, - "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" - } - }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "requires": { - "streamsearch": "^1.1.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "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": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "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" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", - "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "dependencies": { - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - } - } - }, - "eslint-plugin-eslint-plugin": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-5.0.8.tgz", - "integrity": "sha512-bxPMZ3L/+5YypErWQMKUI9XdkLpgqOOO0CgbtHjk5Zxzcg4EVsWYPy8duvGSLxSyR60LBIoXNzVMueEZ3/j0AQ==", - "dev": true, - "requires": { - "eslint-utils": "^3.0.0", - "estraverse": "^5.3.0" - } - }, - "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" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "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" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "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.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "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 - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "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" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "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 - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "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" - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "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" - } - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "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 - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "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 - }, - "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-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "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 - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "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 - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "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" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "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-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 - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prom-client": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-14.2.0.tgz", - "integrity": "sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==", - "requires": { - "tdigest": "^0.1.1" - } - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - }, - "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 - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "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" - } - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "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 - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "tdigest": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", - "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", - "requires": { - "bintrees": "1.0.2" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "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" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - }, - "undici": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", - "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==", - "requires": { - "busboy": "^1.6.0" - } - }, - "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" - } - }, - "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" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "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 - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/health-check/package.json b/health-check/package.json deleted file mode 100644 index 95fa240df..000000000 --- a/health-check/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "health-check", - "version": "1.0.0", - "description": "", - "exports": { - "pg": "./dist/pg.js", - "prometheus": "./dist/prometheus.js" - }, - "scripts": { - "prometheus": "node dist/prometheus.js", - "pg": "node dist/pg.js", - "build": "rm -rf dist && tsc", - "lint": "eslint . --ext .ts" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "dotenv": "^16.0.3", - "prom-client": "^14.2.0", - "undici": "^5.21.0" - }, - "devDependencies": { - "@types/node": "^18.14.0", - "@typescript-eslint/eslint-plugin": "^5.53.0", - "@typescript-eslint/parser": "^5.53.0", - "eslint": "^8.34.0", - "eslint-plugin-eslint-plugin": "^5.0.8", - "typescript": "^4.9.5" - } -} diff --git a/health-check/src/pg.ts b/health-check/src/pg.ts deleted file mode 100644 index 6dbd25da4..000000000 --- a/health-check/src/pg.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ServerResponse, createServer } from 'http'; -import * as dotenv from 'dotenv'; -import { exec } from 'child_process'; -import { secureCompare } from './utils'; - -dotenv.config(); - -function checkIsPostgresReady() { - const command = `pg_isready -h ${process.env.POSTGRES_HOST} -p ${process.env.POSTGRES_PORT}`; - return new Promise((resolve, reject) => { - exec(command, (err, stdout) => { - if (err) { - reject(err); - return; - } - const ready = stdout.includes('accepting connections'); - resolve(ready); - }); - }); -} - -async function checkPostgresHealth(res: ServerResponse) { - try { - const isReady = await checkIsPostgresReady(); - - if (isReady) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('OK'); - } else { - res.writeHead(500, { 'Content-Type': 'text/plain' }); - res.end('Internal Server Error'); - } - } catch (error) { - console.error(error); - res.writeHead(500, { 'Content-Type': 'text/plain' }); - res.end('Internal Server Error'); - } -} - -const server = createServer(async (req, res) => { - const authHeader = req.headers.authorization; - - if (authHeader && authHeader.startsWith('Bearer ')) { - const token = authHeader.split('Bearer ')[1]; - const isTokenValid = secureCompare(token, process.env.SECRET); - - if (isTokenValid) { - if (req.url === '/health') { - await checkPostgresHealth(res); - } else { - res.writeHead(404, { 'Content-Type': 'text/plain' }); - res.end('Not Found'); - } - } else { - res.writeHead(401, { 'Content-Type': 'text/plain' }); - res.end('Unauthorized'); - } - } else { - res.writeHead(401, { 'Content-Type': 'text/plain' }); - res.end('Unauthorized'); - } -}); - -const port = process.env.PORT; - -server.listen(port, () => { - console.log(`Postgres health check server running at http://localhost:${port}/`); -}); diff --git a/health-check/src/prometheus.ts b/health-check/src/prometheus.ts deleted file mode 100644 index 217142f9c..000000000 --- a/health-check/src/prometheus.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { ServerResponse, createServer } from 'http'; -import { register, Gauge, collectDefaultMetrics } from 'prom-client'; -import * as dotenv from 'dotenv'; -import { request } from 'undici'; -import { secureCompare } from './utils'; - -dotenv.config(); - -const serviceHealth = new Gauge({ - name: 'service_health', - help: 'Health status of a service using Prometheus metrics', -}); - -const prometheusUrl = `${process.env.PROMETHEUS_HOST}/metrics`; - -let lastProcessedBlock = 0; - -async function updateHealth() { - try { - const response = await request(prometheusUrl); - const text = await response.body.text(); - // Regex for services: - // `ingest`: sqd_last_block - // `processor`: sqd_processor_last_block - const regex = new RegExp('sqd_(?:last_block|processor_last_block) (\\d+)'); - const match = regex.exec(text); - - // If the regex matches and the block number is greater than the last processed block, set the service health metric to 1 - if (match && lastProcessedBlock < Number(match[1])) { - serviceHealth.set(1); - lastProcessedBlock = Number(match[1]); - } - } catch (error) { - console.error(error); - // If the request fails, set the service health metric to 0 - serviceHealth.set(0); - } -} - -async function checkHealth(res: ServerResponse) { - const isHealthy = (await serviceHealth.get()).values[0].value === 1; - - if (isHealthy) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('OK'); - } else { - res.writeHead(500, { 'Content-Type': 'text/plain' }); - res.end('Internal Server Error'); - } -} - -const server = createServer(async (req, res) => { - const authHeader = req.headers.authorization; - - if (authHeader && authHeader.startsWith('Bearer ')) { - const token = authHeader.split('Bearer ')[1]; - const isTokenValid = secureCompare(token, process.env.SECRET); - - if (isTokenValid) { - if (req.url === '/health') { - await checkHealth(res); - } else { - res.writeHead(404, { 'Content-Type': 'text/plain' }); - res.end('Not Found'); - } - } else { - res.writeHead(401, { 'Content-Type': 'text/plain' }); - res.end('Unauthorized'); - } - } else { - res.writeHead(401, { 'Content-Type': 'text/plain' }); - res.end('Unauthorized'); - } -}); - -register.registerMetric(serviceHealth); -collectDefaultMetrics(); -// check if Ingest service is healthy right now and every 10 seconds -updateHealth(); -setInterval(updateHealth, 10000); - -const port = process.env.PORT; - -server.listen(port, () => { - console.log(`Prometheus service health check server running at http://localhost:${port}/`); -}); diff --git a/health-check/src/utils.ts b/health-check/src/utils.ts deleted file mode 100644 index 8e25ad249..000000000 --- a/health-check/src/utils.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { timingSafeEqual } from 'crypto'; - -export function secureCompare(a: string | undefined, b: string | undefined): boolean { - if (a === undefined || b === undefined) return false; - const bufferA = Buffer.from(a); - const bufferB = Buffer.from(b); - return timingSafeEqual(bufferA, bufferB); -} diff --git a/health-check/tsconfig.json b/health-check/tsconfig.json deleted file mode 100644 index 3e3146aa7..000000000 --- a/health-check/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./dist", - "target": "ES2020", - "moduleResolution": "node", - "module": "commonjs", - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noImplicitReturns": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "resolveJsonModule": true, - }, - "include": [ - "./src/**/*" - ] -} diff --git a/indexers/api/Dockerfile b/indexers/api/Dockerfile index e6f8a9e92..dc55d6f17 100644 --- a/indexers/api/Dockerfile +++ b/indexers/api/Dockerfile @@ -1,13 +1,36 @@ FROM node:18-alpine +# Switch to root user to install packages +USER root + +# Install Python and build tools +RUN apk update && apk add --no-cache python3 make g++ + +# Switch back to the default user +USER node + +# Create app directory WORKDIR /app -COPY package*.json ./ +# Copy the package.json file +COPY package.json ./ +# Install dependencies RUN yarn install +# Bundle app source COPY . . +# Change ownership of the directory to the node user +USER root +RUN chown -R node:node /app + +# Switch back to the default user +USER node + +# Install dependencies +RUN yarn install + RUN yarn build EXPOSE 3000 diff --git a/indexers/consensus/package.json b/indexers/consensus/package.json index 86a0398f0..9ac2cca5b 100644 --- a/indexers/consensus/package.json +++ b/indexers/consensus/package.json @@ -32,9 +32,9 @@ "license": "MIT", "devDependencies": { "@apollo/client": "^3.7.16", - "@autonomys/auto-consensus": "^1.2.5", - "@autonomys/auto-dag-data": "^1.2.5", - "@autonomys/auto-utils": "^1.2.5", + "@autonomys/auto-consensus": "^1.3.1", + "@autonomys/auto-dag-data": "^1.3.1", + "@autonomys/auto-utils": "^1.3.1", "@polkadot/api": "^12.4.2", "@polkadot/types": "^14.1.1", "@polkadot/util": "^13.2.2", diff --git a/indexers/db/docker-entrypoint-initdb.d/init-db.sql b/indexers/db/docker-entrypoint-initdb.d/init-db.sql index 7fc209161..5c329d25c 100644 --- a/indexers/db/docker-entrypoint-initdb.d/init-db.sql +++ b/indexers/db/docker-entrypoint-initdb.d/init-db.sql @@ -1206,6 +1206,7 @@ ALTER TABLE staking.deposit_events OWNER TO postgres; CREATE TABLE staking.deposit_histories ( id text NOT NULL, + domain_id text NOT NULL, account_id text NOT NULL, operator_id text NOT NULL, nominator_id text NOT NULL, @@ -1381,6 +1382,18 @@ CREATE TABLE staking.nominators ( ); ALTER TABLE staking.nominators OWNER TO postgres; +CREATE TABLE staking.operator_deregistrations ( + id text NOT NULL, + owner text NOT NULL, + domain_id text NOT NULL, + block_height numeric NOT NULL, + extrinsic_id text NOT NULL, + event_id text NOT NULL, + _id uuid NOT NULL, + _block_range int8range NOT NULL +); +ALTER TABLE staking.operator_deregistrations OWNER TO postgres; + CREATE TABLE staking.operator_registrations ( id text NOT NULL, sort_id text NOT NULL, @@ -1503,6 +1516,22 @@ CREATE TABLE staking.runtime_creations ( ); ALTER TABLE staking.runtime_creations OWNER TO postgres; +CREATE TABLE staking.unlocked_events ( + id text NOT NULL, + domain_id text NOT NULL, + operator_id text NOT NULL, + account_id text NOT NULL, + nominator_id text NOT NULL, + amount numeric NOT NULL, + storage_fee numeric NOT NULL, + block_height numeric NOT NULL, + extrinsic_id text NOT NULL, + event_id text NOT NULL, + _id uuid NOT NULL, + _block_range int8range NOT NULL +); +ALTER TABLE staking.unlocked_events OWNER TO postgres; + CREATE TABLE staking.withdraw_events ( id text NOT NULL, sort_id text NOT NULL, @@ -1892,6 +1921,9 @@ ALTER TABLE ONLY staking.domains ALTER TABLE ONLY staking.nominators ADD CONSTRAINT nominators_pkey PRIMARY KEY (id); +ALTER TABLE ONLY staking.operator_deregistrations + ADD CONSTRAINT operator_deregistrations_pkey PRIMARY KEY (_id); + ALTER TABLE ONLY staking.operator_registrations ADD CONSTRAINT operator_registrations_pkey PRIMARY KEY (_id); @@ -1910,6 +1942,9 @@ ALTER TABLE ONLY staking.operators ALTER TABLE ONLY staking.runtime_creations ADD CONSTRAINT runtime_creations_pkey PRIMARY KEY (_id); +ALTER TABLE ONLY staking.unlocked_events + ADD CONSTRAINT unlocked_events_pkey PRIMARY KEY (_id); + ALTER TABLE ONLY staking.withdraw_events ADD CONSTRAINT withdraw_events_pkey PRIMARY KEY (_id); @@ -2089,6 +2124,8 @@ CREATE INDEX "0xd5509466634aea27" ON files.chunks USING btree (id); CREATE INDEX "0xd9be8718ef6c7984" ON files.folder_cids USING btree (id); CREATE INDEX "files_folder_cids_parent_cid" ON files.folder_cids USING btree (parent_cid); +CREATE INDEX "0x095f76af1e0896c7" ON staking.unlocked_events USING btree (id); +CREATE INDEX "0x17ee75861ab4beba" ON staking.operator_deregistrations USING btree (id); CREATE INDEX "0x386761c4d1c44502" ON staking.operator_rewards USING btree (id); CREATE INDEX "0x3a7ed99d2776ff11" ON staking.operator_tax_collections USING btree (id); CREATE INDEX "0x59e52a1d9c35dee5" ON staking.domain_block_histories USING btree (id); @@ -2629,12 +2666,12 @@ CREATE OR REPLACE FUNCTION staking.handle_deposit_events() RETURNS TRIGGER BEGIN UPDATE staking.domains SET - total_deposits = staking.domains.total_deposits + NEW.amount + total_deposits = staking.domains.total_deposits::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.domain_id; UPDATE staking.operators SET - total_deposits = staking.operators.total_deposits + NEW.amount + total_deposits = staking.operators.total_deposits::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.operator_id; IF NOT EXISTS ( @@ -2710,8 +2747,8 @@ BEGIN ELSE UPDATE staking.nominators SET - total_deposits = staking.nominators.total_deposits + NEW.amount, - total_deposits_count = staking.nominators.total_deposits_count + 1, + total_deposits = staking.nominators.total_deposits::NUMERIC(78) + NEW.amount::NUMERIC(78), + total_deposits_count = staking.nominators.total_deposits_count::NUMERIC(78) + 1, updated_at = NEW.block_height WHERE id = NEW.nominator_id; END IF; @@ -2780,9 +2817,9 @@ BEGIN NEW.block_height -- updated_at ) ON CONFLICT (id) DO UPDATE SET - total_deposits = staking.accounts.total_deposits + NEW.total_amount, - current_total_stake = staking.accounts.current_total_stake + NEW.amount, - current_storage_fee_deposit = staking.accounts.current_storage_fee_deposit + NEW.storage_fee_deposit, + total_deposits = staking.accounts.total_deposits::NUMERIC(78) + NEW.total_amount::NUMERIC(78), + current_total_stake = staking.accounts.current_total_stake::NUMERIC(78) + NEW.amount::NUMERIC(78), + current_storage_fee_deposit = staking.accounts.current_storage_fee_deposit::NUMERIC(78) + NEW.storage_fee_deposit::NUMERIC(78), updated_at = NEW.block_height; RETURN NEW; @@ -2795,6 +2832,65 @@ AFTER INSERT ON staking.deposit_events FOR EACH ROW EXECUTE FUNCTION staking.handle_deposit_events(); +CREATE OR REPLACE FUNCTION staking.handle_withdraw_events() RETURNS TRIGGER + LANGUAGE plpgsql + AS $$ +BEGIN + + INSERT INTO staking.withdrawals ( + id, + account_id, + domain_id, + operator_id, + nominator_id, + shares, + estimated_amount, + unlocked_amount, + unlocked_storage_fee, + total_amount, + status, + "timestamp", + withdraw_extrinsic_hash, + unlock_extrinsic_hash, + epoch_withdrawal_requested_at, + domain_block_number_withdrawal_requested_at, + created_at, + ready_at, + unlocked_at, + updated_at + ) VALUES ( + NEW.id, -- id + NEW.account_id, -- account_id + NEW.domain_id, -- domain_id + NEW.operator_id, -- operator_id + NEW.nominator_id, -- nominator_id + 0, -- shares + 0, -- estimated_amount + 0, -- unlocked_amount + 0, -- unlocked_storage_fee + 0, -- total_amount + 'ACTIVE', -- status + NEW."timestamp", -- timestamp + NEW.extrinsic_id, -- withdraw_extrinsic_hash + '', -- unlock_extrinsic_hash + '', -- epoch_withdrawal_requested_at + '', -- domain_block_number_withdrawal_requested_at + NEW.block_height, -- created_at + '', -- ready_at + '', -- unlocked_at + NEW.block_height -- updated_at + ); + + RETURN NEW; +END; +$$; +ALTER FUNCTION staking.handle_withdraw_events() OWNER TO postgres; + +CREATE TRIGGER handle_withdraw_events +AFTER INSERT ON staking.withdraw_events +FOR EACH ROW +EXECUTE FUNCTION staking.handle_withdraw_events(); + CREATE OR REPLACE FUNCTION staking.handle_operator_tax_collections_events() RETURNS TRIGGER LANGUAGE plpgsql AS $$ @@ -2807,17 +2903,17 @@ BEGIN UPDATE staking.domains SET - total_tax_collected = staking.domains.total_tax_collected + NEW.amount + total_tax_collected = staking.domains.total_tax_collected::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.domain_id; UPDATE staking.operators SET - total_tax_collected = staking.operators.total_tax_collected + NEW.amount + total_tax_collected = staking.operators.total_tax_collected::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.operator_id; UPDATE staking.accounts SET - total_tax_collected = staking.accounts.total_tax_collected + NEW.amount + total_tax_collected = staking.accounts.total_tax_collected::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = operator_account_id; RETURN NEW; @@ -2836,12 +2932,12 @@ CREATE OR REPLACE FUNCTION staking.handle_operator_rewards_events() RETURNS TRIG BEGIN UPDATE staking.domains SET - total_rewards_collected = staking.domains.total_rewards_collected + NEW.amount + total_rewards_collected = staking.domains.total_rewards_collected::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.domain_id; UPDATE staking.operators SET - total_rewards_collected = staking.operators.total_rewards_collected + NEW.amount + total_rewards_collected = staking.operators.total_rewards_collected::NUMERIC(78) + NEW.amount::NUMERIC(78) WHERE id = NEW.operator_id; RETURN NEW; @@ -2860,37 +2956,37 @@ CREATE OR REPLACE FUNCTION staking.handle_bundle_submissions_events() RETURNS TR BEGIN UPDATE staking.domains SET - total_transfers_in = staking.domains.total_transfers_in + NEW.total_transfers_in, - transfers_in_count = staking.domains.transfers_in_count + NEW.transfers_in_count, - total_transfers_out = staking.domains.total_transfers_out + NEW.total_transfers_out, - transfers_out_count = staking.domains.transfers_out_count + NEW.transfers_out_count, - total_rejected_transfers_claimed = staking.domains.total_rejected_transfers_claimed + NEW.total_rejected_transfers_claimed, - rejected_transfers_claimed_count = staking.domains.rejected_transfers_claimed_count + NEW.rejected_transfers_claimed_count, - total_transfers_rejected = staking.domains.total_transfers_rejected + NEW.total_transfers_rejected, - transfers_rejected_count = staking.domains.transfers_rejected_count + NEW.transfers_rejected_count, - total_volume = staking.domains.total_volume + NEW.total_volume, - total_consensus_storage_fee = staking.domains.total_consensus_storage_fee + NEW.consensus_storage_fee, - total_domain_execution_fee = staking.domains.total_domain_execution_fee + NEW.domain_execution_fee, - total_burned_balance = staking.domains.total_burned_balance + NEW.burned_balance, + total_transfers_in = staking.domains.total_transfers_in::NUMERIC(78) + NEW.total_transfers_in::NUMERIC(78), + transfers_in_count = staking.domains.transfers_in_count::NUMERIC(78) + NEW.transfers_in_count::NUMERIC(78), + total_transfers_out = staking.domains.total_transfers_out::NUMERIC(78) + NEW.total_transfers_out::NUMERIC(78), + transfers_out_count = staking.domains.transfers_out_count::NUMERIC(78) + NEW.transfers_out_count::NUMERIC(78), + total_rejected_transfers_claimed = staking.domains.total_rejected_transfers_claimed::NUMERIC(78) + NEW.total_rejected_transfers_claimed::NUMERIC(78), + rejected_transfers_claimed_count = staking.domains.rejected_transfers_claimed_count::NUMERIC(78) + NEW.rejected_transfers_claimed_count::NUMERIC(78), + total_transfers_rejected = staking.domains.total_transfers_rejected::NUMERIC(78) + NEW.total_transfers_rejected::NUMERIC(78), + transfers_rejected_count = staking.domains.transfers_rejected_count::NUMERIC(78) + NEW.transfers_rejected_count::NUMERIC(78), + total_volume = staking.domains.total_volume::NUMERIC(78) + NEW.total_volume::NUMERIC(78), + total_consensus_storage_fee = staking.domains.total_consensus_storage_fee::NUMERIC(78) + NEW.consensus_storage_fee::NUMERIC(78), + total_domain_execution_fee = staking.domains.total_domain_execution_fee::NUMERIC(78) + NEW.domain_execution_fee::NUMERIC(78), + total_burned_balance = staking.domains.total_burned_balance::NUMERIC(78) + NEW.burned_balance::NUMERIC(78) , bundle_count = staking.domains.bundle_count + 1, last_bundle_at = NEW.consensus_block_number WHERE id = NEW.domain_id; UPDATE staking.operators SET - total_transfers_in = staking.operators.total_transfers_in + NEW.total_transfers_in, - transfers_in_count = staking.operators.transfers_in_count + NEW.transfers_in_count, - total_transfers_out = staking.operators.total_transfers_out + NEW.total_transfers_out, - transfers_out_count = staking.operators.transfers_out_count + NEW.transfers_out_count, - total_rejected_transfers_claimed = staking.operators.total_rejected_transfers_claimed + NEW.total_rejected_transfers_claimed, - rejected_transfers_claimed_count = staking.operators.rejected_transfers_claimed_count + NEW.rejected_transfers_claimed_count, - total_transfers_rejected = staking.operators.total_transfers_rejected + NEW.total_transfers_rejected, - transfers_rejected_count = staking.operators.transfers_rejected_count + NEW.transfers_rejected_count, - total_volume = staking.operators.total_volume + NEW.total_volume, - total_consensus_storage_fee = staking.operators.total_consensus_storage_fee + NEW.consensus_storage_fee, - total_domain_execution_fee = staking.operators.total_domain_execution_fee + NEW.domain_execution_fee, - total_burned_balance = staking.operators.total_burned_balance + NEW.burned_balance, - bundle_count = staking.operators.bundle_count + 1, + total_transfers_in = staking.operators.total_transfers_in::NUMERIC(78) + NEW.total_transfers_in::NUMERIC(78), + transfers_in_count = staking.operators.transfers_in_count::NUMERIC(78) + NEW.transfers_in_count::NUMERIC(78), + total_transfers_out = staking.operators.total_transfers_out::NUMERIC(78) + NEW.total_transfers_out::NUMERIC(78), + transfers_out_count = staking.operators.transfers_out_count::NUMERIC(78) + NEW.transfers_out_count::NUMERIC(78), + total_rejected_transfers_claimed = staking.operators.total_rejected_transfers_claimed::NUMERIC(78) + NEW.total_rejected_transfers_claimed::NUMERIC(78), + rejected_transfers_claimed_count = staking.operators.rejected_transfers_claimed_count::NUMERIC(78) + NEW.rejected_transfers_claimed_count::NUMERIC(78), + total_transfers_rejected = staking.operators.total_transfers_rejected::NUMERIC(78) + NEW.total_transfers_rejected::NUMERIC(78), + transfers_rejected_count = staking.operators.transfers_rejected_count::NUMERIC(78) + NEW.transfers_rejected_count::NUMERIC(78), + total_volume = staking.operators.total_volume::NUMERIC(78) + NEW.total_volume::NUMERIC(78), + total_consensus_storage_fee = staking.operators.total_consensus_storage_fee::NUMERIC(78) + NEW.consensus_storage_fee::NUMERIC(78), + total_domain_execution_fee = staking.operators.total_domain_execution_fee::NUMERIC(78) + NEW.domain_execution_fee::NUMERIC(78), + total_burned_balance = staking.operators.total_burned_balance::NUMERIC(78) + NEW.burned_balance::NUMERIC(78), + bundle_count = staking.operators.bundle_count::NUMERIC(78) + 1, last_bundle_at = NEW.consensus_block_number WHERE id = NEW.operator_id; @@ -2982,4 +3078,65 @@ ALTER FUNCTION staking.update_domain_stakes() OWNER TO postgres; CREATE TRIGGER update_domain_stakes_trigger AFTER INSERT ON staking.domain_staking_histories FOR EACH ROW -EXECUTE FUNCTION staking.update_domain_stakes(); \ No newline at end of file +EXECUTE FUNCTION staking.update_domain_stakes(); + +CREATE OR REPLACE FUNCTION staking.update_operator_on_deregistration() RETURNS TRIGGER + LANGUAGE plpgsql + AS $$ +BEGIN + UPDATE staking.operators + SET + raw_status = 'DEREGISTERED', + updated_at = NEW.block_height + WHERE id = NEW.id; + + RETURN NEW; +END; +$$; +ALTER FUNCTION staking.update_operator_on_deregistration() OWNER TO postgres; + +CREATE TRIGGER update_operator_on_deregistration_trigger +AFTER INSERT ON staking.operator_deregistrations +FOR EACH ROW +EXECUTE FUNCTION staking.update_operator_on_deregistration(); + +CREATE OR REPLACE FUNCTION staking.handle_unlocked_events() RETURNS TRIGGER + LANGUAGE plpgsql + AS $$ +BEGIN + UPDATE staking.domains + SET + total_withdrawals = staking.domains.total_withdrawals::NUMERIC(78) + NEW.amount::NUMERIC(78), + updated_at = NEW.block_height + WHERE id = NEW.domain_id; + + UPDATE staking.operators + SET + total_withdrawals = staking.operators.total_withdrawals::NUMERIC(78) + NEW.amount::NUMERIC(78), + updated_at = NEW.block_height + WHERE id = NEW.operator_id; + + UPDATE staking.nominators + SET + total_withdrawal_amounts = staking.nominators.total_withdrawal_amounts::NUMERIC(78) + NEW.amount::NUMERIC(78), + total_storage_fee_refund = staking.nominators.total_storage_fee_refund::NUMERIC(78) + NEW.storage_fee::NUMERIC(78), + total_withdrawals = staking.nominators.total_withdrawals::NUMERIC(78) + NEW.amount::NUMERIC(78), + total_withdrawals_count = staking.nominators.total_withdrawal_amounts::NUMERIC(78) + 1, + updated_at = NEW.block_height + WHERE id = NEW.nominator_id; + + UPDATE staking.accounts + SET + total_withdrawals = staking.accounts.total_withdrawals::NUMERIC(78) + NEW.amount::NUMERIC(78), + updated_at = NEW.block_height + WHERE id = NEW.account_id; + + RETURN NEW; +END; +$$; +ALTER FUNCTION staking.handle_unlocked_events() OWNER TO postgres; + +CREATE TRIGGER handle_unlocked_events +AFTER INSERT ON staking.unlocked_events +FOR EACH ROW +EXECUTE FUNCTION staking.handle_unlocked_events(); \ No newline at end of file diff --git a/indexers/db/metadata/databases/default/tables/staking_domains.yaml b/indexers/db/metadata/databases/default/tables/staking_domains.yaml index e79cbb754..4825d78bb 100644 --- a/indexers/db/metadata/databases/default/tables/staking_domains.yaml +++ b/indexers/db/metadata/databases/default/tables/staking_domains.yaml @@ -12,6 +12,15 @@ object_relationships: name: accounts schema: staking array_relationships: + - name: deposit_events + using: + manual_configuration: + column_mapping: + id: domain_id + insertion_order: null + remote_table: + name: deposit_events + schema: staking - name: deposits using: manual_configuration: @@ -39,6 +48,15 @@ array_relationships: remote_table: name: operators schema: staking + - name: withdraw_events + using: + manual_configuration: + column_mapping: + id: domain_id + insertion_order: null + remote_table: + name: withdraw_events + schema: staking - name: withdrawals using: manual_configuration: diff --git a/indexers/db/metadata/databases/default/tables/staking_nominators.yaml b/indexers/db/metadata/databases/default/tables/staking_nominators.yaml index 66391df11..1964eda9d 100644 --- a/indexers/db/metadata/databases/default/tables/staking_nominators.yaml +++ b/indexers/db/metadata/databases/default/tables/staking_nominators.yaml @@ -30,6 +30,24 @@ object_relationships: name: operators schema: staking array_relationships: + - name: deposit_events + using: + manual_configuration: + column_mapping: + id: nominator_id + insertion_order: null + remote_table: + name: deposit_events + schema: staking + - name: deposit_histories + using: + manual_configuration: + column_mapping: + id: nominator_id + insertion_order: null + remote_table: + name: deposit_histories + schema: staking - name: deposits using: manual_configuration: @@ -39,6 +57,24 @@ array_relationships: remote_table: name: deposits schema: staking + - name: withdraw_events + using: + manual_configuration: + column_mapping: + id: nominator_id + insertion_order: null + remote_table: + name: withdraw_events + schema: staking + - name: withdrawal_histories + using: + manual_configuration: + column_mapping: + id: nominator_id + insertion_order: null + remote_table: + name: withdrawal_histories + schema: staking - name: withdrawals using: manual_configuration: diff --git a/indexers/db/metadata/databases/default/tables/staking_operator_deregistrations.yaml b/indexers/db/metadata/databases/default/tables/staking_operator_deregistrations.yaml new file mode 100644 index 000000000..f895e580e --- /dev/null +++ b/indexers/db/metadata/databases/default/tables/staking_operator_deregistrations.yaml @@ -0,0 +1,25 @@ +table: + name: operator_deregistrations + schema: staking +configuration: + column_config: + _id: + custom_name: uuid + custom_column_names: + _id: uuid + custom_root_fields: {} +select_permissions: + - role: user + permission: + columns: + - _block_range + - block_height + - domain_id + - event_id + - extrinsic_id + - id + - owner + - _id + filter: {} + limit: 50 + comment: "" diff --git a/indexers/db/metadata/databases/default/tables/staking_operators.yaml b/indexers/db/metadata/databases/default/tables/staking_operators.yaml index 41b69212f..9d13f5433 100644 --- a/indexers/db/metadata/databases/default/tables/staking_operators.yaml +++ b/indexers/db/metadata/databases/default/tables/staking_operators.yaml @@ -21,6 +21,24 @@ object_relationships: name: domains schema: staking array_relationships: + - name: deposit_events + using: + manual_configuration: + column_mapping: + id: operator_id + insertion_order: null + remote_table: + name: deposit_events + schema: staking + - name: deposit_histories + using: + manual_configuration: + column_mapping: + id: operator_id + insertion_order: null + remote_table: + name: deposit_histories + schema: staking - name: deposits using: manual_configuration: @@ -39,6 +57,24 @@ array_relationships: remote_table: name: nominators schema: staking + - name: withdraw_events + using: + manual_configuration: + column_mapping: + id: operator_id + insertion_order: null + remote_table: + name: withdraw_events + schema: staking + - name: withdrawal_histories + using: + manual_configuration: + column_mapping: + id: operator_id + insertion_order: null + remote_table: + name: withdrawal_histories + schema: staking - name: withdrawals using: manual_configuration: diff --git a/indexers/db/metadata/databases/default/tables/staking_unlocked_events.yaml b/indexers/db/metadata/databases/default/tables/staking_unlocked_events.yaml new file mode 100644 index 000000000..a2d9e5c36 --- /dev/null +++ b/indexers/db/metadata/databases/default/tables/staking_unlocked_events.yaml @@ -0,0 +1,28 @@ +table: + name: unlocked_events + schema: staking +configuration: + column_config: + _id: + custom_name: uuid + custom_column_names: + _id: uuid + custom_root_fields: {} +select_permissions: + - role: user + permission: + columns: + - _block_range + - amount + - block_height + - storage_fee + - account_id + - domain_id + - event_id + - extrinsic_id + - id + - operator_id + - _id + filter: {} + limit: 50 + comment: "" diff --git a/indexers/db/metadata/databases/default/tables/tables.yaml b/indexers/db/metadata/databases/default/tables/tables.yaml index 2c9d8306a..4abfebf71 100644 --- a/indexers/db/metadata/databases/default/tables/tables.yaml +++ b/indexers/db/metadata/databases/default/tables/tables.yaml @@ -88,12 +88,14 @@ - "!include staking_domain_staking_histories.yaml" - "!include staking_domains.yaml" - "!include staking_nominators.yaml" +- "!include staking_operator_deregistrations.yaml" - "!include staking_operator_registrations.yaml" - "!include staking_operator_rewards.yaml" - "!include staking_operator_staking_histories.yaml" - "!include staking_operator_tax_collections.yaml" - "!include staking_operators.yaml" - "!include staking_runtime_creations.yaml" +- "!include staking_unlocked_events.yaml" - "!include staking_withdraw_events.yaml" - "!include staking_withdrawal_histories.yaml" - "!include staking_withdrawals.yaml" diff --git a/indexers/files/package.json b/indexers/files/package.json index d4df99c72..39a81e494 100644 --- a/indexers/files/package.json +++ b/indexers/files/package.json @@ -32,8 +32,8 @@ "license": "MIT", "devDependencies": { "@apollo/client": "^3.7.16", - "@autonomys/auto-dag-data": "^1.2.5", - "@autonomys/auto-utils": "^1.2.5", + "@autonomys/auto-dag-data": "^1.3.1", + "@autonomys/auto-utils": "^1.3.1", "@polkadot/api": "^12.4.2", "@polkadot/types": "^14.1.1", "@polkadot/util": "^13.2.2", diff --git a/indexers/staking/package.json b/indexers/staking/package.json index 4206123f9..a96673499 100644 --- a/indexers/staking/package.json +++ b/indexers/staking/package.json @@ -31,8 +31,8 @@ }, "license": "MIT", "devDependencies": { - "@autonomys/auto-consensus": "^1.2.5", - "@autonomys/auto-utils": "^1.2.5", + "@autonomys/auto-consensus": "^1.3.1", + "@autonomys/auto-utils": "^1.3.1", "@apollo/client": "^3.7.16", "@polkadot/api": "^12.4.2", "@polkadot/types": "^14.1.1", diff --git a/indexers/staking/schema.graphql b/indexers/staking/schema.graphql index 6524f1751..bb67e1679 100644 --- a/indexers/staking/schema.graphql +++ b/indexers/staking/schema.graphql @@ -123,6 +123,28 @@ type BundleSubmission @entity { eventId: String! } +type UnlockedEvent @entity { + id: ID! + domainId: String! + operatorId: String! + accountId: String! + nominatorId: String! + amount: BigInt! + storageFee: BigInt! + blockHeight: BigInt! + extrinsicId: String! + eventId: String! +} + +type OperatorDeregistration @entity { + id: ID! + owner: String! + domainId: String! + blockHeight: BigInt! + extrinsicId: String! + eventId: String! +} + # Chain states entities type DomainBlockHistory @entity { @@ -160,6 +182,7 @@ type OperatorStakingHistory @entity { type DepositHistory @entity { id: ID! + domainId: String! accountId: String! operatorId: String! nominatorId: String! diff --git a/indexers/staking/src/mappings/db.ts b/indexers/staking/src/mappings/db.ts index cca960912..d8b1648f1 100644 --- a/indexers/staking/src/mappings/db.ts +++ b/indexers/staking/src/mappings/db.ts @@ -1,3 +1,4 @@ +import { Operator } from "@autonomys/auto-consensus"; import { BundleSubmission, DepositEvent, @@ -5,15 +6,17 @@ import { DomainBlockHistory, DomainInstantiation, DomainStakingHistory, + OperatorDeregistration, OperatorRegistration, OperatorReward, OperatorStakingHistory, OperatorTaxCollection, RuntimeCreation, + UnlockedEvent, WithdrawEvent, WithdrawalHistory, } from "../types"; -import { getSortId } from "./utils"; +import { getNominationId, getSortId } from "./utils"; export type Cache = { bundleSubmission: BundleSubmission[]; @@ -26,9 +29,13 @@ export type Cache = { operatorStakingHistory: OperatorStakingHistory[]; operatorReward: OperatorReward[]; operatorTaxCollection: OperatorTaxCollection[]; + operatorDeregistration: OperatorDeregistration[]; runtimeCreation: RuntimeCreation[]; withdrawEvent: WithdrawEvent[]; withdrawalHistory: WithdrawalHistory[]; + unlockedEvent: UnlockedEvent[]; + // only for caching purposes + parentBlockOperators: Operator[]; }; export const initializeCache = (): Cache => ({ @@ -42,9 +49,13 @@ export const initializeCache = (): Cache => ({ operatorStakingHistory: [], operatorReward: [], operatorTaxCollection: [], + operatorDeregistration: [], runtimeCreation: [], withdrawEvent: [], withdrawalHistory: [], + unlockedEvent: [], + // only for caching purposes + parentBlockOperators: [], }); export const saveCache = async (cache: Cache) => { @@ -59,9 +70,11 @@ export const saveCache = async (cache: Cache) => { store.bulkCreate(`OperatorStakingHistory`, cache.operatorStakingHistory), store.bulkCreate(`OperatorReward`, cache.operatorReward), store.bulkCreate(`OperatorTaxCollection`, cache.operatorTaxCollection), + store.bulkCreate(`OperatorDeregistration`, cache.operatorDeregistration), store.bulkCreate(`RuntimeCreation`, cache.runtimeCreation), store.bulkCreate(`WithdrawEvent`, cache.withdrawEvent), store.bulkCreate(`WithdrawalHistory`, cache.withdrawalHistory), + store.bulkCreate(`UnlockedEvent`, cache.unlockedEvent), ]); }; @@ -150,12 +163,12 @@ export function createDepositEvent( eventId: string ): DepositEvent { return DepositEvent.create({ - id: extrinsicId + "-" + accountId + "-" + domainId + "-" + operatorId, + id: extrinsicId + "-" + getNominationId(accountId, domainId, operatorId), sortId: getSortId(blockHeight, extrinsicId), accountId, domainId, operatorId, - nominatorId: accountId + "-" + domainId + "-" + operatorId, + nominatorId: getNominationId(accountId, domainId, operatorId), amount, storageFeeDeposit, totalAmount, @@ -180,12 +193,12 @@ export function createWithdrawEvent( eventId: string ): WithdrawEvent { return WithdrawEvent.create({ - id: extrinsicId + "-" + accountId + "-" + domainId + "-" + operatorId, + id: extrinsicId + "-" + getNominationId(accountId, domainId, operatorId), sortId: getSortId(blockHeight, extrinsicId), accountId, domainId, operatorId, - nominatorId: accountId + "-" + domainId + "-" + operatorId, + nominatorId: getNominationId(accountId, domainId, operatorId), toWithdraw, amount1, amount2, @@ -237,6 +250,48 @@ export function createOperatorTaxCollection( }); } +export function createUnlockedEvent( + domainId: string, + operatorId: string, + accountId: string, + amount: bigint, + storageFee: bigint, + blockHeight: bigint, + extrinsicId: string, + eventId: string +): UnlockedEvent { + return UnlockedEvent.create({ + id: extrinsicId, + domainId, + operatorId, + accountId, + nominatorId: getNominationId(accountId, domainId, operatorId), + amount, + storageFee, + blockHeight, + extrinsicId, + eventId, + }); +} + +export function createOperatorDeregistration( + operatorId: string, + owner: string, + domainId: string, + blockHeight: bigint, + extrinsicId: string, + eventId: string +): OperatorDeregistration { + return OperatorDeregistration.create({ + id: operatorId, + owner, + domainId, + blockHeight, + extrinsicId, + eventId, + }); +} + export function createBundleSubmission( id: string, accountId: string, @@ -359,6 +414,7 @@ export function createOperatorStakingHistory( export function createDepositHistory( hash: string, + domainId: string, accountId: string, operatorId: string, shares: bigint, @@ -373,9 +429,10 @@ export function createDepositHistory( ): DepositHistory { return DepositHistory.create({ id: hash, + domainId, accountId, operatorId, - nominatorId: accountId + "-" + operatorId, + nominatorId: getNominationId(accountId, domainId, operatorId), shares, storageFeeDeposit, sharesKnown, @@ -388,7 +445,7 @@ export function createDepositHistory( }); } -export function createWithdrawalHistoryHistory( +export function createWithdrawalHistory( hash: string, domainId: string, accountId: string, @@ -405,7 +462,7 @@ export function createWithdrawalHistoryHistory( domainId, accountId, operatorId, - nominatorId: accountId + "-" + operatorId, + nominatorId: getNominationId(accountId, domainId, operatorId), totalWithdrawalAmount, domainEpoch, unlockAtConfirmedDomainBlockNumber, diff --git a/indexers/staking/src/mappings/eventHandler.ts b/indexers/staking/src/mappings/eventHandler.ts index a1351ab84..e9271042a 100644 --- a/indexers/staking/src/mappings/eventHandler.ts +++ b/indexers/staking/src/mappings/eventHandler.ts @@ -6,7 +6,11 @@ import { import * as db from "./db"; import { Cache } from "./db"; import { SealedBundleHeader } from "./types"; -import { calculateTransfer, findOneExtrinsicEvent } from "./utils"; +import { + calculateTransfer, + findDomainIdFromOperatorsCache, + findOneExtrinsicEvent, +} from "./utils"; type EventHandler = (params: { event: EventRecord; @@ -144,6 +148,7 @@ export const EVENT_HANDLERS: Record = { const operatorId = event.event.data[0].toString(); const accountId = event.event.data[1].toString(); const amount = BigInt(event.event.data[2].toString()); + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); const storageFeeDepositedEvent = findOneExtrinsicEvent( extrinsicEvents, @@ -153,11 +158,6 @@ export const EVENT_HANDLERS: Record = { const storageFeeDeposit = BigInt( storageFeeDepositedEvent?.event.data[2].toString() ?? 0 ); - const opFromCache = cache.operatorStakingHistory.find( - (o) => o.operatorId === operatorId - ); - if (!opFromCache) throw new Error("Operator from cache not found"); - const domainId = opFromCache.currentDomainId; cache.depositEvent.push( db.createDepositEvent( @@ -201,11 +201,7 @@ export const EVENT_HANDLERS: Record = { ); const amount2 = amount1 - BigInt(amount2Event?.event.data[0].toString() ?? 0); - const opFromCache = cache.operatorStakingHistory.find( - (o) => o.operatorId === operatorId - ); - if (!opFromCache) throw new Error("Operator from cache not found"); - const domainId = opFromCache.currentDomainId; + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); cache.withdrawEvent.push( db.createWithdrawEvent( @@ -234,11 +230,7 @@ export const EVENT_HANDLERS: Record = { const operatorId = event.event.data[1].toString(); const amount = BigInt(event.event.data[2].toString()); const atBlockNumber = BigInt(bundleDetails.bundle.atBlockNumber.toString()); - const opFromCache = cache.operatorStakingHistory.find( - (o) => o.operatorId === operatorId - ); - if (!opFromCache) throw new Error("Operator from cache not found"); - const domainId = opFromCache.currentDomainId; + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); cache.operatorReward.push( db.createOperatorReward( @@ -261,11 +253,7 @@ export const EVENT_HANDLERS: Record = { }) => { const operatorId = event.event.data[0].toString(); const tax = BigInt(event.event.data[1].toString()); - const opFromCache = cache.operatorStakingHistory.find( - (o) => o.operatorId === operatorId - ); - if (!opFromCache) throw new Error("Operator from cache not found"); - const domainId = opFromCache.currentDomainId; + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); cache.operatorTaxCollection.push( db.createOperatorTaxCollection( @@ -278,6 +266,63 @@ export const EVENT_HANDLERS: Record = { ) ); }, + "domains.NominatedStakedUnlocked": ({ + event, + cache, + height, + extrinsicEvents, + extrinsicId, + eventId, + }) => { + const operatorId = event.event.data[0].toString(); + const accountId = event.event.data[1].toString(); + const amount = BigInt(event.event.data[2].toString()); + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); + + const StorageFeeUnlockedEvent = findOneExtrinsicEvent( + extrinsicEvents, + "domains", + "StorageFeeUnlocked" + ); + const storageFee = BigInt( + StorageFeeUnlockedEvent?.event.data[2].toString() ?? 0 + ); + + cache.unlockedEvent.push( + db.createUnlockedEvent( + domainId, + operatorId, + accountId, + amount, + storageFee, + height, + extrinsicId, + eventId + ) + ); + }, + "domains.OperatorDeregistered": ({ + event, + cache, + extrinsicSigner, + height, + extrinsicId, + eventId, + }) => { + const operatorId = event.event.data[0].toString(); + const domainId = findDomainIdFromOperatorsCache(cache, operatorId); + + cache.operatorDeregistration.push( + db.createOperatorDeregistration( + operatorId, + extrinsicSigner, + domainId, + height, + extrinsicId, + eventId + ) + ); + }, "domains.BundleStored": ({ event, cache, diff --git a/indexers/staking/src/mappings/mappingHandlers.ts b/indexers/staking/src/mappings/mappingHandlers.ts index f9b2241a5..6dad5ef73 100644 --- a/indexers/staking/src/mappings/mappingHandlers.ts +++ b/indexers/staking/src/mappings/mappingHandlers.ts @@ -8,12 +8,12 @@ import { SubstrateBlock } from "@subql/types"; import { SHARES_CALCULATION_MULTIPLIER, ZERO_BIGINT } from "./constants"; import * as db from "./db"; import { EVENT_HANDLERS } from "./eventHandler"; -import { createHashId } from "./utils"; +import { createHashId, findDomainIdFromOperatorsCache } from "./utils"; export async function handleBlock(_block: SubstrateBlock): Promise { const { block: { - header: { number }, + header: { number, parentHash }, extrinsics, }, timestamp, @@ -33,13 +33,22 @@ export async function handleBlock(_block: SubstrateBlock): Promise { ) : api; - const [domainStakingSummary, headDomainNumber, operatorIdOwner, operators] = - await Promise.all([ - api.query.domains.domainStakingSummary.entries(), - api.query.domains.headDomainNumber.entries(), - api.query.domains.operatorIdOwner.entries(), - apiPatched.query.domains.operators.entries(), - ]); + // Use to query the parent block operators (for the last unlock of an operator (unlockNominator)) + const parentBlockApi = unsafeApi ? await unsafeApi.at(parentHash) : api; + + const [ + domainStakingSummary, + headDomainNumber, + operatorIdOwner, + operators, + parentBlockOperators, + ] = await Promise.all([ + api.query.domains.domainStakingSummary.entries(), + api.query.domains.headDomainNumber.entries(), + api.query.domains.operatorIdOwner.entries(), + apiPatched.query.domains.operators.entries(), + parentBlockApi.query.domains.operators.entries(), + ]); domainStakingSummary.forEach((data) => { const keyPrimitive = data[0].toPrimitive() as any; @@ -103,6 +112,10 @@ export async function handleBlock(_block: SubstrateBlock): Promise { ); }); + parentBlockOperators.forEach((o: any) => + cache.parentBlockOperators.push(parseOperator(o)) + ); + const deposits = ( await Promise.all( operatorIdOwner.map((o) => @@ -114,11 +127,13 @@ export async function handleBlock(_block: SubstrateBlock): Promise { ).flat(); deposits.forEach((d: any) => { const data = parseDeposit(d); + const operatorId = data.operatorId.toString(); cache.depositHistory.push( db.createDepositHistory( createHashId(data), + findDomainIdFromOperatorsCache(cache, operatorId), data.account, - data.operatorId.toString(), + operatorId, data.shares, data.storageFeeDeposit, data.known.shares, @@ -143,18 +158,26 @@ export async function handleBlock(_block: SubstrateBlock): Promise { withdrawals.forEach((w: any) => { const data = parseWithdrawal(w); - logger.info(`withdrawals: ${stringify(data)}`); + const operatorId = data.operatorId.toString(); cache.withdrawalHistory.push( - db.createWithdrawalHistoryHistory( + db.createWithdrawalHistory( createHashId(data), - data.withdrawalInShares.domainEpoch[0].toString(), + findDomainIdFromOperatorsCache(cache, operatorId), data.account, - data.operatorId.toString(), + operatorId, data.totalWithdrawalAmount, - data.withdrawalInShares.domainEpoch[1], - BigInt(data.withdrawalInShares.unlockAtConfirmedDomainBlockNumber), - data.withdrawalInShares.shares, - data.withdrawalInShares.storageFeeRefund, + data.withdrawalInShares === null + ? 0 + : data.withdrawalInShares.domainEpoch[1], + data.withdrawalInShares === null + ? ZERO_BIGINT + : BigInt(data.withdrawalInShares.unlockAtConfirmedDomainBlockNumber), + data.withdrawalInShares === null + ? ZERO_BIGINT + : data.withdrawalInShares.shares, + data.withdrawalInShares === null + ? ZERO_BIGINT + : data.withdrawalInShares.storageFeeRefund, height ) ); diff --git a/indexers/staking/src/mappings/types.ts b/indexers/staking/src/mappings/types.ts index fa88404d6..c7823c63f 100644 --- a/indexers/staking/src/mappings/types.ts +++ b/indexers/staking/src/mappings/types.ts @@ -54,13 +54,15 @@ interface InboxedBundle { extrinsicsRoot: Uint8Array; } -export type Transfer = [ChainId, bigint]; +export type Transfer = { + [key: string]: bigint; +}; interface Transfers { - transfersIn: Transfer[]; - transfersOut: Transfer[]; - rejectedTransfersClaimed: Transfer[]; - transfersRejected: Transfer[]; + transfersIn: Transfer; + transfersOut: Transfer; + rejectedTransfersClaimed: Transfer; + transfersRejected: Transfer; } interface BlockFees { diff --git a/indexers/staking/src/mappings/utils.ts b/indexers/staking/src/mappings/utils.ts index d9cc1cff1..d827314bd 100644 --- a/indexers/staking/src/mappings/utils.ts +++ b/indexers/staking/src/mappings/utils.ts @@ -1,6 +1,7 @@ import { EventRecord, stringify } from "@autonomys/auto-utils"; import { createHash } from "crypto"; import { PAD_ZEROS, ZERO_BIGINT } from "./constants"; +import { Cache } from "./db"; import { Transfer } from "./types"; export const getSortId = ( @@ -13,15 +14,21 @@ export const getSortId = ( return str1 + "-" + str2; }; +export const getNominationId = ( + accountId: string, + domainId: string, + operatorId: string +): string => accountId + "-" + domainId + "-" + operatorId; + export const createHashId = (data: any): string => createHash("sha256").update(stringify(data)).digest("hex"); -export const calculateTransfer = (transfers: Transfer[]) => { - if (!Array.isArray(transfers)) return [ZERO_BIGINT, ZERO_BIGINT]; +export const calculateTransfer = (transfers: Transfer) => { + if (!transfers) return [ZERO_BIGINT, ZERO_BIGINT]; let total = ZERO_BIGINT; - const length = transfers.length; - for (let i = 0; i < length; i++) { - total += BigInt(transfers[i][1]); + const length = Object.keys(transfers).length; + for (const key in transfers) { + total += BigInt(transfers[key]); } return [total, BigInt(length)]; }; @@ -38,3 +45,20 @@ export const findOneExtrinsicEvent = ( e.event.method === method ); }; + +export const findDomainIdFromOperatorsCache = ( + cache: Cache, + operatorId: string +): string => { + const opFromCache = cache.operatorStakingHistory.find( + (o) => o.operatorId === operatorId + ); + if (!opFromCache) { + const parentOpFromCache = cache.parentBlockOperators.find( + (o) => o.operatorId.toString() === operatorId + ); + if (!parentOpFromCache) throw new Error("Operator from cache not found"); + return parentOpFromCache.operatorDetails.currentDomainId.toString(); + } + return opFromCache.currentDomainId; +}; diff --git a/indexers/taskboard/package.json b/indexers/taskboard/package.json index b5f4a5d4a..0fa7f2c2c 100644 --- a/indexers/taskboard/package.json +++ b/indexers/taskboard/package.json @@ -10,8 +10,8 @@ "dev": "export $(grep -v '^#' ../../.env | xargs) && export $(grep -v '^#' ../../.env.dev | xargs) && ts-node-dev src/index.ts" }, "dependencies": { - "@autonomys/auto-consensus": "^1.2.5", - "@autonomys/auto-utils": "^1.2.5", + "@autonomys/auto-consensus": "^1.3.1", + "@autonomys/auto-utils": "^1.3.1", "@bull-board/api": "^5.23.0", "@bull-board/express": "^5.23.0", "@bull-board/ui": "^5.23.0", diff --git a/indexers/yarn.lock b/indexers/yarn.lock index 4a90d7b14..b271e8bc7 100644 --- a/indexers/yarn.lock +++ b/indexers/yarn.lock @@ -65,17 +65,17 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@autonomys/auto-consensus@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-consensus/-/auto-consensus-1.2.5.tgz#d5d8607e2a06b950f46c25ad09f8e444a84278e2" - integrity sha512-b4e2LeR0ZduHWQltZNVNxQX/b295vFM04kt7GpYWgOcTCsAw5FBHaqkjm46nxyScbHDKyd5GpdD1D+bm/Ec/eQ== +"@autonomys/auto-consensus@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-consensus/-/auto-consensus-1.3.1.tgz#f52321f0584d50bb53a6c09b674cc27b8223f18e" + integrity sha512-28eP+aqLbwsMw4lOFUxPpIpZ9a0p7FqyrC27lHN8SUhaZ6KmDTK0BT7tIjb60QVzyzprZk7KEUvHfi77TNp6Yg== dependencies: - "@autonomys/auto-utils" "^1.2.5" + "@autonomys/auto-utils" "^1.3.1" -"@autonomys/auto-dag-data@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-dag-data/-/auto-dag-data-1.2.5.tgz#41319d1d6734fc99fb16d800f058697c341d6e84" - integrity sha512-AMS5LvdBf4ahSBH06MaApLJPjZcCAhMcouxuBhIwuuBF5ufyePcGQQuy9a7QvFJ0bis0TfTutjGZKZqfnyjRYA== +"@autonomys/auto-dag-data@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-dag-data/-/auto-dag-data-1.3.1.tgz#1af9bfddf3e873d8fd01f3385487ec7113669a3e" + integrity sha512-s7xmmLGHm//i4jF7jUz7pQFu39nk8uGUAqYrJbYK84lisIwHK03ESWm5aRJGNDyeWFFk49+BoxyJ14TEGr5JFQ== dependencies: "@ipld/dag-pb" "^4.1.2" "@peculiar/webcrypto" "^1.5.0" @@ -88,10 +88,10 @@ protons "^7.6.0" protons-runtime "^5.5.0" -"@autonomys/auto-utils@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@autonomys/auto-utils/-/auto-utils-1.2.5.tgz#81b6694de1dc141cf9f05fe436e4c35fe823ff62" - integrity sha512-LuG8POLzQ+Q9HiQK4jM5KYnxuKKJFFygERX/oQqS+CvMxxQL9zBYkoBti8jAw9HhC8QOExkTJD4/NcjKbl/QuQ== +"@autonomys/auto-utils@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@autonomys/auto-utils/-/auto-utils-1.3.1.tgz#72c5a2500dcc6f2f8262d842246a81cc6252a0f4" + integrity sha512-9PwOmHtm8c/wLDipyyi+v3rJM1UVFQsrGIyf7er+mGjZpN5ToLbSE6okf6wjCz3FV/M+yr0YmO3AC5EFQB8ZVw== dependencies: "@polkadot/api" "^14.3.1" "@polkadot/extension-dapp" "^0.56.2"