diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..50347b1 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,49 @@ +name: npm audit + +on: + pull_request: + merge_group: + branches: + - fixes/evgeni/various + schedule: + - cron: '0 10 * * *' + +jobs: + npm-scan: + name: ts-sdk npm audit + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Enable Corepack + run: corepack enable + + - name: Get PNPM store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup PNPM cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Run pnpm audit + run: pnpm audit diff --git a/.github/workflows/gen-deploy-docs.yml b/.github/workflows/gen-deploy-docs.yml index d0799cb..8ef8d47 100644 --- a/.github/workflows/gen-deploy-docs.yml +++ b/.github/workflows/gen-deploy-docs.yml @@ -2,27 +2,51 @@ name: Deploy documentation on: push: - tags: - - v* + branches: + - fixes/evgeni/various + workflow_dispatch: jobs: deploy-typedoc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 18 - - name: Generate doc - run: | - npm ci - npm run doc - mv docs/documentation/html aave-v3-aptos-ts-sdk - - name: Deploy files - uses: appleboy/scp-action@master + + - name: Install PNPM + uses: pnpm/action-setup@v4 with: - host: ${{ secrets.AAVEDOC_HOST }} - username: ${{ secrets.AAVEDOC_USERNAME }} - key: ${{ secrets.AAVEDOC_SSHKEY }} - source: "./aave-v3-aptos-ts-sdk" - target: "/var/www/type-doc" + version: 9 + run_install: false + + - name: Enable Corepack + run: corepack enable + + - name: Get PNPM store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup PNPM cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Install gh-pages globally + run: pnpm add -g gh-pages + + - name: Publish github pages + run: | + npx gh-pages -d dist -u "github-actions-bot " + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7947732..ca2c226 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,11 +1,9 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - name: Node.js CI on: push: workflow_call: + workflow_dispatch: jobs: build: @@ -13,17 +11,46 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + node-version: [18.x, 20.x] steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: "npm" - - run: npm ci - - run: npm run build - - run: npm run fmt:check - - run: npm test + + - name: Install PNPM + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Enable Corepack + run: corepack enable + + - name: Get PNPM store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup PNPM cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm run build + + - name: Format Check + run: pnpm run fmt:check + + - name: Run Tests + run: pnpm test diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml deleted file mode 100644 index 4b891cb..0000000 --- a/.github/workflows/npm-publish-dev.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Npm nightly publish - -on: - push: - branches: [main, buildnet] - -jobs: - test: - uses: ./.github/workflows/node.js.yml - - publish-npm-dev: - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org - - run: ./scripts/publish-dev.sh - env: - NODE_AUTH_TOKEN: ${{ secrets.npm_token }} \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4449539..f18dfd9 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -12,9 +12,10 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ @@ -32,5 +33,5 @@ jobs: - uses: softprops/action-gh-release@v1 with: files: | - bundle.js - bundle.min.js + dist/bundle.js + dist/bundle.min.js diff --git a/.github/workflows/test-example.yml b/.github/workflows/test-example.yml index f9fa338..972cea3 100644 --- a/.github/workflows/test-example.yml +++ b/.github/workflows/test-example.yml @@ -6,7 +6,7 @@ on: - main jobs: - deploy-SC-example: + tes-api-example: defaults: run: working-directory: ./examples/ @@ -15,25 +15,41 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install node - uses: actions/setup-node@v3 + - name: Install PNPM + run: npm install -g pnpm + + - name: Install Node.js + uses: actions/setup-node@v4 with: node-version: "18" - cache: "npm" - cache-dependency-path: ./package-lock.json + + - name: Enable Corepack + run: corepack enable + + - name: Get PNPM store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup PNPM cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm install + run: pnpm install --frozen-lockfile - name: Build - run: npm run build + run: pnpm run build - name: Deploy run: | echo ${{ secrets.JSON_RPC_URL_PUBLIC }} - if npm run test-borrow-example ; then + if pnpm run test-borrow-example ; then echo "Borrow example passed!" else echo "Failed to run borrow example ..." diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 07ba04d..e0a4865 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -15,25 +15,45 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - # https://github.com/actions/checkout/issues/298#issuecomment-664976337 ref: ${{ github.head_ref }} - # Checkout code using bot account token: ${{ github.token }} - - name: Use Node.js - uses: actions/setup-node@v3 + - name: Set Node.js + uses: actions/setup-node@v4 with: node-version: 18.x - cache: 'npm' + + - name: Install PNPM + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Enable Corepack + run: corepack enable + + - name: Get PNPM store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup PNPM cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Execute unit tests run: | - npm ci - npm run build - npm run fmt:check - npm run test + pnpm run build + pnpm run fmt:check + pnpm run test - name: allow access to coverage.sh run: chmod +x ./scripts/coverage.sh @@ -42,12 +62,12 @@ jobs: - name: Extract coverage id: coverage run: | - value=$(npm run test:cov | awk '/All files/ {print $10}' | tr -d '%') + value=$(pnpm run test:cov | awk '/All files/ {print $10}' | tr -d '%') echo "coverage=$value" >> $GITHUB_OUTPUT - name: Add test coverage to README - run: ./scripts/coverage.sh - shell: bash + run: ./scripts/coverage.sh + shell: bash env: COVERAGE: ${{ steps.coverage.outputs.coverage }} @@ -62,4 +82,4 @@ jobs: with: commit_message: "Generate coverage badge" file_pattern: "README.md" - commit_author: Aaave \ No newline at end of file + commit_author: Aave diff --git a/LICENSE b/LICENSE index a94dad7..b3c6e1c 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1 @@ -Copyright (c) 2024 Aave. All Rights Reserved. \ No newline at end of file +Copyright (c) 2025 Aave Labs. All Rights Reserved. \ No newline at end of file diff --git a/examples/quiries/getAPT.ts b/examples/quiries/getAPT.ts new file mode 100644 index 0000000..b6e6cfb --- /dev/null +++ b/examples/quiries/getAPT.ts @@ -0,0 +1,37 @@ +import { Account, AccountAddress, Ed25519PrivateKey } from "@aptos-labs/ts-sdk"; +import { AptosProvider } from "../../src/clients"; +import { DEFAULT_TESTNET_CONFIG } from "../../src/configs/testnet"; + +const aptFunderPrivateKey = "0x0"; +const addressesToFund = ["0x0"].map((addr) => AccountAddress.fromString(addr)); +const fundAmount = BigInt(0.5); + +(async () => { + // global aptos provider + const aptosProvider = AptosProvider.fromConfig(DEFAULT_TESTNET_CONFIG); + + try { + // set the tx sender + const aptFunderAccount = Account.fromPrivateKey({ + privateKey: new Ed25519PrivateKey(aptFunderPrivateKey), + }); + + // get details for each underlying token + for (const addressToFund of addressesToFund) { + const transaction = await aptosProvider + .getAptos() + .transferCoinTransaction({ + sender: aptFunderAccount.accountAddress, + recipient: addressToFund, + amount: fundAmount, + }); + const pendingTransaction = await aptosProvider + .getAptos() + .signAndSubmitTransaction({ signer: aptFunderAccount, transaction }); + console.log(`User addresses ${addressToFund.toString()} funded with ${fundAmount.toString()} APT + Tx Hash = ${pendingTransaction.hash}`); + } + } catch (ex) { + console.error("Expection = ", ex); + } +})(); diff --git a/examples/quiries/getUSDT.ts b/examples/quiries/getUSDT.ts new file mode 100644 index 0000000..b6e6cfb --- /dev/null +++ b/examples/quiries/getUSDT.ts @@ -0,0 +1,37 @@ +import { Account, AccountAddress, Ed25519PrivateKey } from "@aptos-labs/ts-sdk"; +import { AptosProvider } from "../../src/clients"; +import { DEFAULT_TESTNET_CONFIG } from "../../src/configs/testnet"; + +const aptFunderPrivateKey = "0x0"; +const addressesToFund = ["0x0"].map((addr) => AccountAddress.fromString(addr)); +const fundAmount = BigInt(0.5); + +(async () => { + // global aptos provider + const aptosProvider = AptosProvider.fromConfig(DEFAULT_TESTNET_CONFIG); + + try { + // set the tx sender + const aptFunderAccount = Account.fromPrivateKey({ + privateKey: new Ed25519PrivateKey(aptFunderPrivateKey), + }); + + // get details for each underlying token + for (const addressToFund of addressesToFund) { + const transaction = await aptosProvider + .getAptos() + .transferCoinTransaction({ + sender: aptFunderAccount.accountAddress, + recipient: addressToFund, + amount: fundAmount, + }); + const pendingTransaction = await aptosProvider + .getAptos() + .signAndSubmitTransaction({ signer: aptFunderAccount, transaction }); + console.log(`User addresses ${addressToFund.toString()} funded with ${fundAmount.toString()} APT + Tx Hash = ${pendingTransaction.hash}`); + } + } catch (ex) { + console.error("Expection = ", ex); + } +})(); diff --git a/package.json b/package.json index 0298c4b..0aacd9a 100644 --- a/package.json +++ b/package.json @@ -6,21 +6,21 @@ "module": "dist/esm/index.js", "types": "dist/esm/index.d.ts", "scripts": { - "up": "pnpm update", - "check": "pnpm outdated", - "audit": "pnpm audit --audit-level=high", + "up": "pnpm run update", + "check": "pnpm run outdated", + "audit": "pnpm run audit --audit-level=high", "upgrade": "pnpm run up && pnpm run check && pnpm run build", "clean-dist": "rimraf dist/*", "build-esm": "tsc --project tsconfig.esm.json", "build-commonjs": "tsc --project tsconfig.commonjs.json", "build-esm:watch": "tsc --project tsconfig.esm.json --watch", "build-commonjs:watch": "tsc --project tsconfig.commonjs.json --watch", - "build-bundle": "webpack", + "build-bundle": "npx webpack --progress", "build": "npm-run-all clean-dist build-*", "dev": "run-p build-commonjs:watch build-esm:watch", - "update-version-major": "pnpm version major", - "update-version-minor": "pnpm version minor", - "update-version-patch": "pnpm version patch", + "update-version-major": "pnpm run version major", + "update-version-minor": "pnpm run version minor", + "update-version-patch": "pnpm run version patch", "test": "jest", "test:cov": "jest --coverage", "supply": "tsx examples/users/supply.ts", @@ -34,13 +34,15 @@ "setup-testnet": "tsx examples/admin/setupTestnet.ts", "mint-underlyings": "tsx examples/admin/mintUnderlyings.ts", "set-asset-prices": "tsx examples/admin/setAssetPrices.ts", - "lint": "eslint . --no-cache --ignore-pattern 'bundle.js'", - "lint:fix": "eslint . --fix --no-cache --ignore-pattern 'bundle.js'", + "lint": "eslint . --no-cache --ignore-pattern 'dist'", + "lint:fix": "eslint . --fix --no-cache --ignore-pattern 'dist'", "prettier": "prettier --check .", "prettier:fix": "prettier --write .", "fmt": "pnpm run prettier:fix && pnpm run lint:fix", "fmt:check": "pnpm run prettier && pnpm run lint", - "doc": "typedoc src/index.ts --name aave-aptos --out docs/documentation/html --tsconfig tsconfig.json", + "docs": "typedoc", + "serve-docs": "npx http-server docs/documentation/html", + "deploy-docs": "pnpm run run docs && gh-pages -d docs/documentation/html", "prepare": "husky install" }, "author": "Avara ", @@ -64,12 +66,11 @@ "aave" ], "files": [ - "dist", - "bundle.js", - "bundle.min.js" + "dist" ], + "sideEffects": false, "dependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", + "@aptos-labs/ts-sdk": "^1.35.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", "crypto-js": "^4.2.0", @@ -78,49 +79,48 @@ "events": "^3.3.0", "jest-environment-jsdom": "^29.7.0", "tslib": "^2.8.1", - "tsx": "^4.19.2", + "tsx": "^4.19.3", "util": "^0.12.5", - "yaml": "^2.7.0" + "yaml": "^2.7.0", + "gh-pages": "^6.3.0" }, "devDependencies": { "@types/bn.js": "^5.1.6", "@types/jest": "^29.5.14", - "@types/node": "^22.10.5", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", + "@types/node": "^22.13.5", + "@typescript-eslint/eslint-plugin": "^8.25.0", + "@typescript-eslint/parser": "^8.25.0", "chalk": "^5.4.1", - "eslint": "^9.17.0", + "eslint": "^9.21.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.2", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsdoc": "^50.6.1", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-tsdoc": "^0.4.0", + "gh-pages": "^6.3.0", "husky": "^9.1.7", "jest": "^29.7.0", - "jsdom": "^25.0.1", - "node-ts": "^6.1.3", + "jsdom": "^26.0.0", + "node-ts": "^8.0.0", "npm-run-all": "^4.1.5", - "ora": "^8.1.1", - "prettier": "^3.4.2", + "ora": "^8.2.0", + "prettier": "^3.5.2", "prettier-eslint": "^16.3.0", "prettier-standard": "^16.4.1", "rimraf": "^6.0.1", - "ts-jest": "^29.2.5", - "ts-loader": "^9.5.1", - "typedoc": "^0.27.6", - "typescript": "^5.7.2", - "typescript-eslint": "^8.19.0", - "webpack": "^5.97.1", + "ts-jest": "^29.2.6", + "ts-loader": "^9.5.2", + "ts-node": "^10.9.2", + "typedoc": "^0.27.9", + "typescript": "^5.7.3", + "typescript-eslint": "^8.25.0", + "webpack": "^5.98.0", "webpack-cli": "^6.0.1" }, - "optionalDependencies": { - "bufferutil": "^4.0.9", - "utf-8-validate": "^6.0.5" - }, "pnpm": { "overrides": { "trim@<0.0.3": ">=0.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 202b08f..ba25b64 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,8 +17,8 @@ importers: .: dependencies: '@aptos-labs/ts-sdk': - specifier: ^1.33.1 - version: 1.33.1 + specifier: ^1.35.0 + version: 1.35.0(axios@1.7.4)(got@11.8.6) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -37,6 +37,9 @@ importers: events: specifier: ^3.3.0 version: 3.3.0 + gh-pages: + specifier: ^6.3.0 + version: 6.3.0 jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -44,21 +47,14 @@ importers: specifier: ^2.8.1 version: 2.8.1 tsx: - specifier: ^4.19.2 - version: 4.19.2 + specifier: ^4.19.3 + version: 4.19.3 util: specifier: ^0.12.5 version: 0.12.5 yaml: specifier: ^2.7.0 version: 2.7.0 - optionalDependencies: - bufferutil: - specifier: ^4.0.9 - version: 4.0.9 - utf-8-validate: - specifier: ^6.0.5 - version: 6.0.5 devDependencies: '@types/bn.js': specifier: ^5.1.6 @@ -67,44 +63,44 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.10.5 - version: 22.10.5 + specifier: ^22.13.5 + version: 22.13.5 '@typescript-eslint/eslint-plugin': - specifier: ^8.19.0 - version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + specifier: ^8.25.0 + version: 8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3) '@typescript-eslint/parser': - specifier: ^8.19.0 - version: 8.19.0(eslint@9.17.0)(typescript@5.7.2) + specifier: ^8.25.0 + version: 8.25.0(eslint@9.21.0)(typescript@5.7.3) chalk: specifier: ^5.4.1 version: 5.4.1 eslint: - specifier: ^9.17.0 - version: 9.17.0 + specifier: ^9.21.0 + version: 9.21.0 eslint-config-airbnb-base: specifier: ^15.0.0 - version: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint@9.17.0) + version: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint@9.21.0) eslint-config-airbnb-typescript: specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2))(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint@9.17.0) + version: 18.0.0(@typescript-eslint/eslint-plugin@8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3))(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint@9.21.0) eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.17.0) + specifier: ^10.0.2 + version: 10.0.2(eslint@9.21.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint-plugin-n@16.6.2(eslint@9.17.0))(eslint-plugin-promise@7.2.1(eslint@9.17.0))(eslint@9.17.0) + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint-plugin-n@16.6.2(eslint@9.21.0))(eslint-plugin-promise@7.2.1(eslint@9.21.0))(eslint@9.21.0) eslint-plugin-import: specifier: ^2.31.0 - version: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0) + version: 2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0) eslint-plugin-jsdoc: - specifier: ^50.6.1 - version: 50.6.1(eslint@9.17.0) + specifier: ^50.6.3 + version: 50.6.3(eslint@9.21.0) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@9.17.0) + version: 11.1.0(eslint@9.21.0) eslint-plugin-promise: specifier: ^7.2.1 - version: 7.2.1(eslint@9.17.0) + version: 7.2.1(eslint@9.21.0) eslint-plugin-tsdoc: specifier: ^0.4.0 version: 0.4.0 @@ -113,52 +109,55 @@ importers: version: 9.1.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + version: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) jsdom: - specifier: ^25.0.1 - version: 25.0.1(bufferutil@4.0.9)(utf-8-validate@6.0.5) + specifier: ^26.0.0 + version: 26.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) node-ts: - specifier: ^6.1.3 - version: 6.1.3 + specifier: ^8.0.0 + version: 8.0.0 npm-run-all: specifier: ^4.1.5 version: 4.1.5 ora: - specifier: ^8.1.1 - version: 8.1.1 + specifier: ^8.2.0 + version: 8.2.0 prettier: - specifier: ^3.4.2 - version: 3.4.2 + specifier: ^3.5.2 + version: 3.5.2 prettier-eslint: specifier: ^16.3.0 version: 16.3.0 prettier-standard: specifier: ^16.4.1 - version: 16.4.1(typescript@5.7.2) + version: 16.4.1(typescript@5.7.3) rimraf: specifier: ^6.0.1 version: 6.0.1 ts-jest: - specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)))(typescript@5.7.2) + specifier: ^29.2.6 + version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)))(typescript@5.7.3) ts-loader: - specifier: ^9.5.1 - version: 9.5.1(typescript@5.7.2)(webpack@5.97.1) + specifier: ^9.5.2 + version: 9.5.2(typescript@5.7.3)(webpack@5.98.0) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@22.13.5)(typescript@5.7.3) typedoc: - specifier: ^0.27.6 - version: 0.27.6(typescript@5.7.2) + specifier: ^0.27.9 + version: 0.27.9(typescript@5.7.3) typescript: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^5.7.3 + version: 5.7.3 typescript-eslint: - specifier: ^8.19.0 - version: 8.19.0(eslint@9.17.0)(typescript@5.7.2) + specifier: ^8.25.0 + version: 8.25.0(eslint@9.21.0)(typescript@5.7.3) webpack: - specifier: ^5.97.1 - version: 5.97.1(webpack-cli@6.0.1) + specifier: ^5.98.0 + version: 5.98.0(webpack-cli@6.0.1) webpack-cli: specifier: ^6.0.1 - version: 6.0.1(webpack@5.97.1) + version: 6.0.1(webpack@5.98.0) packages: @@ -176,13 +175,25 @@ packages: resolution: {integrity: sha512-PYPsd0Kk3ynkxNfe3S4fanI3DiUICCoh4ibQderbvjPFL5A0oK6F4lPEO2t0MDsQySTk2t4vh99Xjy6Bd9y+aQ==} hasBin: true - '@aptos-labs/aptos-client@0.1.1': - resolution: {integrity: sha512-kJsoy4fAPTOhzVr7Vwq8s/AUg6BQiJDa7WOqRzev4zsuIS3+JCuIZ6vUd7UBsjnxtmguJJulMRs9qWCzVBt2XA==} + '@aptos-labs/aptos-client@1.0.0': + resolution: {integrity: sha512-P/U/xz9w7+tTQDkaeAc693lDFcADO15bjD5RtP/2sa5FSIYbAyGI5A1RfSNPESuBjvskHBa6s47wajgSt4yX7g==} engines: {node: '>=15.10.0'} + peerDependencies: + axios: ^1.7.7 + got: ^11.8.6 - '@aptos-labs/ts-sdk@1.33.1': - resolution: {integrity: sha512-d6nWtUI//fyEN8DeLjm3+ro87Ad6+IKwR9pCqfrs/Azahso1xR1Llxd/O6fj/m1DDsuDj/HAsCsy5TC/aKD6Eg==} - engines: {node: '>=11.0.0'} + '@aptos-labs/aptos-dynamic-transaction-composer@0.1.3': + resolution: {integrity: sha512-bJl+Zq5QbhpcPIJakAkl9tnT3T02mxCYhZThQDhUmjsOZ5wMRlKJ0P7aaq1dmlybSHkVj7vRgOy2t86/NDKKng==} + + '@aptos-labs/script-composer-pack@0.0.9': + resolution: {integrity: sha512-Y3kA1rgF65HETgoTn2omDymsgO+fnZouPLrKJZ9sbxTGdOekIIHtGee3A2gk84eCqa02ZKBumZmP+IDCXRtU/g==} + + '@aptos-labs/ts-sdk@1.35.0': + resolution: {integrity: sha512-ChW2Lvi6lKfEb0AYo0HAa98bYf0+935nMdjl40wFMWsR+mxFhtNA4EYINXsHVTMPfE/WV9sXEvDInvscJFrALQ==} + engines: {node: '>=20.0.0'} + + '@asamuzakjp/css-color@2.8.3': + resolution: {integrity: sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==} '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} @@ -191,20 +202,20 @@ packages: '@babel/code-frame@7.8.3': resolution: {integrity: sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==} - '@babel/compat-data@7.26.3': - resolution: {integrity: sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==} + '@babel/compat-data@7.26.8': + resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} engines: {node: '>=6.9.0'} - '@babel/core@7.26.0': - resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} + '@babel/core@7.26.9': + resolution: {integrity: sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==} engines: {node: '>=6.9.0'} - '@babel/generator@7.26.3': - resolution: {integrity: sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==} + '@babel/generator@7.26.9': + resolution: {integrity: sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.9': - resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} + '@babel/helper-compilation-targets@7.26.5': + resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} engines: {node: '>=6.9.0'} '@babel/helper-module-imports@7.25.9': @@ -217,8 +228,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-plugin-utils@7.25.9': - resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} '@babel/helper-string-parser@7.25.9': @@ -233,16 +244,16 @@ packages: resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.26.0': - resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} + '@babel/helpers@7.26.9': + resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==} engines: {node: '>=6.9.0'} '@babel/highlight@7.25.9': resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.3': - resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} + '@babel/parser@7.26.9': + resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} engines: {node: '>=6.0.0'} hasBin: true @@ -342,20 +353,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime@7.26.0': - resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + '@babel/runtime@7.26.9': + resolution: {integrity: sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.9': - resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + '@babel/template@7.26.9': + resolution: {integrity: sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.26.4': - resolution: {integrity: sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==} + '@babel/traverse@7.26.9': + resolution: {integrity: sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.3': - resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} + '@babel/types@7.26.9': + resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -365,6 +376,34 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@csstools/color-helpers@5.0.2': + resolution: {integrity: sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.1.2': + resolution: {integrity: sha512-TklMyb3uBB28b5uQdxjReG4L80NxAqgrECqLZFQbyLekwwlcDDS8r3f07DKqeo8C4926Br0gf/ZDe17Zv4wIuw==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-color-parser@3.0.8': + resolution: {integrity: sha512-pdwotQjCCnRPuNi06jFuP68cykU1f3ZWExLe/8MQ1LOs8Xq+fTkYgd+2V8mWUWMrOn9iS2HftPVaMZDaXzGbhQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-parser-algorithms@3.0.4': + resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-tokenizer@3.0.3': + resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + engines: {node: '>=18'} + '@discoveryjs/json-ext@0.6.3': resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==} engines: {node: '>=14.17.0'} @@ -373,146 +412,152 @@ packages: resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} engines: {node: '>=16'} - '@esbuild/aix-ppc64@0.23.1': - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + '@esbuild/aix-ppc64@0.25.0': + resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.23.1': - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + '@esbuild/android-arm64@0.25.0': + resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.23.1': - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + '@esbuild/android-arm@0.25.0': + resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.23.1': - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + '@esbuild/android-x64@0.25.0': + resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.23.1': - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + '@esbuild/darwin-arm64@0.25.0': + resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.23.1': - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + '@esbuild/darwin-x64@0.25.0': + resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.23.1': - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + '@esbuild/freebsd-arm64@0.25.0': + resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.23.1': - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + '@esbuild/freebsd-x64@0.25.0': + resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.23.1': - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + '@esbuild/linux-arm64@0.25.0': + resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.23.1': - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + '@esbuild/linux-arm@0.25.0': + resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.23.1': - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + '@esbuild/linux-ia32@0.25.0': + resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.23.1': - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + '@esbuild/linux-loong64@0.25.0': + resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.23.1': - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + '@esbuild/linux-mips64el@0.25.0': + resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.23.1': - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + '@esbuild/linux-ppc64@0.25.0': + resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.23.1': - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + '@esbuild/linux-riscv64@0.25.0': + resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.23.1': - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + '@esbuild/linux-s390x@0.25.0': + resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.23.1': - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + '@esbuild/linux-x64@0.25.0': + resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.23.1': - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + '@esbuild/netbsd-arm64@0.25.0': + resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.0': + resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.23.1': - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + '@esbuild/openbsd-arm64@0.25.0': + resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.23.1': - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + '@esbuild/openbsd-x64@0.25.0': + resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.23.1': - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + '@esbuild/sunos-x64@0.25.0': + resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.23.1': - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + '@esbuild/win32-arm64@0.25.0': + resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.23.1': - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + '@esbuild/win32-ia32@0.25.0': + resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.23.1': - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + '@esbuild/win32-x64@0.25.0': + resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -527,40 +572,40 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.1': - resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} + '@eslint/config-array@0.19.2': + resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.9.1': - resolution: {integrity: sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==} + '@eslint/core@0.12.0': + resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/eslintrc@3.2.0': - resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + '@eslint/eslintrc@3.3.0': + resolution: {integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/js@8.57.1': resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.17.0': - resolution: {integrity: sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==} + '@eslint/js@9.21.0': + resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.5': - resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.4': - resolution: {integrity: sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==} + '@eslint/plugin-kit@0.2.7': + resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@gerrit0/mini-shiki@1.26.1': - resolution: {integrity: sha512-gHFUvv9f1fU2Piou/5Y7Sx5moYxcERbC7CXc6rkDLQTUBg5Dgg9L4u29/nHqfoQ3Y9R0h0BcOhd14uOEZIBP7Q==} + '@gerrit0/mini-shiki@1.27.2': + resolution: {integrity: sha512-GeWyHz8ao2gBiUW4OJnQDxXQnFgZQwwQk05t/CVVgNBN7/rK8XZ7xY6YhLVv9tH3VppWWmr9DCl3MwemB/i+Og==} '@glimmer/interfaces@0.41.4': resolution: {integrity: sha512-MzXwMyod3MlwSZezHSaVBsCEIW/giYYfTDYARR46QnYsaFVatMVbydjsI7jkAuBCbnLCyNOIc1TrYIj71i/rpg==} @@ -596,8 +641,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.1': - resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} engines: {node: '>=18.18'} '@iarna/toml@2.2.3': @@ -714,16 +759,16 @@ packages: '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} - '@noble/curves@1.8.0': - resolution: {integrity: sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==} + '@noble/curves@1.8.1': + resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} '@noble/hashes@1.3.2': resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} - '@noble/hashes@1.7.0': - resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} '@nodelib/fs.scandir@2.1.5': @@ -760,23 +805,23 @@ packages: zen-observable: optional: true - '@scure/base@1.2.1': - resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} - '@scure/bip32@1.6.1': - resolution: {integrity: sha512-jSO+5Ud1E588Y+LFo8TaB8JVPNAZw/lGGao+1SepHDeTs2dFLurdNIAgUuDlwezqEjRjElkCJajVrtrZaBxvaQ==} + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} - '@scure/bip39@1.5.1': - resolution: {integrity: sha512-GnlufVSP9UdAo/H2Patfv22VTtpNTyfi+I3qCKpvuB5l1KWzEYx+l2TNpBy9Ksh4xTs3Rn06tBlpWCi/1Vz8gw==} + '@scure/bip39@1.5.4': + resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} - '@shikijs/engine-oniguruma@1.26.1': - resolution: {integrity: sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==} + '@shikijs/engine-oniguruma@1.29.2': + resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} - '@shikijs/types@1.26.1': - resolution: {integrity: sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==} + '@shikijs/types@1.29.2': + resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} - '@shikijs/vscode-textmate@10.0.1': - resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==} + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -880,8 +925,8 @@ packages: '@types/node@10.17.60': resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} - '@types/node@22.10.5': - resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + '@types/node@22.13.5': + resolution: {integrity: sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==} '@types/node@22.7.5': resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} @@ -907,8 +952,8 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@8.19.0': - resolution: {integrity: sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==} + '@typescript-eslint/eslint-plugin@8.25.0': + resolution: {integrity: sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -925,8 +970,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.19.0': - resolution: {integrity: sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==} + '@typescript-eslint/parser@8.25.0': + resolution: {integrity: sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -936,12 +981,12 @@ packages: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@8.19.0': - resolution: {integrity: sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==} + '@typescript-eslint/scope-manager@8.25.0': + resolution: {integrity: sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.19.0': - resolution: {integrity: sha512-TZs0I0OSbd5Aza4qAMpp1cdCYVnER94IziudE3JU328YUHgWu9gwiwhag+fuLeJ2LkWLXI+F/182TbG+JaBdTg==} + '@typescript-eslint/type-utils@8.25.0': + resolution: {integrity: sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -951,8 +996,8 @@ packages: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@8.19.0': - resolution: {integrity: sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==} + '@typescript-eslint/types@8.25.0': + resolution: {integrity: sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@2.6.1': @@ -973,14 +1018,14 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.19.0': - resolution: {integrity: sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==} + '@typescript-eslint/typescript-estree@8.25.0': + resolution: {integrity: sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.19.0': - resolution: {integrity: sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==} + '@typescript-eslint/utils@8.25.0': + resolution: {integrity: sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -990,12 +1035,12 @@ packages: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@8.19.0': - resolution: {integrity: sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==} + '@typescript-eslint/visitor-keys@8.25.0': + resolution: {integrity: sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.2.1': - resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} + '@ungap/structured-clone@1.3.0': + resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -1122,11 +1167,6 @@ packages: ajv: optional: true - ajv-keywords@3.5.2: - resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} - peerDependencies: - ajv: ^6.9.1 - ajv-keywords@5.1.0: resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} peerDependencies: @@ -1276,6 +1316,10 @@ packages: resolution: {integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==} engines: {node: '>=4'} + async-function@1.0.0: + resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} + engines: {node: '>= 0.4'} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -1336,8 +1380,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.24.3: - resolution: {integrity: sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==} + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1373,8 +1417,8 @@ packages: resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} engines: {node: '>=8'} - call-bind-apply-helpers@1.0.1: - resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} call-bind@1.0.8: @@ -1409,8 +1453,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001690: - resolution: {integrity: sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==} + caniuse-lite@1.0.30001701: + resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} @@ -1463,8 +1507,8 @@ packages: resolution: {integrity: sha512-E4gFi2f3jC0zFVHpaAcupW+gv9OejZ2aV3DP/LlSO0dDcZJAXw7W0ivn+vN17edN/PhU4HCgs1bfx7lPK7FpdA==} engines: {node: '>= 4'} - cjs-module-lexer@1.4.1: - resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} @@ -1543,6 +1587,10 @@ packages: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commander@13.1.0: + resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} + engines: {node: '>=18'} + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -1554,6 +1602,9 @@ packages: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1596,8 +1647,8 @@ packages: resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} engines: {node: '>=8'} - cssstyle@4.1.0: - resolution: {integrity: sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==} + cssstyle@4.2.1: + resolution: {integrity: sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==} engines: {node: '>=18'} dashify@2.0.0: @@ -1644,8 +1695,8 @@ packages: supports-color: optional: true - decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + decimal.js@10.5.0: + resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} @@ -1744,13 +1795,16 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.76: - resolution: {integrity: sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==} + electron-to-chromium@1.5.109: + resolution: {integrity: sha512-AidaH9JETVRr9DIPGfp1kAarm/W6hRJTPuCnkF+2MqhF4KaAgRIcBc8nvjk+YMXZhwfISof/7WG29eS4iGxQLQ==} elegant-spinner@1.0.1: resolution: {integrity: sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==} engines: {node: '>=0.10.0'} + email-addresses@5.0.0: + resolution: {integrity: sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw==} + emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} @@ -1770,8 +1824,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - enhanced-resolve@5.18.0: - resolution: {integrity: sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==} + enhanced-resolve@5.18.1: + resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} engines: {node: '>=10.13.0'} entities@4.5.0: @@ -1801,23 +1855,24 @@ packages: es-module-lexer@1.6.0: resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} es-set-tostringtag@2.1.0: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + es-shim-unscopables@1.1.0: + resolution: {integrity: sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==} + engines: {node: '>= 0.4'} es-to-primitive@1.3.0: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} - esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + esbuild@0.25.0: + resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} engines: {node: '>=18'} hasBin: true @@ -1862,8 +1917,8 @@ packages: '@typescript-eslint/parser': ^7.0.0 eslint: ^8.56.0 - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@10.0.2: + resolution: {integrity: sha512-1105/17ZIMjmCOJOPNfVdbXafLCLj3hPmkmB7dLgt7XsQ/zkxSuDerE/xgO3RxoHysR1N1whmquY0lSn2O0VLg==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1923,8 +1978,8 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jsdoc@50.6.1: - resolution: {integrity: sha512-UWyaYi6iURdSfdVVqvfOs2vdCVz0J40O/z/HTsv2sFjdjmdlUI/qlKLOTmwbPQ2tAfQnE5F9vqx+B+poF71DBQ==} + eslint-plugin-jsdoc@50.6.3: + resolution: {integrity: sha512-NxbJyt1M5zffPcYZ8Nb53/8nnbIScmiLAMdoe0/FAszwb7lcSiX3iYBTsuF7RV84dZZJC8r3NghomrUXsmWvxQ==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -1994,8 +2049,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.17.0: - resolution: {integrity: sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==} + eslint@9.21.0: + resolution: {integrity: sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -2088,15 +2143,15 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.0.4: - resolution: {integrity: sha512-G3iTQw1DizJQ5eEqj1CbFCWhq+pzum7qepkxU7rS1FGZDqjYKcrguo9XDRbV7EgPnn8CgaPigTq+NEjyioeYZQ==} + fast-uri@3.0.6: + resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - fastq@1.18.0: - resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + fastq@1.19.1: + resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} @@ -2128,10 +2183,22 @@ packages: filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + filename-reserved-regex@2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + + filenamify@4.3.0: + resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} + engines: {node: '>=8'} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + find-parent-dir@0.3.0: resolution: {integrity: sha512-41+Uo9lF5JNGpIMGrujNKDuqH9ofU2ISJ1XCZPLIN/Yayql599PtA0ywYtlLMYmJcSPkr4uAF14wJmKlW2Fx3g==} @@ -2166,8 +2233,8 @@ packages: flatted@2.0.2: resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==} - flatted@3.3.2: - resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} flatten@1.0.3: resolution: {integrity: sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==} @@ -2186,17 +2253,22 @@ packages: debug: optional: true - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.5: + resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} + engines: {node: '>= 0.4'} - foreground-child@3.3.0: - resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@4.0.1: - resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} + form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} engines: {node: '>= 6'} + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -2230,8 +2302,8 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} - get-intrinsic@1.2.7: - resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} get-own-enumerable-property-symbols@3.0.2: @@ -2265,8 +2337,13 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + get-tsconfig@4.10.0: + resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + + gh-pages@6.3.0: + resolution: {integrity: sha512-Ot5lU6jK0Eb+sszG8pciXdjMXdBJ5wODvgjR+imihTqsUWF2K6dJ9HST55lgqcs8wWcw6o6wAsUzfcYRhJPXbA==} + engines: {node: '>=10'} + hasBin: true glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -2279,8 +2356,8 @@ packages: glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - glob@11.0.0: - resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + glob@11.0.1: + resolution: {integrity: sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==} engines: {node: 20 || >=22} hasBin: true @@ -2459,8 +2536,8 @@ packages: resolution: {integrity: sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==} engines: {node: '>=4'} - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} import-local@3.2.0: @@ -2519,16 +2596,16 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-async-function@2.1.0: - resolution: {integrity: sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==} + is-async-function@2.1.1: + resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==} engines: {node: '>= 0.4'} is-bigint@1.1.0: resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} engines: {node: '>= 0.4'} - is-boolean-object@1.2.1: - resolution: {integrity: sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==} + is-boolean-object@1.2.2: + resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} engines: {node: '>= 0.4'} is-buffer@2.0.5: @@ -2695,8 +2772,8 @@ packages: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} - is-weakref@1.1.0: - resolution: {integrity: sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==} + is-weakref@1.1.1: + resolution: {integrity: sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==} engines: {node: '>= 0.4'} is-weakset@2.0.4: @@ -2746,8 +2823,8 @@ packages: iterall@1.3.0: resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} - jackspeak@4.0.2: - resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + jackspeak@4.1.0: + resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==} engines: {node: 20 || >=22} jake@10.9.2: @@ -2931,11 +3008,11 @@ packages: canvas: optional: true - jsdom@25.0.1: - resolution: {integrity: sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==} + jsdom@26.0.0: + resolution: {integrity: sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==} engines: {node: '>=18'} peerDependencies: - canvas: ^2.11.2 + canvas: ^3.0.0 peerDependenciesMeta: canvas: optional: true @@ -2975,6 +3052,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonify@0.0.1: resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} @@ -3101,6 +3181,9 @@ packages: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@11.0.2: resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} engines: {node: 20 || >=22} @@ -3114,6 +3197,10 @@ packages: lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -3261,9 +3348,9 @@ packages: node-releases@2.0.19: resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - node-ts@6.1.3: - resolution: {integrity: sha512-efSBNOe7AJxg2QKmDVzzQGxYMTfR51USAlteD6UCFlR2B4nMGhJiTVsypzKFupimWj9kwYUl5faeJcuMGpcwXw==} - engines: {node: '>=18.0.0'} + node-ts@8.0.0: + resolution: {integrity: sha512-3EQmf6a3heddGDt2xumCbQ3OzLpt/e7uBGcUBSvp3aK+9JaRigxjYKnRHBRnlybp/zYAMAslYg7DeDMbrkK0jw==} + engines: {node: '>=22.0.0'} normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -3300,8 +3387,8 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.13.3: - resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} object-keys@1.1.1: @@ -3351,8 +3438,8 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@8.1.1: - resolution: {integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==} + ora@8.2.0: + resolution: {integrity: sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==} engines: {node: '>=18'} os-tmpdir@1.0.2: @@ -3508,8 +3595,8 @@ packages: poseidon-lite@0.2.1: resolution: {integrity: sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==} - possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + possible-typed-array-names@1.1.0: + resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} postcss-less@2.0.0: @@ -3530,8 +3617,8 @@ packages: resolution: {integrity: sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==} engines: {node: '>=4'} - postcss@8.4.49: - resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + postcss@8.5.3: + resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.1.2: @@ -3559,8 +3646,8 @@ packages: engines: {node: '>=8'} hasBin: true - prettier@3.4.2: - resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + prettier@3.5.2: + resolution: {integrity: sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==} engines: {node: '>=14'} hasBin: true @@ -3731,8 +3818,8 @@ packages: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} rimraf@2.6.3: @@ -3750,8 +3837,8 @@ packages: engines: {node: 20 || >=22} hasBin: true - rrweb-cssom@0.7.1: - resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} + rrweb-cssom@0.8.0: + resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -3786,10 +3873,6 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - schema-utils@3.3.0: - resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} - engines: {node: '>= 10.13.0'} - schema-utils@4.3.0: resolution: {integrity: sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==} engines: {node: '>= 10.13.0'} @@ -3805,8 +3888,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} engines: {node: '>=10'} hasBin: true @@ -3926,8 +4009,8 @@ packages: spdx-expression-parse@4.0.0: resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} - spdx-license-ids@3.0.20: - resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} + spdx-license-ids@3.0.21: + resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -4035,6 +4118,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-outer@1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} @@ -4074,8 +4161,8 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - terser-webpack-plugin@5.3.11: - resolution: {integrity: sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==} + terser-webpack-plugin@5.3.12: + resolution: {integrity: sha512-jDLYqo7oF8tJIttjXO6jBY5Hk8p3A8W4ttih7cCEq64fQFWmgJ4VqAQjKr7WwIDlmXKEc6QeoRb5ecjZ+2afcg==} engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -4090,8 +4177,8 @@ packages: uglify-js: optional: true - terser@5.37.0: - resolution: {integrity: sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==} + terser@5.39.0: + resolution: {integrity: sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==} engines: {node: '>=10'} hasBin: true @@ -4105,11 +4192,11 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tldts-core@6.1.71: - resolution: {integrity: sha512-LRbChn2YRpic1KxY+ldL1pGXN/oVvKfCVufwfVzEQdFYNo39uF7AJa/WXdo+gYO7PTvdfkCPCed6Hkvz/kR7jg==} + tldts-core@6.1.79: + resolution: {integrity: sha512-HM+Ud/2oQuHt4I43Nvjc213Zji/z25NSH5OkJskJwHXNtYh9DTRlHMDFhms9dFMP7qyve/yVaXFIxmcJ7TdOjw==} - tldts@6.1.71: - resolution: {integrity: sha512-LQIHmHnuzfZgZWAf2HzL83TIIrD8NhhI0DVxqo9/FdOd4ilec+NTNZOlDZf7EwrTNoutccbsHjvWHYXLAtvxjw==} + tldts@6.1.79: + resolution: {integrity: sha512-wjlYwK8lC/WcywLWf3A7qbK07SexezXjTRVwuPWXHvcjD7MnpPS2RXY5rLO3g12a8CNc7Y7jQRQsV7XyuBZjig==} hasBin: true tmp@0.0.33: @@ -4127,8 +4214,8 @@ packages: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} engines: {node: '>=6'} - tough-cookie@5.0.0: - resolution: {integrity: sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==} + tough-cookie@5.1.1: + resolution: {integrity: sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==} engines: {node: '>=16'} tr46@3.0.0: @@ -4139,6 +4226,10 @@ packages: resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} engines: {node: '>=18'} + trim-repeated@1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + trim-trailing-lines@1.1.4: resolution: {integrity: sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==} @@ -4155,8 +4246,14 @@ packages: peerDependencies: typescript: '>=4.2.0' - ts-jest@29.2.5: - resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + ts-api-utils@2.0.1: + resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + ts-jest@29.2.6: + resolution: {integrity: sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4179,8 +4276,8 @@ packages: esbuild: optional: true - ts-loader@9.5.1: - resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} + ts-loader@9.5.2: + resolution: {integrity: sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw==} engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' @@ -4218,8 +4315,8 @@ packages: 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' - tsx@4.19.2: - resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + tsx@4.19.3: + resolution: {integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -4263,22 +4360,22 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typedoc@0.27.6: - resolution: {integrity: sha512-oBFRoh2Px6jFx366db0lLlihcalq/JzyCVp7Vaq1yphL/tbgx2e+bkpkCgJPunaPvPwoTOXSwasfklWHm7GfAw==} + typedoc@0.27.9: + resolution: {integrity: sha512-/z585740YHURLl9DN2jCWe6OW7zKYm6VoQ93H0sxZ1cwHQEQrUn5BJrEnkWhfzUdyO+BLGjnKUZ9iz9hKloFDw==} engines: {node: '>= 18'} hasBin: true peerDependencies: - typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x - typescript-eslint@8.19.0: - resolution: {integrity: sha512-Ni8sUkVWYK4KAcTtPjQ/UTiRk6jcsuDhPpxULapUDi8A/l8TSBk+t1GtJA1RsCzIJg0q6+J7bf35AwQigENWRQ==} + typescript-eslint@8.25.0: + resolution: {integrity: sha512-TxRdQQLH4g7JkoFlYG3caW5v1S6kEkz8rqt80iQJZUYPq1zD1Ra7HfQBJJ88ABRaMvHAXnwRvRB4V+6sQ9xN5Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true @@ -4336,8 +4433,12 @@ packages: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - update-browserslist-db@1.1.1: - resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -4428,8 +4529,8 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - webpack@5.97.1: - resolution: {integrity: sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==} + webpack@5.98.0: + resolution: {integrity: sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -4458,8 +4559,8 @@ packages: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} engines: {node: '>=12'} - whatwg-url@14.1.0: - resolution: {integrity: sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==} + whatwg-url@14.1.1: + resolution: {integrity: sha512-mDGf9diDad/giZ/Sm9Xi2YcyzaFpbdLpJPr+E9fSkyQ7KpQD4SdFcugkRQYzhmfI4KeV4Qpnn2sKPdo+kmsgRQ==} engines: {node: '>=18'} which-boxed-primitive@1.1.1: @@ -4532,8 +4633,8 @@ packages: utf-8-validate: optional: true - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.18.1: + resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -4615,28 +4716,42 @@ snapshots: dependencies: commander: 12.1.0 - '@aptos-labs/aptos-client@0.1.1': + '@aptos-labs/aptos-client@1.0.0(axios@1.7.4)(got@11.8.6)': dependencies: axios: 1.7.4 got: 11.8.6 - transitivePeerDependencies: - - debug - '@aptos-labs/ts-sdk@1.33.1': + '@aptos-labs/aptos-dynamic-transaction-composer@0.1.3': {} + + '@aptos-labs/script-composer-pack@0.0.9': + dependencies: + '@aptos-labs/aptos-dynamic-transaction-composer': 0.1.3 + + '@aptos-labs/ts-sdk@1.35.0(axios@1.7.4)(got@11.8.6)': dependencies: '@aptos-labs/aptos-cli': 1.0.2 - '@aptos-labs/aptos-client': 0.1.1 - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 - '@scure/bip32': 1.6.1 - '@scure/bip39': 1.5.1 + '@aptos-labs/aptos-client': 1.0.0(axios@1.7.4)(got@11.8.6) + '@aptos-labs/script-composer-pack': 0.0.9 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 eventemitter3: 5.0.1 - form-data: 4.0.1 + form-data: 4.0.2 js-base64: 3.7.7 jwt-decode: 4.0.0 poseidon-lite: 0.2.1 transitivePeerDependencies: - - debug + - axios + - got + + '@asamuzakjp/css-color@2.8.3': + dependencies: + '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-color-parser': 3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + lru-cache: 10.4.3 '@babel/code-frame@7.26.2': dependencies: @@ -4648,20 +4763,20 @@ snapshots: dependencies: '@babel/highlight': 7.25.9 - '@babel/compat-data@7.26.3': {} + '@babel/compat-data@7.26.8': {} - '@babel/core@7.26.0': + '@babel/core@7.26.9': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.3 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.3 - '@babel/template': 7.25.9 - '@babel/traverse': 7.26.4 - '@babel/types': 7.26.3 + '@babel/generator': 7.26.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) + '@babel/helpers': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 convert-source-map: 2.0.0 debug: 4.4.0 gensync: 1.0.0-beta.2 @@ -4670,39 +4785,39 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.26.3': + '@babel/generator@7.26.9': dependencies: - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 - '@babel/helper-compilation-targets@7.25.9': + '@babel/helper-compilation-targets@7.26.5': dependencies: - '@babel/compat-data': 7.26.3 + '@babel/compat-data': 7.26.8 '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.3 + browserslist: 4.24.4 lru-cache: 5.1.1 semver: 6.3.1 '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.26.4 - '@babel/types': 7.26.3 + '@babel/traverse': 7.26.9 + '@babel/types': 7.26.9 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.9 '@babel/helper-module-imports': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.4 + '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.25.9': {} + '@babel/helper-plugin-utils@7.26.5': {} '@babel/helper-string-parser@7.25.9': {} @@ -4710,10 +4825,10 @@ snapshots: '@babel/helper-validator-option@7.25.9': {} - '@babel/helpers@7.26.0': + '@babel/helpers@7.26.9': dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.3 + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 '@babel/highlight@7.25.9': dependencies: @@ -4722,122 +4837,122 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.26.3': + '@babel/parser@7.26.9': dependencies: - '@babel/types': 7.26.3 + '@babel/types': 7.26.9 '@babel/parser@7.9.4': dependencies: - '@babel/types': 7.26.3 + '@babel/types': 7.26.9 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.0)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.9)': dependencies: - '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/core': 7.26.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/runtime@7.26.0': + '@babel/runtime@7.26.9': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.9': + '@babel/template@7.26.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 - '@babel/traverse@7.26.4': + '@babel/traverse@7.26.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.3 - '@babel/parser': 7.26.3 - '@babel/template': 7.25.9 - '@babel/types': 7.26.3 + '@babel/generator': 7.26.9 + '@babel/parser': 7.26.9 + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.26.3': + '@babel/types@7.26.9': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -4847,7 +4962,26 @@ snapshots: '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 - optional: true + + '@csstools/color-helpers@5.0.2': {} + + '@csstools/css-calc@2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-color-parser@3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/color-helpers': 5.0.2 + '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-tokenizer@3.0.3': {} '@discoveryjs/json-ext@0.6.3': {} @@ -4857,76 +4991,79 @@ snapshots: esquery: 1.6.0 jsdoc-type-pratt-parser: 4.1.0 - '@esbuild/aix-ppc64@0.23.1': + '@esbuild/aix-ppc64@0.25.0': + optional: true + + '@esbuild/android-arm64@0.25.0': optional: true - '@esbuild/android-arm64@0.23.1': + '@esbuild/android-arm@0.25.0': optional: true - '@esbuild/android-arm@0.23.1': + '@esbuild/android-x64@0.25.0': optional: true - '@esbuild/android-x64@0.23.1': + '@esbuild/darwin-arm64@0.25.0': optional: true - '@esbuild/darwin-arm64@0.23.1': + '@esbuild/darwin-x64@0.25.0': optional: true - '@esbuild/darwin-x64@0.23.1': + '@esbuild/freebsd-arm64@0.25.0': optional: true - '@esbuild/freebsd-arm64@0.23.1': + '@esbuild/freebsd-x64@0.25.0': optional: true - '@esbuild/freebsd-x64@0.23.1': + '@esbuild/linux-arm64@0.25.0': optional: true - '@esbuild/linux-arm64@0.23.1': + '@esbuild/linux-arm@0.25.0': optional: true - '@esbuild/linux-arm@0.23.1': + '@esbuild/linux-ia32@0.25.0': optional: true - '@esbuild/linux-ia32@0.23.1': + '@esbuild/linux-loong64@0.25.0': optional: true - '@esbuild/linux-loong64@0.23.1': + '@esbuild/linux-mips64el@0.25.0': optional: true - '@esbuild/linux-mips64el@0.23.1': + '@esbuild/linux-ppc64@0.25.0': optional: true - '@esbuild/linux-ppc64@0.23.1': + '@esbuild/linux-riscv64@0.25.0': optional: true - '@esbuild/linux-riscv64@0.23.1': + '@esbuild/linux-s390x@0.25.0': optional: true - '@esbuild/linux-s390x@0.23.1': + '@esbuild/linux-x64@0.25.0': optional: true - '@esbuild/linux-x64@0.23.1': + '@esbuild/netbsd-arm64@0.25.0': optional: true - '@esbuild/netbsd-x64@0.23.1': + '@esbuild/netbsd-x64@0.25.0': optional: true - '@esbuild/openbsd-arm64@0.23.1': + '@esbuild/openbsd-arm64@0.25.0': optional: true - '@esbuild/openbsd-x64@0.23.1': + '@esbuild/openbsd-x64@0.25.0': optional: true - '@esbuild/sunos-x64@0.23.1': + '@esbuild/sunos-x64@0.25.0': optional: true - '@esbuild/win32-arm64@0.23.1': + '@esbuild/win32-arm64@0.25.0': optional: true - '@esbuild/win32-ia32@0.23.1': + '@esbuild/win32-ia32@0.25.0': optional: true - '@esbuild/win32-x64@0.23.1': + '@esbuild/win32-x64@0.25.0': optional: true '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': @@ -4934,22 +5071,22 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.17.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.21.0)': dependencies: - eslint: 9.17.0 + eslint: 9.21.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.1': + '@eslint/config-array@0.19.2': dependencies: - '@eslint/object-schema': 2.1.5 + '@eslint/object-schema': 2.1.6 debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - '@eslint/core@0.9.1': + '@eslint/core@0.12.0': dependencies: '@types/json-schema': 7.0.15 @@ -4960,21 +5097,21 @@ snapshots: espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 - import-fresh: 3.3.0 + import-fresh: 3.3.1 js-yaml: 4.1.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@eslint/eslintrc@3.2.0': + '@eslint/eslintrc@3.3.0': dependencies: ajv: 6.12.6 debug: 4.4.0 espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 - import-fresh: 3.3.0 + import-fresh: 3.3.1 js-yaml: 4.1.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 @@ -4983,19 +5120,20 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.17.0': {} + '@eslint/js@9.21.0': {} - '@eslint/object-schema@2.1.5': {} + '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.2.4': + '@eslint/plugin-kit@0.2.7': dependencies: + '@eslint/core': 0.12.0 levn: 0.4.1 - '@gerrit0/mini-shiki@1.26.1': + '@gerrit0/mini-shiki@1.27.2': dependencies: - '@shikijs/engine-oniguruma': 1.26.1 - '@shikijs/types': 1.26.1 - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/engine-oniguruma': 1.29.2 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 '@glimmer/interfaces@0.41.4': {} @@ -5029,7 +5167,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.1': {} + '@humanwhocodes/retry@0.4.2': {} '@iarna/toml@2.2.3': {} @@ -5055,27 +5193,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -5100,7 +5238,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -5118,7 +5256,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5140,7 +5278,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -5187,7 +5325,7 @@ snapshots: '@jest/transform@29.7.0': dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.9 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 babel-plugin-istanbul: 6.1.1 @@ -5210,7 +5348,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -5240,7 +5378,6 @@ snapshots: dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - optional: true '@microsoft/tsdoc-config@0.17.1': dependencies: @@ -5255,13 +5392,13 @@ snapshots: dependencies: '@noble/hashes': 1.3.2 - '@noble/curves@1.8.0': + '@noble/curves@1.8.1': dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.7.1 '@noble/hashes@1.3.2': {} - '@noble/hashes@1.7.0': {} + '@noble/hashes@1.7.1': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -5273,7 +5410,7 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.18.0 + fastq: 1.19.1 '@pkgr/core@0.1.1': {} @@ -5291,30 +5428,30 @@ snapshots: transitivePeerDependencies: - zenObservable - '@scure/base@1.2.1': {} + '@scure/base@1.2.4': {} - '@scure/bip32@1.6.1': + '@scure/bip32@1.6.2': dependencies: - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 - '@scure/base': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 - '@scure/bip39@1.5.1': + '@scure/bip39@1.5.4': dependencies: - '@noble/hashes': 1.7.0 - '@scure/base': 1.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 - '@shikijs/engine-oniguruma@1.26.1': + '@shikijs/engine-oniguruma@1.29.2': dependencies: - '@shikijs/types': 1.26.1 - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/types': 1.29.2 + '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/types@1.26.1': + '@shikijs/types@1.29.2': dependencies: - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/vscode-textmate@10.0.1': {} + '@shikijs/vscode-textmate@10.0.2': {} '@sinclair/typebox@0.27.8': {} @@ -5334,48 +5471,44 @@ snapshots: '@tootallnate/once@2.0.0': {} - '@tsconfig/node10@1.0.11': - optional: true + '@tsconfig/node10@1.0.11': {} - '@tsconfig/node12@1.0.11': - optional: true + '@tsconfig/node12@1.0.11': {} - '@tsconfig/node14@1.0.3': - optional: true + '@tsconfig/node14@1.0.3': {} - '@tsconfig/node16@1.0.4': - optional: true + '@tsconfig/node16@1.0.4': {} '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.26.3 + '@babel/types': 7.26.9 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.26.3 + '@babel/types': 7.26.9 '@types/bn.js@5.1.6': dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/cacheable-request@6.0.3': dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/responselike': 1.0.3 '@types/eslint-scope@3.7.7': @@ -5393,11 +5526,11 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/hast@3.0.4': dependencies: @@ -5422,7 +5555,7 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -5432,13 +5565,13 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/minimatch@5.1.2': {} '@types/node@10.17.60': {} - '@types/node@22.10.5': + '@types/node@22.13.5': dependencies: undici-types: 6.20.0 @@ -5448,7 +5581,7 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 '@types/stack-utils@2.0.3': {} @@ -5464,45 +5597,45 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.19.0 - '@typescript-eslint/type-utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.19.0 - eslint: 9.17.0 + '@typescript-eslint/parser': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.25.0 + '@typescript-eslint/type-utils': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.25.0 + eslint: 9.21.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.7.2) - typescript: 5.7.2 + ts-api-utils: 2.0.1(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.4.0 eslint: 8.57.1 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/scope-manager': 8.19.0 - '@typescript-eslint/types': 8.19.0 - '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.19.0 + '@typescript-eslint/scope-manager': 8.25.0 + '@typescript-eslint/types': 8.25.0 + '@typescript-eslint/typescript-estree': 8.25.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.25.0 debug: 4.4.0 - eslint: 9.17.0 - typescript: 5.7.2 + eslint: 9.21.0 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -5511,40 +5644,40 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/scope-manager@8.19.0': + '@typescript-eslint/scope-manager@8.25.0': dependencies: - '@typescript-eslint/types': 8.19.0 - '@typescript-eslint/visitor-keys': 8.19.0 + '@typescript-eslint/types': 8.25.0 + '@typescript-eslint/visitor-keys': 8.25.0 - '@typescript-eslint/type-utils@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.25.0(eslint@9.21.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.25.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.25.0(eslint@9.21.0)(typescript@5.7.3) debug: 4.4.0 - eslint: 9.17.0 - ts-api-utils: 1.4.3(typescript@5.7.2) - typescript: 5.7.2 + eslint: 9.21.0 + ts-api-utils: 2.0.1(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/types@8.19.0': {} + '@typescript-eslint/types@8.25.0': {} - '@typescript-eslint/typescript-estree@2.6.1(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@2.6.1(typescript@5.7.3)': dependencies: debug: 4.4.0 glob: 7.2.3 is-glob: 4.0.3 lodash.unescape: 4.0.1 - semver: 7.6.3 - tsutils: 3.21.0(typescript@5.7.2) + semver: 7.7.1 + tsutils: 3.21.0(typescript@5.7.3) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 @@ -5552,35 +5685,35 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@5.7.2) + semver: 7.7.1 + ts-api-utils: 1.4.3(typescript@5.7.3) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.19.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.25.0(typescript@5.7.3)': dependencies: - '@typescript-eslint/types': 8.19.0 - '@typescript-eslint/visitor-keys': 8.19.0 + '@typescript-eslint/types': 8.25.0 + '@typescript-eslint/visitor-keys': 8.25.0 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@5.7.2) - typescript: 5.7.2 + semver: 7.7.1 + ts-api-utils: 2.0.1(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.19.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.25.0(eslint@9.21.0)(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) - '@typescript-eslint/scope-manager': 8.19.0 - '@typescript-eslint/types': 8.19.0 - '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) - eslint: 9.17.0 - typescript: 5.7.2 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) + '@typescript-eslint/scope-manager': 8.25.0 + '@typescript-eslint/types': 8.25.0 + '@typescript-eslint/typescript-estree': 8.25.0(typescript@5.7.3) + eslint: 9.21.0 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -5589,12 +5722,12 @@ snapshots: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.19.0': + '@typescript-eslint/visitor-keys@8.25.0': dependencies: - '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/types': 8.25.0 eslint-visitor-keys: 4.2.0 - '@ungap/structured-clone@1.2.1': {} + '@ungap/structured-clone@1.3.0': {} '@webassemblyjs/ast@1.14.1': dependencies: @@ -5672,20 +5805,20 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1)(webpack@5.97.1)': + '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1)(webpack@5.98.0)': dependencies: - webpack: 5.97.1(webpack-cli@6.0.1) - webpack-cli: 6.0.1(webpack@5.97.1) + webpack: 5.98.0(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack@5.98.0) - '@webpack-cli/info@3.0.1(webpack-cli@6.0.1)(webpack@5.97.1)': + '@webpack-cli/info@3.0.1(webpack-cli@6.0.1)(webpack@5.98.0)': dependencies: - webpack: 5.97.1(webpack-cli@6.0.1) - webpack-cli: 6.0.1(webpack@5.97.1) + webpack: 5.98.0(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack@5.98.0) - '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1)(webpack@5.97.1)': + '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1)(webpack@5.98.0)': dependencies: - webpack: 5.97.1(webpack-cli@6.0.1) - webpack-cli: 6.0.1(webpack@5.97.1) + webpack: 5.98.0(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack@5.98.0) '@xtuc/ieee754@1.2.0': {} @@ -5733,10 +5866,6 @@ snapshots: optionalDependencies: ajv: 8.17.1 - ajv-keywords@3.5.2(ajv@6.12.6): - dependencies: - ajv: 6.12.6 - ajv-keywords@5.1.0(ajv@8.17.1): dependencies: ajv: 8.17.1 @@ -5759,7 +5888,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.4 + fast-uri: 3.0.6 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -5814,8 +5943,7 @@ snapshots: are-docs-informative@0.0.2: {} - arg@4.1.3: - optional: true + arg@4.1.3: {} argparse@1.0.10: dependencies: @@ -5835,8 +5963,8 @@ snapshots: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.7 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 is-string: 1.1.1 array-union@1.0.2: @@ -5853,22 +5981,22 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.9 es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-shim-unscopables: 1.0.2 + es-object-atoms: 1.1.1 + es-shim-unscopables: 1.1.0 array.prototype.flat@1.3.3: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.flatmap@1.3.3: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 arraybuffer.prototype.slice@1.0.4: dependencies: @@ -5877,36 +6005,38 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.9 es-errors: 1.3.0 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 arrify@1.0.1: {} astral-regex@1.0.0: {} + async-function@1.0.0: {} + async@3.2.6: {} asynckit@0.4.0: {} available-typed-arrays@1.0.7: dependencies: - possible-typed-array-names: 1.0.0 + possible-typed-array-names: 1.1.0 axios@1.7.4: dependencies: follow-redirects: 1.15.9 - form-data: 4.0.1 + form-data: 4.0.2 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - babel-jest@29.7.0(@babel/core@7.26.0): + babel-jest@29.7.0(@babel/core@7.26.9): dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.9 '@jest/transform': 29.7.0 '@types/babel__core': 7.20.5 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.26.0) + babel-preset-jest: 29.6.3(@babel/core@7.26.9) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -5915,7 +6045,7 @@ snapshots: babel-plugin-istanbul@6.1.1: dependencies: - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -5925,35 +6055,35 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.3 + '@babel/template': 7.26.9 + '@babel/types': 7.26.9 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 - babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): - dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.0) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.0) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.0) - '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.0) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.0) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.0) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) - - babel-preset-jest@29.6.3(@babel/core@7.26.0): - dependencies: - '@babel/core': 7.26.0 + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.9) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.9) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.9) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.9) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.9) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.9) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.9) + + babel-preset-jest@29.6.3(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.9) bail@1.0.5: {} @@ -5976,12 +6106,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.24.3: + browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001690 - electron-to-chromium: 1.5.76 + caniuse-lite: 1.0.30001701 + electron-to-chromium: 1.5.109 node-releases: 2.0.19 - update-browserslist-db: 1.1.1(browserslist@4.24.3) + update-browserslist-db: 1.1.3(browserslist@4.24.4) bs-logger@0.2.6: dependencies: @@ -6007,7 +6137,7 @@ snapshots: builtins@5.1.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 cacheable-lookup@5.0.4: {} @@ -6021,22 +6151,22 @@ snapshots: normalize-url: 6.1.0 responselike: 2.0.1 - call-bind-apply-helpers@1.0.1: + call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 call-bind@1.0.8: dependencies: - call-bind-apply-helpers: 1.0.1 + call-bind-apply-helpers: 1.0.2 es-define-property: 1.0.1 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 set-function-length: 1.2.2 call-bound@1.0.3: dependencies: - call-bind-apply-helpers: 1.0.1 - get-intrinsic: 1.2.7 + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 caller-callsite@2.0.0: dependencies: @@ -6054,7 +6184,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001690: {} + caniuse-lite@1.0.30001701: {} chalk@1.1.3: dependencies: @@ -6103,7 +6233,7 @@ snapshots: regexp-util: 1.2.2 unicode-regex: 2.0.0 - cjs-module-lexer@1.4.1: {} + cjs-module-lexer@1.4.3: {} clean-stack@2.2.0: {} @@ -6172,12 +6302,16 @@ snapshots: commander@12.1.0: {} + commander@13.1.0: {} + commander@2.20.3: {} comment-parser@1.4.1: {} common-tags@1.8.2: {} + commondir@1.0.1: {} + concat-map@0.0.1: {} confusing-browser-globals@1.0.11: {} @@ -6191,13 +6325,13 @@ snapshots: js-yaml: 3.14.1 parse-json: 4.0.0 - create-jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)): + create-jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -6206,8 +6340,7 @@ snapshots: - supports-color - ts-node - create-require@1.1.1: - optional: true + create-require@1.1.1: {} cross-spawn@6.0.6: dependencies: @@ -6233,9 +6366,10 @@ snapshots: dependencies: cssom: 0.3.8 - cssstyle@4.1.0: + cssstyle@4.2.1: dependencies: - rrweb-cssom: 0.7.1 + '@asamuzakjp/css-color': 2.8.3 + rrweb-cssom: 0.8.0 dashify@2.0.0: {} @@ -6248,7 +6382,7 @@ snapshots: data-urls@5.0.0: dependencies: whatwg-mimetype: 4.0.0 - whatwg-url: 14.1.0 + whatwg-url: 14.1.1 data-view-buffer@1.0.2: dependencies: @@ -6278,7 +6412,7 @@ snapshots: dependencies: ms: 2.1.3 - decimal.js@10.4.3: {} + decimal.js@10.5.0: {} decompress-response@6.0.0: dependencies: @@ -6347,7 +6481,7 @@ snapshots: dunder-proto@1.0.1: dependencies: - call-bind-apply-helpers: 1.0.1 + call-bind-apply-helpers: 1.0.2 es-errors: 1.3.0 gopd: 1.2.0 @@ -6366,10 +6500,12 @@ snapshots: dependencies: jake: 10.9.2 - electron-to-chromium@1.5.76: {} + electron-to-chromium@1.5.109: {} elegant-spinner@1.0.1: {} + email-addresses@5.0.0: {} + emittery@0.13.1: {} emoji-regex@10.4.0: {} @@ -6384,7 +6520,7 @@ snapshots: dependencies: once: 1.4.0 - enhanced-resolve@5.18.0: + enhanced-resolve@5.18.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 @@ -6409,11 +6545,11 @@ snapshots: data-view-byte-offset: 1.0.1 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 es-set-tostringtag: 2.1.0 es-to-primitive: 1.3.0 function.prototype.name: 1.1.8 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 get-proto: 1.0.1 get-symbol-description: 1.1.0 globalthis: 1.0.4 @@ -6430,9 +6566,9 @@ snapshots: is-shared-array-buffer: 1.0.4 is-string: 1.1.1 is-typed-array: 1.1.15 - is-weakref: 1.1.0 + is-weakref: 1.1.1 math-intrinsics: 1.1.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 object-keys: 1.1.1 object.assign: 4.1.7 own-keys: 1.0.1 @@ -6457,18 +6593,18 @@ snapshots: es-module-lexer@1.6.0: {} - es-object-atoms@1.0.0: + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 es-set-tostringtag@2.1.0: dependencies: es-errors: 1.3.0 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 hasown: 2.0.2 - es-shim-unscopables@1.0.2: + es-shim-unscopables@1.1.0: dependencies: hasown: 2.0.2 @@ -6478,32 +6614,33 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - esbuild@0.23.1: + esbuild@0.25.0: optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 + '@esbuild/aix-ppc64': 0.25.0 + '@esbuild/android-arm': 0.25.0 + '@esbuild/android-arm64': 0.25.0 + '@esbuild/android-x64': 0.25.0 + '@esbuild/darwin-arm64': 0.25.0 + '@esbuild/darwin-x64': 0.25.0 + '@esbuild/freebsd-arm64': 0.25.0 + '@esbuild/freebsd-x64': 0.25.0 + '@esbuild/linux-arm': 0.25.0 + '@esbuild/linux-arm64': 0.25.0 + '@esbuild/linux-ia32': 0.25.0 + '@esbuild/linux-loong64': 0.25.0 + '@esbuild/linux-mips64el': 0.25.0 + '@esbuild/linux-ppc64': 0.25.0 + '@esbuild/linux-riscv64': 0.25.0 + '@esbuild/linux-s390x': 0.25.0 + '@esbuild/linux-x64': 0.25.0 + '@esbuild/netbsd-arm64': 0.25.0 + '@esbuild/netbsd-x64': 0.25.0 + '@esbuild/openbsd-arm64': 0.25.0 + '@esbuild/openbsd-x64': 0.25.0 + '@esbuild/sunos-x64': 0.25.0 + '@esbuild/win32-arm64': 0.25.0 + '@esbuild/win32-ia32': 0.25.0 + '@esbuild/win32-x64': 0.25.0 escalade@3.2.0: {} @@ -6521,39 +6658,39 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.17.0): + eslint-compat-utils@0.5.1(eslint@9.21.0): dependencies: - eslint: 9.17.0 - semver: 7.6.3 + eslint: 9.21.0 + semver: 7.7.1 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint@9.17.0): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint@9.21.0): dependencies: confusing-browser-globals: 1.0.11 - eslint: 9.17.0 - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0) + eslint: 9.21.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0) object.assign: 4.1.7 object.entries: 1.1.8 - semver: 7.6.3 + semver: 6.3.1 - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2))(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint@9.17.0): + eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3))(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint@9.21.0): dependencies: - '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - eslint: 9.17.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint@9.17.0) + '@typescript-eslint/eslint-plugin': 8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + eslint: 9.21.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint@9.21.0) transitivePeerDependencies: - eslint-plugin-import - eslint-config-prettier@9.1.0(eslint@9.17.0): + eslint-config-prettier@10.0.2(eslint@9.21.0): dependencies: - eslint: 9.17.0 + eslint: 9.21.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0))(eslint-plugin-n@16.6.2(eslint@9.17.0))(eslint-plugin-promise@7.2.1(eslint@9.17.0))(eslint@9.17.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0))(eslint-plugin-n@16.6.2(eslint@9.21.0))(eslint-plugin-promise@7.2.1(eslint@9.21.0))(eslint@9.21.0): dependencies: - eslint: 9.17.0 - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0) - eslint-plugin-n: 16.6.2(eslint@9.17.0) - eslint-plugin-promise: 7.2.1(eslint@9.17.0) + eslint: 9.21.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0) + eslint-plugin-n: 16.6.2(eslint@9.21.0) + eslint-plugin-promise: 7.2.1(eslint@9.21.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -6563,30 +6700,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.21.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - eslint: 9.17.0 + '@typescript-eslint/parser': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + eslint: 9.21.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.8.0(eslint@9.17.0): + eslint-plugin-es-x@7.8.0(eslint@9.21.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.17.0 - eslint-compat-utils: 0.5.1(eslint@9.17.0) + eslint: 9.21.0 + eslint-compat-utils: 0.5.1(eslint@9.21.0) - eslint-plugin-es@3.0.1(eslint@9.17.0): + eslint-plugin-es@3.0.1(eslint@9.21.0): dependencies: - eslint: 9.17.0 + eslint: 9.21.0 eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -6595,9 +6732,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.17.0 + eslint: 9.21.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@9.17.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.21.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -6609,58 +6746,58 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.25.0(eslint@9.21.0)(typescript@5.7.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsdoc@50.6.1(eslint@9.17.0): + eslint-plugin-jsdoc@50.6.3(eslint@9.21.0): dependencies: '@es-joy/jsdoccomment': 0.49.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.17.0 + eslint: 9.21.0 espree: 10.3.0 esquery: 1.6.0 parse-imports: 2.2.1 - semver: 7.6.3 + semver: 7.7.1 spdx-expression-parse: 4.0.0 synckit: 0.9.2 transitivePeerDependencies: - supports-color - eslint-plugin-n@16.6.2(eslint@9.17.0): + eslint-plugin-n@16.6.2(eslint@9.21.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) builtins: 5.1.0 - eslint: 9.17.0 - eslint-plugin-es-x: 7.8.0(eslint@9.17.0) - get-tsconfig: 4.8.1 + eslint: 9.21.0 + eslint-plugin-es-x: 7.8.0(eslint@9.21.0) + get-tsconfig: 4.10.0 globals: 13.24.0 ignore: 5.3.2 is-builtin-module: 3.2.1 is-core-module: 2.16.1 minimatch: 3.1.2 resolve: 1.22.10 - semver: 7.6.3 + semver: 7.7.1 - eslint-plugin-node@11.1.0(eslint@9.17.0): + eslint-plugin-node@11.1.0(eslint@9.21.0): dependencies: - eslint: 9.17.0 - eslint-plugin-es: 3.0.1(eslint@9.17.0) + eslint: 9.21.0 + eslint-plugin-es: 3.0.1(eslint@9.21.0) eslint-utils: 2.1.0 ignore: 5.3.2 - minimatch: 10.0.1 + minimatch: 3.1.2 resolve: 1.22.10 - semver: 7.6.3 + semver: 6.3.1 - eslint-plugin-promise@7.2.1(eslint@9.17.0): + eslint-plugin-promise@7.2.1(eslint@9.21.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) - eslint: 9.17.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) + eslint: 9.21.0 eslint-plugin-tsdoc@0.4.0: dependencies: @@ -6715,7 +6852,7 @@ snapshots: glob-parent: 5.1.2 globals: 12.4.0 ignore: 4.0.6 - import-fresh: 3.3.0 + import-fresh: 3.3.1 imurmurhash: 0.1.4 inquirer: 7.3.3 is-glob: 4.0.3 @@ -6723,13 +6860,13 @@ snapshots: json-stable-stringify-without-jsonify: 1.0.1 levn: 0.3.0 lodash: 4.17.21 - minimatch: 10.0.1 + minimatch: 3.1.2 mkdirp: 0.5.6 natural-compare: 1.4.0 optionator: 0.8.3 progress: 2.0.3 regexpp: 2.0.1 - semver: 7.6.3 + semver: 6.3.1 strip-ansi: 5.2.0 strip-json-comments: 3.1.1 table: 5.4.6 @@ -6747,7 +6884,7 @@ snapshots: '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.1 + '@ungap/structured-clone': 1.3.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 @@ -6781,18 +6918,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.17.0: + eslint@9.21.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.1 - '@eslint/core': 0.9.1 - '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.17.0 - '@eslint/plugin-kit': 0.2.4 + '@eslint/config-array': 0.19.2 + '@eslint/core': 0.12.0 + '@eslint/eslintrc': 3.3.0 + '@eslint/js': 9.21.0 + '@eslint/plugin-kit': 0.2.7 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.1 + '@humanwhocodes/retry': 0.4.2 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -6927,13 +7064,13 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@3.0.4: {} + fast-uri@3.0.6: {} fastest-levenshtein@1.0.16: {} - fastq@1.18.0: + fastq@1.19.1: dependencies: - reusify: 1.0.4 + reusify: 1.1.0 fb-watchman@2.0.2: dependencies: @@ -6968,10 +7105,24 @@ snapshots: dependencies: minimatch: 5.1.6 + filename-reserved-regex@2.0.0: {} + + filenamify@4.3.0: + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 + find-cache-dir@3.3.2: + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + find-parent-dir@0.3.0: {} find-project-root@1.1.1: {} @@ -6994,20 +7145,20 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.3.2 + flatted: 3.3.3 keyv: 4.5.4 rimraf: 3.0.2 flat-cache@4.0.1: dependencies: - flatted: 3.3.2 + flatted: 3.3.3 keyv: 4.5.4 flat@5.0.2: {} flatted@2.0.2: {} - flatted@3.3.2: {} + flatted@3.3.3: {} flatten@1.0.3: {} @@ -7015,21 +7166,28 @@ snapshots: follow-redirects@1.15.9: {} - for-each@0.3.3: + for-each@0.3.5: dependencies: is-callable: 1.2.7 - foreground-child@3.3.0: + foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@4.0.1: + form-data@4.0.2: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 mime-types: 2.1.35 + fs-extra@11.3.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -7056,12 +7214,12 @@ snapshots: get-east-asian-width@1.3.0: {} - get-intrinsic@1.2.7: + get-intrinsic@1.3.0: dependencies: - call-bind-apply-helpers: 1.0.1 + call-bind-apply-helpers: 1.0.2 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 function-bind: 1.1.2 get-proto: 1.0.1 gopd: 1.2.0 @@ -7076,7 +7234,7 @@ snapshots: get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 get-stdin@7.0.0: {} @@ -7094,12 +7252,22 @@ snapshots: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 - get-tsconfig@4.8.1: + get-tsconfig@4.10.0: dependencies: resolve-pkg-maps: 1.0.0 + gh-pages@6.3.0: + dependencies: + async: 3.2.6 + commander: 13.1.0 + email-addresses: 5.0.0 + filenamify: 4.3.0 + find-cache-dir: 3.3.2 + fs-extra: 11.3.0 + globby: 11.1.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -7110,10 +7278,10 @@ snapshots: glob-to-regexp@0.4.1: {} - glob@11.0.0: + glob@11.0.1: dependencies: - foreground-child: 3.3.0 - jackspeak: 4.0.2 + foreground-child: 3.3.1 + jackspeak: 4.1.0 minimatch: 10.0.1 minipass: 7.1.2 package-json-from-dist: 1.0.1 @@ -7313,7 +7481,7 @@ snapshots: caller-path: 2.0.0 resolve-from: 3.0.0 - import-fresh@3.3.0: + import-fresh@3.3.1: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 @@ -7378,12 +7546,13 @@ snapshots: dependencies: call-bind: 1.0.8 call-bound: 1.0.3 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 is-arrayish@0.2.1: {} - is-async-function@2.1.0: + is-async-function@2.1.1: dependencies: + async-function: 1.0.0 call-bound: 1.0.3 get-proto: 1.0.1 has-tostringtag: 1.0.2 @@ -7393,7 +7562,7 @@ snapshots: dependencies: has-bigints: 1.1.0 - is-boolean-object@1.2.1: + is-boolean-object@1.2.2: dependencies: call-bound: 1.0.3 has-tostringtag: 1.0.2 @@ -7417,7 +7586,7 @@ snapshots: is-data-view@1.0.2: dependencies: call-bound: 1.0.3 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 is-typed-array: 1.1.15 is-date-object@1.1.0: @@ -7529,14 +7698,14 @@ snapshots: is-weakmap@2.0.2: {} - is-weakref@1.1.0: + is-weakref@1.1.1: dependencies: call-bound: 1.0.3 is-weakset@2.0.4: dependencies: call-bound: 1.0.3 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 is-whitespace-character@1.0.4: {} @@ -7552,21 +7721,21 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: - '@babel/core': 7.26.0 - '@babel/parser': 7.26.3 + '@babel/core': 7.26.9 + '@babel/parser': 7.26.9 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.26.0 - '@babel/parser': 7.26.3 + '@babel/core': 7.26.9 + '@babel/parser': 7.26.9 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color @@ -7591,7 +7760,7 @@ snapshots: iterall@1.3.0: {} - jackspeak@4.0.2: + jackspeak@4.1.0: dependencies: '@isaacs/cliui': 8.0.2 @@ -7614,7 +7783,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -7634,16 +7803,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)): + jest-cli@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + create-jest: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + jest-config: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -7653,12 +7822,12 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)): + jest-config@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)): dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.9 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) + babel-jest: 29.7.0(@babel/core@7.26.9) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -7678,8 +7847,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.5 - ts-node: 10.9.2(@types/node@22.10.5)(typescript@5.7.2) + '@types/node': 22.13.5 + ts-node: 10.9.2(@types/node@22.13.5)(typescript@5.7.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -7713,7 +7882,7 @@ snapshots: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -7727,7 +7896,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -7737,7 +7906,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.10.5 + '@types/node': 22.13.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7776,7 +7945,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -7811,7 +7980,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7839,9 +8008,9 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 - cjs-module-lexer: 1.4.1 + cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 glob: 7.2.3 graceful-fs: 4.2.11 @@ -7859,15 +8028,15 @@ snapshots: jest-snapshot@29.7.0: dependencies: - '@babel/core': 7.26.0 - '@babel/generator': 7.26.3 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) - '@babel/types': 7.26.3 + '@babel/core': 7.26.9 + '@babel/generator': 7.26.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.9) + '@babel/types': 7.26.9 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.9) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -7878,14 +8047,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7904,7 +8073,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.5 + '@types/node': 22.13.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7913,23 +8082,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.10.5 + '@types/node': 22.13.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)): + jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + jest-cli: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -7961,10 +8130,10 @@ snapshots: cssom: 0.5.0 cssstyle: 2.3.0 data-urls: 3.0.2 - decimal.js: 10.4.3 + decimal.js: 10.5.0 domexception: 4.0.0 escodegen: 2.1.0 - form-data: 4.0.1 + form-data: 4.0.2 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -7979,35 +8148,35 @@ snapshots: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@6.0.5) xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@6.0.5): + jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5): dependencies: - cssstyle: 4.1.0 + cssstyle: 4.2.1 data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.1 + decimal.js: 10.5.0 + form-data: 4.0.2 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.16 parse5: 7.2.1 - rrweb-cssom: 0.7.1 + rrweb-cssom: 0.8.0 saxes: 6.0.0 symbol-tree: 3.2.4 - tough-cookie: 5.0.0 + tough-cookie: 5.1.1 w3c-xmlserializer: 5.0.0 webidl-conversions: 7.0.0 whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 - whatwg-url: 14.1.0 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + whatwg-url: 14.1.1 + ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@6.0.5) xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -8038,6 +8207,12 @@ snapshots: json5@2.2.3: {} + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + jsonify@0.0.1: {} jwt-decode@4.0.0: {} @@ -8186,6 +8361,8 @@ snapshots: lowercase-keys@2.0.0: {} + lru-cache@10.4.3: {} + lru-cache@11.0.2: {} lru-cache@4.1.5: @@ -8199,9 +8376,13 @@ snapshots: lunr@2.3.9: {} + make-dir@3.1.0: + dependencies: + semver: 7.7.1 + make-dir@4.0.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 make-error@1.3.6: {} @@ -8298,7 +8479,7 @@ snapshots: array-differ: 2.1.0 array-union: 1.0.2 arrify: 1.0.1 - minimatch: 10.0.1 + minimatch: 3.1.2 mute-stream@0.0.8: {} @@ -8319,10 +8500,10 @@ snapshots: node-releases@2.0.19: {} - node-ts@6.1.3: + node-ts@8.0.0: dependencies: '@rauschma/stringio': 1.4.0 - '@types/node': 22.10.5 + '@types/node': 22.13.5 normalize-package-data@2.5.0: dependencies: @@ -8341,7 +8522,7 @@ snapshots: chalk: 2.4.2 cross-spawn: 6.0.6 memorystream: 0.3.1 - minimatch: 10.0.1 + minimatch: 3.1.2 pidtree: 0.3.1 read-pkg: 3.0.0 shell-quote: 1.8.2 @@ -8361,7 +8542,7 @@ snapshots: object-assign@4.1.1: {} - object-inspect@1.13.3: {} + object-inspect@1.13.4: {} object-keys@1.1.1: {} @@ -8370,7 +8551,7 @@ snapshots: call-bind: 1.0.8 call-bound: 1.0.3 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 has-symbols: 1.1.0 object-keys: 1.1.1 @@ -8378,14 +8559,14 @@ snapshots: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 object.fromentries@2.0.8: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 object.groupby@1.0.3: dependencies: @@ -8398,7 +8579,7 @@ snapshots: call-bind: 1.0.8 call-bound: 1.0.3 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 once@1.4.0: dependencies: @@ -8434,7 +8615,7 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@8.1.1: + ora@8.2.0: dependencies: chalk: 5.4.1 cli-cursor: 5.0.0 @@ -8450,7 +8631,7 @@ snapshots: own-keys@1.0.1: dependencies: - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 object-keys: 1.1.1 safe-push-apply: 1.0.0 @@ -8573,17 +8754,17 @@ snapshots: poseidon-lite@0.2.1: {} - possible-typed-array-names@1.0.0: {} + possible-typed-array-names@1.1.0: {} postcss-less@2.0.0: dependencies: - postcss: 8.4.49 + postcss: 8.5.3 postcss-media-query-parser@0.2.3: {} postcss-scss@2.0.0: dependencies: - postcss: 8.4.49 + postcss: 8.5.3 postcss-selector-parser@2.2.3: dependencies: @@ -8597,7 +8778,7 @@ snapshots: indexes-of: 1.0.1 uniq: 1.0.1 - postcss@8.4.49: + postcss@8.5.3: dependencies: nanoid: 3.3.8 picocolors: 1.1.1 @@ -8609,22 +8790,22 @@ snapshots: prettier-eslint@16.3.0: dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.3) common-tags: 1.8.2 dlv: 1.1.3 eslint: 8.57.1 indent-string: 4.0.0 lodash.merge: 4.6.2 loglevel-colored-level-prefix: 1.0.0 - prettier: 3.4.2 + prettier: 3.5.2 pretty-format: 29.7.0 require-relative: 0.8.7 - typescript: 5.7.2 + typescript: 5.7.3 vue-eslint-parser: 9.4.3(eslint@8.57.1) transitivePeerDependencies: - supports-color - prettier-standard@16.4.1(typescript@5.7.2): + prettier-standard@16.4.1(typescript@5.7.3): dependencies: chalk: 2.4.2 diff: 4.0.2 @@ -8637,23 +8818,23 @@ snapshots: lint-staged: 9.4.3 mri: 1.2.0 multimatch: 3.0.0 - prettierx: 0.11.3(typescript@5.7.2) + prettierx: 0.11.3(typescript@5.7.3) transitivePeerDependencies: - supports-color - typescript - zen-observable - zenObservable - prettier@3.4.2: {} + prettier@3.5.2: {} - prettierx@0.11.3(typescript@5.7.2): + prettierx@0.11.3(typescript@5.7.3): dependencies: '@angular/compiler': 8.2.14 '@babel/code-frame': 7.8.3 '@babel/parser': 7.9.4 '@glimmer/syntax': 0.41.4 '@iarna/toml': 2.2.3 - '@typescript-eslint/typescript-estree': 2.6.1(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 2.6.1(typescript@5.7.3) angular-estree-parser: 1.3.1(@angular/compiler@8.2.14) angular-html-parser: 1.4.0 camelcase: 5.3.1 @@ -8699,7 +8880,7 @@ snapshots: remark-math: 1.0.6(remark-parse@5.0.0) remark-parse: 5.0.0 resolve: 1.15.1 - semver: 7.6.3 + semver: 7.7.1 string-width: 4.2.0 unicode-regex: 3.0.0 unified: 8.4.2 @@ -8707,7 +8888,7 @@ snapshots: yaml: 1.8.3 yaml-unist-parser: 1.1.1 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -8771,8 +8952,8 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.9 es-errors: 1.3.0 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.7 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 get-proto: 1.0.1 which-builtin-type: 1.2.1 @@ -8873,7 +9054,7 @@ snapshots: onetime: 7.0.0 signal-exit: 4.1.0 - reusify@1.0.4: {} + reusify@1.1.0: {} rimraf@2.6.3: dependencies: @@ -8885,10 +9066,10 @@ snapshots: rimraf@6.0.1: dependencies: - glob: 11.0.0 + glob: 11.0.1 package-json-from-dist: 1.0.1 - rrweb-cssom@0.7.1: {} + rrweb-cssom@0.8.0: {} run-async@2.4.1: {} @@ -8904,7 +9085,7 @@ snapshots: dependencies: call-bind: 1.0.8 call-bound: 1.0.3 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 has-symbols: 1.1.0 isarray: 2.0.5 @@ -8927,12 +9108,6 @@ snapshots: dependencies: xmlchars: 2.2.0 - schema-utils@3.3.0: - dependencies: - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - ajv-keywords: 3.5.2(ajv@6.12.6) - schema-utils@4.3.0: dependencies: '@types/json-schema': 7.0.15 @@ -8946,7 +9121,7 @@ snapshots: semver@6.3.1: {} - semver@7.6.3: {} + semver@7.7.1: {} serialize-javascript@6.0.2: dependencies: @@ -8957,7 +9132,7 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.7 + get-intrinsic: 1.3.0 gopd: 1.2.0 has-property-descriptors: 1.0.2 @@ -8972,7 +9147,7 @@ snapshots: dependencies: dunder-proto: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 shallow-clone@3.0.1: dependencies: @@ -8995,27 +9170,27 @@ snapshots: side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-map@1.0.1: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.7 - object-inspect: 1.13.3 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 side-channel-weakmap@1.0.2: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.7 - object-inspect: 1.13.3 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 side-channel-map: 1.0.1 side-channel@1.1.0: dependencies: es-errors: 1.3.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-list: 1.0.0 side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 @@ -9061,21 +9236,21 @@ snapshots: spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.20 + spdx-license-ids: 3.0.21 spdx-exceptions@2.5.0: {} spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.20 + spdx-license-ids: 3.0.21 spdx-expression-parse@4.0.0: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.20 + spdx-license-ids: 3.0.21 - spdx-license-ids@3.0.20: {} + spdx-license-ids@3.0.21: {} sprintf-js@1.0.3: {} @@ -9140,7 +9315,7 @@ snapshots: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 string.prototype.trim@1.2.10: dependencies: @@ -9149,7 +9324,7 @@ snapshots: define-data-property: 1.1.4 define-properties: 1.2.1 es-abstract: 1.23.9 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 has-property-descriptors: 1.0.2 string.prototype.trimend@1.0.9: @@ -9157,13 +9332,13 @@ snapshots: call-bind: 1.0.8 call-bound: 1.0.3 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 string.prototype.trimstart@1.0.8: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 stringify-object@3.3.0: dependencies: @@ -9199,6 +9374,10 @@ snapshots: strip-json-comments@3.1.1: {} + strip-outer@1.0.1: + dependencies: + escape-string-regexp: 1.0.5 + supports-color@2.0.0: {} supports-color@5.5.0: @@ -9233,16 +9412,16 @@ snapshots: tapable@2.2.1: {} - terser-webpack-plugin@5.3.11(webpack@5.97.1): + terser-webpack-plugin@5.3.12(webpack@5.98.0): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 4.3.0 serialize-javascript: 6.0.2 - terser: 5.37.0 - webpack: 5.97.1(webpack-cli@6.0.1) + terser: 5.39.0 + webpack: 5.98.0(webpack-cli@6.0.1) - terser@5.37.0: + terser@5.39.0: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.14.0 @@ -9259,11 +9438,11 @@ snapshots: through@2.3.8: {} - tldts-core@6.1.71: {} + tldts-core@6.1.79: {} - tldts@6.1.71: + tldts@6.1.79: dependencies: - tldts-core: 6.1.71 + tldts-core: 6.1.79 tmp@0.0.33: dependencies: @@ -9282,9 +9461,9 @@ snapshots: universalify: 0.2.0 url-parse: 1.5.10 - tough-cookie@5.0.0: + tough-cookie@5.1.1: dependencies: - tldts: 6.1.71 + tldts: 6.1.79 tr46@3.0.0: dependencies: @@ -9294,63 +9473,70 @@ snapshots: dependencies: punycode: 2.3.1 + trim-repeated@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + trim-trailing-lines@1.1.4: {} trim@1.0.1: {} trough@1.0.5: {} - ts-api-utils@1.4.3(typescript@5.7.2): + ts-api-utils@1.4.3(typescript@5.7.3): dependencies: - typescript: 5.7.2 + typescript: 5.7.3 - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)))(typescript@5.7.2): + ts-api-utils@2.0.1(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + + ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)))(typescript@5.7.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2)) + jest: 29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.6.3 - typescript: 5.7.2 + semver: 7.7.1 + typescript: 5.7.3 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.9 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) + babel-jest: 29.7.0(@babel/core@7.26.9) - ts-loader@9.5.1(typescript@5.7.2)(webpack@5.97.1): + ts-loader@9.5.2(typescript@5.7.3)(webpack@5.98.0): dependencies: chalk: 4.1.2 - enhanced-resolve: 5.18.0 + enhanced-resolve: 5.18.1 micromatch: 4.0.8 - semver: 7.6.3 + semver: 7.7.1 source-map: 0.7.4 - typescript: 5.7.2 - webpack: 5.97.1(webpack-cli@6.0.1) + typescript: 5.7.3 + webpack: 5.98.0(webpack-cli@6.0.1) - ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.2): + ts-node@10.9.2(@types/node@22.13.5)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.5 + '@types/node': 22.13.5 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.2 + typescript: 5.7.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - optional: true tsconfig-paths@3.15.0: dependencies: @@ -9365,15 +9551,15 @@ snapshots: tslib@2.8.1: {} - tsutils@3.21.0(typescript@5.7.2): + tsutils@3.21.0(typescript@5.7.3): dependencies: tslib: 1.14.1 - typescript: 5.7.2 + typescript: 5.7.3 - tsx@4.19.2: + tsx@4.19.3: dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.8.1 + esbuild: 0.25.0 + get-tsconfig: 4.10.0 optionalDependencies: fsevents: 2.3.3 @@ -9402,7 +9588,7 @@ snapshots: typed-array-byte-length@1.0.3: dependencies: call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.5 gopd: 1.2.0 has-proto: 1.2.0 is-typed-array: 1.1.15 @@ -9411,7 +9597,7 @@ snapshots: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.5 gopd: 1.2.0 has-proto: 1.2.0 is-typed-array: 1.1.15 @@ -9420,32 +9606,32 @@ snapshots: typed-array-length@1.0.7: dependencies: call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.5 gopd: 1.2.0 is-typed-array: 1.1.15 - possible-typed-array-names: 1.0.0 + possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typedoc@0.27.6(typescript@5.7.2): + typedoc@0.27.9(typescript@5.7.3): dependencies: - '@gerrit0/mini-shiki': 1.26.1 + '@gerrit0/mini-shiki': 1.27.2 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 - typescript: 5.7.2 + typescript: 5.7.3 yaml: 2.7.0 - typescript-eslint@8.19.0(eslint@9.17.0)(typescript@5.7.2): + typescript-eslint@8.25.0(eslint@9.21.0)(typescript@5.7.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) - eslint: 9.17.0 - typescript: 5.7.2 + '@typescript-eslint/eslint-plugin': 8.25.0(@typescript-eslint/parser@8.25.0(eslint@9.21.0)(typescript@5.7.3))(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.25.0(eslint@9.21.0)(typescript@5.7.3) + eslint: 9.21.0 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - typescript@5.7.2: {} + typescript@5.7.3: {} uc.micro@2.1.0: {} @@ -9507,9 +9693,11 @@ snapshots: universalify@0.2.0: {} - update-browserslist-db@1.1.1(browserslist@4.24.3): + universalify@2.0.1: {} + + update-browserslist-db@1.1.3(browserslist@4.24.4): dependencies: - browserslist: 4.24.3 + browserslist: 4.24.4 escalade: 3.2.0 picocolors: 1.1.1 @@ -9535,8 +9723,7 @@ snapshots: is-typed-array: 1.1.15 which-typed-array: 1.1.18 - v8-compile-cache-lib@3.0.1: - optional: true + v8-compile-cache-lib@3.0.1: {} v8-compile-cache@2.4.0: {} @@ -9580,7 +9767,7 @@ snapshots: espree: 9.6.1 esquery: 1.6.0 lodash: 4.17.21 - semver: 7.6.3 + semver: 7.7.1 transitivePeerDependencies: - supports-color @@ -9603,12 +9790,12 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-cli@6.0.1(webpack@5.97.1): + webpack-cli@6.0.1(webpack@5.98.0): dependencies: '@discoveryjs/json-ext': 0.6.3 - '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1)(webpack@5.97.1) - '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1)(webpack@5.97.1) - '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1)(webpack@5.97.1) + '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1)(webpack@5.98.0) + '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1)(webpack@5.98.0) + '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1)(webpack@5.98.0) colorette: 2.0.20 commander: 12.1.0 cross-spawn: 7.0.6 @@ -9617,7 +9804,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.97.1(webpack-cli@6.0.1) + webpack: 5.98.0(webpack-cli@6.0.1) webpack-merge: 6.0.1 webpack-merge@6.0.1: @@ -9628,7 +9815,7 @@ snapshots: webpack-sources@3.2.3: {} - webpack@5.97.1(webpack-cli@6.0.1): + webpack@5.98.0(webpack-cli@6.0.1): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -9636,9 +9823,9 @@ snapshots: '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 acorn: 8.14.0 - browserslist: 4.24.3 + browserslist: 4.24.4 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.0 + enhanced-resolve: 5.18.1 es-module-lexer: 1.6.0 eslint-scope: 5.1.1 events: 3.3.0 @@ -9648,13 +9835,13 @@ snapshots: loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 - schema-utils: 3.3.0 + schema-utils: 4.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.11(webpack@5.97.1) + terser-webpack-plugin: 5.3.12(webpack@5.98.0) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: - webpack-cli: 6.0.1(webpack@5.97.1) + webpack-cli: 6.0.1(webpack@5.98.0) transitivePeerDependencies: - '@swc/core' - esbuild @@ -9677,7 +9864,7 @@ snapshots: tr46: 3.0.0 webidl-conversions: 7.0.0 - whatwg-url@14.1.0: + whatwg-url@14.1.1: dependencies: tr46: 5.0.0 webidl-conversions: 7.0.0 @@ -9685,7 +9872,7 @@ snapshots: which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 - is-boolean-object: 1.2.1 + is-boolean-object: 1.2.2 is-number-object: 1.1.1 is-string: 1.1.1 is-symbol: 1.1.1 @@ -9695,12 +9882,12 @@ snapshots: call-bound: 1.0.3 function.prototype.name: 1.1.8 has-tostringtag: 1.0.2 - is-async-function: 2.1.0 + is-async-function: 2.1.1 is-date-object: 1.1.0 is-finalizationregistry: 1.1.1 is-generator-function: 1.1.0 is-regex: 1.2.1 - is-weakref: 1.1.0 + is-weakref: 1.1.1 isarray: 2.0.5 which-boxed-primitive: 1.1.1 which-collection: 1.0.2 @@ -9718,7 +9905,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.8 call-bound: 1.0.3 - for-each: 0.3.3 + for-each: 0.3.5 gopd: 1.2.0 has-tostringtag: 1.0.2 @@ -9769,7 +9956,7 @@ snapshots: bufferutil: 4.0.9 utf-8-validate: 6.0.5 - ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5): + ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@6.0.5): optionalDependencies: bufferutil: 4.0.9 utf-8-validate: 6.0.5 @@ -9796,7 +9983,7 @@ snapshots: yaml@1.8.3: dependencies: - '@babel/runtime': 7.26.0 + '@babel/runtime': 7.26.9 yaml@2.7.0: {} @@ -9812,7 +9999,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yn@3.1.1: - optional: true + yn@3.1.1: {} yocto-queue@0.1.0: {} diff --git a/scripts/publish-dev.sh b/scripts/publish-dev.sh deleted file mode 100755 index 2eb7f5b..0000000 --- a/scripts/publish-dev.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -set -e - -npm ci -npm run build -npm version --preid dev --no-git-tag-version --no-commit-hooks prepatch -#Use timestamp as package suffix -TIME=$(date -u +%Y%m%d%H%M%S) -sed -i "/version/s/dev.0/dev.$TIME/g" package.json - -PACKAGE_NAME=$(cat package.json | jq -r '.name') -PUBLISH_VERSION=$(cat package.json | jq -r '.version') -echo publishing ${PACKAGE_NAME}@$PUBLISH_VERSION - -BRANCH=${GITHUB_REF##*/} -TAG="" -if [[ "$BRANCH" == "main" ]]; then - TAG="main-" -else - TAG="test-" -fi - -npm publish --access public --tag ${TAG}dev \ No newline at end of file diff --git a/src/clients/aTokensClient.ts b/src/clients/aTokensClient.ts index 1c2d6f6..b8997f0 100644 --- a/src/clients/aTokensClient.ts +++ b/src/clients/aTokensClient.ts @@ -10,14 +10,52 @@ import { AptosProvider } from "./aptosProvider"; import { TokensContract } from "../contracts/tokens"; import { mapToBigInt } from "../helpers/common"; +/** + * The `ATokensClient` class provides methods to interact with AToken contracts on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes functionalities for creating tokens, + * retrieving metadata, and managing token balances. + * + * @remarks + * This client is designed to work with the AToken contracts and provides a high-level API for common operations. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const client = new ATokensClient(provider); + * const tokenAddress = await client.createToken( + * 1000000n, + * "MyToken", + * "MTK", + * 18, + * "https://example.com/icon.png", + * "https://example.com", + * "0x1", + * "0x2" + * ); + * ``` + * + * @public + */ export class ATokensClient extends AptosContractWrapperBaseClass { tokensContract: TokensContract; + /** + * Creates an instance of the aTokensClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance used for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.tokensContract = new TokensContract(provider); } + /** + * Creates an instance of ATokensClient using the default signer provided by the AptosProvider. + * + * @param provider - The AptosProvider instance to use for creating the ATokensClient. + * @returns A new instance of ATokensClient configured with the default signer. + */ public static buildWithDefaultSigner(provider: AptosProvider): ATokensClient { const client = new ATokensClient( provider, @@ -26,6 +64,19 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return client; } + /** + * Creates a new token with the specified parameters. + * + * @param maximumSupply - The maximum supply of the token. + * @param name - The name of the token. + * @param symbol - The symbol of the token. + * @param decimals - The number of decimal places the token uses. + * @param iconUri - The URI of the token's icon. + * @param projectUri - The URI of the project's website or information page. + * @param underlyingAsset - The account address of the underlying asset. + * @param treasuryAddress - The account address of the treasury. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async createToken( maximumSupply: bigint, name: string, @@ -51,6 +102,14 @@ export class ATokensClient extends AptosContractWrapperBaseClass { ); } + /** + * Rescues tokens from the contract and sends them to a specified address. + * + * @param token - The address of the token to be rescued. + * @param to - The address to which the rescued tokens will be sent. + * @param amount - The amount of tokens to be rescued. + * @returns A promise that resolves to the response of the committed transaction. + */ public async rescueTokens( token: AccountAddress, to: AccountAddress, @@ -62,6 +121,11 @@ export class ATokensClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the revision number of the AToken contract. + * + * @returns {Promise} A promise that resolves to the revision number of the AToken contract. + */ public async getRevision(): Promise { const [resp] = await this.callViewMethod( this.tokensContract.ATokenGetRevisionFuncAddr, @@ -70,6 +134,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp as number; } + /** + * Retrieves the metadata of an AToken by its symbol for a given account owner. + * + * @param owner - The account address of the owner. + * @param symbol - The symbol of the AToken. + * @returns A promise that resolves to the account address containing the metadata. + */ public async getMetadataBySymbol( owner: AccountAddress, symbol: string, @@ -81,6 +152,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the token account address associated with the given metadata address. + * + * @param metadataAddress - The address of the metadata account. + * @returns A promise that resolves to the token account address. + */ public async getTokenAccountAddress( metadataAddress: AccountAddress, ): Promise { @@ -91,6 +168,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the token address for a given owner and token symbol. + * + * @param owner - The account address of the token owner. + * @param symbol - The symbol of the token. + * @returns A promise that resolves to the account address of the token. + */ public async getTokenAddress( owner: AccountAddress, symbol: string, @@ -102,6 +186,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the metadata of a specific asset for a given owner and symbol. + * + * @param owner - The account address of the asset owner. + * @param symbol - The symbol of the asset. + * @returns A promise that resolves to the account address containing the asset metadata. + */ public async assetMetadata( owner: AccountAddress, symbol: string, @@ -113,6 +204,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the reserve treasury address for a given metadata address. + * + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to the account address of the reserve treasury. + */ public async getReserveTreasuryAddress( metadataAddress: AccountAddress, ): Promise { @@ -123,6 +220,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the underlying asset address for a given metadata address. + * + * @param metadataAddress - The address of the metadata account. + * @returns A promise that resolves to the underlying asset address. + */ public async getUnderlyingAssetAddress( metadataAddress: AccountAddress, ): Promise { @@ -133,6 +236,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the scaled balance of a specific account for a given token. + * + * @param owner - The address of the account whose scaled balance is being queried. + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the scaled balance of the specified account as a bigint. + */ public async scaledBalanceOf( owner: AccountAddress, metadataAddress: AccountAddress, @@ -146,6 +256,32 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the balance of a specific token for a given account. + * + * @param owner - The address of the account whose token balance is being queried. + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the balance of the token as a bigint. + */ + public async balanceOf( + owner: AccountAddress, + metadataAddress: AccountAddress, + ): Promise { + const [resp] = ( + await this.callViewMethod(this.tokensContract.ATokenBalanceOfFuncAddr, [ + owner, + metadataAddress, + ]) + ).map(mapToBigInt); + return resp; + } + + /** + * Retrieves the scaled total supply of a token. + * + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the scaled total supply of the token as a bigint. + */ public async scaledTotalSupply( metadataAddress: AccountAddress, ): Promise { @@ -158,6 +294,28 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the total supply of a token given its metadata address. + * + * @param {AccountAddress} metadataAddress - The address of the token's metadata. + * @returns {Promise} A promise that resolves to the total supply of the token as a bigint. + */ + public async totalSupply(metadataAddress: AccountAddress): Promise { + const [resp] = ( + await this.callViewMethod(this.tokensContract.ATokenTotalSupplyFuncAddr, [ + metadataAddress, + ]) + ).map(mapToBigInt); + return resp; + } + + /** + * Retrieves the previous index for a given user and metadata address. + * + * @param user - The account address of the user. + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to the previous index as a bigint. + */ public async getPreviousIndex( user: AccountAddress, metadataAddress: AccountAddress, @@ -171,6 +329,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the scaled user balance and total supply for a given user and token metadata address. + * + * @param owner - The account address of the user whose balance is being queried. + * @param metadataAddress - The account address of the token metadata. + * @returns A promise that resolves to an object containing the scaled user balance and the total supply. + */ public async getScaledUserBalanceAndSupply( owner: AccountAddress, metadataAddress: AccountAddress, @@ -184,7 +349,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return { scaledUserBalance, supply }; } - // Get the name of the fungible asset from the metadata object. + /** + * Retrieves the name of the token associated with the given metadata address. + * + * @param metadataAddress - The address of the account metadata. + * @returns A promise that resolves to the name of the token as a string. + */ public async name(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.ATokenNameFuncAddr, @@ -193,7 +363,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the symbol of the fungible asset from the metadata object. + /** + * Retrieves the symbol of the AToken associated with the given metadata address. + * + * @param metadataAddress - The address of the account metadata. + * @returns A promise that resolves to the symbol of the AToken as a string. + */ public async symbol(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.ATokenSymbolFuncAddr, @@ -202,7 +377,12 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the decimals from the metadata object. + /** + * Retrieves the number of decimals for a given token. + * + * @param metadataAddress - The address of the token metadata. + * @returns A promise that resolves to the number of decimals as a bigint. + */ public async decimals(metadataAddress: AccountAddress): Promise { const [resp] = ( await this.callViewMethod(this.tokensContract.ATokenDecimalsFuncAddr, [ @@ -212,7 +392,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return resp; } - // get metadata address + /** + * Retrieves the metadata address for a given coin. + * + * @param funcAddr - The Move function identifier to call. + * @param coinName - The name of the coin for which to retrieve the metadata address. + * @returns A promise that resolves to the account address containing the metadata. + */ public async getMetadataAddress( funcAddr: MoveFunctionId, coinName: string, @@ -221,7 +407,13 @@ export class ATokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } - // get decimals + /** + * Retrieves the decimal precision of a token. + * + * @param funcAddr - The address of the Move function to call. + * @param metadataAddr - The account address containing the token metadata. + * @returns A promise that resolves to the decimal precision of the token as a bigint. + */ public async getDecimals( funcAddr: MoveFunctionId, metadataAddr: AccountAddress, diff --git a/src/clients/aclClient.ts b/src/clients/aclClient.ts index 8782714..2d1ca5f 100644 --- a/src/clients/aclClient.ts +++ b/src/clients/aclClient.ts @@ -7,19 +7,39 @@ import { AptosContractWrapperBaseClass } from "./baseClass"; import { AclManagerContract } from "../contracts/acl_manage"; import { AptosProvider } from "./aptosProvider"; +/** + * AclClient class provides methods to interact with the ACL (Access Control List) manager contract. + * It extends the AptosContractWrapperBaseClass and provides various methods to manage roles and permissions. + */ export class AclClient extends AptosContractWrapperBaseClass { AclManagerContract: AclManagerContract; + /** + * Constructs an instance of AclClient. + * @param provider - The AptosProvider instance. + * @param signer - Optional Ed25519Account signer. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.AclManagerContract = new AclManagerContract(provider); } + /** + * Builds an AclClient instance with the default signer. + * @param provider - The AptosProvider instance. + * @returns A new instance of AclClient. + */ public static buildWithDefaultSigner(provider: AptosProvider): AclClient { const client = new AclClient(provider, provider.getAclProfileAccount()); return client; } + /** + * Checks if a user has a specific role. + * @param role - The role to check. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user has the role. + */ public async hasRole(role: string, user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.hasRoleFuncAddr, @@ -28,6 +48,12 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Grants a role to a user. + * @param role - The role to grant. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async grantRole( role: string, user: AccountAddress, @@ -38,6 +64,12 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Renounces a role for a user. + * @param role - The role to renounce. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async renounceRole( role: string, user: AccountAddress, @@ -48,6 +80,12 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Revokes a role from a user. + * @param role - The role to revoke. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async revokeRole( role: string, user: AccountAddress, @@ -58,6 +96,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Adds a pool admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addPoolAdmin( user: AccountAddress, ): Promise { @@ -67,6 +110,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes a pool admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removePoolAdmin( user: AccountAddress, ): Promise { @@ -76,6 +124,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is a pool admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is a pool admin. + */ public async isPoolAdmin(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isPoolAdminFuncAddr, @@ -84,6 +137,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Adds an emergency admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addEmergencyAdmin( user: AccountAddress, ): Promise { @@ -93,6 +151,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes an emergency admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removeEmergencyAdmin( user: AccountAddress, ): Promise { @@ -102,6 +165,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is an emergency admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is an emergency admin. + */ public async isEmergencyAdmin(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isEmergencyAdminFuncAddr, @@ -110,6 +178,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Adds a risk admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addRiskAdmin( user: AccountAddress, ): Promise { @@ -119,6 +192,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes a risk admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removeRiskAdmin( user: AccountAddress, ): Promise { @@ -128,6 +206,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is a risk admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is a risk admin. + */ public async isRiskAdmin(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isRiskAdminFuncAddr, @@ -136,6 +219,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Adds a flash borrower. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addFlashBorrower( user: AccountAddress, ): Promise { @@ -145,6 +233,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes a flash borrower. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removeFlashBorrower( user: AccountAddress, ): Promise { @@ -154,6 +247,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is a flash borrower. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is a flash borrower. + */ public async isFlashBorrower(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isFlashBorrowerFuncAddr, @@ -162,6 +260,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Adds a bridge. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addBridge( user: AccountAddress, ): Promise { @@ -171,6 +274,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes a bridge. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removeBridge( user: AccountAddress, ): Promise { @@ -180,6 +288,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is a bridge. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is a bridge. + */ public async isBridge(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isBridgeFuncAddr, @@ -188,6 +301,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Adds an asset listing admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async addAssetListingAdmin( user: AccountAddress, ): Promise { @@ -197,6 +315,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes an asset listing admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async removeAssetListingAdmin( user: AccountAddress, ): Promise { @@ -206,6 +329,11 @@ export class AclClient extends AptosContractWrapperBaseClass { ); } + /** + * Checks if a user is an asset listing admin. + * @param user - The account address of the user. + * @returns A promise that resolves to a boolean indicating if the user is an asset listing admin. + */ public async isAssetListingAdmin(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.isAssetListingAdminFuncAddr, @@ -214,6 +342,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Gets the pool admin role. + * @returns A promise that resolves to the pool admin role as a string. + */ public async getPoolAdminRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getPoolAdminRoleFuncAddr, @@ -222,6 +354,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the emergency admin role. + * @returns A promise that resolves to the emergency admin role as a string. + */ public async getEmergencyAdminRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getEmergencyAdminRoleFuncAddr, @@ -230,6 +366,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the risk admin role. + * @returns A promise that resolves to the risk admin role as a string. + */ public async getRiskAdminRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getRiskAdminRoleFuncAddr, @@ -238,6 +378,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the flash borrower role. + * @returns A promise that resolves to the flash borrower role as a string. + */ public async getFlashBorrowerRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getFlashBorrowerRoleFuncAddr, @@ -246,6 +390,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the bridge role. + * @returns A promise that resolves to the bridge role as a string. + */ public async getBridgeRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getBridgeRoleFuncAddr, @@ -254,6 +402,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the asset listing admin role. + * @returns A promise that resolves to the asset listing admin role as a string. + */ public async getAssetListingAdminRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getAssetListingAdminRoleFuncAddr, @@ -262,13 +414,10 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } - public async grantDefaultRoleAdmin(): Promise { - return this.sendTxAndAwaitResponse( - this.AclManagerContract.grantDefaultAdminRole, - [], - ); - } - + /** + * Gets the default admin role. + * @returns A promise that resolves to the default admin role as a string. + */ public async getDefaultAdminRole(): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.defaultAdminRole, @@ -277,6 +426,11 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Gets the admin role for a specific role. + * @param role - The role to get the admin role for. + * @returns A promise that resolves to the admin role as a string. + */ public async getRoleAdmin(role: string): Promise { const [resp] = await this.callViewMethod( this.AclManagerContract.getRoleAdmin, @@ -285,6 +439,12 @@ export class AclClient extends AptosContractWrapperBaseClass { return resp as string; } + /** + * Sets the admin role for a specific role. + * @param role - The role to set the admin role for. + * @param adminRole - The admin role to set. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async setRoleAdmin( role: string, adminRole: string, diff --git a/src/clients/aptosProvider.ts b/src/clients/aptosProvider.ts index c0fcba4..2ebe8a4 100644 --- a/src/clients/aptosProvider.ts +++ b/src/clients/aptosProvider.ts @@ -8,8 +8,24 @@ import { Ed25519Account, } from "@aptos-labs/ts-sdk"; import YAML from "yaml"; -import { map } from "yaml/dist/schema/common/map"; +/** + * Configuration interface for the AptosProvider. + * + * @interface AptosProviderConfig + * + * @property {Network} network - The network configuration for the AptosProvider. + * @property {Object} addresses - The contract addresses used by the AptosProvider. + * @property {string} addresses.A_TOKENS - The address for A tokens. + * @property {string} addresses.UNDERLYING_TOKENS - The address for underlying tokens. + * @property {string} addresses.VARIABLE_TOKENS - The address for variable tokens. + * @property {string} addresses.AAVE_ACL - The address for AAVE ACL. + * @property {string} addresses.AAVE_CONFIG - The address for AAVE configuration. + * @property {string} addresses.AAVE_ORACLE - The address for AAVE oracle. + * @property {string} addresses.AAVE_POOL - The address for AAVE pool. + * @property {string} addresses.AAVE_RATE - The address for AAVE rate. + * @property {string} addresses.AAVE_DATA - The address for AAVE data. + */ export interface AptosProviderConfig { network: Network; addresses: { @@ -25,6 +41,18 @@ export interface AptosProviderConfig { }; } +/** + * Configuration interface for an Aptos account. + * + * @interface AptosAccountConfig + * + * @property {string} network - The network to which the account belongs (e.g., mainnet, testnet). + * @property {string} private_key - The private key associated with the account. + * @property {string} public_key - The public key associated with the account. + * @property {string} account - The account address. + * @property {string} rest_url - The REST API URL for interacting with the Aptos blockchain. + * @property {string} faucet_url - The URL for the faucet service to fund the account with test tokens. + */ export interface AptosAccountConfig { network: string; private_key: string; @@ -46,6 +74,8 @@ export enum AAVE_PROFILES { AAVE_LARGE_PACKAGES = "aave_large_packages", AAVE_MATH = "aave_math", AAVE_DATA = "aave_data", + AAVE_DATA_FEEDS = "data_feeds", + AAVE_PLATFORM = "platform", DEFAULT_FUNDER = "default", TEST_ACCOUNT_0 = "test_account_0", TEST_ACCOUNT_1 = "test_account_1", @@ -55,11 +85,15 @@ export enum AAVE_PROFILES { TEST_ACCOUNT_5 = "test_account_5", } +/** + * The `AptosProvider` class is responsible for managing the configuration and profiles + * for interacting with the Aptos blockchain. It allows setting up network configurations, + * adding profile addresses and accounts, and initializing the Aptos instance. + * + * @class + */ export class AptosProvider { private network: Network; - - private oracleUrl: string; - private profileAddressMap = new Map(); private profileAccountMap = new Map(); @@ -67,30 +101,72 @@ export class AptosProvider { private constructor() {} + /** + * Sets the network for the Aptos provider. + * + * @param network - The network to set, represented by the `Network` type. + */ public setNetwork(network: Network) { this.network = network; } - public setOracleUrl(oracleUrl: string) { - this.oracleUrl = oracleUrl; - } - + /** + * Adds a profile address to the profile address map. + * + * @param profileName - The name of the profile to associate with the address. + * @param address - The account address to be added. + */ public addProfileAddress(profileName: string, address: AccountAddress) { this.profileAddressMap.set(profileName, address); } + /** + * Adds a profile account to the profile account map. + * + * @param profileName - The name of the profile to associate with the account. + * @param account - The Ed25519 private key of the account to add. + */ public addProfileAccount(profileName: string, account: Ed25519PrivateKey) { this.profileAccountMap.set(profileName, account); } + /** + * Sets the Aptos configuration for the client. + * + * @param aptosConfig - The configuration object for Aptos. + */ public setAptos(aptosConfig: AptosConfig) { this.aptos = new Aptos(aptosConfig); } + /** + * Creates an instance of `AptosProvider` from the given configuration. + * + * @param config - The configuration object for the `AptosProvider`. + * @returns A new instance of `AptosProvider` configured with the provided settings. + * + * @example + * ```typescript + * const config: AptosProviderConfig = { + * network: 'mainnet', + * addresses: { + * A_TOKENS: '0x...', + * UNDERLYING_TOKENS: '0x...', + * VARIABLE_TOKENS: '0x...', + * AAVE_ACL: '0x...', + * AAVE_CONFIG: '0x...', + * AAVE_ORACLE: '0x...', + * AAVE_POOL: '0x...', + * AAVE_DATA: '0x...' + * } + * }; + * const aptosProvider = AptosProvider.fromConfig(config); + * ``` + */ public static fromConfig(config: AptosProviderConfig): AptosProvider { let aptosProvider = new AptosProvider(); aptosProvider.setNetwork(config.network); - // aptosProvider.setOracleUrl(config.oracle.URL); + aptosProvider.addProfileAddress( AAVE_PROFILES.A_TOKENS, AccountAddress.fromString(config.addresses.A_TOKENS), @@ -130,6 +206,33 @@ export class AptosProvider { return aptosProvider; } + /** + * Creates an instance of `AptosProvider` by reading configuration from environment variables. + * + * @throws {Error} If any required environment variable is missing or if an unknown network is specified. + * + * @returns {AptosProvider} The configured `AptosProvider` instance. + * + * Environment Variables: + * - `APTOS_NETWORK`: The network to connect to (testnet, devnet, mainnet, local). + * - `A_TOKENS_PRIVATE_KEY`: Private key for A_TOKENS profile. + * - `UNDERLYING_TOKENS_PRIVATE_KEY`: Private key for UNDERLYING_TOKENS profile. + * - `VARIABLE_TOKENS_PRIVATE_KEY`: Private key for VARIABLE_TOKENS profile. + * - `AAVE_ACL_PRIVATE_KEY`: Private key for AAVE_ACL profile. + * - `AAVE_CONFIG_PRIVATE_KEY`: Private key for AAVE_CONFIG profile. + * - `AAVE_ORACLE_PRIVATE_KEY`: Private key for AAVE_ORACLE profile. + * - `AAVE_POOL_PRIVATE_KEY`: Private key for AAVE_POOL profile. + * - `AAVE_LARGE_PACKAGES_PRIVATE_KEY`: Private key for AAVE_LARGE_PACKAGES profile. + * - `AAVE_MATH_PRIVATE_KEY`: Private key for AAVE_MATH profile. + * - `AAVE_DATA_PRIVATE_KEY`: Private key for AAVE_DATA profile. + * - `DEFAULT_FUNDER_PRIVATE_KEY`: Private key for DEFAULT_FUNDER profile. + * - `TEST_ACCOUNT_0_PRIVATE_KEY`: Private key for TEST_ACCOUNT_0 profile. + * - `TEST_ACCOUNT_1_PRIVATE_KEY`: Private key for TEST_ACCOUNT_1 profile. + * - `TEST_ACCOUNT_2_PRIVATE_KEY`: Private key for TEST_ACCOUNT_2 profile. + * - `TEST_ACCOUNT_3_PRIVATE_KEY`: Private key for TEST_ACCOUNT_3 profile. + * - `TEST_ACCOUNT_4_PRIVATE_KEY`: Private key for TEST_ACCOUNT_4 profile. + * - `TEST_ACCOUNT_5_PRIVATE_KEY`: Private key for TEST_ACCOUNT_5 profile. + */ public static fromEnvs(): AptosProvider { const aptosProvider = new AptosProvider(); // read vars from .env file @@ -159,8 +262,6 @@ export class AptosProvider { ); } - aptosProvider.setOracleUrl(""); - // read envs if (!process.env.A_TOKENS_PRIVATE_KEY) { throw new Error("Env variable A_TOKENS_PRIVATE_KEY does not exist"); @@ -328,6 +429,17 @@ export class AptosProvider { return aptosProvider; } + /** + * Creates an instance of `AptosProvider` from a YAML string. + * + * This method parses the provided YAML string to extract profile configurations, + * sets the network for the `AptosProvider` based on the profile's network configuration, + * and adds profile accounts and addresses to the provider. + * + * @param aptosYaml - The YAML string containing the Aptos profile configurations. + * @returns An instance of `AptosProvider` configured based on the provided YAML. + * @throws Will throw an error if an unknown network is specified in the profile configuration. + */ public static fromAptosYaml(aptosYaml: string): AptosProvider { let aptosProvider = new AptosProvider(); const parsedYaml = YAML.parse(aptosYaml); @@ -372,12 +484,22 @@ export class AptosProvider { return aptosProvider; } - /** Returns the aptos instance. */ + /** + * Retrieves the Aptos instance. + * + * @returns {Aptos} The Aptos instance. + */ public getAptos(): Aptos { return this.aptos; } - /** Returns the profile private key by name if found. */ + /** + * Retrieves the private key associated with a given profile name. + * + * @param profileName - The name of the profile whose private key is to be retrieved. + * @returns The Ed25519 private key associated with the specified profile name. + * @throws Will throw an error if the profile name is not found in the profiles map. + */ public getProfileAccountPrivateKeyByName( profileName: string, ): Ed25519PrivateKey { @@ -389,7 +511,12 @@ export class AptosProvider { return this.profileAccountMap.get(profileName); } - /** Returns the profile private key by name if found. */ + /** + * Retrieves the profile account associated with the given profile name. + * + * @param profileName - The name of the profile whose account is to be retrieved. + * @returns An instance of `Ed25519Account` if the profile account exists, otherwise `undefined`. + */ public getProfileAccountByName(profileName: string): Ed25519Account { const profileAccount = this.getProfileAccountPrivateKeyByName(profileName); if (profileAccount) { @@ -400,7 +527,13 @@ export class AptosProvider { return undefined; } - /** Returns the profile address by name if found. */ + /** + * Retrieves the account address associated with the given profile name. + * + * @param profileName - The name of the profile whose account address is to be retrieved. + * @returns The account address associated with the given profile name. + * @throws Will throw an error if the profile name does not exist in the profile address map. + */ public getProfileAddressByName(profileName: string): AccountAddress { if (!this.profileAddressMap.has(profileName)) { throw new Error( @@ -410,45 +543,90 @@ export class AptosProvider { return this.profileAddressMap.get(profileName); } + /** + * Retrieves the Oracle profile account. + * + * This method returns an `Ed25519Account` instance associated with the + * AAVE Oracle profile. It internally calls `getProfileAccountByName` + * with the `AAVE_ORACLE` profile name to fetch the account details. + * + * @returns {Ed25519Account} The Oracle profile account. + */ public getOracleProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.AAVE_ORACLE); } + /** + * Retrieves the Ed25519 account associated with the AAVE pool profile. + * + * @returns {Ed25519Account} The Ed25519 account for the AAVE pool profile. + */ public getPoolProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.AAVE_POOL); } + /** + * Retrieves the profile account associated with AAVE A_TOKENS. + * + * @returns {Ed25519Account} The Ed25519 account corresponding to the A_TOKENS profile. + */ public getATokensProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.A_TOKENS); } + /** + * Retrieves the profile account associated with underlying tokens. + * + * @returns {Ed25519Account} The profile account for underlying tokens. + */ public getUnderlyingTokensProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.UNDERLYING_TOKENS); } + /** + * Retrieves the profile account associated with variable tokens. + * + * @returns {Ed25519Account} The Ed25519 account corresponding to the variable tokens profile. + */ public getVariableTokensProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.VARIABLE_TOKENS); } + /** + * Retrieves the ACL (Access Control List) profile account. + * + * @returns {Ed25519Account} The ACL profile account. + */ public getAclProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.AAVE_ACL); } + /** + * Retrieves the data profile account associated with the AAVE_DATA profile. + * + * @returns {Ed25519Account} The Ed25519 account corresponding to the AAVE_DATA profile. + */ public getDataProfileAccount(): Ed25519Account { return this.getProfileAccountByName(AAVE_PROFILES.AAVE_DATA); } - /** Gets the selected network. */ + /** + * Retrieves the current network configuration. + * + * @returns {Network} The network configuration. + */ public getNetwork(): Network { return this.network; } - - /** Gets the oracle url. */ - public getOracleUrl(): string { - return this.oracleUrl; - } } +/** + * Adds a profile private key to the Aptos provider and associates it with a profile account. + * + * @param aptosProvider - The instance of the AptosProvider to which the profile and private key will be added. + * @param profile - The name of the profile to be associated with the private key. + * @param privateKey - The private key to be added and associated with the profile. + */ const addProfilePkey = ( aptosProvider: AptosProvider, profile: string, diff --git a/src/clients/baseClass.ts b/src/clients/baseClass.ts index 5c8fd65..f8419be 100644 --- a/src/clients/baseClass.ts +++ b/src/clients/baseClass.ts @@ -16,6 +16,14 @@ import { } from "@aptos-labs/ts-sdk"; import { AptosProvider } from "./aptosProvider"; +/** + * Retrieves the APT balance of a specified account. + * + * @param aptos - An instance of the Aptos client. + * @param accountAddress - The address of the account to retrieve the balance for. + * @param versionToWaitFor - (Optional) The ledger version to wait for before retrieving the balance. + * @returns A promise that resolves to the APT balance of the account as a bigint. + */ const getAccountBalance = async ( aptos: Aptos, accountAddress: AccountAddress, @@ -28,6 +36,14 @@ const getAccountBalance = async ( return BigInt(amount); }; +/** + * Funds an Aptos account with the specified amount. + * + * @param aptos - The Aptos instance to use for funding the account. + * @param account - The address of the account to be funded. + * @param amount - The amount of funds to be added to the account. + * @returns A promise that resolves to the user transaction response. + */ async function fundAccount( aptos: Aptos, account: AccountAddress, @@ -39,6 +55,15 @@ async function fundAccount( }); } +/** + * Builds a simple transaction data object for the given parameters. + * + * @param aptos - The Aptos client instance used to build the transaction. + * @param user - The account address of the user initiating the transaction. + * @param func_addr - The identifier of the Move function to be called. + * @param func_args - An array of arguments to be passed to the Move function. + * @returns A promise that resolves to the transaction data object. + */ async function transactionData( aptos: Aptos, user: AccountAddress, @@ -56,6 +81,15 @@ async function transactionData( }); } +/** + * Executes a transaction on the Aptos blockchain. + * + * @param aptos - The Aptos client instance. + * @param signer - The account that will sign the transaction. + * @param func_addr - The address of the Move function to be called. + * @param func_args - The arguments to be passed to the Move function. + * @returns A promise that resolves when the transaction is confirmed. + */ async function transaction( aptos: Aptos, signer: Ed25519Account, @@ -79,6 +113,15 @@ async function transaction( return aptos.waitForTransaction({ transactionHash: commitTx.hash }); } +/** + * Executes a view function on the Aptos blockchain. + * + * @template T - The type of the return value, which extends an array of MoveValue. + * @param {Aptos} aptos - The Aptos client instance. + * @param {MoveFunctionId} func_addr - The address of the function to be called. + * @param {Array} func_args - The arguments to be passed to the function. + * @returns {Promise} - A promise that resolves to the result of the view function. + */ async function view( aptos: Aptos, func_addr: MoveFunctionId, @@ -100,35 +143,64 @@ export class AptosContractWrapperBaseClass { protected readonly aptosProvider: AptosProvider; + /** + * Creates an instance of the base class. + * + * @param aptosProvider - An instance of AptosProvider to interact with the Aptos blockchain. + * @param signer - An optional Ed25519Account instance used for signing transactions. + */ constructor(aptosProvider: AptosProvider, signer?: Ed25519Account) { this.aptosProvider = aptosProvider; this.signer = signer; this.moduleSigner = signer; } - /** Sets the signer. */ + /** + * Sets the signer for the client. + * + * @param senderAccount - The Ed25519 account to be used as the signer. + */ public setSigner(senderAccount: Ed25519Account) { this.signer = senderAccount; } - /** Sets the signer. */ + /** + * Sets the signer for the current instance using the provided Ed25519 account. + * + * @param senderAccount - The Ed25519 account to be used as the signer. + * @returns The current instance with the signer set. + */ public withSigner(senderAccount: Ed25519Account) { this.setSigner(senderAccount); return this; } - /** Sets the module signer. */ + /** + * Sets the signer to the module signer and returns the current instance. + * + * @returns {this} The current instance with the module signer set. + */ public withModuleSigner() { this.setSigner(this.moduleSigner); return this; } - /** Returns the signer. */ + /** + * Retrieves the current Ed25519Account signer. + * + * @returns {Ed25519Account} The current signer. + */ public getSigner(): Ed25519Account { return this.signer; } - /** Sends and awaits a response. */ + /** + * Sends a transaction and awaits the response. + * + * @param functionId - The ID of the Move function to be called. + * @param func_args - An array of arguments for the entry function. + * @returns A promise that resolves to the committed transaction response. + */ public async sendTxAndAwaitResponse( functionId: MoveFunctionId, func_args: Array< @@ -143,6 +215,14 @@ export class AptosContractWrapperBaseClass { ); } + /** + * Builds a transaction for the specified user, function, and arguments. + * + * @param user - The account address of the user initiating the transaction. + * @param functionId - The identifier of the Move function to be called. + * @param func_args - An array of arguments for the entry function. + * @returns A promise that resolves to a SimpleTransaction object. + */ public async buildTx( user: AccountAddress, functionId: MoveFunctionId, @@ -158,7 +238,14 @@ export class AptosContractWrapperBaseClass { ); } - /** Calls a view method. */ + /** + * Calls a view method on the Aptos blockchain. + * + * @template T - The type of the return value, which extends an array of MoveValue. + * @param {MoveFunctionId} functionId - The identifier of the function to call. + * @param {Array} func_args - The arguments to pass to the function. + * @returns {Promise} - A promise that resolves to the result of the view method call. + */ public async callViewMethod( functionId: MoveFunctionId, func_args: Array< @@ -168,7 +255,13 @@ export class AptosContractWrapperBaseClass { return view(this.aptosProvider.getAptos(), functionId, func_args); } - /// funds a given account + /** + * Funds an account with a specified amount. + * + * @param account - The address of the account to be funded. + * @param amount - The amount to fund the account with, in bigint. + * @returns A promise that resolves to a UserTransactionResponse. + */ public async fundAccount( account: AccountAddress, amount: bigint, @@ -176,7 +269,14 @@ export class AptosContractWrapperBaseClass { return fundAccount(this.aptosProvider.getAptos(), account, Number(amount)); } - /// returns the account apt balance + /** + * Retrieves the Aptos balance of a specified account. + * + * @param account - The Ed25519 account object. + * @param accountAddress - The address of the account to retrieve the balance for. + * @param versionToWaitFor - (Optional) The specific version to wait for before retrieving the balance. + * @returns A promise that resolves to the balance of the account in bigint. + */ public async getAccounAptBalance( account: Ed25519Account, accountAddress: AccountAddress, @@ -189,7 +289,18 @@ export class AptosContractWrapperBaseClass { ); } - /// gets all events for a tx hash + /** + * Retrieves the events associated with a given transaction hash. + * + * @param txHash - The hash of the transaction to retrieve events for. + * @returns A promise that resolves to an array of objects containing the event data. + * + * @remarks + * This method fetches the transaction details using the provided Aptos provider. + * It then checks if the transaction response is of type `BlockMetadataTransactionResponse` + * or `UserTransactionResponse` to extract the events. The event data is parsed from JSON + * and returned in an array. + */ public async getTxEvents( txHash: HexInput, ): Promise> { @@ -208,7 +319,22 @@ export class AptosContractWrapperBaseClass { })); } - /// gets all events from a given account + /** + * Retrieves events associated with a specific account. + * + * @param account - The address of the account to retrieve events for. + * @param limit - The maximum number of events to retrieve. + * @returns A promise that resolves to an array of event objects, each containing: + * - `account_address`: The address of the account. + * - `creation_number`: The creation number of the event. + * - `data`: The data associated with the event. + * - `event_index`: The index of the event. + * - `sequence_number`: The sequence number of the event. + * - `transaction_block_height`: The block height of the transaction. + * - `transaction_version`: The version of the transaction. + * - `type`: The type of the event. + * - `indexed_type`: The indexed type of the event. + */ public async getEventsFromAccount( account: AccountAddress, limit: number, diff --git a/src/clients/bridgeClient.ts b/src/clients/bridgeClient.ts index e080069..5739d93 100644 --- a/src/clients/bridgeClient.ts +++ b/src/clients/bridgeClient.ts @@ -7,19 +7,44 @@ import { AptosContractWrapperBaseClass } from "./baseClass"; import { BridgeContract } from "../contracts/bridge"; import { AptosProvider } from "./aptosProvider"; +/** + * The `BridgeClient` class provides methods to interact with the bridge contract on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes functionalities to back unbacked assets + * and mint unbacked tokens. + */ export class BridgeClient extends AptosContractWrapperBaseClass { bridgeContract: BridgeContract; + /** + * Creates an instance of BridgeClient. + * + * @param provider - The Aptos blockchain provider. + * @param signer - Optional Ed25519 account signer. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.bridgeContract = new BridgeContract(provider); } + /** + * Creates an instance of `BridgeClient` using the default signer provided by the `AptosProvider`. + * + * @param provider - The `AptosProvider` instance used to create the `BridgeClient`. + * @returns A new instance of `BridgeClient` initialized with the default signer. + */ public static buildWithDefaultSigner(provider: AptosProvider): BridgeClient { const client = new BridgeClient(provider, provider.getPoolProfileAccount()); return client; } + /** + * Initiates a transaction to back unbacked assets. + * + * @param asset - The address of the asset to be backed. + * @param amount - The amount of the asset to be backed, represented as a bigint. + * @param fee - The fee associated with the transaction, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async backUnbacked( asset: AccountAddress, amount: bigint, @@ -31,6 +56,15 @@ export class BridgeClient extends AptosContractWrapperBaseClass { ); } + /** + * Mints unbacked tokens for a specified asset. + * + * @param asset - The address of the asset to mint. + * @param amount - The amount of the asset to mint, represented as a bigint. + * @param onBehalfOf - The address on whose behalf the asset is being minted. + * @param referralCode - A referral code for tracking purposes. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async mintUnbacked( asset: AccountAddress, amount: bigint, diff --git a/src/clients/coinMigratorClient.ts b/src/clients/coinMigratorClient.ts index b83335b..f338d53 100644 --- a/src/clients/coinMigratorClient.ts +++ b/src/clients/coinMigratorClient.ts @@ -7,14 +7,44 @@ import { AptosContractWrapperBaseClass } from "./baseClass"; import { CoinMigratorContract } from "../contracts/coinMigrator"; import { AptosProvider } from "./aptosProvider"; +/** + * The `CoinMigratorClient` class provides methods to interact with the Coin Migrator contract on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes functionalities to convert coins to FA and vice versa, + * as well as retrieve the FA address. + * + * @remarks + * This client is designed to work with the Aptos blockchain and requires an `AptosProvider` for network interactions. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const client = new CoinMigratorClient(provider); + * const faAddress = await client.getFaAddress(); + * console.log(faAddress); + * ``` + * + * @public + */ export class CoinMigratorClient extends AptosContractWrapperBaseClass { coinMigratorContract: CoinMigratorContract; + /** + * Creates an instance of CoinMigratorClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance used for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.coinMigratorContract = new CoinMigratorContract(provider); } + /** + * Creates an instance of `CoinMigratorClient` using the default signer. + * + * @param provider - The `AptosProvider` instance to be used for creating the client. + * @returns A new instance of `CoinMigratorClient` initialized with the provided `AptosProvider`. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): CoinMigratorClient { @@ -25,6 +55,12 @@ export class CoinMigratorClient extends AptosContractWrapperBaseClass { return client; } + /** + * Converts a specified amount of coins to FA (Financial Asset). + * + * @param amount - The amount of coins to be converted, represented as a bigint. + * @returns A promise that resolves to a `CommittedTransactionResponse` object containing the transaction details. + */ public async coinToFa(amount: bigint): Promise { return this.sendTxAndAwaitResponse( this.coinMigratorContract.CoinToFaFuncAddr, @@ -32,6 +68,12 @@ export class CoinMigratorClient extends AptosContractWrapperBaseClass { ); } + /** + * Converts the specified amount from FA to Coin. + * + * @param amount - The amount to be converted, specified as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse object. + */ public async faToCoin(amount: bigint): Promise { return this.sendTxAndAwaitResponse( this.coinMigratorContract.FaToCoinFuncAddr, @@ -39,6 +81,14 @@ export class CoinMigratorClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the FA (Financial Address) associated with the coin migrator contract. + * + * This method calls the `GetFaAddrFuncAddr` view method on the coin migrator contract + * and maps the response to an `AccountAddress` object. + * + * @returns {Promise} A promise that resolves to the FA address as an `AccountAddress` object. + */ public async getFaAddress(): Promise { const [resp] = ( await this.callViewMethod(this.coinMigratorContract.GetFaAddrFuncAddr, []) diff --git a/src/clients/coreClient.ts b/src/clients/coreClient.ts index 9012842..8266030 100644 --- a/src/clients/coreClient.ts +++ b/src/clients/coreClient.ts @@ -9,20 +9,48 @@ import { AptosProvider } from "./aptosProvider"; import { SupplyBorrowContract } from "../contracts/supply_borrow"; import { mapToBigInt } from "../helpers/common"; +/** + * The `CoreClient` class provides methods to interact with the Aave protocol on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes functionalities for supplying, borrowing, + * repaying, and managing assets within the Aave protocol. + * + * @class + * @extends {AptosContractWrapperBaseClass} + */ export class CoreClient extends AptosContractWrapperBaseClass { supplyBorrowContract: SupplyBorrowContract; + /** + * Creates an instance of CoreClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance used for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.supplyBorrowContract = new SupplyBorrowContract(provider); } + /** + * Creates an instance of `CoreClient` using the provided `AptosProvider` and its default signer. + * + * @param provider - The `AptosProvider` instance used to initialize the `CoreClient`. + * @returns A new instance of `CoreClient` initialized with the provided `AptosProvider` and its default signer. + */ public static buildWithDefaultSigner(provider: AptosProvider): CoreClient { const client = new CoreClient(provider, provider.getPoolProfileAccount()); return client; } - /// User supplies + /** + * Supplies a specified amount of an asset on behalf of a given account. + * + * @param asset - The address of the asset to supply. + * @param amount - The amount of the asset to supply, represented as a bigint. + * @param onBehalfOf - The address of the account on whose behalf the asset is being supplied. + * @param referralCode - A referral code for tracking referrals. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async supply( asset: AccountAddress, amount: bigint, @@ -35,6 +63,16 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } + /** + * Builds a supply transaction. + * + * @param user - The account address of the user initiating the supply. + * @param asset - The account address of the asset to be supplied. + * @param amount - The amount of the asset to be supplied, represented as a bigint. + * @param onBehalfOf - The account address on whose behalf the supply is being made. + * @param referralCode - The referral code for the transaction. + * @returns A promise that resolves to a SimpleTransaction object. + */ public async buildSupply( user: AccountAddress, asset: AccountAddress, @@ -50,7 +88,14 @@ export class CoreClient extends AptosContractWrapperBaseClass { ]); } - /// User withdraws + /** + * Withdraws a specified amount of an asset to a given account address. + * + * @param asset - The address of the asset to withdraw. + * @param amount - The amount of the asset to withdraw, represented as a bigint. + * @param to - The account address to which the asset will be withdrawn. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async withdraw( asset: AccountAddress, amount: bigint, @@ -62,7 +107,16 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// User borrows + /** + * Borrows a specified amount of an asset on behalf of a user. + * + * @param asset - The address of the asset to borrow. + * @param amount - The amount of the asset to borrow. + * @param interestRateMode - The interest rate mode (e.g., stable or variable). + * @param referralCode - The referral code for the transaction. + * @param onBehalfOf - The address of the user on whose behalf the asset is borrowed. + * @returns A promise that resolves to the response of the committed transaction. + */ public async borrow( asset: AccountAddress, amount: bigint, @@ -76,7 +130,15 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// User repays + /** + * Repays a borrowed amount for a specific asset. + * + * @param asset - The address of the asset to repay. + * @param amount - The amount to repay, specified as a bigint. + * @param interestRateMode - The interest rate mode (e.g., stable or variable). + * @param onBehalfOf - The address of the account on whose behalf the repayment is made. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async repay( asset: AccountAddress, amount: bigint, @@ -89,7 +151,14 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// User repays with A tokens + /** + * Repays a loan using aTokens. + * + * @param asset - The address of the asset to repay. + * @param amount - The amount of the asset to repay, in bigint. + * @param interestRateMode - The interest rate mode (e.g., stable or variable). + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async repayWithATokens( asset: AccountAddress, amount: bigint, @@ -102,6 +171,17 @@ export class CoreClient extends AptosContractWrapperBaseClass { } /// User finalizes the transfer + /** + * Finalizes the transfer of an asset from one account to another. + * + * @param asset - The address of the asset being transferred. + * @param from - The address of the account sending the asset. + * @param to - The address of the account receiving the asset. + * @param amount - The amount of the asset being transferred. + * @param balanceFromBefore - The balance of the sender's account before the transfer. + * @param balanceToBefore - The balance of the receiver's account before the transfer. + * @returns A promise that resolves to the response of the committed transaction. + */ public async finalizeTransfer( asset: AccountAddress, from: AccountAddress, @@ -123,7 +203,16 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// User liquidates a position + /** + * Executes a liquidation call on the Aave protocol. + * + * @param collateralAsset - The address of the collateral asset. + * @param debtAsset - The address of the debt asset. + * @param user - The address of the user whose position is being liquidated. + * @param debtToCover - The amount of debt to cover in the liquidation. + * @param receiveAToken - A boolean indicating whether to receive aTokens as collateral. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async liquidationCall( collateralAsset: AccountAddress, debtAsset: AccountAddress, @@ -137,7 +226,13 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// User finalizes the transfer + /** + * Sets whether a user should use a specific reserve as collateral. + * + * @param asset - The address of the asset to be used as collateral. + * @param useAsCollateral - A boolean indicating whether to use the asset as collateral. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async setUserUseReserveAsCollateral( asset: AccountAddress, useAsCollateral: boolean, @@ -148,7 +243,18 @@ export class CoreClient extends AptosContractWrapperBaseClass { ); } - /// Returns all user account data + /** + * Retrieves the account data for a specific user. + * + * @param user - The address of the user's account. + * @returns A promise that resolves to an object containing the user's account data: + * - `totalCollateralBase`: The total collateral in base units. + * - `totalDebtBase`: The total debt in base units. + * - `availableBorrowsBase`: The available amount for borrowing in base units. + * - `currentLiquidationThreshold`: The current liquidation threshold in base units. + * - `ltv`: The loan-to-value ratio in base units. + * - `healthFactor`: The health factor in base units. + */ public async getUserAccountData(user: AccountAddress): Promise<{ totalCollateralBase: bigint; totalDebtBase: bigint; diff --git a/src/clients/flashloanClient.ts b/src/clients/flashloanClient.ts index f8b6991..089bd54 100644 --- a/src/clients/flashloanClient.ts +++ b/src/clients/flashloanClient.ts @@ -7,14 +7,31 @@ import { AptosContractWrapperBaseClass } from "./baseClass"; import { AptosProvider } from "./aptosProvider"; import { FlashLoanContract } from "../contracts/flashloan"; +/** + * The FlashloanClient class provides methods to interact with the flash loan functionality + * of the Aave V3 protocol on the Aptos blockchain. It extends the AptosContractWrapperBaseClass + * and uses the FlashLoanContract to execute flash loan transactions. + */ export class FlashloanClient extends AptosContractWrapperBaseClass { flashloanContract: FlashLoanContract; + /** + * Creates an instance of FlashloanClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.flashloanContract = new FlashLoanContract(provider); } + /** + * Creates an instance of FlashloanClient using the default signer. + * + * @param provider - The AptosProvider instance to use for creating the FlashloanClient. + * @returns A new instance of FlashloanClient. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): FlashloanClient { @@ -25,6 +42,17 @@ export class FlashloanClient extends AptosContractWrapperBaseClass { return client; } + /** + * Executes a flash loan transaction. + * + * @param receiverAddress - The address of the contract receiving the funds. + * @param assets - An array of asset addresses to be borrowed. + * @param amounts - An array of amounts corresponding to each asset to be borrowed. + * @param interestRateModes - An array of interest rate modes for each asset. + * @param onBehalfOf - The address on whose behalf the flash loan is executed. + * @param referralCode - A referral code for potential rewards. + * @returns A promise that resolves to a boolean indicating the success of the flash loan transaction. + */ public async flashloan( receiverAddress: AccountAddress, assets: Array, @@ -47,6 +75,15 @@ export class FlashloanClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Executes a simple flash loan transaction. + * + * @param receiverAddress - The address of the account that will receive the flash loan. + * @param asset - The address of the asset to be borrowed. + * @param amount - The amount of the asset to be borrowed. + * @param referralCode - A referral code for the transaction. + * @returns A promise that resolves to the response of the committed transaction. + */ public async flashloanSimple( receiverAddress: AccountAddress, asset: AccountAddress, diff --git a/src/clients/oracleClient.ts b/src/clients/oracleClient.ts index 6781320..c711ddf 100644 --- a/src/clients/oracleClient.ts +++ b/src/clients/oracleClient.ts @@ -8,14 +8,43 @@ import { OracleContract } from "../contracts/oracle"; import { AptosProvider } from "./aptosProvider"; import { mapToBigInt } from "../helpers/common"; +/** + * The `OracleClient` class provides methods to interact with the oracle contract on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes functionalities to retrieve and set asset prices, + * manage feed IDs, and obtain oracle-related addresses. + * + * @remarks + * This class is designed to work with the Aptos blockchain and requires an instance of `AptosProvider` and optionally `Ed25519Account` for signing transactions. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const oracleClient = new OracleClient(provider); + * const price = await oracleClient.getAssetPrice(assetAddress); + * ``` + * + * @public + */ export class OracleClient extends AptosContractWrapperBaseClass { oracleContract: OracleContract; + /** + * Creates an instance of OracleClient. + * + * @param provider - The Aptos blockchain provider. + * @param signer - Optional Ed25519 account signer. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.oracleContract = new OracleContract(provider); } + /** + * Creates an instance of OracleClient using the default signer from the provided AptosProvider. + * + * @param provider - The AptosProvider instance to use for creating the OracleClient. + * @returns A new instance of OracleClient. + */ public static buildWithDefaultSigner(provider: AptosProvider): OracleClient { const client = new OracleClient( provider, @@ -24,6 +53,12 @@ export class OracleClient extends AptosContractWrapperBaseClass { return client; } + /** + * Retrieves the price of a specified asset. + * + * @param asset - The address of the asset for which the price is being requested. + * @returns A promise that resolves to the price of the asset as a bigint. + */ public async getAssetPrice(asset: AccountAddress): Promise { const [resp] = ( await this.callViewMethod(this.oracleContract.GetAssetPriceFuncAddr, [ @@ -33,6 +68,12 @@ export class OracleClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the prices of the specified assets. + * + * @param assets - An array of account addresses representing the assets. + * @returns A promise that resolves to an array of bigints, each representing the price of an asset. + */ public async getAssetsPrices( assets: Array, ): Promise> { @@ -43,6 +84,13 @@ export class OracleClient extends AptosContractWrapperBaseClass { ).map((item) => mapToBigInt(item)); } + /** + * Sets the feed ID for a given asset in the oracle contract. + * + * @param asset - The account address of the asset for which the feed ID is being set. + * @param feedId - The feed ID to be associated with the asset, represented as a Uint8Array. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async setAssetFeedId( asset: AccountAddress, feedId: Uint8Array, @@ -53,6 +101,13 @@ export class OracleClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the feed IDs for a batch of assets in the oracle contract. + * + * @param assets - An array of account addresses representing the assets. + * @param feedIds - An array of Uint8Array representing the feed IDs for the assets. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async batchSetAssetFeedIds( assets: Array, feedIds: Array, @@ -63,6 +118,12 @@ export class OracleClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes the feed ID associated with a given asset. + * + * @param asset - The address of the asset for which the feed ID should be removed. + * @returns A promise that resolves to the response of the committed transaction. + */ public async removeAssetFeedId( asset: AccountAddress, ): Promise { @@ -72,6 +133,12 @@ export class OracleClient extends AptosContractWrapperBaseClass { ); } + /** + * Removes the feed IDs for a batch of assets from the oracle contract. + * + * @param assets - An array of account addresses representing the assets whose feed IDs are to be removed. + * @returns A promise that resolves to a `CommittedTransactionResponse` indicating the result of the transaction. + */ public async batchRemoveAssetFeedIds( assets: Array, ): Promise { @@ -81,6 +148,14 @@ export class OracleClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the Oracle Resource Account address. + * + * This method calls the view method on the oracle contract to get the Oracle Resource Account address, + * and then maps the response to an `AccountAddress` object. + * + * @returns {Promise} A promise that resolves to the `AccountAddress` of the Oracle Resource Account. + */ public async getOracleResourceAccount(): Promise { const [resp] = ( await this.callViewMethod( @@ -91,6 +166,11 @@ export class OracleClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the oracle address from the oracle contract. + * + * @returns {Promise} A promise that resolves to the oracle address. + */ public async getOracleAddress(): Promise { const [resp] = ( await this.callViewMethod( diff --git a/src/clients/poolAddressesProviderClient.ts b/src/clients/poolAddressesProviderClient.ts index be40000..1242baa 100644 --- a/src/clients/poolAddressesProviderClient.ts +++ b/src/clients/poolAddressesProviderClient.ts @@ -8,14 +8,33 @@ import { Metadata } from "../helpers/interfaces"; import { AptosProvider } from "./aptosProvider"; import { PoolContract } from "../contracts/pool"; +/** + * The `PoolAddressesProviderClient` class provides methods to interact with the pool contract + * on the Aptos blockchain. It extends the `AptosContractWrapperBaseClass` and includes various + * methods to retrieve and set addresses and configurations related to the pool. + * + * @extends AptosContractWrapperBaseClass + */ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { poolContract: PoolContract; + /** + * Creates an instance of PoolAddressesProviderClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.poolContract = new PoolContract(provider); } + /** + * Creates an instance of `PoolAddressesProviderClient` using the default signer. + * + * @param provider - The `AptosProvider` instance to use for creating the client. + * @returns A new instance of `PoolAddressesProviderClient` initialized with the default signer. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): PoolAddressesProviderClient { @@ -26,6 +45,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { return client; } + /** + * Checks if the given ID has a mapped account in the pool contract. + * + * @param id - The ID to check for a mapped account. + * @returns A promise that resolves to a boolean indicating whether the ID has a mapped account. + */ public async hasIdMappedAccount(id: string): Promise { const [resp] = await this.callViewMethod( this.poolContract.HasIdMappedAccountFuncAddr, @@ -34,6 +59,11 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { return resp as boolean; } + /** + * Retrieves the market ID from the pool contract. + * + * @returns {Promise} A promise that resolves to the market ID as a string if available, or undefined if not. + */ public async getMarketId(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetMarketIdFuncAddr, @@ -42,6 +72,11 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { return resp ? (resp as Metadata).inner : undefined; } + /** + * Retrieves the address from the pool contract. + * + * @returns {Promise} A promise that resolves to an AccountAddress if the address is found, or undefined if not. + */ public async getAddress(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetAddressFuncAddr, @@ -52,6 +87,11 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the pool address from the pool contract. + * + * @returns {Promise} A promise that resolves to the pool address as an `AccountAddress` object if available, otherwise `undefined`. + */ public async getPool(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetPoolFuncAddr, @@ -62,6 +102,18 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the address of the Pool Configurator. + * + * This method calls the `GetPoolConfiguratorFuncAddr` function on the pool contract + * to obtain the address of the Pool Configurator. If the call is successful and + * a response is received, it converts the response to an `AccountAddress` object. + * If no response is received, it returns `undefined`. + * + * @returns {Promise} A promise that resolves to the + * address of the Pool Configurator as an `AccountAddress` object, or `undefined` + * if no address is found. + */ public async getPoolConfigurator(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetPoolConfiguratorFuncAddr, @@ -72,6 +124,11 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the price oracle address from the pool contract. + * + * @returns {Promise} A promise that resolves to the price oracle address as an `AccountAddress` object, or `undefined` if the address is not available. + */ public async getPriceOracle(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetPriceOracleFuncAddr, @@ -82,6 +139,11 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the ACL (Access Control List) Manager address. + * + * @returns {Promise} A promise that resolves to the ACL Manager's account address if available, otherwise undefined. + */ public async getAclManager(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetAclManagerFuncAddr, @@ -92,6 +154,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the ACL (Access Control List) admin account address. + * + * @returns {Promise} A promise that resolves to the ACL admin account address, + * or undefined if the address could not be retrieved. + */ public async getAclAdmin(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetAclAdminFuncAddr, @@ -102,6 +170,18 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the address of the price oracle sentinel. + * + * This method calls the `GetPriceOracleSentinelFuncAddr` function of the pool contract + * to obtain the address of the price oracle sentinel. If the response is valid, it + * converts the address from a string to an `AccountAddress` object and returns it. + * If the response is not valid, it returns `undefined`. + * + * @returns {Promise} A promise that resolves to the address + * of the price oracle sentinel as an `AccountAddress` object, or `undefined` if the + * address could not be retrieved. + */ public async getPriceOracleSentinel(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetPriceOracleSentinelFuncAddr, @@ -112,6 +192,17 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Retrieves the address of the pool data provider. + * + * This method calls the `GetPoolDataProviderFuncAddr` view method on the pool contract + * to obtain the address of the pool data provider. If the response is valid, it converts + * the address from a string to an `AccountAddress` object. If the response is invalid, + * it returns `undefined`. + * + * @returns {Promise} A promise that resolves to the `AccountAddress` + * of the pool data provider if available, otherwise `undefined`. + */ public async getPoolDataProvider(): Promise { const [resp] = await this.callViewMethod( this.poolContract.GetPoolDataProviderFuncAddr, @@ -122,6 +213,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { : undefined; } + /** + * Sets the market ID for the pool contract. + * + * @param newMarketId - The new market ID to be set. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setMarketId( newMarketId: string, ): Promise { @@ -130,6 +227,13 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ]); } + /** + * Sets the address for a given identifier in the pool contract. + * + * @param id - The identifier for which the address is being set. + * @param addr - The account address to be associated with the identifier. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setAddress( id: string, addr: AccountAddress, @@ -140,6 +244,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ]); } + /** + * Sets the new pool implementation address. + * + * @param newPoolImpl - The address of the new pool implementation. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setPoolImpl( newPoolImpl: AccountAddress, ): Promise { @@ -148,6 +258,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ]); } + /** + * Sets the new pool configurator implementation address. + * + * @param newPoolConfiguratorImpl - The address of the new pool configurator implementation. + * @returns A promise that resolves to the committed transaction response. + */ public async setPoolConfigurator( newPoolConfiguratorImpl: AccountAddress, ): Promise { @@ -157,6 +273,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets a new price oracle implementation address for the pool. + * + * @param newPriceOracleImpl - The address of the new price oracle implementation. + * @returns A promise that resolves to the committed transaction response. + */ public async setPriceOracle( newPriceOracleImpl: AccountAddress, ): Promise { @@ -166,6 +288,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets a new ACL (Access Control List) Manager implementation address. + * + * @param newAclManagerImpl - The address of the new ACL Manager implementation. + * @returns A promise that resolves to a CommittedTransactionResponse object. + */ public async setAclManager( newAclManagerImpl: AccountAddress, ): Promise { @@ -175,6 +303,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets a new ACL (Access Control List) admin. + * + * @param newAclAdminImpl - The address of the new ACL admin. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setAclAdmin( newAclAdminImpl: AccountAddress, ): Promise { @@ -183,6 +317,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ]); } + /** + * Sets a new price oracle sentinel implementation address. + * + * @param newPriceOracleSentinelImpl - The address of the new price oracle sentinel implementation. + * @returns A promise that resolves to the committed transaction response. + */ public async setPriceOracleSentinel( newPriceOracleSentinelImpl: AccountAddress, ): Promise { @@ -192,6 +332,12 @@ export class PoolAddressesProviderClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets a new pool data provider implementation address. + * + * @param newPoolDataProviderImpl - The address of the new pool data provider implementation. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setPoolDataProvider( newPoolDataProviderImpl: AccountAddress, ): Promise { diff --git a/src/clients/poolClient.ts b/src/clients/poolClient.ts index 3cb0ee8..2a1b598 100644 --- a/src/clients/poolClient.ts +++ b/src/clients/poolClient.ts @@ -8,19 +8,36 @@ import { AptosProvider } from "./aptosProvider"; import { PoolContract } from "../contracts/pool"; import { mapToBigInt } from "../helpers/common"; +/** + * Represents the configuration map for a reserve. + * + * @typedef {Object} ReserveConfigurationMap + * @property {number} data - The data associated with the reserve configuration. + */ export type ReserveConfigurationMap = { data: number; }; +/** + * Represents the configuration map for a user. + * + * @property {number} data - The data associated with the user's configuration. + */ export type UserConfigurationMap = { data: number; }; +/** + * Represents the data associated with a token. + */ export interface TokenData { symbol: string; tokenAddress: AccountAddress; } +/** + * Interface representing the reserve data of a user. + */ export interface UserReserveData { currentATokenBalance: bigint; currentVariableDebt: bigint; @@ -29,35 +46,104 @@ export interface UserReserveData { usageAsCollateralEnabled: boolean; } +/** + * Represents the data structure for a reserve in the Aave V3 protocol. + */ export type ReserveData = { - /// stores the reserve configuration + /** + * Stores the reserve configuration. + * @type {Object} configuration - The configuration object containing data. + * @property {number} data - The configuration data. + */ configuration: { data: number }; - /// the liquidity index. Expressed in ray + + /** + * The liquidity index, expressed in ray. + * @type {number} + */ liquidityIndex: number; - /// the current supply rate. Expressed in ray + + /** + * The current supply rate, expressed in ray. + * @type {bigint} + */ currentLiquidityRate: bigint; - /// variable borrow index. Expressed in ray + + /** + * The variable borrow index, expressed in ray. + * @type {bigint} + */ variableBorrowIndex: bigint; - /// the current variable borrow rate. Expressed in ray + + /** + * The current variable borrow rate, expressed in ray. + * @type {bigint} + */ currentVariableBorrowRate: bigint; - /// timestamp of last update (u40 -> u64) + + /** + * The timestamp of the last update. + * @type {number} + */ lastUpdateTimestamp: number; - /// the id of the reserve. Represents the position in the list of the active reserves + + /** + * The ID of the reserve, representing the position in the list of active reserves. + * @type {number} + */ id: number; - /// aToken address + + /** + * The address of the aToken. + * @type {AccountAddress} + */ aTokenAddress: AccountAddress; - /// stableDebtToken address + + /** + * The address of the stable debt token. + * @type {AccountAddress} + */ stableDebtTokenAddress: AccountAddress; - /// variableDebtToken address + + /** + * The address of the variable debt token. + * @type {AccountAddress} + */ variableDebtTokenAddress: AccountAddress; - /// the current treasury balance, scaled + + /** + * The current treasury balance, scaled. + * @type {bigint} + */ accruedToTreasury: bigint; - /// the outstanding unbacked aTokens minted through the bridging feature + + /** + * The outstanding unbacked aTokens minted through the bridging feature. + * @type {bigint} + */ unbacked: bigint; - /// the outstanding debt borrowed against this asset in isolation mode + + /** + * The outstanding debt borrowed against this asset in isolation mode. + * @type {bigint} + */ isolationModeTotalDebt: bigint; }; +/** + * Represents the reserve data structure for Aave V3 on Aptos. + * + * @typedef {Object} ReserveData2 + * @property {bigint} reserveUnbacked - The amount of unbacked reserves. + * @property {bigint} reserveAccruedToTreasury - The amount of reserves accrued to the treasury. + * @property {bigint} aTokenSupply - The total supply of aTokens. + * @property {bigint} varTokenSupply - The total supply of variable debt tokens. + * @property {bigint} reserveCurrentLiquidityRate - The current liquidity rate of the reserve. + * @property {bigint} reserveCurrentVariableBorrowRate - The current variable borrow rate of the reserve. + * @property {bigint} reserveLiquidityIndex - The liquidity index of the reserve. + * @property {bigint} reserveVarBorrowIndex - The variable borrow index of the reserve. + * @property {bigint} reserveLastUpdateTimestamp - The timestamp of the last update to the reserve data. + */ export type ReserveData2 = { reserveUnbacked: bigint; reserveAccruedToTreasury: bigint; @@ -70,6 +156,20 @@ export type ReserveData2 = { reserveLastUpdateTimestamp: bigint; }; +/** + * Represents the configuration data for a reserve in the Aave protocol. + * + * @typedef {Object} ReserveConfigurationData + * @property {bigint} decimals - The number of decimals for the reserve's asset. + * @property {bigint} ltv - The loan-to-value ratio for the reserve. + * @property {bigint} liquidationThreshold - The threshold at which the reserve can be liquidated. + * @property {bigint} liquidationBonus - The bonus applied during liquidation. + * @property {bigint} reserveFactor - The reserve factor for the reserve. + * @property {boolean} usageAsCollateralEnabled - Indicates if the reserve can be used as collateral. + * @property {boolean} borrowingEnabled - Indicates if borrowing is enabled for the reserve. + * @property {boolean} isActive - Indicates if the reserve is active. + * @property {boolean} isFrozen - Indicates if the reserve is frozen. + */ export type ReserveConfigurationData = { decimals: bigint; ltv: bigint; @@ -90,11 +190,23 @@ export class PoolClient extends AptosContractWrapperBaseClass { this.poolContract = new PoolContract(provider); } + /** + * Creates an instance of `PoolClient` using the default signer provided by the `AptosProvider`. + * + * @param provider - An instance of `AptosProvider` which provides the necessary configurations and signer. + * @returns A new instance of `PoolClient` initialized with the default signer. + */ public static buildWithDefaultSigner(provider: AptosProvider): PoolClient { const client = new PoolClient(provider, provider.getPoolProfileAccount()); return client; } + /** + * Mints assets to the treasury. + * + * @param assets - An array of account addresses representing the assets to be minted to the treasury. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async mintToTreasury( assets: Array, ): Promise { @@ -104,6 +216,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Resets the total debt for an asset in isolation mode. + * + * @param asset - The account address of the asset for which the total debt is to be reset. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async resetIsolationModeTotalDebt( asset: AccountAddress, ): Promise { @@ -113,6 +231,14 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Rescues tokens from the pool contract and sends them to a specified address. + * + * @param token - The address of the token to be rescued. + * @param to - The address to which the rescued tokens will be sent. + * @param amount - The amount of tokens to be rescued. + * @returns A promise that resolves to the response of the committed transaction. + */ public async rescueTokens( token: AccountAddress, to: AccountAddress, @@ -124,6 +250,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the bridge protocol fee for the pool. + * + * @param protocolFee - The new protocol fee to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async setBridgeProtocolFee( protocolFee: bigint, ): Promise { @@ -133,6 +265,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the flashloan premiums for the pool. + * + * @param flashloanPremiumTotal - The total premium for the flashloan as a bigint. + * @param flashloanPremiumToProtocol - The portion of the premium that goes to the protocol as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async setFlashloanPremiums( flashloanPremiumTotal: bigint, flashloanPremiumToProtocol: bigint, @@ -143,6 +282,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the revision number of the pool contract. + * + * @returns {Promise} A promise that resolves to the revision number of the pool contract. + */ public async getRevision(): Promise { const [resp] = await this.callViewMethod( this.poolContract.PoolGetRevisionFuncAddr, @@ -151,6 +295,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as number; } + /** + * Retrieves the reserve configuration for a given asset. + * + * @param asset - The address of the asset for which to get the reserve configuration. + * @returns A promise that resolves to the reserve configuration map of the specified asset. + */ public async getReserveConfiguration( asset: AccountAddress, ): Promise { @@ -161,6 +311,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as ReserveConfigurationMap; } + /** + * Retrieves the reserve data for a given asset. + * + * @param asset - The address of the asset for which to retrieve reserve data. + * @returns A promise that resolves to the reserve data of the specified asset. + */ public async getReserveData(asset: AccountAddress): Promise { const resp = await this.callViewMethod( this.poolContract.PoolGetReserveDataFuncAddr, @@ -191,6 +347,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { return reserveData; } + /** + * Retrieves reserve data and the count of reserves for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to an object containing the reserve data and the count of reserves. + * @throws Will throw an error if the view method call fails. + */ public async getReserveDataAndReservesCount( asset: AccountAddress, ): Promise<{ reserveData: ReserveData; count: number }> { @@ -222,6 +385,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { return { reserveData, count: resp[1] as number }; } + /** + * Retrieves the count of reserves from the pool contract. + * + * @returns {Promise} A promise that resolves to the count of reserves as a bigint. + */ public async getReservesCount(): Promise { const [resp] = ( await this.callViewMethod( @@ -232,6 +400,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the list of reserve accounts from the pool contract. + * + * @returns {Promise>} A promise that resolves to an array of AccountAddress objects representing the reserve accounts. + */ public async getReservesList(): Promise> { const resp = ( ( @@ -244,6 +417,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the reserve address associated with a given ID. + * + * @param id - The ID of the reserve to retrieve the address for. + * @returns A promise that resolves to the `AccountAddress` of the reserve. + */ public async getReserveAddressById(id: number): Promise { const [resp] = await this.callViewMethod( this.poolContract.PoolGetReserveAddressByIdFuncAddr, @@ -252,6 +431,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the normalized variable debt for a given reserve asset. + * + * @param asset - The address of the reserve asset. + * @returns A promise that resolves to the normalized variable debt as a bigint. + */ public async getReserveNormalizedVariableDebt( asset: AccountAddress, ): Promise { @@ -264,6 +449,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the normalized income for a given reserve asset. + * + * @param asset - The address of the reserve asset. + * @returns A promise that resolves to the normalized income of the reserve asset as a bigint. + */ public async getReserveNormalizedIncome( asset: AccountAddress, ): Promise { @@ -276,6 +467,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the user configuration for a given account. + * + * @param account - The address of the account to retrieve the configuration for. + * @returns A promise that resolves to the user's configuration map. + */ public async getUserConfiguration( account: AccountAddress, ): Promise { @@ -286,6 +483,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as UserConfigurationMap; } + /** + * Retrieves the bridge protocol fee from the pool contract. + * + * @returns {Promise} A promise that resolves to the bridge protocol fee as a bigint. + */ public async getBridgeProtocolFee(): Promise { const [resp] = ( await this.callViewMethod( @@ -296,6 +498,14 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the total flashloan premium from the pool contract. + * + * This method calls the `PoolGetFlashloanPremiumTotalFuncAddr` function on the pool contract + * and maps the response to a bigint. + * + * @returns {Promise} A promise that resolves to the total flashloan premium as a bigint. + */ public async getFlashloanPremiumTotal(): Promise { const [resp] = ( await this.callViewMethod( @@ -306,6 +516,14 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the flashloan premium to the protocol. + * + * This method calls a view function on the pool contract to get the flashloan premium + * that is allocated to the protocol. The result is mapped to a bigint and returned. + * + * @returns {Promise} A promise that resolves to the flashloan premium as a bigint. + */ public async getFlashloanPremiumToProtocol(): Promise { const [resp] = ( await this.callViewMethod( @@ -316,6 +534,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the maximum number of reserves allowed in the pool. + * + * @returns {Promise} A promise that resolves to the maximum number of reserves as a bigint. + */ public async getMaxNumberReserves(): Promise { const [resp] = ( await this.callViewMethod( @@ -326,6 +549,17 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Initializes the reserves in the pool. + * + * @param underlyingAsset - An array of account addresses representing the underlying assets. + * @param treasury - An array of account addresses representing the treasury. + * @param aTokenName - An array of strings representing the names of the aTokens. + * @param aTokenSymbol - An array of strings representing the symbols of the aTokens. + * @param variableDebtTokenName - An array of strings representing the names of the variable debt tokens. + * @param variableDebtTokenSymbol - An array of strings representing the symbols of the variable debt tokens. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async initReserves( underlyingAsset: Array, treasury: Array, @@ -347,6 +581,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Drops a reserve from the pool. + * + * @param asset - The account address of the asset to be dropped. + * @returns A promise that resolves to the committed transaction response. + */ public async dropReserve( asset: AccountAddress, ): Promise { @@ -356,6 +596,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the eMode category for a specific asset. + * + * @param asset - The address of the asset for which the eMode category is being set. + * @param newCategoryId - The new eMode category ID to be assigned to the asset. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setAssetEmodeCategory( asset: AccountAddress, newCategoryId: number, @@ -366,6 +613,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the borrow cap for a specific asset. + * + * @param asset - The address of the asset for which the borrow cap is being set. + * @param newBorrowCap - The new borrow cap value to be set for the asset. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setBorrowCap( asset: AccountAddress, newBorrowCap: bigint, @@ -376,6 +630,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets whether a specific asset is borrowable in isolation mode. + * + * @param asset - The address of the asset to be configured. + * @param borrowable - A boolean indicating if the asset should be borrowable in isolation. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setBorrowableInIsolation( asset: AccountAddress, borrowable: boolean, @@ -386,6 +647,17 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the eMode category for the pool. + * + * @param categoryId - The ID of the eMode category. + * @param ltv - The loan-to-value ratio for the category. + * @param liquidationThreshold - The liquidation threshold for the category. + * @param liquidationBonus - The liquidation bonus for the category. + * @param oracle - The oracle account address. + * @param label - The label for the eMode category. + * @returns A promise that resolves to the committed transaction response. + */ public async setEmodeCategory( categoryId: number, ltv: number, @@ -400,6 +672,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the liquidation protocol fee for a given asset. + * + * @param asset - The address of the asset for which the liquidation protocol fee is being set. + * @param newFee - The new liquidation protocol fee to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async setLiquidationProtocolFee( asset: AccountAddress, newFee: bigint, @@ -410,6 +689,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Pauses or unpauses the pool. + * + * @param paused - A boolean indicating whether to pause (true) or unpause (false) the pool. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setPoolPause( paused: boolean, ): Promise { @@ -419,6 +704,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the active status of a reserve. + * + * @param asset - The address of the asset's account. + * @param active - A boolean indicating whether the reserve should be active (true) or inactive (false). + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setReserveActive( asset: AccountAddress, active: boolean, @@ -429,6 +721,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the borrowing status for a specific reserve asset. + * + * @param asset - The address of the asset for which borrowing is being enabled or disabled. + * @param enabled - A boolean indicating whether borrowing should be enabled (true) or disabled (false) for the specified asset. + * @returns A promise that resolves to a `CommittedTransactionResponse` object once the transaction is committed. + */ public async setReserveBorrowing( asset: AccountAddress, enabled: boolean, @@ -439,6 +738,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the debt ceiling for a specific asset. + * + * @param asset - The account address of the asset for which the debt ceiling is being set. + * @param newDebtCeiling - The new debt ceiling value to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async setDebtCeiling( asset: AccountAddress, newDebtCeiling: bigint, @@ -449,6 +755,16 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Configures a reserve as collateral by setting the loan-to-value (LTV), + * liquidation threshold, and liquidation bonus for a given asset. + * + * @param asset - The address of the asset to be configured as collateral. + * @param ltv - The loan-to-value ratio for the asset, represented as a bigint. + * @param liquidationThreshold - The threshold at which the asset will be liquidated, represented as a bigint. + * @param liquidationBonus - The bonus applied during liquidation, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async configureReserveAsCollateral( asset: AccountAddress, ltv: bigint, @@ -466,6 +782,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the reserve factor for a given asset. + * + * @param asset - The account address of the asset for which the reserve factor is being set. + * @param newReserveFactor - The new reserve factor to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is committed. + */ public async setReserveFactor( asset: AccountAddress, newReserveFactor: bigint, @@ -476,6 +799,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Enables or disables flash loaning for a specific reserve asset. + * + * @param asset - The address of the reserve asset. + * @param enabled - A boolean indicating whether flash loaning should be enabled (true) or disabled (false). + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setReserveFlashLoaning( asset: AccountAddress, enabled: boolean, @@ -486,6 +816,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the freeze status of a reserve asset. + * + * @param asset - The address of the reserve asset to be frozen or unfrozen. + * @param freeze - A boolean indicating whether to freeze (true) or unfreeze (false) the reserve asset. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setReserveFreeze( asset: AccountAddress, freeze: boolean, @@ -496,6 +833,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the paused state of a reserve. + * + * @param asset - The address of the asset to be paused or unpaused. + * @param paused - A boolean indicating whether to pause (true) or unpause (false) the reserve. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setReservePaused( asset: AccountAddress, paused: boolean, @@ -506,6 +850,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the siloed borrowing status for a given asset. + * + * @param asset - The address of the asset for which to set the siloed borrowing status. + * @param newSiloed - A boolean indicating the new siloed borrowing status. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setSiloedBorrowing( asset: AccountAddress, newSiloed: boolean, @@ -516,6 +867,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the supply cap for a given asset. + * + * @param asset - The account address of the asset for which the supply cap is being set. + * @param newSupplyCap - The new supply cap value to be set for the asset. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setSupplyCap( asset: AccountAddress, newSupplyCap: bigint, @@ -526,6 +884,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Sets the unbacked mint cap for a specific asset. + * + * @param asset - The address of the asset for which the unbacked mint cap is being set. + * @param newUnbackedMintCap - The new unbacked mint cap value to be set. + * @returns A promise that resolves to the response of the committed transaction. + */ public async setUnbackedMintCap( asset: AccountAddress, newUnbackedMintCap: bigint, @@ -536,6 +901,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Updates the bridge protocol fee in the pool contract. + * + * @param newBridgeProtocolFee - The new bridge protocol fee to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse once the transaction is sent and the response is received. + */ public async updateBridgeProtocolFee( newBridgeProtocolFee: bigint, ): Promise { @@ -545,6 +916,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Updates the flashloan premium to protocol. + * + * @param newFlashloanPremiumToProtocol - The new flashloan premium to be set, represented as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async updateFloashloanPremiumToProtocol( newFlashloanPremiumToProtocol: bigint, ): Promise { @@ -555,6 +932,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Updates the flashloan premium total in the pool configurator. + * + * @param newFlashloanPremiumTotal - The new flashloan premium total as a bigint. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async updateFloashloanPremiumTotal( newFlashloanPremiumTotal: bigint, ): Promise { @@ -564,6 +947,14 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the revision number of the pool configurator. + * + * This method calls the `PoolConfiguratorGetRevisionFuncAddr` function on the pool contract + * and maps the response to a bigint. + * + * @returns {Promise} A promise that resolves to the revision number of the pool configurator. + */ public async getPoolConfiguratorRevision(): Promise { const [resp] = ( await this.callViewMethod( @@ -574,6 +965,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Sets the user's eMode category. + * + * @param categoryId - The ID of the eMode category to set for the user. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setUserEmode( categoryId: number, ): Promise { @@ -583,6 +980,16 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Configures an eMode category with the specified parameters. + * + * @param ltv - The loan-to-value ratio for the eMode category. + * @param liquidationThreshold - The liquidation threshold for the eMode category. + * @param liquidationBonus - The liquidation bonus for the eMode category. + * @param priceSource - The account address that serves as the price source for the eMode category. + * @param label - A label for the eMode category. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async configureEmodeCategory( ltv: number, liquidationThreshold: bigint, @@ -596,6 +1003,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the eMode category data for a given category ID. + * + * @param id - The ID of the eMode category to retrieve data for. + * @returns A promise that resolves to the eMode category data as a number. + */ public async getEmodeCategoryData(id: number): Promise { const [resp] = await this.callViewMethod( this.poolContract.PoolGetEmodeCategoryDataFuncAddr, @@ -604,6 +1017,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as number; } + /** + * Retrieves the eMode (efficiency mode) of a user from the pool contract. + * + * @param user - The account address of the user. + * @returns A promise that resolves to the eMode of the user as a number. + */ public async getUserEmode(user: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.poolContract.PoolGetUserEmodeFuncAddr, @@ -612,6 +1031,16 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp as number; } + /** + * Sets the interest rate strategy for a given reserve asset. + * + * @param asset - The address of the reserve asset. + * @param optimalUsageRatio - The optimal usage ratio for the reserve. + * @param baseVariableBorrowRate - The base variable borrow rate for the reserve. + * @param variableRateSlope1 - The first slope of the variable rate for the reserve. + * @param variableRateSlope2 - The second slope of the variable rate for the reserve. + * @returns A promise that resolves to a `CommittedTransactionResponse` object. + */ public async setReserveInterestRateStrategy( asset: AccountAddress, optimalUsageRatio: bigint, @@ -631,6 +1060,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the optimal usage ratio for a given asset. + * + * @param asset - The account address of the asset for which to get the optimal usage ratio. + * @returns A promise that resolves to the optimal usage ratio as a bigint. + */ public async getOptimalUsageRatio(asset: AccountAddress): Promise { const [resp] = ( await this.callViewMethod( @@ -641,6 +1076,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the maximum excess usage ratio for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to a bigint representing the maximum excess usage ratio. + */ public async getMaxExcessUsageRatio(asset: AccountAddress): Promise { const [resp] = ( await this.callViewMethod( @@ -651,6 +1092,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the variable rate slope 1 for a given asset. + * + * @param asset - The address of the asset for which to get the variable rate slope 1. + * @returns A promise that resolves to a bigint representing the variable rate slope 1 of the specified asset. + */ public async getVariableRateSlope1(asset: AccountAddress): Promise { const [resp] = ( await this.callViewMethod( @@ -661,6 +1108,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the variable rate slope 2 for a given asset. + * + * @param asset - The address of the asset for which to get the variable rate slope 2. + * @returns A promise that resolves to the variable rate slope 2 as a bigint. + */ public async getVariableRateSlope2(asset: AccountAddress): Promise { const [resp] = ( await this.callViewMethod( @@ -671,6 +1124,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the base variable borrow rate for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to the base variable borrow rate as a bigint. + */ public async getBaseVariableBorrowRate( asset: AccountAddress, ): Promise { @@ -683,6 +1142,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the maximum variable borrow rate for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to the maximum variable borrow rate as a bigint. + */ public async getMaxVariableBorrowRate( asset: AccountAddress, ): Promise { @@ -695,6 +1160,18 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Calculates the current liquidity rate and current variable borrow rate for a given reserve. + * + * @param unbacked - The amount of unbacked assets. + * @param liquidityAdded - The amount of liquidity added to the reserve. + * @param liquidityTaken - The amount of liquidity taken from the reserve. + * @param totalVariableDebt - The total variable debt of the reserve. + * @param reserveFactor - The reserve factor. + * @param reserve - The address of the reserve account. + * @param atokenAddress - The address of the aToken associated with the reserve. + * @returns An object containing the current liquidity rate and current variable borrow rate. + */ public async calculateInterestRates( unbacked: bigint, liquidityAdded: bigint, @@ -727,6 +1204,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { }; } + /** + * Retrieves all reserve tokens from the pool contract. + * + * @returns {Promise>} A promise that resolves to an array of TokenData objects. + * + * @throws {Error} If the call to the view method fails or returns an unexpected result. + */ public async getAllReservesTokens(): Promise> { const resp = ( ( @@ -745,6 +1229,15 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves all AToken data from the pool contract. + * + * @returns {Promise>} A promise that resolves to an array of TokenData objects. + * + * @example + * const aTokens = await poolClient.getAllATokens(); + * console.log(aTokens); + */ public async getAllATokens(): Promise> { const resp = ( ( @@ -760,6 +1253,22 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves all variable tokens from the pool contract. + * + * @returns {Promise>} A promise that resolves to an array of TokenData objects. + * + * @remarks + * This method calls the `GetAllVariableTokensFuncAddr` function of the pool contract to fetch + * the variable tokens. The response is then mapped to an array of TokenData objects, each containing + * the token symbol and token address. + * + * @example + * ```typescript + * const variableTokens = await poolClient.getAllVariableTokens(); + * console.log(variableTokens); + * ``` + */ public async getAllVariableTokens(): Promise> { const resp = ( ( @@ -778,6 +1287,23 @@ export class PoolClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the reserve configuration data for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to an object containing the reserve configuration data. + * + * The returned object includes the following properties: + * - `decimals`: The number of decimals for the asset. + * - `ltv`: The loan-to-value ratio. + * - `liquidationThreshold`: The liquidation threshold. + * - `liquidationBonus`: The liquidation bonus. + * - `reserveFactor`: The reserve factor. + * - `usageAsCollateralEnabled`: A boolean indicating if the asset can be used as collateral. + * - `borrowingEnabled`: A boolean indicating if borrowing is enabled for the asset. + * - `isActive`: A boolean indicating if the asset is active. + * - `isFrozen`: A boolean indicating if the asset is frozen. + */ public async getReserveConfigurationData( asset: AccountAddress, ): Promise { @@ -808,6 +1334,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { }; } + /** + * Retrieves the eMode category for a given reserve asset. + * + * @param asset - The account address of the reserve asset. + * @returns A promise that resolves to the eMode category number of the specified asset. + */ public async getReserveEmodeCategory(asset: AccountAddress): Promise { const [emodeCategory] = await this.callViewMethod( this.poolContract.GetReserveEModeCategoryFuncAddr, @@ -816,6 +1348,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return emodeCategory as number; } + /** + * Retrieves the reserve caps for a given asset. + * + * @param asset - The address of the asset account. + * @returns A promise that resolves to an object containing the borrow cap and supply cap as big integers. + */ public async getReserveCaps(asset: AccountAddress): Promise<{ borrowCap: bigint; supplyCap: bigint; @@ -830,6 +1368,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { }; } + /** + * Checks if the specified asset is paused. + * + * @param asset - The address of the asset to check. + * @returns A promise that resolves to a boolean indicating whether the asset is paused. + */ public async getPaused(asset: AccountAddress): Promise { const [isSiloedBorrowing] = await this.callViewMethod( this.poolContract.GetPausedFuncAddr, @@ -838,6 +1382,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return isSiloedBorrowing as boolean; } + /** + * Retrieves the siloed borrowing status for a given asset. + * + * @param asset - The account address of the asset to check. + * @returns A promise that resolves to a boolean indicating whether the asset has siloed borrowing enabled. + */ public async getSiloedBorrowing(asset: AccountAddress): Promise { const [isSiloedBorrowing] = await this.callViewMethod( this.poolContract.GetSiloedBorrowingFuncAddr, @@ -846,6 +1396,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return isSiloedBorrowing as boolean; } + /** + * Retrieves the liquidation protocol fee for a given asset. + * + * @param asset - The account address of the asset for which to retrieve the liquidation protocol fee. + * @returns A promise that resolves to the liquidation protocol fee as a bigint. + */ public async getLiquidationProtocolFee( asset: AccountAddress, ): Promise { @@ -858,6 +1414,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return isSiloedBorrowing; } + /** + * Retrieves the unbacked mint cap for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to the unbacked mint cap as a bigint. + */ public async getUnbackedMintCap(asset: AccountAddress): Promise { const [unbackedMintCap] = ( await this.callViewMethod(this.poolContract.GetUnbackedMintCapFuncAddr, [ @@ -867,6 +1429,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return unbackedMintCap; } + /** + * Retrieves the debt ceiling for a given asset. + * + * @param asset - The account address of the asset for which to get the debt ceiling. + * @returns A promise that resolves to the debt ceiling as a bigint. + */ public async getDebtCeiling(asset: AccountAddress): Promise { const [debtCeiling] = ( await this.callViewMethod(this.poolContract.GetDebtCeilingFuncAddr, [ @@ -876,6 +1444,11 @@ export class PoolClient extends AptosContractWrapperBaseClass { return debtCeiling; } + /** + * Retrieves the debt ceiling decimals from the pool contract. + * + * @returns {Promise} A promise that resolves to the debt ceiling decimals as a bigint. + */ public async getDebtCeilingDecimals(): Promise { const [debtCeiling] = ( await this.callViewMethod( @@ -886,6 +1459,23 @@ export class PoolClient extends AptosContractWrapperBaseClass { return debtCeiling; } + /** + * Retrieves reserve data for a given asset. + * + * @param {AccountAddress} asset - The address of the asset to retrieve reserve data for. + * @returns {Promise} A promise that resolves to an object containing reserve data. + * + * The returned object includes the following properties: + * - `reserveUnbacked`: The amount of unbacked reserve. + * - `reserveAccruedToTreasury`: The amount accrued to the treasury. + * - `aTokenSupply`: The total supply of aTokens. + * - `varTokenSupply`: The total supply of variable tokens. + * - `reserveCurrentLiquidityRate`: The current liquidity rate of the reserve. + * - `reserveCurrentVariableBorrowRate`: The current variable borrow rate of the reserve. + * - `reserveLiquidityIndex`: The liquidity index of the reserve. + * - `reserveVarBorrowIndex`: The variable borrow index of the reserve. + * - `reserveLastUpdateTimestamp`: The timestamp of the last update to the reserve data. + */ public async getReserveData2(asset: AccountAddress): Promise { const [ reserveUnbacked, @@ -918,6 +1508,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { } as ReserveData2; } + /** + * Retrieves the total supply of AToken for a given asset. + * + * @param asset - The account address of the asset. + * @returns A promise that resolves to the total supply of the AToken as a bigint. + */ public async getATokenTotalSupply(asset: AccountAddress): Promise { const [totalSupply] = ( await this.callViewMethod( @@ -928,6 +1524,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return totalSupply; } + /** + * Retrieves the total debt for a given asset. + * + * @param asset - The address of the asset account. + * @returns A promise that resolves to the total debt as a bigint. + */ public async getTotalDebt(asset: AccountAddress): Promise { const [totalDebt] = ( await this.callViewMethod(this.poolContract.GetTotalDebtFuncAddr, [asset]) @@ -935,6 +1537,20 @@ export class PoolClient extends AptosContractWrapperBaseClass { return totalDebt; } + /** + * Retrieves the reserve data for a specific user and asset. + * + * @param asset - The address of the asset. + * @param user - The address of the user. + * @returns A promise that resolves to an object containing the user's reserve data. + * + * The returned object includes the following properties: + * - `currentATokenBalance`: The current balance of A tokens held by the user. + * - `currentVariableDebt`: The current variable debt of the user. + * - `scaledVariableDebt`: The scaled variable debt of the user. + * - `liquidityRate`: The liquidity rate of the reserve. + * - `usageAsCollateralEnabled`: A boolean indicating if the asset is being used as collateral. + */ public async getUserReserveData( asset: AccountAddress, user: AccountAddress, @@ -958,6 +1574,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { } as UserReserveData; } + /** + * Retrieves the addresses of the reserve tokens for a given asset. + * + * @param asset - The address of the asset for which to get the reserve token addresses. + * @returns A promise that resolves to an object containing the addresses of the reserve AToken and the reserve Variable Debt Token. + */ public async getReserveTokensAddresses(asset: AccountAddress): Promise<{ reserveATokenAddress: AccountAddress; reserveVariableDebtTokenAddress: AccountAddress; @@ -977,6 +1599,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { }; } + /** + * Checks if flash loans are enabled for a given asset. + * + * @param asset - The address of the asset to check. + * @returns A promise that resolves to a boolean indicating whether flash loans are enabled for the specified asset. + */ public async getFlashloanEnabled(asset: AccountAddress): Promise { const [isFlashloanEnabled] = await this.callViewMethod( this.poolContract.GetFlashLoanEnabledFuncAddr, @@ -985,6 +1613,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return isFlashloanEnabled as boolean; } + /** + * Retrieves the scaled total supply of an AToken. + * + * @param aTokenAddress - The address of the AToken. + * @returns A promise that resolves to the scaled total supply of the AToken as a bigint. + */ public async getScaledATokenTotalSupply( aTokenAddress: AccountAddress, ): Promise { @@ -997,6 +1631,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { return totalSupply; } + /** + * Retrieves the scaled AToken balance of a specified owner. + * + * @param owner - The address of the account owner whose balance is being queried. + * @param aTokenAddress - The address of the AToken contract. + * @returns A promise that resolves to the scaled AToken balance as a bigint. + */ public async getScaledATokenBalanceOf( owner: AccountAddress, aTokenAddress: AccountAddress, @@ -1010,6 +1651,12 @@ export class PoolClient extends AptosContractWrapperBaseClass { return balance; } + /** + * Retrieves the scaled total supply of variable tokens for a given aToken address. + * + * @param aTokenAddress - The address of the aToken whose scaled variable token total supply is to be fetched. + * @returns A promise that resolves to the scaled total supply of variable tokens as a bigint. + */ public async getScaledVariableTokenTotalSupply( aTokenAddress: AccountAddress, ): Promise { @@ -1022,6 +1669,13 @@ export class PoolClient extends AptosContractWrapperBaseClass { return totalSupply; } + /** + * Retrieves the scaled variable token balance of a specified owner for a given variable token address. + * + * @param owner - The account address of the token owner. + * @param varTokenAddress - The account address of the variable token. + * @returns A promise that resolves to the scaled variable token balance as a bigint. + */ public async getScaledVariableTokenBalanceOf( owner: AccountAddress, varTokenAddress: AccountAddress, diff --git a/src/clients/uiIncentiveDataProvider.ts b/src/clients/uiIncentiveDataProvider.ts index 161af81..7cd3785 100644 --- a/src/clients/uiIncentiveDataProvider.ts +++ b/src/clients/uiIncentiveDataProvider.ts @@ -4,18 +4,52 @@ import { AptosProvider } from "./aptosProvider"; import { UiIncentiveDataProviderContract } from "../contracts/uiIncentiveDataProvider"; import { Metadata } from "../helpers/interfaces"; +/** + * Represents the aggregated incentive data for a reserve. + * + * @typedef {Object} AggregatedReserveIncentiveData + * @property {AccountAddress} underlyingAsset - The address of the underlying asset. + * @property {IncentiveData} aIncentiveData - The incentive data for the aToken. + * @property {IncentiveData} vIncentiveData - The incentive data for the variable debt token. + */ export type AggregatedReserveIncentiveData = { underlyingAsset: AccountAddress; aIncentiveData: IncentiveData; vIncentiveData: IncentiveData; }; +/** + * Represents the incentive data for a specific token. + * + * @typedef {Object} IncentiveData + * + * @property {AccountAddress} tokenAddress - The address of the token. + * @property {AccountAddress} incentiveControllerAddress - The address of the incentive controller. + * @property {[RewardInfo]} rewardsTokenInformation - An array containing information about the rewards token. + */ export type IncentiveData = { tokenAddress: AccountAddress; incentiveControllerAddress: AccountAddress; rewardsTokenInformation: [RewardInfo]; }; +/** + * Represents information about a reward token. + * + * @typedef {Object} RewardInfo + * + * @property {string} rewardTokenSymbol - The symbol of the reward token. + * @property {AccountAddress} rewardTokenAddress - The address of the reward token. + * @property {AccountAddress} rewardOracleAddress - The address of the reward oracle. + * @property {bigint} emissionPerSecond - The emission rate of the reward token per second. + * @property {bigint} incentivesLastUpdateTimestamp - The timestamp of the last update to the incentives. + * @property {bigint} tokenIncentivesIndex - The index of the token incentives. + * @property {bigint} emissionEndTimestamp - The timestamp when the emission ends. + * @property {bigint} rewardPriceFeed - The price feed of the reward token. + * @property {number} rewardTokenDecimals - The number of decimals of the reward token. + * @property {number} precision - The precision of the reward calculations. + * @property {number} priceFeedDecimals - The number of decimals in the price feed. + */ export type RewardInfo = { rewardTokenSymbol: string; rewardTokenAddress: AccountAddress; @@ -30,18 +64,48 @@ export type RewardInfo = { priceFeedDecimals: number; }; +/** + * Represents the incentive data for a user's reserve. + * + * @typedef {Object} UserReserveIncentiveData + * @property {AccountAddress} underlyingAsset - The address of the underlying asset. + * @property {UserIncentiveData} aTokenIncentivesUserData - The incentive data for the aToken. + * @property {UserIncentiveData} vTokenIncentivesUserData - The incentive data for the vToken. + */ export type UserReserveIncentiveData = { underlyingAsset: AccountAddress; aTokenIncentivesUserData: UserIncentiveData; vTokenIncentivesUserData: UserIncentiveData; }; +/** + * Represents the incentive data for a user. + * + * @typedef {Object} UserIncentiveData + * + * @property {AccountAddress} tokenAddress - The address of the token. + * @property {AccountAddress} incentiveControllerAddress - The address of the incentive controller. + * @property {[UserRewardInfo]} userRewardsInformation - An array containing information about user rewards. + */ export type UserIncentiveData = { tokenAddress: AccountAddress; incentiveControllerAddress: AccountAddress; userRewardsInformation: [UserRewardInfo]; }; +/** + * Represents the reward information for a user. + * + * @typedef {Object} UserRewardInfo + * @property {string} rewardTokenSymbol - The symbol of the reward token. + * @property {AccountAddress} rewardOracleAddress - The address of the reward oracle. + * @property {AccountAddress} rewardTokenAddress - The address of the reward token. + * @property {bigint} userUnclaimedRewards - The amount of unclaimed rewards for the user. + * @property {bigint} tokenIncentivesUserIndex - The user's index in the token incentives. + * @property {bigint} rewardPriceFeed - The price feed of the reward. + * @property {number} priceFeedDecimals - The number of decimals in the price feed. + * @property {number} rewardTokenDecimals - The number of decimals in the reward token. + */ export type UserRewardInfo = { rewardTokenSymbol: string; rewardOracleAddress: AccountAddress; @@ -53,6 +117,24 @@ export type UserRewardInfo = { rewardTokenDecimals: number; }; +/** + * Maps the raw reward token information to a structured `RewardInfo` object. + * + * @param rewardTokenInfo - The raw reward token information. + * @returns A `RewardInfo` object containing the mapped incentive data. + * + * @property rewardTokenSymbol - The symbol of the reward token. + * @property rewardTokenAddress - The address of the reward token. + * @property rewardOracleAddress - The address of the reward oracle. + * @property emissionPerSecond - The emission rate of the reward token per second. + * @property incentivesLastUpdateTimestamp - The timestamp of the last update to the incentives. + * @property tokenIncentivesIndex - The index of the token incentives. + * @property emissionEndTimestamp - The timestamp when the emission ends. + * @property rewardPriceFeed - The price feed of the reward token. + * @property rewardTokenDecimals - The number of decimals for the reward token. + * @property precision - The precision of the reward token. + * @property priceFeedDecimals - The number of decimals for the price feed. + */ const mapIncentiveData = (rewardTokenInfo: any): RewardInfo => ({ rewardTokenSymbol: rewardTokenInfo.reward_token_symbol as string, @@ -74,6 +156,12 @@ const mapIncentiveData = (rewardTokenInfo: any): RewardInfo => priceFeedDecimals: rewardTokenInfo.price_feed_decimals as number, }) as RewardInfo; +/** + * Maps the given reward token information to a UserRewardInfo object. + * + * @param rewardTokenInfo - The reward token information to map. + * @returns A UserRewardInfo object containing the mapped data. + */ const mapUserIncentiveData = (rewardTokenInfo: any): UserRewardInfo => ({ rewardTokenSymbol: rewardTokenInfo.reward_token_symbol as string, @@ -92,6 +180,12 @@ const mapUserIncentiveData = (rewardTokenInfo: any): UserRewardInfo => rewardTokenDecimals: rewardTokenInfo.reward_token_decimals as number, }) as UserRewardInfo; +/** + * Processes raw user reserves incentives data and maps it to structured user reserve incentive data. + * + * @param userReservesIncentivesDataRaw - An array of raw user reserves incentives data. + * @returns An array containing the structured user reserve incentive data. + */ const getUserReservesIncentivesDataInternal = ( userReservesIncentivesDataRaw: Array, ): [UserReserveIncentiveData] => { @@ -133,6 +227,12 @@ const getUserReservesIncentivesDataInternal = ( return userReservesIncentives as [UserReserveIncentiveData]; }; +/** + * Processes raw aggregated incentives reserve data and maps it to a structured format. + * + * @param aggregatedIncentivesReserveDataRaw - An array of raw incentive data for reserves. + * @returns An array containing a single `AggregatedReserveIncentiveData` object. + */ const getReservesIncentivesDataInternal = ( aggregatedIncentivesReserveDataRaw: Array, ): [AggregatedReserveIncentiveData] => { @@ -185,6 +285,13 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass ); } + /** + * Creates an instance of `UiIncentiveDataProviderClient` using the provided `AptosProvider`. + * The client is initialized with the default signer obtained from the provider's pool profile account. + * + * @param provider - The `AptosProvider` instance used to create the client. + * @returns A new instance of `UiIncentiveDataProviderClient`. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): UiIncentiveDataProviderClient { @@ -195,6 +302,15 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass return client; } + /** + * Fetches the address of the UI Pool Data Provider V3. + * + * This method calls the `uiIncentiveDataProviderV3DataAddress` view method on the + * `uiPoolDataProviderContract` to retrieve the address. + * + * @returns {Promise} A promise that resolves to an `AccountAddress` object + * representing the address of the UI Pool Data Provider V3. + */ public async uiPoolDataProviderV3DataAddress(): Promise { const [resp] = await this.callViewMethod( this.uiPoolDataProviderContract.uiIncentiveDataProviderV3DataAddress, @@ -203,6 +319,17 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass return AccountAddress.fromString(resp as string); } + /** + * Fetches the V3 data object from the UI Pool Data Provider. + * + * This method calls the `uiIncentiveDataProviderV3DataObject` view method on the + * `uiPoolDataProviderContract` and returns the result as an `AccountAddress`. + * + * @returns {Promise} A promise that resolves to an `AccountAddress` object + * representing the V3 data object. + * + * @throws {Error} If the call to the view method fails or the response cannot be parsed. + */ public async uiPoolDataProviderV3DataObject(): Promise { const [resp] = await this.callViewMethod( this.uiPoolDataProviderContract.uiIncentiveDataProviderV3DataObject, @@ -211,6 +338,14 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Fetches the full reserves incentive data from the UI Pool Data Provider contract. + * + * @returns {Promise<{ aggregatedReservesIncentivesData: [AggregatedReserveIncentiveData], userReserveIncentiveData: [UserReserveIncentiveData] }>} + * A promise that resolves to an object containing: + * - `aggregatedReservesIncentivesData`: An array of aggregated reserve incentive data. + * - `userReserveIncentiveData`: An array of user reserve incentive data. + */ public async getFullReservesIncentiveData(): Promise<{ aggregatedReservesIncentivesData: [AggregatedReserveIncentiveData]; userReserveIncentiveData: [UserReserveIncentiveData]; @@ -233,6 +368,13 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass return { aggregatedReservesIncentivesData, userReserveIncentiveData }; } + /** + * Retrieves the incentives data for all reserves. + * + * @returns {Promise<[AggregatedReserveIncentiveData]>} A promise that resolves to an array containing the aggregated incentives data for all reserves. + * + * @throws {Error} If the call to the view method fails. + */ public async getReservesIncentivesData(): Promise< [AggregatedReserveIncentiveData] > { @@ -247,6 +389,12 @@ export class UiIncentiveDataProviderClient extends AptosContractWrapperBaseClass return aggregatedReservesIncentivesData as [AggregatedReserveIncentiveData]; } + /** + * Retrieves the incentives data for the user's reserves. + * + * @param user - The account address of the user. + * @returns A promise that resolves to an array containing the user's reserve incentive data. + */ public async getUserReservesIncentivesData( user: AccountAddress, ): Promise<[UserReserveIncentiveData]> { diff --git a/src/clients/uiPoolDataProvider.ts b/src/clients/uiPoolDataProvider.ts index 3447827..21e8193 100644 --- a/src/clients/uiPoolDataProvider.ts +++ b/src/clients/uiPoolDataProvider.ts @@ -4,6 +4,54 @@ import { AptosProvider } from "./aptosProvider"; import { UiPoolDataProviderContract } from "../contracts/uiPoolDataProvider"; import { Metadata } from "../helpers/interfaces"; +/** + * Represents the aggregated reserve data for a specific asset in the Aave protocol. + * + * @property {string} underlyingAsset - The address of the underlying asset. + * @property {string} name - The name of the asset. + * @property {string} symbol - The symbol of the asset. + * @property {number} decimals - The number of decimals of the asset. + * @property {bigint} baseLTVasCollateral - The loan-to-value ratio for the asset when used as collateral. + * @property {bigint} reserveLiquidationThreshold - The threshold at which the asset can be liquidated. + * @property {bigint} reserveLiquidationBonus - The bonus applied during liquidation. + * @property {bigint} reserveFactor - The reserve factor for the asset. + * @property {boolean} usageAsCollateralEnabled - Whether the asset can be used as collateral. + * @property {boolean} borrowingEnabled - Whether borrowing is enabled for the asset. + * @property {boolean} isActive - Whether the asset is active. + * @property {boolean} isFrozen - Whether the asset is frozen. + * @property {bigint} liquidityIndex - The liquidity index of the asset. + * @property {bigint} variableBorrowIndex - The variable borrow index of the asset. + * @property {bigint} liquidityRate - The liquidity rate of the asset. + * @property {bigint} variableBorrowRate - The variable borrow rate of the asset. + * @property {number} lastUpdateTimestamp - The timestamp of the last update. + * @property {string} aTokenAddress - The address of the aToken contract. + * @property {string} variableDebtTokenAddress - The address of the variable debt token contract. + * @property {bigint} availableLiquidity - The available liquidity of the asset. + * @property {bigint} totalScaledVariableDebt - The total scaled variable debt of the asset. + * @property {bigint} priceInMarketReferenceCurrency - The price of the asset in the market reference currency. + * @property {string} priceOracle - The address of the price oracle. + * @property {bigint} variableRateSlope1 - The first slope of the variable rate. + * @property {bigint} variableRateSlope2 - The second slope of the variable rate. + * @property {bigint} baseVariableBorrowRate - The base variable borrow rate. + * @property {bigint} optimalUsageRatio - The optimal usage ratio. + * @property {boolean} isPaused - Whether the asset is paused. + * @property {boolean} isSiloedBorrowing - Whether the asset has siloed borrowing. + * @property {bigint} accruedToTreasury - The amount accrued to the treasury. + * @property {bigint} unbacked - The amount of unbacked assets. + * @property {bigint} isolationModeTotalDebt - The total debt in isolation mode. + * @property {boolean} flashLoanEnabled - Whether flash loans are enabled for the asset. + * @property {bigint} debtCeiling - The debt ceiling for the asset. + * @property {number} debtCeilingDecimals - The number of decimals for the debt ceiling. + * @property {number} eModeCategoryId - The eMode category ID. + * @property {bigint} borrowCap - The borrow cap for the asset. + * @property {bigint} supplyCap - The supply cap for the asset. + * @property {number} eModeLtv - The loan-to-value ratio in eMode. + * @property {number} eModeLiquidationThreshold - The liquidation threshold in eMode. + * @property {number} eModeLiquidationBonus - The liquidation bonus in eMode. + * @property {string} eModePriceSource - The price source in eMode. + * @property {string} eModeLabel - The label for eMode. + * @property {boolean} borrowableInIsolation - Whether the asset is borrowable in isolation. + */ export type AggregatedReserveData = { underlyingAsset: string; name: string; @@ -56,6 +104,15 @@ export type AggregatedReserveData = { borrowableInIsolation: boolean; }; +/** + * Represents the base currency data for a market. + * + * @typedef {Object} BaseCurrencyData + * @property {number} marketReferenceCurrencyDecimals - The number of decimals for the market reference currency. + * @property {bigint} marketReferenceCurrencyPriceInUsd - The price of the market reference currency in USD. + * @property {bigint} networkBaseTokenPriceInUsd - The price of the network base token in USD. + * @property {number} networkBaseTokenPriceDecimals - The number of decimals for the network base token price. + */ export type BaseCurrencyData = { marketReferenceCurrencyDecimals: number; marketReferenceCurrencyPriceInUsd: bigint; @@ -63,6 +120,15 @@ export type BaseCurrencyData = { networkBaseTokenPriceDecimals: number; }; +/** + * Represents the data related to a user's reserve in the Aave protocol. + * + * @property {string} underlyingAsset - The address of the underlying asset. + * @property {bigint} scaledATokenBalance - The scaled balance of AToken held by the user. + * @property {boolean} usageAsCollateralEnabledOnUser - Indicates if the user has enabled the asset as collateral. + * @property {bigint} scaledVariableDebt - The scaled variable debt of the user. + * @property {number} decimals - The number of decimals of the underlying asset. + */ export type UserReserveData = { underlyingAsset: string; scaledATokenBalance: bigint; @@ -71,24 +137,85 @@ export type UserReserveData = { decimals: number; }; +/** + * Represents the data structure for reserves and base currency information. + * + * @typedef {Object} ReservesData + * @property {AggregatedReserveData[]} reservesData - An array of aggregated reserve data. + * @property {BaseCurrencyData} baseCurrencyData - The data related to the base currency. + */ export type ReservesData = { reservesData: AggregatedReserveData[]; baseCurrencyData: BaseCurrencyData; }; +/** + * Represents the data structure for user reserves. + * + * @typedef {Object} UserReservesData + * @property {UserReserveData[]} userReserves - An array of user reserve data objects. + * @property {number} userEmodeCategoryId - The ID of the user's e-mode category. + */ export type UserReservesData = { userReserves: UserReserveData[]; userEmodeCategoryId: number; }; +/** + * The `UiPoolDataProviderClient` class provides methods to interact with the UI Pool Data Provider contract on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and includes methods to fetch various data related to reserves and user reserves. + * + * @class UiPoolDataProviderClient + * @extends {AptosContractWrapperBaseClass} + * + * @property {UiPoolDataProviderContract} uiPoolDataProviderContract - An instance of the UI Pool Data Provider contract. + * + * @constructor + * @param {AptosProvider} provider - The `AptosProvider` instance to be used for creating the client. + * @param {Ed25519Account} [signer] - An optional signer account. + * + * @method static buildWithDefaultSigner + * @param {AptosProvider} provider - The `AptosProvider` instance to be used for creating the client. + * @returns {UiPoolDataProviderClient} A new instance of `UiPoolDataProviderClient` initialized with the provided `AptosProvider`. + * + * @method async uiPoolDataProviderV32DataAddress + * @returns {Promise} A promise that resolves to an `AccountAddress` instance representing the V3.2 data address. + * @throws {Error} If the call to the view method fails or the response cannot be parsed into an `AccountAddress`. + * + * @method async uiPoolDataProviderV3DataObject + * @returns {Promise} A promise that resolves to an `AccountAddress` object. + * @throws {Error} If the call to the view method fails or the response is invalid. + * + * @method async getReservesList + * @returns {Promise>} A promise that resolves to an array of `AccountAddress` objects. + * + * @method async getReservesData + * @returns {Promise} A promise that resolves to an object containing reserves data and base currency data. + * + * @method async getUserReserveData + * @param {string} user - The address of the user whose reserve data is being retrieved. + * @returns {Promise} A promise that resolves to an object containing the user's reserves data and eMode category ID. + */ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { uiPoolDataProviderContract: UiPoolDataProviderContract; + /** + * Creates an instance of the UiPoolDataProvider client. + * + * @param provider - The Aptos blockchain provider. + * @param signer - Optional Ed25519 account signer. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.uiPoolDataProviderContract = new UiPoolDataProviderContract(provider); } + /** + * Creates an instance of `UiPoolDataProviderClient` using the default signer. + * + * @param provider - The `AptosProvider` instance to be used for creating the client. + * @returns A new instance of `UiPoolDataProviderClient` initialized with the provided `AptosProvider`. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): UiPoolDataProviderClient { @@ -99,6 +226,13 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { return client; } + /** + * Fetches the V3.2 data address from the UI Pool Data Provider contract. + * + * @returns {Promise} A promise that resolves to an AccountAddress instance representing the V3.2 data address. + * + * @throws {Error} If the call to the view method fails or the response cannot be parsed into an AccountAddress. + */ public async uiPoolDataProviderV32DataAddress(): Promise { const [resp] = await this.callViewMethod( this.uiPoolDataProviderContract.uiPoolDataProviderV32DataAddress, @@ -107,6 +241,13 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Fetches the V3 data object from the UI Pool Data Provider contract. + * + * @returns {Promise} A promise that resolves to an AccountAddress object. + * + * @throws {Error} If the call to the view method fails or the response is invalid. + */ public async uiPoolDataProviderV3DataObject(): Promise { const [resp] = await this.callViewMethod( this.uiPoolDataProviderContract.uiPoolDataProviderV3DataObject, @@ -115,6 +256,14 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the list of reserve accounts. + * + * This method calls the `getReservesList` function on the `uiPoolDataProviderContract` + * and returns an array of `AccountAddress` objects. + * + * @returns {Promise>} A promise that resolves to an array of `AccountAddress` objects. + */ public async getReservesList(): Promise> { const resp = ( ( @@ -127,6 +276,63 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Fetches and returns the reserves data and base currency data. + * + * @returns {Promise} A promise that resolves to an object containing reserves data and base currency data. + * + * The reserves data includes: + * - underlyingAsset: The address of the underlying asset. + * - name: The name of the reserve. + * - symbol: The symbol of the reserve. + * - decimals: The number of decimals of the reserve. + * - baseLTVasCollateral: The base loan-to-value ratio as collateral. + * - reserveLiquidationThreshold: The reserve liquidation threshold. + * - reserveLiquidationBonus: The reserve liquidation bonus. + * - reserveFactor: The reserve factor. + * - usageAsCollateralEnabled: Whether usage as collateral is enabled. + * - borrowingEnabled: Whether borrowing is enabled. + * - isActive: Whether the reserve is active. + * - isFrozen: Whether the reserve is frozen. + * - liquidityIndex: The liquidity index. + * - variableBorrowIndex: The variable borrow index. + * - liquidityRate: The liquidity rate. + * - variableBorrowRate: The variable borrow rate. + * - lastUpdateTimestamp: The timestamp of the last update. + * - aTokenAddress: The address of the aToken. + * - variableDebtTokenAddress: The address of the variable debt token. + * - availableLiquidity: The available liquidity. + * - totalScaledVariableDebt: The total scaled variable debt. + * - priceInMarketReferenceCurrency: The price in market reference currency. + * - priceOracle: The address of the price oracle. + * - variableRateSlope1: The variable rate slope 1. + * - variableRateSlope2: The variable rate slope 2. + * - baseVariableBorrowRate: The base variable borrow rate. + * - optimalUsageRatio: The optimal usage ratio. + * - isPaused: Whether the reserve is paused. + * - isSiloedBorrowing: Whether siloed borrowing is enabled. + * - accruedToTreasury: The amount accrued to the treasury. + * - unbacked: The unbacked amount. + * - isolationModeTotalDebt: The total debt in isolation mode. + * - flashLoanEnabled: Whether flash loans are enabled. + * - debtCeiling: The debt ceiling. + * - debtCeilingDecimals: The number of decimals for the debt ceiling. + * - eModeCategoryId: The eMode category ID. + * - borrowCap: The borrow cap. + * - supplyCap: The supply cap. + * - eModeLtv: The eMode loan-to-value ratio. + * - eModeLiquidationThreshold: The eMode liquidation threshold. + * - eModeLiquidationBonus: The eMode liquidation bonus. + * - eModePriceSource: The address of the eMode price source. + * - eModeLabel: The label for the eMode. + * - borrowableInIsolation: Whether borrowing in isolation is enabled. + * + * The base currency data includes: + * - marketReferenceCurrencyDecimals: The number of decimals for the market reference currency. + * - marketReferenceCurrencyPriceInUsd: The price of the market reference currency in USD. + * - networkBaseTokenPriceInUsd: The price of the network base token in USD. + * - networkBaseTokenPriceDecimals: The number of decimals for the network base token price. + */ public async getReservesData(): Promise { const resp = await this.callViewMethod( this.uiPoolDataProviderContract.getReservesData, @@ -214,6 +420,21 @@ export class UiPoolDataProviderClient extends AptosContractWrapperBaseClass { return { reservesData, baseCurrencyData }; } + /** + * Retrieves the reserve data for a specific user. + * + * @param user - The address of the user whose reserve data is being retrieved. + * @returns A promise that resolves to an object containing the user's reserves data and eMode category ID. + * + * The returned object has the following structure: + * - `userReserves`: An array of objects representing the user's reserves. Each object contains: + * - `underlyingAsset`: The address of the underlying asset. + * - `scaledATokenBalance`: The scaled balance of A tokens. + * - `usageAsCollateralEnabledOnUser`: A boolean indicating if the asset is being used as collateral by the user. + * - `scaledVariableDebt`: The scaled variable debt of the user. + * - `decimals`: The number of decimals for the asset. + * - `userEmodeCategoryId`: The eMode category ID of the user. + */ public async getUserReserveData(user: string): Promise { const resp = await this.callViewMethod( this.uiPoolDataProviderContract.getUserReservesData, diff --git a/src/clients/underlyingTokensClient.ts b/src/clients/underlyingTokensClient.ts index 49b4923..09f4666 100644 --- a/src/clients/underlyingTokensClient.ts +++ b/src/clients/underlyingTokensClient.ts @@ -2,11 +2,7 @@ import { AccountAddress, CommittedTransactionResponse, Ed25519Account, - MoveAddressType, MoveFunctionId, - MoveOption, - MoveOptionType, - MoveVector, } from "@aptos-labs/ts-sdk"; import { AptosContractWrapperBaseClass } from "./baseClass"; import { Metadata } from "../helpers/interfaces"; @@ -14,14 +10,104 @@ import { AptosProvider } from "./aptosProvider"; import { TokensContract } from "../contracts/tokens"; import { mapToBigInt } from "../helpers/common"; +/** + * The `UnderlyingTokensClient` class provides methods to interact with underlying tokens + * on the Aptos blockchain. It extends the `AptosContractWrapperBaseClass` and utilizes + * the `TokensContract` to perform various operations such as creating tokens, minting tokens, + * retrieving metadata, and more. + * + * @class UnderlyingTokensClient + * @extends {AptosContractWrapperBaseClass} + * @property {TokensContract} tokensContract - The contract instance for interacting with tokens. + * @constructor + * @param {AptosProvider} provider - The provider instance for interacting with the Aptos blockchain. + * @param {Ed25519Account} [signer] - Optional signer account for signing transactions. + * + * @method static buildWithDefaultSigner + * @param {AptosProvider} provider - The provider instance for creating the client. + * @returns {UnderlyingTokensClient} A new instance of `UnderlyingTokensClient`. + * + * @method createToken + * @param {bigint} maximumSupply - The maximum supply of the token. + * @param {string} name - The name of the token. + * @param {string} symbol - The symbol of the token. + * @param {number} decimals - The number of decimal places for the token. + * @param {string} iconUri - The URI of the token's icon. + * @param {string} projectUri - The URI of the project's website or information page. + * @returns {Promise} A promise that resolves to a transaction response. + * + * @method mint + * @param {AccountAddress} to - The account address to which the tokens will be minted. + * @param {bigint} amount - The amount of tokens to mint. + * @param {AccountAddress} metadataAddress - The account address of the metadata. + * @returns {Promise} A promise that resolves to a transaction response. + * + * @method getMetadataBySymbol + * @param {string} symbol - The symbol of the token for which metadata is being requested. + * @returns {Promise} A promise that resolves to an `AccountAddress` object containing the metadata. + * + * @method getTokenAccountAddress + * @returns {Promise} A promise that resolves to an `AccountAddress` object containing the token account address. + * + * @method supply + * @param {AccountAddress} metadataAddress - The address of the metadata to supply tokens for. + * @returns {Promise} A promise that resolves to the amount of tokens supplied as a bigint. + * + * @method maximum + * @param {AccountAddress} metadataAddress - The address of the account metadata. + * @returns {Promise} A promise that resolves to a bigint representing the maximum value, or undefined if not available. + * + * @method name + * @param {AccountAddress} metadataAddress - The address of the account metadata. + * @returns {Promise} A promise that resolves to the name of the underlying token as a string. + * + * @method symbol + * @param {AccountAddress} metadataAddress - The address of the account metadata. + * @returns {Promise} A promise that resolves to the symbol of the underlying token as a string. + * + * @method decimals + * @param {AccountAddress} metadataAddress - The address of the token's metadata. + * @returns {Promise} A promise that resolves to the number of decimals as a bigint. + * + * @method getMetadataAddress + * @param {MoveFunctionId} funcAddr - The identifier of the Move function to call. + * @param {string} coinName - The name of the coin for which to retrieve the metadata address. + * @returns {Promise} A promise that resolves to the account address containing the metadata. + * + * @method getDecimals + * @param {MoveFunctionId} funcAddr - The address of the Move function to call. + * @param {AccountAddress} metadataAddr - The address of the account containing the token metadata. + * @returns {Promise} A promise that resolves to the decimal precision of the token as a bigint. + * + * @method balanceOf + * @param {AccountAddress} owner - The account address of the token owner. + * @param {AccountAddress} metadataAddress - The account address of the token metadata. + * @returns {Promise} A promise that resolves to the balance of underlying tokens as a bigint. + * + * @method getTokenAddress + * @param {string} symbol - The symbol of the token whose address is to be retrieved. + * @returns {Promise} A promise that resolves to the account address of the token. + */ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { tokensContract: TokensContract; + /** + * Creates an instance of the UnderlyingTokensClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.tokensContract = new TokensContract(provider); } + /** + * Creates an instance of `UnderlyingTokensClient` using the default signer. + * + * @param provider - The `AptosProvider` instance to be used for creating the client. + * @returns A new instance of `UnderlyingTokensClient`. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): UnderlyingTokensClient { @@ -32,6 +118,17 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return client; } + /** + * Creates a new token with the specified parameters. + * + * @param maximumSupply - The maximum supply of the token as a bigint. + * @param name - The name of the token. + * @param symbol - The symbol of the token. + * @param decimals - The number of decimal places for the token. + * @param iconUri - The URI of the token's icon. + * @param projectUri - The URI of the project's website or information page. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async createToken( maximumSupply: bigint, name: string, @@ -46,6 +143,14 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { ); } + /** + * Mints a specified amount of tokens to a given account address. + * + * @param to - The account address to which the tokens will be minted. + * @param amount - The amount of tokens to mint, represented as a bigint. + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to a CommittedTransactionResponse. + */ public async mint( to: AccountAddress, amount: bigint, @@ -57,6 +162,13 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the metadata for a given token symbol. + * + * @param symbol - The symbol of the token for which metadata is being requested. + * @returns A promise that resolves to an `AccountAddress` object containing the metadata. + * @throws Will throw an error if the view method call fails or if the response cannot be parsed. + */ public async getMetadataBySymbol(symbol: string): Promise { const [resp] = await this.callViewMethod( this.tokensContract.UnderlyingGetMetadataBySymbolFuncAddr, @@ -65,6 +177,14 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the token account address. + * + * This method calls the `UnderlyingGetTokenAccountAddressFuncAddr` function + * of the `tokensContract` to get the token account address. + * + * @returns {Promise} A promise that resolves to an `AccountAddress` object. + */ public async getTokenAccountAddress(): Promise { const [resp] = await this.callViewMethod( this.tokensContract.UnderlyingGetTokenAccountAddressFuncAddr, @@ -73,6 +193,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Supplies the underlying tokens for a given metadata address. + * + * @param {AccountAddress} metadataAddress - The address of the metadata to supply tokens for. + * @returns {Promise} A promise that resolves to the amount of tokens supplied as a bigint. + */ public async supply(metadataAddress: AccountAddress): Promise { const [resp] = ( await this.callViewMethod(this.tokensContract.UnderlyingSupplyFuncAddr, [ @@ -82,7 +208,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp; } - // Get the maximum supply from the metadata object. + /** + * Retrieves the maximum value associated with a given metadata address. + * + * @param metadataAddress - The address of the account metadata. + * @returns A promise that resolves to a bigint representing the maximum value, or undefined if not available. + */ public async maximum( metadataAddress: AccountAddress, ): Promise { @@ -98,7 +229,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp; } - // Get the name of the fungible asset from the metadata object. + /** + * Retrieves the name of the underlying token associated with the given metadata address. + * + * @param metadataAddress - The address of the account metadata. + * @returns A promise that resolves to the name of the underlying token as a string. + */ public async name(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.UnderlyingNameFuncAddr, @@ -107,7 +243,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the symbol of the fungible asset from the metadata object. + /** + * Retrieves the symbol of the underlying token associated with the given metadata address. + * + * @param metadataAddress - The address of the account metadata. + * @returns A promise that resolves to the symbol of the underlying token as a string. + */ public async symbol(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.UnderlyingSymbolFuncAddr, @@ -116,7 +257,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the decimals from the metadata object. + /** + * Retrieves the number of decimals for a given token's metadata address. + * + * @param {AccountAddress} metadataAddress - The address of the token's metadata. + * @returns {Promise} A promise that resolves to the number of decimals as a bigint. + */ public async decimals(metadataAddress: AccountAddress): Promise { const [resp] = ( await this.callViewMethod( @@ -127,7 +273,13 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp; } - // get metadata address + /** + * Retrieves the metadata address for a given coin name by calling a specified Move function. + * + * @param funcAddr - The identifier of the Move function to call. + * @param coinName - The name of the coin for which to retrieve the metadata address. + * @returns A promise that resolves to the account address containing the metadata. + */ public async getMetadataAddress( funcAddr: MoveFunctionId, coinName: string, @@ -136,7 +288,13 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } - // get decimals + /** + * Retrieves the decimal precision of a token. + * + * @param funcAddr - The address of the Move function to call. + * @param metadataAddr - The address of the account containing the token metadata. + * @returns A promise that resolves to the decimal precision of the token as a bigint. + */ public async getDecimals( funcAddr: MoveFunctionId, metadataAddr: AccountAddress, @@ -147,6 +305,13 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return res; } + /** + * Retrieves the balance of underlying tokens for a given owner and metadata address. + * + * @param owner - The account address of the token owner. + * @param metadataAddress - The account address of the token metadata. + * @returns A promise that resolves to the balance of underlying tokens as a bigint. + */ public async balanceOf( owner: AccountAddress, metadataAddress: AccountAddress, @@ -160,6 +325,12 @@ export class UnderlyingTokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the token address for a given symbol. + * + * @param symbol - The symbol of the token whose address is to be retrieved. + * @returns A promise that resolves to the account address of the token. + */ public async getTokenAddress(symbol: string): Promise { const [resp] = await this.callViewMethod( this.tokensContract.UnderlyingTokenAddressFuncAddr, diff --git a/src/clients/variableTokensClient.ts b/src/clients/variableTokensClient.ts index 7baf6a5..fc08a72 100644 --- a/src/clients/variableTokensClient.ts +++ b/src/clients/variableTokensClient.ts @@ -10,14 +10,52 @@ import { AptosProvider } from "./aptosProvider"; import { TokensContract } from "../contracts/tokens"; import { mapToBigInt } from "../helpers/common"; +/** + * The `VariableTokensClient` class provides methods to interact with variable tokens on the Aptos blockchain. + * It extends the `AptosContractWrapperBaseClass` and utilizes the `TokensContract` for various token operations. + * + * @remarks + * This client allows for creating new variable tokens, retrieving token metadata, balances, and other related information. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const client = VariableTokensClient.buildWithDefaultSigner(provider); + * const tokenAddress = await client.createToken( + * 1000000n, + * "MyToken", + * "MTK", + * 18, + * "https://example.com/icon.png", + * "https://example.com", + * "0x1" + * ); + * const balance = await client.balanceOf("0x1", tokenAddress); + * console.log(`Balance: ${balance}`); + * ``` + * + * @public + */ export class VariableTokensClient extends AptosContractWrapperBaseClass { tokensContract: TokensContract; + /** + * Creates an instance of VariableTokensClient. + * + * @param provider - The AptosProvider instance to interact with the Aptos blockchain. + * @param signer - Optional Ed25519Account instance used for signing transactions. + */ constructor(provider: AptosProvider, signer?: Ed25519Account) { super(provider, signer); this.tokensContract = new TokensContract(provider); } + /** + * Creates an instance of `VariableTokensClient` using the default signer. + * + * @param provider - The `AptosProvider` instance to be used for creating the client. + * @returns A new instance of `VariableTokensClient` initialized with the provided `AptosProvider`. + */ public static buildWithDefaultSigner( provider: AptosProvider, ): VariableTokensClient { @@ -28,6 +66,18 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return client; } + /** + * Creates a new variable token with the specified parameters. + * + * @param maximumSupply - The maximum supply of the token. + * @param name - The name of the token. + * @param symbol - The symbol of the token. + * @param decimals - The number of decimal places the token uses. + * @param iconUri - The URI of the token's icon. + * @param projectUri - The URI of the project's website or information page. + * @param underlyingAsset - The account address of the underlying asset. + * @returns A promise that resolves to the committed transaction response. + */ public async createToken( maximumSupply: bigint, name: string, @@ -51,6 +101,13 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { ); } + /** + * Retrieves the revision number of the variable tokens contract. + * + * @returns {Promise} A promise that resolves to the revision number. + * + * @throws {Error} If the call to the view method fails. + */ public async getRevision(): Promise { const [resp] = await this.callViewMethod( this.tokensContract.VariableGetRevisionFuncAddr, @@ -59,6 +116,15 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp as number; } + /** + * Retrieves the metadata associated with a given token symbol for a specific account. + * + * @param owner - The account address of the token owner. + * @param symbol - The symbol of the token for which metadata is being requested. + * @returns A promise that resolves to the account address containing the metadata. + * + * @throws Will throw an error if the call to the view method fails. + */ public async getMetadataBySymbol( owner: AccountAddress, symbol: string, @@ -70,6 +136,13 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the token address for a given owner and token symbol. + * + * @param owner - The account address of the token owner. + * @param symbol - The symbol of the token. + * @returns A promise that resolves to the account address of the token. + */ public async getTokenAddress( owner: AccountAddress, symbol: string, @@ -81,6 +154,13 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the metadata of a specific asset for a given owner. + * + * @param owner - The account address of the asset owner. + * @param symbol - The symbol of the asset. + * @returns A promise that resolves to the account address containing the asset metadata. + */ public async getAssetMetadata( owner: AccountAddress, symbol: string, @@ -92,6 +172,12 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString((resp as Metadata).inner); } + /** + * Retrieves the underlying asset address for a given metadata address. + * + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to the account address of the underlying asset. + */ public async getUnderlyingAssetAddress( metadataAddress: AccountAddress, ): Promise { @@ -102,6 +188,33 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return AccountAddress.fromString(resp as string); } + /** + * Retrieves the balance of variable tokens for a given owner and metadata address. + * + * @param owner - The account address of the token owner. + * @param metadataAddress - The account address of the token metadata. + * @returns A promise that resolves to the balance of the variable tokens as a bigint. + */ + public async balanceOf( + owner: AccountAddress, + metadataAddress: AccountAddress, + ): Promise { + const [resp] = ( + await this.callViewMethod(this.tokensContract.VariableBalanceOfFuncAddr, [ + owner, + metadataAddress, + ]) + ).map(mapToBigInt); + return resp; + } + + /** + * Retrieves the scaled balance of a specific token for a given owner. + * + * @param owner - The address of the account owner. + * @param metadataAddress - The address of the token metadata. + * @returns A promise that resolves to the scaled balance as a bigint. + */ public async scaledBalanceOf( owner: AccountAddress, metadataAddress: AccountAddress, @@ -115,6 +228,12 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the scaled total supply of a token given its metadata address. + * + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the scaled total supply of the token as a bigint. + */ public async scaledTotalSupplyOf( metadataAddress: AccountAddress, ): Promise { @@ -127,6 +246,29 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the total supply of a specific token. + * + * @param metadataAddress - The account address of the token metadata. + * @returns A promise that resolves to the total supply of the token as a bigint. + */ + public async totalSupplyOf(metadataAddress: AccountAddress): Promise { + const [resp] = ( + await this.callViewMethod( + this.tokensContract.VariableTotalSupplyFuncAddr, + [metadataAddress], + ) + ).map(mapToBigInt); + return resp; + } + + /** + * Retrieves the scaled user balance and supply for a given owner and metadata address. + * + * @param owner - The account address of the owner. + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to a bigint representing the scaled user balance and supply. + */ public async getScaledUserBalanceAndSupply( owner: AccountAddress, metadataAddress: AccountAddress, @@ -140,6 +282,13 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp; } + /** + * Retrieves the previous index for a given user and metadata address. + * + * @param user - The account address of the user. + * @param metadataAddress - The account address of the metadata. + * @returns A promise that resolves to a bigint representing the previous index. + */ public async getPreviousIndex( user: AccountAddress, metadataAddress: AccountAddress, @@ -153,7 +302,12 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp; } - // Get the name of the fungible asset from the metadata object. + /** + * Retrieves the name associated with a given metadata address. + * + * @param metadataAddress - The address of the metadata to query. + * @returns A promise that resolves to the name as a string. + */ public async name(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.VariableNameFuncAddr, @@ -162,7 +316,12 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the symbol of the fungible asset from the metadata object. + /** + * Retrieves the symbol of a variable token given its metadata address. + * + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the symbol of the token as a string. + */ public async symbol(metadataAddress: AccountAddress): Promise { const [resp] = await this.callViewMethod( this.tokensContract.VariableSymbolFuncAddr, @@ -171,7 +330,12 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp as string; } - // Get the decimals from the metadata object. + /** + * Retrieves the number of decimals for a given token. + * + * @param metadataAddress - The address of the token's metadata. + * @returns A promise that resolves to the number of decimals as a bigint. + */ public async decimals(metadataAddress: AccountAddress): Promise { const [resp] = ( await this.callViewMethod(this.tokensContract.VariableDecimalsFuncAddr, [ @@ -181,7 +345,13 @@ export class VariableTokensClient extends AptosContractWrapperBaseClass { return resp; } - // get decimals + /** + * Retrieves the decimal precision for a given token. + * + * @param funcAddr - The address of the Move function to call. + * @param metadataAddr - The address of the account containing the token metadata. + * @returns A promise that resolves to the decimal precision of the token as a bigint. + */ public async getDecimals( funcAddr: MoveFunctionId, metadataAddr: AccountAddress, diff --git a/src/configs/testnet.ts b/src/configs/testnet.ts index 294c17d..3177d97 100644 --- a/src/configs/testnet.ts +++ b/src/configs/testnet.ts @@ -2,6 +2,23 @@ import { Network } from "@aptos-labs/ts-sdk"; import { AptosProviderConfig } from "../clients/aptosProvider"; import { ZERO_ADDRESS } from "../helpers"; +/** + * Configuration object for the Aave V3 Testnet on Aptos. + * + * @constant + * @type {AptosProviderConfig} + * @property {Network} network - The network type, set to TESTNET. + * @property {Object} addresses - The addresses for various Aave components. + * @property {string} addresses.A_TOKENS - Address for Aave A Tokens. + * @property {string} addresses.UNDERLYING_TOKENS - Address for underlying tokens. + * @property {string} addresses.VARIABLE_TOKENS - Address for variable tokens. + * @property {string} addresses.AAVE_ACL - Address for Aave ACL. + * @property {string} addresses.AAVE_CONFIG - Address for Aave configuration. + * @property {string} addresses.AAVE_ORACLE - Address for Aave oracle. + * @property {string} addresses.AAVE_POOL - Address for Aave pool. + * @property {string} addresses.AAVE_RATE - Address for Aave rate. + * @property {string} addresses.AAVE_DATA - Address for Aave data. + */ export const DEFAULT_TESTNET_CONFIG: AptosProviderConfig = { network: Network.TESTNET, addresses: { @@ -26,6 +43,16 @@ export const DEFAULT_TESTNET_CONFIG: AptosProviderConfig = { }, }; +/** + * Generates an empty configuration object for the Aptos testnet. + * + * @returns {AptosProviderConfig} An object containing default addresses set to ZERO_ADDRESS for the Aptos testnet. + * + * @example + * const config = EMPTY_TESTNET_CONFIG(); + * console.log(config.network); // Output: Network.TESTNET + * console.log(config.addresses.A_TOKENS); // Output: ZERO_ADDRESS + */ export const EMPTY_TESTNET_CONFIG = (): AptosProviderConfig => { return { network: Network.TESTNET, @@ -42,6 +69,11 @@ export const EMPTY_TESTNET_CONFIG = (): AptosProviderConfig => { } as AptosProviderConfig; }; +/** + * Generates an empty local configuration for the Aptos provider. + * + * @returns {AptosProviderConfig} An object containing the local network configuration with all addresses set to ZERO_ADDRESS. + */ export const EMPTY_LOCAL_CONFIG = (): AptosProviderConfig => { return { network: Network.LOCAL, diff --git a/src/contracts/acl_manage.ts b/src/contracts/acl_manage.ts index e6c9651..c2f37c5 100644 --- a/src/contracts/acl_manage.ts +++ b/src/contracts/acl_manage.ts @@ -1,8 +1,48 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * AclManagerContract class provides methods to manage ACL (Access Control List) roles and permissions + * within the AAVE protocol on the Aptos blockchain. + * + * @class AclManagerContract + * + * @property {MoveFunctionId} hasRoleFuncAddr - Address of the function to check if an account has a specific role. + * @property {MoveFunctionId} grantRoleFuncAddr - Address of the function to grant a role to an account. + * @property {MoveFunctionId} renounceRoleFuncAddr - Address of the function to renounce a role from an account. + * @property {MoveFunctionId} revokeRoleFuncAddr - Address of the function to revoke a role from an account. + * @property {MoveFunctionId} addPoolAdminFuncAddr - Address of the function to add a pool admin. + * @property {MoveFunctionId} removePoolAdminFuncAddr - Address of the function to remove a pool admin. + * @property {MoveFunctionId} isPoolAdminFuncAddr - Address of the function to check if an account is a pool admin. + * @property {MoveFunctionId} addEmergencyAdminFuncAddr - Address of the function to add an emergency admin. + * @property {MoveFunctionId} removeEmergencyAdminFuncAddr - Address of the function to remove an emergency admin. + * @property {MoveFunctionId} isEmergencyAdminFuncAddr - Address of the function to check if an account is an emergency admin. + * @property {MoveFunctionId} addRiskAdminFuncAddr - Address of the function to add a risk admin. + * @property {MoveFunctionId} removeRiskAdminFuncAddr - Address of the function to remove a risk admin. + * @property {MoveFunctionId} isRiskAdminFuncAddr - Address of the function to check if an account is a risk admin. + * @property {MoveFunctionId} addFlashBorrowerFuncAddr - Address of the function to add a flash borrower. + * @property {MoveFunctionId} removeFlashBorrowerFuncAddr - Address of the function to remove a flash borrower. + * @property {MoveFunctionId} isFlashBorrowerFuncAddr - Address of the function to check if an account is a flash borrower. + * @property {MoveFunctionId} addBridgeFuncAddr - Address of the function to add a bridge. + * @property {MoveFunctionId} removeBridgeFuncAddr - Address of the function to remove a bridge. + * @property {MoveFunctionId} isBridgeFuncAddr - Address of the function to check if an account is a bridge. + * @property {MoveFunctionId} addAssetListingAdminFuncAddr - Address of the function to add an asset listing admin. + * @property {MoveFunctionId} removeAssetListingAdminFuncAddr - Address of the function to remove an asset listing admin. + * @property {MoveFunctionId} isAssetListingAdminFuncAddr - Address of the function to check if an account is an asset listing admin. + * @property {MoveFunctionId} getPoolAdminRoleFuncAddr - Address of the function to get the pool admin role. + * @property {MoveFunctionId} getEmergencyAdminRoleFuncAddr - Address of the function to get the emergency admin role. + * @property {MoveFunctionId} getRiskAdminRoleFuncAddr - Address of the function to get the risk admin role. + * @property {MoveFunctionId} getFlashBorrowerRoleFuncAddr - Address of the function to get the flash borrower role. + * @property {MoveFunctionId} getBridgeRoleFuncAddr - Address of the function to get the bridge role. + * @property {MoveFunctionId} getAssetListingAdminRoleFuncAddr - Address of the function to get the asset listing admin role. + * @property {MoveFunctionId} defaultAdminRole - Address of the function to get the default admin role. + * @property {MoveFunctionId} getRoleAdmin - Address of the function to get the admin role of a specific role. + * @property {MoveFunctionId} setRoleAdmin - Address of the function to set the admin role of a specific role. + * + * @constructor + * @param {AptosProvider} provider - The provider to interact with the Aptos blockchain. + */ export class AclManagerContract { - // Resource Func Addr hasRoleFuncAddr: MoveFunctionId; grantRoleFuncAddr: MoveFunctionId; @@ -61,14 +101,51 @@ export class AclManagerContract { getAssetListingAdminRoleFuncAddr: MoveFunctionId; - grantDefaultAdminRole: MoveFunctionId; - defaultAdminRole: MoveFunctionId; getRoleAdmin: MoveFunctionId; setRoleAdmin: MoveFunctionId; + /** + * Constructs an instance of the ACL Manager with the provided AptosProvider. + * Initializes various function addresses related to ACL management. + * + * @param provider - The AptosProvider instance used to get the profile address for AAVE_ACL. + * + * Properties initialized: + * - `hasRoleFuncAddr`: Address for the `has_role` function. + * - `grantRoleFuncAddr`: Address for the `grant_role` function. + * - `renounceRoleFuncAddr`: Address for the `renounce_role` function. + * - `revokeRoleFuncAddr`: Address for the `revoke_role` function. + * - `addPoolAdminFuncAddr`: Address for the `add_pool_admin` function. + * - `removePoolAdminFuncAddr`: Address for the `remove_pool_admin` function. + * - `isPoolAdminFuncAddr`: Address for the `is_pool_admin` function. + * - `addEmergencyAdminFuncAddr`: Address for the `add_emergency_admin` function. + * - `removeEmergencyAdminFuncAddr`: Address for the `remove_emergency_admin` function. + * - `isEmergencyAdminFuncAddr`: Address for the `is_emergency_admin` function. + * - `addRiskAdminFuncAddr`: Address for the `add_risk_admin` function. + * - `removeRiskAdminFuncAddr`: Address for the `remove_risk_admin` function. + * - `isRiskAdminFuncAddr`: Address for the `is_risk_admin` function. + * - `addFlashBorrowerFuncAddr`: Address for the `add_flash_borrower` function. + * - `removeFlashBorrowerFuncAddr`: Address for the `remove_flash_borrower` function. + * - `isFlashBorrowerFuncAddr`: Address for the `is_flash_borrower` function. + * - `addBridgeFuncAddr`: Address for the `add_bridge` function. + * - `removeBridgeFuncAddr`: Address for the `remove_bridge` function. + * - `isBridgeFuncAddr`: Address for the `is_bridge` function. + * - `addAssetListingAdminFuncAddr`: Address for the `add_asset_listing_admin` function. + * - `removeAssetListingAdminFuncAddr`: Address for the `remove_asset_listing_admin` function. + * - `isAssetListingAdminFuncAddr`: Address for the `is_asset_listing_admin` function. + * - `getPoolAdminRoleFuncAddr`: Address for the `get_pool_admin_role` function. + * - `getEmergencyAdminRoleFuncAddr`: Address for the `get_emergency_admin_role` function. + * - `getRiskAdminRoleFuncAddr`: Address for the `get_risk_admin_role` function. + * - `getFlashBorrowerRoleFuncAddr`: Address for the `get_flash_borrower_role` function. + * - `getBridgeRoleFuncAddr`: Address for the `get_bridge_role` function. + * - `getAssetListingAdminRoleFuncAddr`: Address for the `get_asset_listing_admin_role` function. + * - `defaultAdminRole`: Address for the `default_admin_role`. + * - `getRoleAdmin`: Address for the `get_role_admin` function. + * - `setRoleAdmin`: Address for the `set_role_admin` function. + */ constructor(provider: AptosProvider) { const AclManager = provider.getProfileAddressByName(AAVE_PROFILES.AAVE_ACL); const AclManagerAccountAddress = AclManager.toString(); @@ -100,12 +177,10 @@ export class AclManagerContract { this.getFlashBorrowerRoleFuncAddr = `${AclManagerAccountAddress}::acl_manage::get_flash_borrower_role`; this.getBridgeRoleFuncAddr = `${AclManagerAccountAddress}::acl_manage::get_bridge_role`; this.getAssetListingAdminRoleFuncAddr = `${AclManagerAccountAddress}::acl_manage::get_asset_listing_admin_role`; - this.grantDefaultAdminRole = `${AclManagerAccountAddress}::acl_manage::grant_default_admin_role`; this.defaultAdminRole = `${AclManagerAccountAddress}::acl_manage::default_admin_role`; this.getRoleAdmin = `${AclManagerAccountAddress}::acl_manage::get_role_admin`; this.setRoleAdmin = `${AclManagerAccountAddress}::acl_manage::set_role_admin`; } } -// Mock Account export const FLASH_BORROW_ADMIN_ROLE = "FLASH_BORROWER"; diff --git a/src/contracts/bridge.ts b/src/contracts/bridge.ts index 84a6f1c..15e23cd 100644 --- a/src/contracts/bridge.ts +++ b/src/contracts/bridge.ts @@ -1,12 +1,24 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * The `BridgeContract` class provides methods to interact with the bridge logic on the Aptos blockchain. + * It initializes the addresses for the `mint_unbacked` and `back_unbacked` functions using the profile + * address associated with the AAVE_POOL profile. + */ export class BridgeContract { - // Resource Func Addr MintUnbackedFuncAddr: MoveFunctionId; - BackUnbackedFuncAddr: MoveFunctionId; + /** + * Constructs an instance of the Bridge class. + * + * @param provider - An instance of AptosProvider used to interact with the Aptos blockchain. + * + * This constructor initializes the BridgeManager by fetching the profile address associated with + * the AAVE_POOL profile. It then converts this address to a string and uses it to set the addresses + * for the `mint_unbacked` and `back_unbacked` functions within the bridge logic. + */ constructor(provider: AptosProvider) { const BridgeManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/contracts/coinMigrator.ts b/src/contracts/coinMigrator.ts index bd5c163..ece8151 100644 --- a/src/contracts/coinMigrator.ts +++ b/src/contracts/coinMigrator.ts @@ -1,12 +1,37 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * The `CoinMigratorContract` class provides methods to interact with the coin migration functionalities + * on the Aptos blockchain. It allows migrating coins to FA, migrating FA to coins, and retrieving the FA address. + * + * @remarks + * This class requires an instance of `AptosProvider` to interact with the Aptos blockchain. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const coinMigrator = new CoinMigratorContract(provider); + * ``` + * + * @public + */ export class CoinMigratorContract { // Resource Func Addr CoinToFaFuncAddr: MoveFunctionId; FaToCoinFuncAddr: MoveFunctionId; GetFaAddrFuncAddr: MoveFunctionId; + /** + * Constructs a new instance of the CoinMigrator class. + * + * @param provider - An instance of AptosProvider used to interact with the Aptos blockchain. + * + * Initializes the following properties: + * - `CoinToFaFuncAddr`: The address of the function to migrate coins to FA. + * - `FaToCoinFuncAddr`: The address of the function to migrate FA to coins. + * - `GetFaAddrFuncAddr`: The address of the function to get the FA address. + */ constructor(provider: AptosProvider) { const CoinMigratorManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/contracts/flashloan.ts b/src/contracts/flashloan.ts index dc2cad0..75f3b84 100644 --- a/src/contracts/flashloan.ts +++ b/src/contracts/flashloan.ts @@ -1,8 +1,23 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * Represents a contract for handling flash loans on the Aptos blockchain. + * + * @remarks + * This class provides functionality to interact with the flash loan logic + * defined in the AAVE_POOL profile on the Aptos blockchain. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const flashLoanContract = new FlashLoanContract(provider); + * console.log(flashLoanContract.FlashLoanFuncAddr); + * ``` + * + * @public + */ export class FlashLoanContract { - // Resource Func Addr FlashLoanFuncAddr: MoveFunctionId; PayFlashLoanComplexFuncAddr: MoveFunctionId; @@ -11,6 +26,18 @@ export class FlashLoanContract { PayFlashLoanSimpleFuncAddr: MoveFunctionId; + /** + * Creates an instance of the FlashLoan class. + * + * @param provider - An instance of AptosProvider used to interact with the Aptos blockchain. + * + * This constructor initializes the FlashLoanManager by fetching the profile address associated with AAVE_POOL. + * It then converts the FlashLoanManager address to a string and constructs the function addresses for + * `flashloan` and `flash_loan_simple` logic. + * + * @property FlashLoanFuncAddr - The address of the flash loan function. + * @property FlashLoanSimpleFuncAddr - The address of the simple flash loan function. + */ constructor(provider: AptosProvider) { const FlashLoanManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/contracts/oracle.ts b/src/contracts/oracle.ts index ece1f18..1e14941 100644 --- a/src/contracts/oracle.ts +++ b/src/contracts/oracle.ts @@ -18,6 +18,25 @@ export class OracleContract { GetOracleAddressFuncAddr: MoveFunctionId; + /** + * Constructs an instance of the Oracle class. + * + * @param provider - An instance of `AptosProvider` used to interact with the Aptos blockchain. + * + * This constructor initializes various function addresses related to the Oracle contract by + * fetching the OracleManager's account address from the provider and constructing the full + * function addresses for different oracle operations. + * + * The following function addresses are initialized: + * - `GetAssetPriceFuncAddr`: Address for the `get_asset_price` function. + * - `GetAssetsPricesFuncAddr`: Address for the `get_assets_prices` function. + * - `SetAssetFeedIdFuncAddr`: Address for the `set_asset_feed_id` function. + * - `BatchSetAssetFeedIdsFuncAddr`: Address for the `batch_set_asset_feed_ids` function. + * - `RemoveAssetFeedIdFuncAddr`: Address for the `remove_asset_feed_id` function. + * - `RemoveAssetFeedIdsFuncAddr`: Address for the `batch_remove_asset_feed_ids` function. + * - `GetOracleResourceAccountFuncAddr`: Address for the `get_oracle_resource_account` function. + * - `GetOracleAddressFuncAddr`: Address for the `oracle_address` function. + */ constructor(provider: AptosProvider) { const OracleManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_ORACLE, diff --git a/src/contracts/pool.ts b/src/contracts/pool.ts index bb26e4d..6163778 100644 --- a/src/contracts/pool.ts +++ b/src/contracts/pool.ts @@ -1,6 +1,23 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * Represents the PoolContract class which interacts with the AAVE protocol on the Aptos blockchain. + * + * This class initializes various function addresses for interacting with the AAVE protocol. + * + * The function addresses are categorized into several sections: + * + * - **Pool**: Functions related to pool operations such as minting to treasury, resetting isolation mode total debt, rescuing tokens, setting bridge protocol fees, and setting flashloan premiums. + * - **Pool View**: Functions for retrieving pool data such as revision, reserve configuration, reserve data, reserves count, reserves list, reserve address by ID, reserve normalized variable debt, reserve normalized income, user configuration, bridge protocol fee, flashloan premium total, flashloan premium to protocol, max number of reserves, scaled AToken total supply, scaled AToken balance, scaled variable token total supply, and scaled variable token balance. + * - **Pool Configurator**: Functions for configuring the pool such as initializing reserves, dropping reserves, setting asset emode category, setting borrow cap, setting borrowable in isolation, setting debt ceiling, setting emode category, setting liquidation protocol fee, setting pool pause, setting reserve active, setting reserve borrowing, configuring reserve as collateral, setting reserve factor, setting reserve flash loaning, setting reserve freeze, setting reserve pause, setting siloed borrowing, setting supply cap, setting unbacked mint cap, updating bridge protocol fee, updating flashloan premium to protocol, and updating flashloan premium total. + * - **E Mode Logic**: Functions for emode logic such as setting user emode, configuring emode category, getting emode category data, and getting user emode. + * - **Default Reserve Interest Rate Strategy**: Functions for default reserve interest rate strategy such as setting reserve interest rate strategy, getting optimal usage ratio, getting max excess usage ratio, getting variable rate slope1, getting variable rate slope2, getting base variable borrow rate, getting max variable borrow rate, and calculating interest rates. + * - **Pool Data Provider**: Functions for pool data provider such as getting all reserves tokens, getting all ATokens, getting all variable tokens, getting reserve configuration data, getting reserve emode category, getting reserve caps, getting paused status, getting siloed borrowing, getting liquidation protocol fee tokens, getting unbacked mint cap, getting debt ceiling, getting debt ceiling decimals, getting reserve data, getting AToken total supply, getting total debt, getting user reserve data, getting reserve tokens addresses, and getting flash loan enabled status. + * - **Pool Addresses Provider**: Functions for pool addresses provider such as checking if ID mapped account exists, getting market ID, getting address, getting pool, getting pool configurator, getting price oracle, getting ACL manager, getting ACL admin, getting price oracle sentinel, getting pool data provider, setting market ID, setting address, setting pool implementation, setting pool configurator, setting price oracle, setting ACL manager, setting ACL admin, setting price oracle sentinel, and setting pool data provider. + * + * @param provider - The AptosProvider instance used to interact with the Aptos blockchain. + */ export class PoolContract { // Resource Func Addr /** @@ -244,6 +261,23 @@ export class PoolContract { SetPoolDataProviderFuncAddr: MoveFunctionId; + /** + * Constructs a new instance of the Pool class. + * + * @param provider - The AptosProvider instance used to interact with the Aptos blockchain. + * + * This constructor initializes various function addresses for interacting with the AAVE protocol on the Aptos blockchain. + * + * The function addresses are categorized into several sections: + * + * - **Pool**: Functions related to pool operations such as minting to treasury, resetting isolation mode total debt, rescuing tokens, setting bridge protocol fees, and setting flashloan premiums. + * - **pool**: Functions for retrieving pool data such as revision, reserve configuration, reserve data, reserves count, reserves list, reserve address by ID, reserve normalized variable debt, reserve normalized income, user configuration, bridge protocol fee, flashloan premium total, flashloan premium to protocol, max number of reserves, scaled AToken total supply, scaled AToken balance, scaled variable token total supply, and scaled variable token balance. + * - **Pool Configurator**: Functions for configuring the pool such as initializing reserves, dropping reserves, setting asset emode category, setting borrow cap, setting borrowable in isolation, setting debt ceiling, setting emode category, setting liquidation protocol fee, setting pool pause, setting reserve active, setting reserve borrowing, configuring reserve as collateral, setting reserve factor, setting reserve flash loaning, setting reserve freeze, setting reserve pause, setting siloed borrowing, setting supply cap, setting unbacked mint cap, updating bridge protocol fee, updating flashloan premium to protocol, and updating flashloan premium total. + * - **E Mode Logic**: Functions for emode logic such as getting revision, setting user emode, configuring emode category, getting emode category data, and getting user emode. + * - **default_reserve_interest_rate_strategy**: Functions for default reserve interest rate strategy such as setting reserve interest rate strategy, getting optimal usage ratio, getting max excess usage ratio, getting variable rate slope1, getting variable rate slope2, getting base variable borrow rate, getting max variable borrow rate, and calculating interest rates. + * - **pool data provider**: Functions for pool data provider such as getting all reserves tokens, getting all ATokens, getting all variable tokens, getting reserve configuration data, getting reserve emode category, getting reserve caps, getting paused status, getting siloed borrowing, getting liquidation protocol fee tokens, getting unbacked mint cap, getting debt ceiling, getting debt ceiling decimals, getting reserve data, getting AToken total supply, getting total debt, getting user reserve data, getting reserve tokens addresses, and getting flash loan enabled status. + * - **pool addresses provider**: Functions for pool addresses provider such as checking if ID mapped account exists, getting market ID, getting address, getting pool, getting pool configurator, getting price oracle, getting ACL manager, getting ACL admin, getting price oracle sentinel, getting pool data provider, setting market ID, setting address, setting pool implementation, setting pool configurator, setting price oracle, setting ACL manager, setting ACL admin, setting price oracle sentinel, and setting pool data provider. + */ constructor(provider: AptosProvider) { const PoolManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, @@ -269,7 +303,7 @@ export class PoolContract { this.PoolGetRevisionFuncAddr = `${PoolManagerAccountAddress}::pool::get_revision`; this.PoolGetReserveConfigurationFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserve_configuration`; this.PoolGetReserveDataFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserve_data`; - this.GetReserveDataAndReservesCountFuncAddr = `${PoolManagerAccountAddress}::pool_data_provider::get_reserve_data_and_reserves_count`; + this.GetReserveDataAndReservesCountFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserve_data_and_reserves_count`; this.PoolGetReservesCountFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserves_count`; this.PoolGetReservesListFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserves_list`; this.PoolGetReserveAddressByIdFuncAddr = `${PoolManagerAccountAddress}::pool::get_reserve_address_by_id`; diff --git a/src/contracts/supply_borrow.ts b/src/contracts/supply_borrow.ts index 64733ea..a992ea0 100644 --- a/src/contracts/supply_borrow.ts +++ b/src/contracts/supply_borrow.ts @@ -1,10 +1,35 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * The `SupplyBorrowContract` class encapsulates the logic for interacting with the supply, borrow, and liquidation + * functionalities of the AAVE protocol on the Aptos blockchain. + * + * This class initializes various function addresses required for these operations by retrieving the profile address + * associated with the AAVE_POOL from the provided `AptosProvider` instance. + * + * @remarks + * The following function addresses are set during initialization: + * - `SupplyFuncAddr`: Address for the supply logic. + * - `WithdrawFuncAddr`: Address for the withdraw logic. + * - `FinalizeTransferFuncAddr`: Address for the finalize transfer logic. + * - `SetUserUseReserveAsCollateralFuncAddr`: Address for setting user reserve as collateral. + * - `DepositFuncAddr`: Address for the deposit logic. + * - `BorrowFuncAddr`: Address for the borrow logic. + * - `RepayFuncAddr`: Address for the repay logic. + * - `RepayWithATokensFuncAddr`: Address for repaying with A tokens. + * - `LiquidationCallFuncAddr`: Address for the liquidation call logic. + * - `GetUserAccountDataFuncAddr`: Address for retrieving user account data. + * + * @param provider - An instance of `AptosProvider` used to interact with the Aptos blockchain. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const supplyBorrowContract = new SupplyBorrowContract(provider); + * ``` + */ export class SupplyBorrowContract { - // Resource Func Addr - // Supply - /// Entry SupplyFuncAddr: MoveFunctionId; WithdrawFuncAddr: MoveFunctionId; @@ -15,22 +40,35 @@ export class SupplyBorrowContract { DepositFuncAddr: MoveFunctionId; - // Borrow - /// Entry BorrowFuncAddr: MoveFunctionId; RepayFuncAddr: MoveFunctionId; RepayWithATokensFuncAddr: MoveFunctionId; - // Liquidation - /// Entry LiquidationCallFuncAddr: MoveFunctionId; - // User Logic - /// View GetUserAccountDataFuncAddr: MoveFunctionId; + /** + * Constructs a new instance of the SupplyBorrowManager class. + * + * @param provider - An instance of AptosProvider used to interact with the Aptos blockchain. + * + * Initializes various function addresses for supply, borrow, and liquidation logic + * by retrieving the profile address associated with AAVE_POOL from the provider. + * + * The following function addresses are set: + * - `SupplyFuncAddr`: Address for the supply logic. + * - `WithdrawFuncAddr`: Address for the withdraw logic. + * - `FinalizeTransferFuncAddr`: Address for the finalize transfer logic. + * - `SetUserUseReserveAsCollateralFuncAddr`: Address for setting user reserve as collateral. + * - `BorrowFuncAddr`: Address for the borrow logic. + * - `RepayFuncAddr`: Address for the repay logic. + * - `RepayWithATokensFuncAddr`: Address for repaying with A tokens. + * - `LiquidationCallFuncAddr`: Address for the liquidation call logic. + * - `GetUserAccountDataFuncAddr`: Address for retrieving user account data. + */ constructor(provider: AptosProvider) { const SupplyBorrowManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/contracts/tokens.ts b/src/contracts/tokens.ts index 6364beb..8917bef 100644 --- a/src/contracts/tokens.ts +++ b/src/contracts/tokens.ts @@ -1,8 +1,70 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * The `TokensContract` class provides methods to interact with various token contracts on the Aptos blockchain. + * It includes functionality for managing underlying tokens, A tokens, and variable tokens. + * + * @remarks + * This class initializes various function addresses required for token operations using the provided Aptos provider. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const tokensContract = new TokensContract(provider); + * ``` + * + * @param provider - The Aptos provider used to get profile addresses and interact with the blockchain. + * + * Properties initialized: + * - `UnderlyingCreateTokenFuncAddr`: Address for creating an underlying token. + * - `UnderlyingGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for an underlying token. + * - `UnderlyingGetTokenAccountAddressFuncAddr`: Address for getting the token account address for an underlying token. + * - `UnderlyingMintFuncAddr`: Address for minting an underlying token. + * - `UnderlyingSupplyFuncAddr`: Address for supplying an underlying token. + * - `UnderlyingMaximumFuncAddr`: Address for getting the maximum supply of an underlying token. + * - `UnderlyingNameFuncAddr`: Address for getting the name of an underlying token. + * - `UnderlyingSymbolFuncAddr`: Address for getting the symbol of an underlying token. + * - `UnderlyingDecimalsFuncAddr`: Address for getting the decimals of an underlying token. + * - `UnderlyingBalanceOfFuncAddr`: Address for getting the balance of an underlying token. + * - `UnderlyingTokenAddressFuncAddr`: Address for getting the token address of an underlying token. + * + * - `ATokenCreateTokenFuncAddr`: Address for creating an A token. + * - `ATokenGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for an A token. + * - `ATokenGetTokenAccountAddressFuncAddr`: Address for getting the token account address for an A token. + * - `ATokenGetReserveTreasuryAddressFuncAddr`: Address for getting the reserve treasury address for an A token. + * - `ATokenGetUnderlyingAssetAddressFuncAddr`: Address for getting the underlying asset address for an A token. + * - `ATokenScaledTotalSupplyFuncAddr`: Address for getting the scaled total supply of an A token. + * - `ATokenTotalSupplyFuncAddr`: Address for getting the total supply of an A token. + * - `ATokenNameFuncAddr`: Address for getting the name of an A token. + * - `ATokenSymbolFuncAddr`: Address for getting the symbol of an A token. + * - `ATokenDecimalsFuncAddr`: Address for getting the decimals of an A token. + * - `ATokenBalanceOfFuncAddr`: Address for getting the balance of an A token. + * - `ATokenScaledBalanceOfFuncAddr`: Address for getting the scaled balance of an A token. + * - `ATokenRescueTokensFuncAddr`: Address for rescuing tokens of an A token. + * - `ATokenGetScaledUserBalanceAndSupplyFuncAddr`: Address for getting the scaled user balance and supply of an A token. + * - `ATokenGetGetPreviousIndexFuncAddr`: Address for getting the previous index of an A token. + * - `ATokenGetRevisionFuncAddr`: Address for getting the revision of an A token. + * - `ATokenTokenAddressFuncAddr`: Address for getting the token address of an A token. + * - `ATokenAssetMetadataFuncAddr`: Address for getting the asset metadata of an A token. + * + * - `VariableCreateTokenFuncAddr`: Address for creating a variable token. + * - `VariableGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for a variable token. + * - `VariableGetTokenAddressFuncAddr`: Address for getting the token address of a variable token. + * - `VariableGetAssetMetadataFuncAddr`: Address for getting the asset metadata of a variable token. + * - `VariableGetUnderlyingAddressFuncAddr`: Address for getting the underlying asset address of a variable token. + * - `VariableNameFuncAddr`: Address for getting the name of a variable token. + * - `VariableSymbolFuncAddr`: Address for getting the symbol of a variable token. + * - `VariableDecimalsFuncAddr`: Address for getting the decimals of a variable token. + * - `VariableScaledBalanceOfFuncAddr`: Address for getting the scaled balance of a variable token. + * - `VariableBalanceOfFuncAddr`: Address for getting the balance of a variable token. + * - `VariableScaledTotalSupplyFuncAddr`: Address for getting the scaled total supply of a variable token. + * - `VariableTotalSupplyFuncAddr`: Address for getting the total supply of a variable token. + * - `VariableGetScaledUserBalanceAndSupplyFuncAddr`: Address for getting the scaled user balance and supply of a variable token. + * - `VariableGetPreviousIndexFuncAddr`: Address for getting the previous index of a variable token. + * - `VariableGetRevisionFuncAddr`: Address for getting the revision of a variable token. + */ export class TokensContract { - // Resource Func Addr // Underlying Token UnderlyingCreateTokenFuncAddr: MoveFunctionId; @@ -39,6 +101,8 @@ export class TokensContract { ATokenScaledTotalSupplyFuncAddr: MoveFunctionId; + ATokenTotalSupplyFuncAddr: MoveFunctionId; + ATokenNameFuncAddr: MoveFunctionId; ATokenSymbolFuncAddr: MoveFunctionId; @@ -47,6 +111,8 @@ export class TokensContract { ATokenScaledBalanceOfFuncAddr: MoveFunctionId; + ATokenBalanceOfFuncAddr: MoveFunctionId; + ATokenRescueTokensFuncAddr: MoveFunctionId; ATokenGetScaledUserBalanceAndSupplyFuncAddr: MoveFunctionId; @@ -78,14 +144,72 @@ export class TokensContract { VariableScaledBalanceOfFuncAddr: MoveFunctionId; + VariableBalanceOfFuncAddr: MoveFunctionId; + VariableScaledTotalSupplyFuncAddr: MoveFunctionId; + VariableTotalSupplyFuncAddr: MoveFunctionId; + VariableGetScaledUserBalanceAndSupplyFuncAddr: MoveFunctionId; VariableGetPreviousIndexFuncAddr: MoveFunctionId; VariableGetRevisionFuncAddr: MoveFunctionId; + /** + * Constructs an instance of the token manager with the provided Aptos provider. + * Initializes various function addresses for managing underlying tokens, A tokens, and variable tokens. + * + * @param provider - The Aptos provider used to get profile addresses and interact with the blockchain. + * + * Properties initialized: + * - `UnderlyingCreateTokenFuncAddr`: Address for creating an underlying token. + * - `UnderlyingGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for an underlying token. + * - `UnderlyingGetTokenAccountAddressFuncAddr`: Address for getting the token account address for an underlying token. + * - `UnderlyingMintFuncAddr`: Address for minting an underlying token. + * - `UnderlyingSupplyFuncAddr`: Address for supplying an underlying token. + * - `UnderlyingMaximumFuncAddr`: Address for getting the maximum supply of an underlying token. + * - `UnderlyingNameFuncAddr`: Address for getting the name of an underlying token. + * - `UnderlyingSymbolFuncAddr`: Address for getting the symbol of an underlying token. + * - `UnderlyingDecimalsFuncAddr`: Address for getting the decimals of an underlying token. + * - `UnderlyingBalanceOfFuncAddr`: Address for getting the balance of an underlying token. + * - `UnderlyingTokenAddressFuncAddr`: Address for getting the token address of an underlying token. + * + * - `ATokenCreateTokenFuncAddr`: Address for creating an A token. + * - `ATokenGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for an A token. + * - `ATokenGetTokenAccountAddressFuncAddr`: Address for getting the token account address for an A token. + * - `ATokenGetReserveTreasuryAddressFuncAddr`: Address for getting the reserve treasury address for an A token. + * - `ATokenGetUnderlyingAssetAddressFuncAddr`: Address for getting the underlying asset address for an A token. + * - `ATokenScaledTotalSupplyFuncAddr`: Address for getting the scaled total supply of an A token. + * - `ATokenTotalSupplyFuncAddr`: Address for getting the total supply of an A token. + * - `ATokenNameFuncAddr`: Address for getting the name of an A token. + * - `ATokenSymbolFuncAddr`: Address for getting the symbol of an A token. + * - `ATokenDecimalsFuncAddr`: Address for getting the decimals of an A token. + * - `ATokenBalanceOfFuncAddr`: Address for getting the balance of an A token. + * - `ATokenScaledBalanceOfFuncAddr`: Address for getting the scaled balance of an A token. + * - `ATokenRescueTokensFuncAddr`: Address for rescuing tokens of an A token. + * - `ATokenGetScaledUserBalanceAndSupplyFuncAddr`: Address for getting the scaled user balance and supply of an A token. + * - `ATokenGetGetPreviousIndexFuncAddr`: Address for getting the previous index of an A token. + * - `ATokenGetRevisionFuncAddr`: Address for getting the revision of an A token. + * - `ATokenTokenAddressFuncAddr`: Address for getting the token address of an A token. + * - `ATokenAssetMetadataFuncAddr`: Address for getting the asset metadata of an A token. + * + * - `VariableCreateTokenFuncAddr`: Address for creating a variable token. + * - `VariableGetMetadataBySymbolFuncAddr`: Address for getting metadata by symbol for a variable token. + * - `VariableGetTokenAddressFuncAddr`: Address for getting the token address of a variable token. + * - `VariableGetAssetMetadataFuncAddr`: Address for getting the asset metadata of a variable token. + * - `VariableGetUnderlyingAddressFuncAddr`: Address for getting the underlying asset address of a variable token. + * - `VariableNameFuncAddr`: Address for getting the name of a variable token. + * - `VariableSymbolFuncAddr`: Address for getting the symbol of a variable token. + * - `VariableDecimalsFuncAddr`: Address for getting the decimals of a variable token. + * - `VariableScaledBalanceOfFuncAddr`: Address for getting the scaled balance of a variable token. + * - `VariableBalanceOfFuncAddr`: Address for getting the balance of a variable token. + * - `VariableScaledTotalSupplyFuncAddr`: Address for getting the scaled total supply of a variable token. + * - `VariableTotalSupplyFuncAddr`: Address for getting the total supply of a variable token. + * - `VariableGetScaledUserBalanceAndSupplyFuncAddr`: Address for getting the scaled user balance and supply of a variable token. + * - `VariableGetPreviousIndexFuncAddr`: Address for getting the previous index of a variable token. + * - `VariableGetRevisionFuncAddr`: Address for getting the revision of a variable token. + */ constructor(provider: AptosProvider) { // Underlying Token const AaveTokensManager = provider.getProfileAddressByName( @@ -113,9 +237,11 @@ export class TokensContract { this.ATokenGetReserveTreasuryAddressFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::get_reserve_treasury_address`; this.ATokenGetUnderlyingAssetAddressFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::get_underlying_asset_address`; this.ATokenScaledTotalSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::scaled_total_supply`; + this.ATokenTotalSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::total_supply`; this.ATokenNameFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::name`; this.ATokenSymbolFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::symbol`; this.ATokenDecimalsFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::decimals`; + this.ATokenBalanceOfFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::balance_of`; this.ATokenScaledBalanceOfFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::scaled_balance_of`; this.ATokenRescueTokensFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::rescue_tokens`; this.ATokenGetScaledUserBalanceAndSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::a_token_factory::get_scaled_user_balance_and_supply`; @@ -134,7 +260,9 @@ export class TokensContract { this.VariableSymbolFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::symbol`; this.VariableDecimalsFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::decimals`; this.VariableScaledBalanceOfFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::scaled_balance_of`; + this.VariableBalanceOfFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::balance_of`; this.VariableScaledTotalSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::scaled_total_supply`; + this.VariableTotalSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::total_supply`; this.VariableGetScaledUserBalanceAndSupplyFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::get_scaled_user_balance_and_supply`; this.VariableGetPreviousIndexFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::get_previous_index`; this.VariableGetRevisionFuncAddr = `${AaveTokensManagerAccountAddress}::variable_debt_token_factory::get_revision`; diff --git a/src/contracts/uiIncentiveDataProvider.ts b/src/contracts/uiIncentiveDataProvider.ts index fb7a24c..147cce0 100644 --- a/src/contracts/uiIncentiveDataProvider.ts +++ b/src/contracts/uiIncentiveDataProvider.ts @@ -1,8 +1,26 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * Class representing the UI Incentive Data Provider Contract. + * + * This class provides methods to interact with the AAVE protocol's UI Incentive Data Provider V3. + * It initializes various addresses and methods required to retrieve incentive data. + * + * @remarks + * The constructor retrieves the Periphery Manager's account address from the provided AptosProvider instance + * and constructs the necessary addresses and method names for interacting with the incentive data provider. + * + * @property uiIncentiveDataProviderV3DataAddress - The address for the UI Incentive Data Provider V3 data. + * @property uiIncentiveDataProviderV3DataObject - The object address for the UI Incentive Data Provider V3 data. + * @property getFullReservesIncentiveData - The method name for retrieving full reserves incentive data. + * @property getReservesIncentivesData - The method name for retrieving reserves incentives data. + * @property getUserReservesIncentivesData - The method name for retrieving user reserves incentives data. + * + * @constructor + * @param provider - The AptosProvider instance used to interact with the AAVE protocol. + */ export class UiIncentiveDataProviderContract { - // Resource Func Addr /** * ------------------------------------------------------------------------- * UI Incentive Data Provider @@ -20,6 +38,22 @@ export class UiIncentiveDataProviderContract { getUserReservesIncentivesData: MoveFunctionId; + /** + * Creates an instance of the UIIncentiveDataProvider. + * + * @param provider - The AptosProvider instance used to interact with the AAVE protocol. + * + * @remarks + * This constructor initializes various addresses and methods related to the UI Incentive Data Provider V3. + * It retrieves the Periphery Manager's account address from the provider and constructs the necessary + * addresses and method names for interacting with the incentive data provider. + * + * @property uiIncentiveDataProviderV3DataAddress - The address for the UI Incentive Data Provider V3 data. + * @property uiIncentiveDataProviderV3DataObject - The object address for the UI Incentive Data Provider V3 data. + * @property getFullReservesIncentiveData - The method name for retrieving full reserves incentive data. + * @property getReservesIncentivesData - The method name for retrieving reserves incentives data. + * @property getUserReservesIncentivesData - The method name for retrieving user reserves incentives data. + */ constructor(provider: AptosProvider) { const PeripheryManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/contracts/uiPoolDataProvider.ts b/src/contracts/uiPoolDataProvider.ts index b634ef8..3f643b4 100644 --- a/src/contracts/uiPoolDataProvider.ts +++ b/src/contracts/uiPoolDataProvider.ts @@ -1,8 +1,24 @@ import { MoveFunctionId } from "@aptos-labs/ts-sdk"; import { AAVE_PROFILES, AptosProvider } from "../clients/aptosProvider"; +/** + * Class representing the UI Pool Data Provider contract. + * + * This class provides methods to interact with the AAVE protocol's UI Pool Data Provider. + * + * @remarks + * The class initializes various properties that represent the addresses of different functions + * and data objects within the AAVE protocol. + * + * @example + * ```typescript + * const provider = new AptosProvider(); + * const uiPoolDataProvider = new UiPoolDataProviderContract(provider); + * ``` + * + * @public + */ export class UiPoolDataProviderContract { - // Resource Func Addr /** * ------------------------------------------------------------------------- * UI Pool Data Provider @@ -20,6 +36,18 @@ export class UiPoolDataProviderContract { getUserReservesData: MoveFunctionId; + /** + * Constructs an instance of the UIPoolDataProvider class. + * + * @param provider - An instance of AptosProvider used to interact with the AAVE protocol. + * + * Initializes the following properties: + * - `uiPoolDataProviderV32DataAddress`: The address of the UI Pool Data Provider V3.2 data. + * - `uiPoolDataProviderV3DataObject`: The address of the UI Pool Data Provider V3 data object. + * - `getReservesList`: The address of the function to get the list of reserves. + * - `getReservesData`: The address of the function to get the data of reserves. + * - `getUserReservesData`: The address of the function to get the data of user reserves. + */ constructor(provider: AptosProvider) { const PeripheryManager = provider.getProfileAddressByName( AAVE_PROFILES.AAVE_POOL, diff --git a/src/helpers/AptosConfigurator.ts b/src/helpers/AptosConfigurator.ts deleted file mode 100644 index 0db06a9..0000000 --- a/src/helpers/AptosConfigurator.ts +++ /dev/null @@ -1,519 +0,0 @@ -import { - Account, - AccountAddress, - CommittedTransactionResponse, - Ed25519Account, - Ed25519PrivateKey, -} from "@aptos-labs/ts-sdk"; -import { PoolClient } from "../clients/poolClient"; -import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; -import { AptosProvider, AptosProviderConfig } from "../clients/aptosProvider"; -import { OracleClient } from "../clients/oracleClient"; - -const ONE_OCTA = 100_000_000; - -export interface ReserveConfig { - priceInMarketReferenceCurrency: bigint; - maxSupply: bigint; - name: string; - symbol: string; - decimals: number; - iconUri: string; - projectUri: string; - treasury: AccountAddress; - aTokenName: string; - aTokenSymbol: string; - variableDebtTokenName: string; - variableDebtTokenSymbol: string; - optimalUsageRatio: bigint; - baseVariableBorrowRate: bigint; - variableRateSlope1: bigint; - variableRateSlope2: bigint; - ltv: bigint; - liquidationThreshold: bigint; - liquidationBonus: bigint; - reserveFactor: bigint; - borrowCap: bigint; - supplyCap: bigint; - borrowingEnabled: boolean; - flashloanEnabled: boolean; - eModeCategoryId: number; - borrowableInIsolation: boolean; - active: boolean; - paused: boolean; - freezed: boolean; - debtCeiling: bigint; -} - -interface EModeConfig { - categoryId: number; - ltv: number; - liquidationThreshold: number; - liquidationBonus: number; - oracle: AccountAddress; - label: string; -} - -interface AssetPriceConfig { - symbol: string; - address: AccountAddress; - priceInMarketReferenceCurrency: bigint; -} - -interface TokenConfig { - maxSupply: bigint; - name: string; - symbol: string; - decimals: number; - iconUri: string; - projectUri: string; -} - -interface ReserveStrategyConfig { - symbol: string; - address: AccountAddress; - optimalUsageRatio: bigint; - baseVariableBorrowRate: bigint; - variableRateSlope1: bigint; - variableRateSlope2: bigint; -} - -type WithAccountAddress = T & { address: AccountAddress }; - -export class AptosConfigurator { - provider: AptosProvider; - poolClient: PoolClient; - oracleClient: OracleClient; - underlyingTokenClient: UnderlyingTokensClient; - mnemonic?: string; - - constructor( - config: AptosProviderConfig, - poolPK: string, - oraclePK: string, - underlyingTokensPK: string, - mnemonic?: string, - ) { - this.provider = AptosProvider.fromConfig(config); - const poolSigner = Account.fromPrivateKey({ - privateKey: new Ed25519PrivateKey(poolPK), - }); - const oracleSigner = Account.fromPrivateKey({ - privateKey: new Ed25519PrivateKey(oraclePK), - }); - const underlyingTokenSigner = Account.fromPrivateKey({ - privateKey: new Ed25519PrivateKey(underlyingTokensPK), - }); - this.underlyingTokenClient = new UnderlyingTokensClient( - this.provider, - underlyingTokenSigner, - ); - this.poolClient = new PoolClient(this.provider, poolSigner); - this.oracleClient = new OracleClient(this.provider, oracleSigner); - this.mnemonic = mnemonic; - } - - async setEModes( - eModes: EModeConfig[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const eMode of eModes) { - const receipt = await this.setEMode(eMode); - receipts.push(receipt); - } - return receipts; - } - - async setEMode(eMode: EModeConfig): Promise { - const receipt = await this.poolClient.setEmodeCategory( - eMode.categoryId, - eMode.ltv, - eMode.liquidationThreshold, - eMode.liquidationBonus, - eMode.oracle, - eMode.label, - ); - console.log( - `EMODE ${eMode.label} with id ${eMode.categoryId} was setup, tx hash ${receipt.hash}`, - ); - return receipt; - } - - async setReserveInterestRateStrategy( - strategy: ReserveStrategyConfig, - ): Promise { - const receipt = await this.poolClient.setReserveInterestRateStrategy( - strategy.address, - strategy.optimalUsageRatio, - strategy.baseVariableBorrowRate, - strategy.variableRateSlope1, - strategy.variableRateSlope2, - ); - console.log( - `Strategy for asset ${strategy.symbol} was setup, tx ${receipt.hash}`, - ); - return receipt; - } - - async setReservesBorrowableInIsolation( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const receipt = await this.poolClient.setBorrowableInIsolation( - reserve.address, - reserve.borrowableInIsolation, - ); - console.log( - `RESERVE ${reserve.symbol} was configured with borrowableInIsolation ${reserve.borrowableInIsolation}, tx ${receipt.hash}`, - ); - receipts.push(receipt); - } - return receipts; - } - - async setReservesInterestRateStrategy( - strategies: ReserveStrategyConfig[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const strategy of strategies) { - const receipt = await this.setReserveInterestRateStrategy(strategy); - receipts.push(receipt); - } - return receipts; - } - - async setAssetsPrice(assets: AssetPriceConfig[]) { - const receipts: CommittedTransactionResponse[] = []; - for (const asset of assets) { - const receipt = await this.oracleClient.setAssetPrice( - asset.address, - asset.priceInMarketReferenceCurrency, - ); - console.log( - `TOKEN ${asset.symbol} price set at ${asset.priceInMarketReferenceCurrency}, tx hash ${receipt.hash}`, - ); - receipts.push(receipt); - } - return receipts; - } - - async createTokens( - tokens: T[], - ): Promise[]> { - const tokenWithAddress: WithAccountAddress[] = []; - for (const token of tokens) { - await this.underlyingTokenClient.createToken( - token.maxSupply, - token.name, - token.symbol, - token.decimals, - token.iconUri, - token.projectUri, - ); - const address = await this.underlyingTokenClient.getMetadataBySymbol( - token.symbol, - ); - tokenWithAddress.push({ - ...token, - address, - }); - } - return tokenWithAddress; - } - - async try_createTokens( - tokens: T[], - ): Promise[]> { - const tokenWithAddress: WithAccountAddress[] = []; - for (const token of tokens) { - var tokenAddress: AccountAddress | undefined = undefined; - try { - tokenAddress = await this.underlyingTokenClient.getMetadataBySymbol( - token.symbol, - ); - } catch { - tokenAddress = undefined; - } - if (!tokenAddress) { - const tx = await this.underlyingTokenClient.createToken( - token.maxSupply, - token.name, - token.symbol, - token.decimals, - token.iconUri, - token.projectUri, - ); - console.log(`TOKEN ${token.symbol} was created, tx ${tx.hash}`); - const address = await this.underlyingTokenClient.getMetadataBySymbol( - token.symbol, - ); - tokenWithAddress.push({ - ...token, - address, - }); - } else { - console.log(`TOKEN ${token.symbol} already exist`); - const maxSupply = - await this.underlyingTokenClient.maximum(tokenAddress); - const data = await this.provider - .getAptos() - .getFungibleAssetMetadataByAssetType({ - assetType: tokenAddress.toString(), - }); - tokenWithAddress.push({ - ...token, - address: tokenAddress, - name: data.name, - decimals: data.decimals, - maxSupply, - }); - } - } - return tokenWithAddress; - } - - async setReservesDebtCeiling( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const currentDebtCeiling = await this.poolClient.getDebtCeiling( - reserve.address, - ); - if (currentDebtCeiling !== reserve.debtCeiling) { - const receipt = await this.poolClient.setDebtCeiling( - reserve.address, - reserve.debtCeiling, - ); - console.log( - `RESERVE ${reserve.symbol} was configured with debt ceiling ${reserve.debtCeiling}, tx ${receipt.hash}`, - ); - receipts.push(receipt); - } - } - return receipts; - } - - async configReserves( - reservesConfig: WithAccountAddress[], - ): Promise { - // const reservesToConfigure = { - // asset: [] as Array, - // ltv: [] as Array, - // liquidationThreshold: [] as Array, - // liquidationBonus: [] as Array, - // reserveFactor: [] as Array, - // borrowCap: [] as Array, - // supplyCap: [] as Array, - // borrowingEnabled: [] as Array, - // flashloanEnabled: [] as Array, - // }; - // for (const reserve of reservesConfig) { - // reservesToConfigure.asset.push(reserve.address); - // reservesToConfigure.ltv.push(reserve.ltv); - // reservesToConfigure.liquidationThreshold.push( - // reserve.liquidationThreshold, - // ); - // reservesToConfigure.liquidationBonus.push(reserve.liquidationBonus); - // reservesToConfigure.reserveFactor.push(reserve.reserveFactor); - // reservesToConfigure.borrowCap.push(reserve.borrowCap); - // reservesToConfigure.supplyCap.push(reserve.supplyCap); - // reservesToConfigure.borrowingEnabled.push(reserve.borrowingEnabled); - // reservesToConfigure.flashloanEnabled.push(reserve.flashloanEnabled); - // } - // const receipt = await this.poolClient.configureReserves( - // reservesToConfigure.asset, - // reservesToConfigure.ltv, - // reservesToConfigure.liquidationThreshold, - // reservesToConfigure.liquidationBonus, - // reservesToConfigure.reserveFactor, - // reservesToConfigure.borrowCap, - // reservesToConfigure.supplyCap, - // reservesToConfigure.borrowingEnabled, - // reservesToConfigure.flashloanEnabled, - // ); - // console.log( - // `RESERVES ${reservesConfig.map((r) => r.symbol)} were configured, tx ${receipt.hash}`, - // ); - for (const reserve of reservesConfig) { - await this.poolClient.configureReserveAsCollateral( - reserve.address, - reserve.ltv, - reserve.liquidationThreshold, - reserve.liquidationBonus, - ); - await this.poolClient.setReserveFactor( - reserve.address, - reserve.reserveFactor, - ); - await this.poolClient.setBorrowCap(reserve.address, reserve.borrowCap); - await this.poolClient.setSupplyCap(reserve.address, reserve.supplyCap); - await this.poolClient.setReserveBorrowing( - reserve.address, - reserve.borrowingEnabled, - ); - await this.poolClient.setReserveFlashLoaning( - reserve.address, - reserve.flashloanEnabled, - ); - } - return; - } - - async setReservesEModeCategory( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const receipt = await this.poolClient.setAssetEmodeCategory( - reserve.address, - reserve.eModeCategoryId, - ); - console.log( - `RESERVE ${reserve.symbol} was configured with eMode ${reserve.eModeCategoryId}, tx ${receipt.hash}`, - ); - } - return receipts; - } - - async setReservesActive( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const receipt = await this.poolClient.setReserveActive( - reserve.address, - reserve.active, - ); - console.log( - `RESERVE ${reserve.symbol} was set active=${reserve.active}, tx ${receipt.hash}`, - ); - } - return receipts; - } - - async setReservesPaused( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const receipt = await this.poolClient.setReservePaused( - reserve.address, - reserve.paused, - ); - console.log( - `RESERVE ${reserve.symbol} was set paused=${reserve.paused}, tx ${receipt.hash}`, - ); - } - return receipts; - } - - async setReservesFreezed( - reservesConfig: WithAccountAddress[], - ): Promise { - const receipts: CommittedTransactionResponse[] = []; - for (const reserve of reservesConfig) { - const receipt = await this.poolClient.setReserveFreeze( - reserve.address, - reserve.freezed, - ); - console.log( - `RESERVE ${reserve.symbol} was set freezed=${reserve.freezed}, tx ${receipt.hash}`, - ); - } - return receipts; - } - - async try_initReserves( - reservesConfig: WithAccountAddress[], - ): Promise { - const reservesToInit = { - assets: [] as Array, - decimals: [] as Array, - treasury: [] as Array, - aTokenName: [] as Array, - aTokenSymbol: [] as Array, - variableDebtTokenName: [] as Array, - variableDebtTokenSymbol: [] as Array, - }; - - const currentReserves = await this.poolClient.getReservesList(); - - reservesConfig.forEach((reserve) => { - if (!currentReserves.find((elem) => elem.equals(reserve.address))) { - reservesToInit.assets.push(reserve.address); - reservesToInit.decimals.push(reserve.decimals); - reservesToInit.treasury.push(reserve.treasury); - reservesToInit.aTokenName.push(reserve.aTokenName); - reservesToInit.aTokenSymbol.push(reserve.aTokenSymbol); - reservesToInit.variableDebtTokenName.push( - reserve.variableDebtTokenName, - ); - reservesToInit.variableDebtTokenSymbol.push( - reserve.variableDebtTokenSymbol, - ); - } else { - console.log(`RESERVE ${reserve.symbol} already was initialized`); - } - }); - - if (reservesToInit.assets.length > 0) { - const receipt = await this.poolClient.initReserves( - reservesToInit.assets, - reservesToInit.treasury, - reservesToInit.aTokenName, - reservesToInit.aTokenSymbol, - reservesToInit.variableDebtTokenName, - reservesToInit.variableDebtTokenSymbol, - ); - console.log( - `RESERVES ${reservesToInit.aTokenSymbol} were initialized, tx ${receipt.hash}`, - ); - return receipt; - } - return undefined; - } - - async generateAndFundSigner(index: number): Promise { - if (!this.mnemonic) { - throw new Error("mnemonic is required to generate signer"); - } - const account = Account.fromDerivationPath({ - mnemonic: this.mnemonic, - path: `m/44'/637'/0'/0'/${index}`, - }); - await this.provider.getAptos().fundAccount({ - accountAddress: account.accountAddress, - amount: ONE_OCTA, - }); - return account; - } - - async setupProtocol(reservesConfig: ReserveConfig[], eModes: EModeConfig[]) { - // create tokens if they dont exist and get addresses - const tokens = await this.try_createTokens(reservesConfig); - // set price of assets on the oracle - await this.setAssetsPrice(tokens); - // set emodes - await this.setEModes(eModes); - // set interest rate strategies - await this.setReservesInterestRateStrategy(tokens); - // try init reserves that are not initialized - await this.try_initReserves(tokens); - // configure reserves - await this.configReserves(tokens); - // set reserves eMode category - await this.setReservesEModeCategory(tokens); - // set borrowable in isolation - await this.setReservesBorrowableInIsolation(tokens); - // set reserves active - await this.setReservesActive(tokens); - // set reserves paused - await this.setReservesPaused(tokens); - // set reserves freezed - await this.setReservesFreezed(tokens); - // set debt ceiling - await this.setReservesDebtCeiling(tokens); - } -} diff --git a/src/helpers/aptosConfigurator.ts b/src/helpers/aptosConfigurator.ts new file mode 100644 index 0000000..b640c6d --- /dev/null +++ b/src/helpers/aptosConfigurator.ts @@ -0,0 +1,838 @@ +import { + Account, + AccountAddress, + CommittedTransactionResponse, + Ed25519Account, + Ed25519PrivateKey, +} from "@aptos-labs/ts-sdk"; +import { PoolClient } from "../clients/poolClient"; +import { UnderlyingTokensClient } from "../clients/underlyingTokensClient"; +import { AptosProvider, AptosProviderConfig } from "../clients/aptosProvider"; +import { OracleClient } from "../clients/oracleClient"; +import { priceFeeds } from "./priceFeeds"; +import { ONE_OCTA } from "./constants"; + +/** + * Interface representing the configuration of a reserve in the Aave protocol. + * + * @property priceInMarketReferenceCurrency - The price of the reserve in the market reference currency. + * @property maxSupply - The maximum supply of the reserve. + * @property name - The name of the reserve. + * @property symbol - The symbol of the reserve. + * @property decimals - The number of decimals of the reserve. + * @property iconUri - The URI of the icon representing the reserve. + * @property projectUri - The URI of the project associated with the reserve. + * @property treasury - The account address of the treasury. + * @property aTokenName - The name of the aToken associated with the reserve. + * @property aTokenSymbol - The symbol of the aToken associated with the reserve. + * @property variableDebtTokenName - The name of the variable debt token associated with the reserve. + * @property variableDebtTokenSymbol - The symbol of the variable debt token associated with the reserve. + * @property optimalUsageRatio - The optimal usage ratio of the reserve. + * @property baseVariableBorrowRate - The base variable borrow rate of the reserve. + * @property variableRateSlope1 - The first slope of the variable rate of the reserve. + * @property variableRateSlope2 - The second slope of the variable rate of the reserve. + * @property ltv - The loan-to-value ratio of the reserve. + * @property liquidationThreshold - The liquidation threshold of the reserve. + * @property liquidationBonus - The liquidation bonus of the reserve. + * @property reserveFactor - The reserve factor of the reserve. + * @property borrowCap - The borrowing cap of the reserve. + * @property supplyCap - The supply cap of the reserve. + * @property borrowingEnabled - Whether borrowing is enabled for the reserve. + * @property flashloanEnabled - Whether flashloans are enabled for the reserve. + * @property eModeCategoryId - The eMode category ID of the reserve. + * @property borrowableInIsolation - Whether the reserve is borrowable in isolation mode. + * @property active - Whether the reserve is active. + * @property paused - Whether the reserve is paused. + * @property freezed - Whether the reserve is freezed. + * @property debtCeiling - The debt ceiling of the reserve. + */ +export interface ReserveConfig { + priceInMarketReferenceCurrency: bigint; + maxSupply: bigint; + name: string; + symbol: string; + decimals: number; + iconUri: string; + projectUri: string; + treasury: AccountAddress; + aTokenName: string; + aTokenSymbol: string; + variableDebtTokenName: string; + variableDebtTokenSymbol: string; + optimalUsageRatio: bigint; + baseVariableBorrowRate: bigint; + variableRateSlope1: bigint; + variableRateSlope2: bigint; + ltv: bigint; + liquidationThreshold: bigint; + liquidationBonus: bigint; + reserveFactor: bigint; + borrowCap: bigint; + supplyCap: bigint; + borrowingEnabled: boolean; + flashloanEnabled: boolean; + eModeCategoryId: number; + borrowableInIsolation: boolean; + active: boolean; + paused: boolean; + freezed: boolean; + debtCeiling: bigint; +} + +/** + * Configuration for EMode (Efficiency Mode) in the Aave protocol. + * + * @interface EModeConfig + * + * @property {number} categoryId - The unique identifier for the EMode category. + * @property {number} ltv - Loan-to-Value ratio, representing the maximum borrowing power of the asset. + * @property {number} liquidationThreshold - The threshold at which the asset will be considered for liquidation. + * @property {number} liquidationBonus - The bonus applied to the liquidator's reward. + * @property {AccountAddress} oracle - The address of the oracle providing price feeds for the asset. + * @property {string} label - A human-readable label for the EMode category. + */ +interface EModeConfig { + categoryId: number; + ltv: number; + liquidationThreshold: number; + liquidationBonus: number; + oracle: AccountAddress; + label: string; +} + +/** + * Configuration for the price of an asset. + * + * @interface AssetPriceConfig + * @property {string} symbol - The symbol of the asset. + * @property {AccountAddress} address - The account address of the asset. + * @property {bigint} priceInMarketReferenceCurrency - The price of the asset in the market reference currency. + */ +interface AssetPriceConfig { + symbol: string; + address: AccountAddress; + priceInMarketReferenceCurrency: bigint; +} + +/** + * Interface representing the configuration for a token. + * + * @interface TokenConfig + * @property {bigint} maxSupply - The maximum supply of the token. + * @property {string} name - The name of the token. + * @property {string} symbol - The symbol of the token. + * @property {number} decimals - The number of decimal places the token uses. + * @property {string} iconUri - The URI of the token's icon. + * @property {string} projectUri - The URI of the token's project. + */ +interface TokenConfig { + maxSupply: bigint; + name: string; + symbol: string; + decimals: number; + iconUri: string; + projectUri: string; +} + +/** + * Configuration for a reserve strategy. + * + * @interface ReserveStrategyConfig + * + * @property {string} symbol - The symbol representing the reserve. + * @property {AccountAddress} address - The account address associated with the reserve. + * @property {bigint} optimalUsageRatio - The optimal usage ratio for the reserve. + * @property {bigint} baseVariableBorrowRate - The base variable borrow rate for the reserve. + * @property {bigint} variableRateSlope1 - The first slope of the variable rate for the reserve. + * @property {bigint} variableRateSlope2 - The second slope of the variable rate for the reserve. + */ +interface ReserveStrategyConfig { + symbol: string; + address: AccountAddress; + optimalUsageRatio: bigint; + baseVariableBorrowRate: bigint; + variableRateSlope1: bigint; + variableRateSlope2: bigint; +} + +/** + * A utility type that adds an `address` property of type `AccountAddress` to an existing type `T`. + * + * @template T - The original type to which the `address` property will be added. + */ +type WithAccountAddress = T & { address: AccountAddress }; + +export class AptosConfigurator { + provider: AptosProvider; + poolClient: PoolClient; + oracleClient: OracleClient; + underlyingTokenClient: UnderlyingTokensClient; + mnemonic?: string; + + /** + * Constructs an instance of the AptosConfigurator. + * + * @param {AptosProviderConfig} config - The configuration for the Aptos provider. + * @param {string} poolPK - The private key for the pool account. + * @param {string} oraclePK - The private key for the oracle account. + * @param {string} underlyingTokensPK - The private key for the underlying tokens account. + * @param {string} [mnemonic] - An optional mnemonic for the account. + */ + constructor( + config: AptosProviderConfig, + poolPK: string, + oraclePK: string, + underlyingTokensPK: string, + mnemonic?: string, + ) { + this.provider = AptosProvider.fromConfig(config); + const poolSigner = Account.fromPrivateKey({ + privateKey: new Ed25519PrivateKey(poolPK), + }); + const oracleSigner = Account.fromPrivateKey({ + privateKey: new Ed25519PrivateKey(oraclePK), + }); + const underlyingTokenSigner = Account.fromPrivateKey({ + privateKey: new Ed25519PrivateKey(underlyingTokensPK), + }); + this.underlyingTokenClient = new UnderlyingTokensClient( + this.provider, + underlyingTokenSigner, + ); + this.poolClient = new PoolClient(this.provider, poolSigner); + this.oracleClient = new OracleClient(this.provider, oracleSigner); + this.mnemonic = mnemonic; + } + + /** + * Sets multiple E-Modes by calling the setEMode method for each EModeConfig in the provided array. + * + * @param eModes - An array of EModeConfig objects to be set. + * @returns A promise that resolves to an array of CommittedTransactionResponse objects, each representing the result of setting an E-Mode. + */ + async setEModes( + eModes: EModeConfig[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const eMode of eModes) { + const receipt = await this.setEMode(eMode); + receipts.push(receipt); + } + return receipts; + } + + /** + * Sets the EMode configuration for the pool. + * + * @param {EModeConfig} eMode - The configuration object for EMode. + * @returns {Promise} - A promise that resolves to the transaction response. + * + * @example + * const eModeConfig = { + * categoryId: 1, + * ltv: 75, + * liquidationThreshold: 80, + * liquidationBonus: 5, + * oracle: '0xOracleAddress', + * label: 'Stablecoins' + * }; + * + * const receipt = await setEMode(eModeConfig); + * console.log(`Transaction hash: ${receipt.hash}`); + */ + async setEMode(eMode: EModeConfig): Promise { + const receipt = await this.poolClient.setEmodeCategory( + eMode.categoryId, + eMode.ltv, + eMode.liquidationThreshold, + eMode.liquidationBonus, + eMode.oracle, + eMode.label, + ); + console.log( + `EMODE ${eMode.label} with id ${eMode.categoryId} was setup, tx hash ${receipt.hash}`, + ); + return receipt; + } + + /** + * Sets the reserve interest rate strategy for a given asset. + * + * @param strategy - The configuration object for the reserve strategy. + * @returns A promise that resolves to the committed transaction response. + * + * @example + * ```typescript + * const strategyConfig: ReserveStrategyConfig = { + * address: '0x...', + * optimalUsageRatio: 0.8, + * baseVariableBorrowRate: 0.02, + * variableRateSlope1: 0.04, + * variableRateSlope2: 0.75, + * symbol: 'DAI' + * }; + * + * const receipt = await setReserveInterestRateStrategy(strategyConfig); + * console.log(`Transaction hash: ${receipt.hash}`); + * ``` + */ + async setReserveInterestRateStrategy( + strategy: ReserveStrategyConfig, + ): Promise { + const receipt = await this.poolClient.setReserveInterestRateStrategy( + strategy.address, + strategy.optimalUsageRatio, + strategy.baseVariableBorrowRate, + strategy.variableRateSlope1, + strategy.variableRateSlope2, + ); + console.log( + `Strategy for asset ${strategy.symbol} was setup, tx ${receipt.hash}`, + ); + return receipt; + } + + /** + * Sets the borrowable in isolation status for a list of reserves. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and the borrowable in isolation status. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x...', borrowableInIsolation: true, symbol: 'USDC' }, + * { address: '0x...', borrowableInIsolation: false, symbol: 'DAI' }, + * ]; + * const receipts = await setReservesBorrowableInIsolation(reservesConfig); + * console.log(receipts); + * ``` + */ + async setReservesBorrowableInIsolation( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const receipt = await this.poolClient.setBorrowableInIsolation( + reserve.address, + reserve.borrowableInIsolation, + ); + console.log( + `RESERVE ${reserve.symbol} was configured with borrowableInIsolation ${reserve.borrowableInIsolation}, tx ${receipt.hash}`, + ); + receipts.push(receipt); + } + return receipts; + } + + /** + * Sets the interest rate strategy for multiple reserves. + * + * @param {ReserveStrategyConfig[]} strategies - An array of reserve strategy configurations. + * @returns {Promise} A promise that resolves to an array of committed transaction responses. + */ + async setReservesInterestRateStrategy( + strategies: ReserveStrategyConfig[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const strategy of strategies) { + const receipt = await this.setReserveInterestRateStrategy(strategy); + receipts.push(receipt); + } + return receipts; + } + + /** + * Sets the price of multiple assets using the oracle client. + * + * @param assets - An array of asset price configurations. + * Each configuration includes the asset's address, symbol, and price in the market reference currency. + * + * @returns A promise that resolves to an array of committed transaction responses. + * Each response contains details about the transaction that set the asset's price. + */ + async setAssetsPrice(assets: AssetPriceConfig[]) { + const receipts: CommittedTransactionResponse[] = []; + for (const asset of assets) { + const receipt = await this.oracleClient.setAssetFeedId( + asset.address, + priceFeeds[asset.symbol], + ); + console.log( + `TOKEN ${asset.symbol} price set at ${asset.priceInMarketReferenceCurrency}, tx hash ${receipt.hash}`, + ); + receipts.push(receipt); + } + return receipts; + } + + /** + * Creates tokens based on the provided configuration and returns an array of tokens with their associated account addresses. + * + * @template T - The type of the token configuration. + * @param {T[]} tokens - An array of token configurations. + * @returns {Promise[]>} A promise that resolves to an array of tokens with their associated account addresses. + */ + async createTokens( + tokens: T[], + ): Promise[]> { + const tokenWithAddress: WithAccountAddress[] = []; + for (const token of tokens) { + await this.underlyingTokenClient.createToken( + token.maxSupply, + token.name, + token.symbol, + token.decimals, + token.iconUri, + token.projectUri, + ); + const address = await this.underlyingTokenClient.getMetadataBySymbol( + token.symbol, + ); + tokenWithAddress.push({ + ...token, + address, + }); + } + return tokenWithAddress; + } + + /** + * Attempts to create tokens based on the provided token configurations. + * + * @template T - The type of the token configuration. + * @param {T[]} tokens - An array of token configurations. + * @returns {Promise[]>} - A promise that resolves to an array of tokens with their associated account addresses. + * + * @remarks + * This method first checks if a token with the given symbol already exists by fetching its metadata. + * If the token does not exist, it creates a new token with the provided configuration and retrieves its address. + * If the token already exists, it fetches additional metadata such as the maximum supply, name, and decimals. + * + * @example + * ```typescript + * const tokens = [ + * { symbol: 'TOKEN1', maxSupply: 1000, name: 'Token One', decimals: 18, iconUri: 'http://example.com/icon1.png', projectUri: 'http://example.com/project1' }, + * { symbol: 'TOKEN2', maxSupply: 2000, name: 'Token Two', decimals: 18, iconUri: 'http://example.com/icon2.png', projectUri: 'http://example.com/project2' } + * ]; + * const result = await tryCreateTokens(tokens); + * console.log(result); + * ``` + */ + async tryCreateTokens( + tokens: T[], + ): Promise[]> { + const tokenWithAddress: WithAccountAddress[] = []; + for (const token of tokens) { + var tokenAddress: AccountAddress | undefined = undefined; + try { + tokenAddress = await this.underlyingTokenClient.getMetadataBySymbol( + token.symbol, + ); + } catch { + tokenAddress = undefined; + } + if (!tokenAddress) { + const tx = await this.underlyingTokenClient.createToken( + token.maxSupply, + token.name, + token.symbol, + token.decimals, + token.iconUri, + token.projectUri, + ); + console.log(`TOKEN ${token.symbol} was created, tx ${tx.hash}`); + const address = await this.underlyingTokenClient.getMetadataBySymbol( + token.symbol, + ); + tokenWithAddress.push({ + ...token, + address, + }); + } else { + console.log(`TOKEN ${token.symbol} already exist`); + const maxSupply = + await this.underlyingTokenClient.maximum(tokenAddress); + const data = await this.provider + .getAptos() + .getFungibleAssetMetadataByAssetType({ + assetType: tokenAddress.toString(), + }); + tokenWithAddress.push({ + ...token, + address: tokenAddress, + name: data.name, + decimals: data.decimals, + maxSupply, + }); + } + } + return tokenWithAddress; + } + + /** + * Sets the debt ceiling for a list of reserves if the current debt ceiling is different from the desired one. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and the desired debt ceiling. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @remarks + * This method iterates over the provided reserve configurations and checks the current debt ceiling for each reserve. + * If the current debt ceiling is different from the desired debt ceiling, it updates the debt ceiling and logs the transaction. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x1', debtCeiling: 1000, symbol: 'RESERVE1' }, + * { address: '0x2', debtCeiling: 2000, symbol: 'RESERVE2' }, + * ]; + * const receipts = await aptosConfigurator.setReservesDebtCeiling(reservesConfig); + * console.log(receipts); + * ``` + */ + async setReservesDebtCeiling( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const currentDebtCeiling = await this.poolClient.getDebtCeiling( + reserve.address, + ); + if (currentDebtCeiling !== reserve.debtCeiling) { + const receipt = await this.poolClient.setDebtCeiling( + reserve.address, + reserve.debtCeiling, + ); + console.log( + `RESERVE ${reserve.symbol} was configured with debt ceiling ${reserve.debtCeiling}, tx ${receipt.hash}`, + ); + receipts.push(receipt); + } + } + return receipts; + } + + /** + * Configures multiple reserves with the provided configuration settings. + * + * @param reservesConfig - An array of reserve configurations, each including the account address and various reserve parameters. + * @returns A promise that resolves to undefined when all reserves have been configured. + * + * @remarks + * This method sequentially configures each reserve by setting its collateral parameters, reserve factor, borrow cap, supply cap, + * borrowing enabled status, and flash loaning enabled status using the `poolClient` instance. + * + * @example + * ```typescript + * const reservesConfig = [ + * { + * address: '0x1', + * ltv: 75, + * liquidationThreshold: 80, + * liquidationBonus: 5, + * reserveFactor: 10, + * borrowCap: 1000, + * supplyCap: 2000, + * borrowingEnabled: true, + * flashloanEnabled: false, + * }, + * // more reserve configurations + * ]; + * await configReserves(reservesConfig); + * ``` + */ + async configReserves( + reservesConfig: WithAccountAddress[], + ): Promise { + for (const reserve of reservesConfig) { + await this.poolClient.configureReserveAsCollateral( + reserve.address, + reserve.ltv, + reserve.liquidationThreshold, + reserve.liquidationBonus, + ); + await this.poolClient.setReserveFactor( + reserve.address, + reserve.reserveFactor, + ); + await this.poolClient.setBorrowCap(reserve.address, reserve.borrowCap); + await this.poolClient.setSupplyCap(reserve.address, reserve.supplyCap); + await this.poolClient.setReserveBorrowing( + reserve.address, + reserve.borrowingEnabled, + ); + await this.poolClient.setReserveFlashLoaning( + reserve.address, + reserve.flashloanEnabled, + ); + } + return; + } + + /** + * Sets the eMode category for a list of reserves. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and eMode category ID. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x...', eModeCategoryId: 1, symbol: 'ETH' }, + * { address: '0x...', eModeCategoryId: 2, symbol: 'DAI' }, + * ]; + * const receipts = await setReservesEModeCategory(reservesConfig); + * console.log(receipts); + * ``` + */ + async setReservesEModeCategory( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const receipt = await this.poolClient.setAssetEmodeCategory( + reserve.address, + reserve.eModeCategoryId, + ); + console.log( + `RESERVE ${reserve.symbol} was configured with eMode ${reserve.eModeCategoryId}, tx ${receipt.hash}`, + ); + } + return receipts; + } + + /** + * Sets the active status of multiple reserves. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and reserve configuration details. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x1', symbol: 'RESERVE1', active: true }, + * { address: '0x2', symbol: 'RESERVE2', active: false }, + * ]; + * const receipts = await aptosConfigurator.setReservesActive(reservesConfig); + * console.log(receipts); + * ``` + */ + async setReservesActive( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const receipt = await this.poolClient.setReserveActive( + reserve.address, + reserve.active, + ); + console.log( + `RESERVE ${reserve.symbol} was set active=${reserve.active}, tx ${receipt.hash}`, + ); + } + return receipts; + } + + /** + * Pauses or unpauses a list of reserves. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and reserve configuration details. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x...', symbol: 'USDC', paused: true }, + * { address: '0x...', symbol: 'DAI', paused: false }, + * ]; + * const receipts = await setReservesPaused(reservesConfig); + * receipts.forEach(receipt => console.log(receipt.hash)); + * ``` + */ + async setReservesPaused( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const receipt = await this.poolClient.setReservePaused( + reserve.address, + reserve.paused, + ); + console.log( + `RESERVE ${reserve.symbol} was set paused=${reserve.paused}, tx ${receipt.hash}`, + ); + } + return receipts; + } + + /** + * Sets the freeze status for multiple reserves. + * + * @param reservesConfig - An array of reserve configurations, each containing an account address and reserve configuration details. + * @returns A promise that resolves to an array of committed transaction responses. + * + * @example + * ```typescript + * const reservesConfig = [ + * { address: '0x1', symbol: 'USDC', freezed: true }, + * { address: '0x2', symbol: 'DAI', freezed: false }, + * ]; + * const receipts = await aptosConfigurator.setReservesFreezed(reservesConfig); + * console.log(receipts); + * ``` + */ + async setReservesFreezed( + reservesConfig: WithAccountAddress[], + ): Promise { + const receipts: CommittedTransactionResponse[] = []; + for (const reserve of reservesConfig) { + const receipt = await this.poolClient.setReserveFreeze( + reserve.address, + reserve.freezed, + ); + console.log( + `RESERVE ${reserve.symbol} was set freezed=${reserve.freezed}, tx ${receipt.hash}`, + ); + } + return receipts; + } + + /** + * Attempts to initialize reserves that are not already initialized. + * + * @param reservesConfig - An array of reserve configurations, each containing account address and reserve details. + * @returns A promise that resolves to a `CommittedTransactionResponse` if reserves were initialized, or `undefined` if no reserves needed initialization. + * + * The function performs the following steps: + * 1. Creates an object to hold the reserves that need to be initialized. + * 2. Retrieves the current list of reserves from the pool client. + * 3. Iterates over the provided reserve configurations and checks if each reserve is already initialized. + * - If a reserve is not initialized, it adds the reserve details to the `reservesToInit` object. + * - If a reserve is already initialized, it logs a message indicating that the reserve was already initialized. + * 4. If there are any reserves to initialize, it calls the `initReserves` method on the pool client with the collected reserve details. + * - Logs a message indicating the reserves that were initialized and the transaction hash. + * - Returns the transaction receipt. + * 5. If no reserves needed initialization, it returns `undefined`. + */ + async tryInitReserves( + reservesConfig: WithAccountAddress[], + ): Promise { + const reservesToInit = { + assets: [] as Array, + decimals: [] as Array, + treasury: [] as Array, + aTokenName: [] as Array, + aTokenSymbol: [] as Array, + variableDebtTokenName: [] as Array, + variableDebtTokenSymbol: [] as Array, + }; + + const currentReserves = await this.poolClient.getReservesList(); + + reservesConfig.forEach((reserve) => { + if (!currentReserves.find((elem) => elem.equals(reserve.address))) { + reservesToInit.assets.push(reserve.address); + reservesToInit.decimals.push(reserve.decimals); + reservesToInit.treasury.push(reserve.treasury); + reservesToInit.aTokenName.push(reserve.aTokenName); + reservesToInit.aTokenSymbol.push(reserve.aTokenSymbol); + reservesToInit.variableDebtTokenName.push( + reserve.variableDebtTokenName, + ); + reservesToInit.variableDebtTokenSymbol.push( + reserve.variableDebtTokenSymbol, + ); + } else { + console.log(`RESERVE ${reserve.symbol} already was initialized`); + } + }); + + if (reservesToInit.assets.length > 0) { + const receipt = await this.poolClient.initReserves( + reservesToInit.assets, + reservesToInit.treasury, + reservesToInit.aTokenName, + reservesToInit.aTokenSymbol, + reservesToInit.variableDebtTokenName, + reservesToInit.variableDebtTokenSymbol, + ); + console.log( + `RESERVES ${reservesToInit.aTokenSymbol} were initialized, tx ${receipt.hash}`, + ); + return receipt; + } + return undefined; + } + + /** + * Generates an Ed25519 account from a mnemonic and funds it with a specified amount. + * + * @param {number} index - The index to derive the account from the mnemonic. + * @returns {Promise} - A promise that resolves to the generated and funded Ed25519 account. + * @throws {Error} - Throws an error if the mnemonic is not provided. + */ + async generateAndFundSigner(index: number): Promise { + if (!this.mnemonic) { + throw new Error("mnemonic is required to generate signer"); + } + const account = Account.fromDerivationPath({ + mnemonic: this.mnemonic, + path: `m/44'/637'/0'/0'/${index}`, + }); + await this.provider.getAptos().fundAccount({ + accountAddress: account.accountAddress, + amount: ONE_OCTA, + }); + return account; + } + + /** + * Sets up the protocol by performing a series of configuration steps. + * + * @param reservesConfig - An array of reserve configurations. + * @param eModes - An array of eMode configurations. + * + * @remarks + * This method performs the following steps: + * 1. Creates tokens if they do not exist and retrieves their addresses. + * 2. Sets the price of assets on the oracle. + * 3. Configures eModes. + * 4. Sets interest rate strategies for the reserves. + * 5. Initializes reserves that are not yet initialized. + * 6. Configures reserves. + * 7. Sets the eMode category for reserves. + * 8. Sets reserves as borrowable in isolation. + * 9. Activates reserves. + * 10. Pauses reserves. + * 11. Freezes reserves. + * 12. Sets the debt ceiling for reserves. + * + * @returns A promise that resolves when the protocol setup is complete. + */ + async setupProtocol(reservesConfig: ReserveConfig[], eModes: EModeConfig[]) { + // create tokens if they dont exist and get addresses + const tokens = await this.tryCreateTokens(reservesConfig); + // set price of assets on the oracle + await this.setAssetsPrice(tokens); + // set emodes + await this.setEModes(eModes); + // set interest rate strategies + await this.setReservesInterestRateStrategy(tokens); + // try init reserves that are not initialized + await this.tryInitReserves(tokens); + // configure reserves + await this.configReserves(tokens); + // set reserves eMode category + await this.setReservesEModeCategory(tokens); + // set borrowable in isolation + await this.setReservesBorrowableInIsolation(tokens); + // set reserves active + await this.setReservesActive(tokens); + // set reserves paused + await this.setReservesPaused(tokens); + // set reserves freezed + await this.setReservesFreezed(tokens); + // set debt ceiling + await this.setReservesDebtCeiling(tokens); + } +} diff --git a/src/helpers/common.ts b/src/helpers/common.ts index f3df853..e1ab107 100644 --- a/src/helpers/common.ts +++ b/src/helpers/common.ts @@ -1,14 +1,44 @@ import { MoveValue } from "@aptos-labs/ts-sdk"; +/** + * Converts a string to a Uint8Array. + * + * @param data - The string to be converted. + * @returns A Uint8Array representing the input string. + */ export const stringToUint8Array = (data: string): Uint8Array => new Uint8Array(Buffer.from(data, "utf8")); +/** + * Converts a given string to its hexadecimal representation. + * + * @param data - The string to be converted to hex. + * @returns The hexadecimal representation of the input string. + */ export const stringToHex = (data: string): string => Buffer.from(data).toString("hex"); +/** + * Converts a Uint8Array to a UTF-8 string. + * + * @param data - The Uint8Array to convert. + * @returns The resulting string. + */ export const uint8ArrayToString = (data: Uint8Array): string => Buffer.from(data).toString("utf8"); +/** + * Converts a string to its hexadecimal representation. + * + * @param str - The input string to be converted to hexadecimal. + * @returns The hexadecimal representation of the input string, prefixed with "0x". + * + * @example + * ```typescript + * const hexString = StringToHex("hello"); + * console.log(hexString); // Output: "0x68656c6c6f" + * ``` + */ export function StringToHex(str: string): string { let hexResult = "0x"; // eslint-disable-next-line no-plusplus @@ -19,10 +49,22 @@ export function StringToHex(str: string): string { return hexResult; } +/** + * Converts a MoveValue to a bigint. + * + * @param value - The MoveValue to be converted. + * @returns The converted bigint value. + */ export function mapToBigInt(value: MoveValue): bigint { return BigInt(value.toString()); } +/** + * Converts a hexadecimal string to a Uint8Array. + * + * @param hexString - The hexadecimal string to convert. It can optionally start with "0x". + * @returns A Uint8Array representing the binary data of the hexadecimal string. + */ export const hexToUint8Array = (hexString: string): Uint8Array => { if (hexString.startsWith("0x")) { hexString = hexString.slice(2); diff --git a/src/helpers/constants.ts b/src/helpers/constants.ts index ad9daf9..edf7c23 100644 --- a/src/helpers/constants.ts +++ b/src/helpers/constants.ts @@ -4,6 +4,7 @@ import { AccountAddress } from "@aptos-labs/ts-sdk"; +export const ONE_OCTA = 100_000_000; export const PERCENTAGE_FACTOR = "10000"; export const HALF_PERCENTAGE = (BigInt(PERCENTAGE_FACTOR) / 2n).toString(); export const WAD = (BigInt(10) ** 18n).toString(); diff --git a/src/helpers/index.ts b/src/helpers/index.ts index f05720e..4623cac 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -1,2 +1,2 @@ export * from "./constants"; -export * from "./AptosConfigurator"; +export * from "./aptosConfigurator"; diff --git a/src/helpers/interfaces.ts b/src/helpers/interfaces.ts index 6af8709..44035cf 100644 --- a/src/helpers/interfaces.ts +++ b/src/helpers/interfaces.ts @@ -1,10 +1,24 @@ import "./wadraymath"; -// Common Interfaces +/** + * Represents metadata information. + */ export interface Metadata { inner: string; } +/** + * Interface representing the data related to a user's reserve in the Aave protocol. + * + * @property {bigint} scaledATokenBalance - The scaled balance of AToken held by the user. + * @property {bigint} currentATokenBalance - The current balance of AToken held by the user. + * @property {bigint} currentVariableDebt - The current variable debt of the user. + * @property {bigint} scaledVariableDebt - The scaled variable debt of the user. + * @property {bigint} liquidityRate - The liquidity rate of the reserve. + * @property {boolean} usageAsCollateralEnabled - Indicates if the reserve can be used as collateral. + * @property {bigint} walletBalance - The balance of the user's wallet. + * @property {bigint | string | boolean} [key: string] - Additional properties that can be of type bigint, string, or boolean. + */ export interface UserReserveData { scaledATokenBalance: bigint; currentATokenBalance: bigint; @@ -16,6 +30,31 @@ export interface UserReserveData { [key: string]: bigint | string | boolean; } +/** + * Interface representing the data structure for a reserve in the Aave V3 protocol on Aptos. + * + * @interface ReserveData + * + * @property {string} address - The address of the reserve. + * @property {string} symbol - The symbol of the reserve. + * @property {bigint} decimals - The number of decimals of the reserve. + * @property {bigint} reserveFactor - The reserve factor of the reserve. + * @property {bigint} availableLiquidity - The available liquidity in the reserve. + * @property {bigint} totalLiquidity - The total liquidity in the reserve. + * @property {bigint} totalVariableDebt - The total variable debt in the reserve. + * @property {bigint} scaledVariableDebt - The scaled variable debt in the reserve. + * @property {bigint} variableBorrowRate - The variable borrow rate of the reserve. + * @property {bigint} supplyUsageRatio - The supply usage ratio of the reserve. + * @property {bigint} borrowUsageRatio - The borrow usage ratio of the reserve. + * @property {bigint} liquidityIndex - The liquidity index of the reserve. + * @property {bigint} variableBorrowIndex - The variable borrow index of the reserve. + * @property {string} aTokenAddress - The address of the aToken associated with the reserve. + * @property {bigint} lastUpdateTimestamp - The timestamp of the last update of the reserve data. + * @property {bigint} liquidityRate - The liquidity rate of the reserve. + * @property {bigint} unbacked - The amount of unbacked liquidity in the reserve. + * @property {bigint} accruedToTreasuryScaled - The amount accrued to the treasury, scaled. + * @property {bigint | string} [key: string] - Additional properties of the reserve, which can be either a bigint or a string. + */ export interface ReserveData { address: string; symbol: string; diff --git a/src/helpers/priceFeeds.ts b/src/helpers/priceFeeds.ts index 25b564e..2992ce8 100644 --- a/src/helpers/priceFeeds.ts +++ b/src/helpers/priceFeeds.ts @@ -1,5 +1,9 @@ import { hexToUint8Array } from "./common"; +/** + * A map that associates a string key with a Uint8Array value. + * This map is used to store price feed data. + */ export const priceFeeds: Map = new Map< string, Uint8Array diff --git a/src/helpers/wadraymath.ts b/src/helpers/wadraymath.ts index 0e4ce9f..b19d854 100644 --- a/src/helpers/wadraymath.ts +++ b/src/helpers/wadraymath.ts @@ -8,74 +8,197 @@ import { WAD_RAY_RATIO, } from "./constants"; +/** + * The `WayRadMath` abstract class provides a set of static methods for performing + * mathematical operations with fixed-point arithmetic using WAD (18 decimal places) + * and RAY (27 decimal places) units. It includes methods for multiplication, division, + * and conversion between these units, as well as constants for common values used in + * these calculations. + * + * @remarks + * - WAD is a unit with 18 decimal places, commonly used for representing fixed-point numbers. + * - RAY is a unit with 27 decimal places, also used for fixed-point arithmetic. + * + * @example + * ```typescript + * const wadValue = WayRadMath.wad(); // Returns the WAD constant as a bigint + * const rayValue = WayRadMath.ray(); // Returns the RAY constant as a bigint + * const result = WayRadMath.wadMul(1000000000000000000n, 2000000000000000000n); // Multiplies two WAD values + * ``` + */ export abstract class WayRadMath { + /** + * Returns the constant value of RAY as a bigint. + * + * @returns {bigint} The value of RAY. + */ static ray(): bigint { return BigInt(RAY); } + /** + * Returns the constant value of WAD as a bigint. + * + * @returns {bigint} The WAD constant value. + */ static wad(): bigint { return BigInt(WAD); } + /** + * Returns half of the RAY constant as a bigint. + * + * @returns {bigint} Half of the RAY constant. + */ static halfRay(): bigint { return BigInt(HALF_RAY); } + /** + * Returns half of the WAD constant as a bigint. + * + * @returns {bigint} Half of the WAD constant. + */ static halfWad(): bigint { return BigInt(HALF_WAD); } + /** + * Returns half of the percentage value as a bigint. + * + * @returns {bigint} The half percentage value. + */ static halfPercentage(): bigint { return BigInt(HALF_PERCENTAGE); } + /** + * Returns the percentage factor as a bigint. + * + * @returns {bigint} The percentage factor. + */ static percentageFactor(): bigint { return BigInt(PERCENTAGE_FACTOR); } + /** + * Returns the ratio between WAD and RAY units as a bigint. + * + * @returns {bigint} The WAD to RAY ratio. + */ static wadRayRatio(): bigint { return BigInt(WAD_RAY_RATIO); } + /** + * Multiplies two wad (18 decimal) values and returns the result. + * + * @param a - The first wad value as a bigint. + * @param b - The second wad value as a bigint. + * @returns The result of the multiplication as a bigint. + */ static wadMul(a: bigint, b: bigint): bigint { const numerator = this.halfWad() + a * b; return numerator / this.wad(); } + /** + * Divides two wad (18 decimal) values. + * + * @param a - The dividend as a bigint. + * @param b - The divisor as a bigint. + * @returns The result of the division as a bigint. + */ static wadDiv(a: bigint, b: bigint): bigint { const numerator = b / 2n + a * this.wad(); return numerator / b; } + /** + * Multiplies two ray values and returns the result. + * + * A ray is a unit with 27 decimal places, used to represent fixed-point numbers. + * This function performs the multiplication and then divides by the ray unit to + * maintain the fixed-point representation. + * + * @param a - The first ray value to multiply. + * @param b - The second ray value to multiply. + * @returns The result of the multiplication, as a ray value. + */ static rayMul(a: bigint, b: bigint): bigint { const numerator = this.halfRay() + a * b; return numerator / this.ray(); } + /** + * Divides two fixed-point numbers with 27 decimals precision. + * + * This function performs division of two fixed-point numbers, where the dividend is `a` and the divisor is `b`. + * The result is also a fixed-point number with 27 decimals precision. + * + * @param a - The dividend as a fixed-point number with 27 decimals precision. + * @param b - The divisor as a fixed-point number with 27 decimals precision. + * @returns The result of the division as a fixed-point number with 27 decimals precision. + */ static rayDiv(a: bigint, b: bigint): bigint { const numerator = b / 2n + a * this.ray(); return numerator / b; } + /** + * Multiplies a given value by a basis points (bps) value and returns the result. + * + * The calculation is performed as follows: + * (a * bps + halfPercentage) / percentageFactor + * + * @param a - The value to be multiplied, represented as a bigint. + * @param bps - The basis points value to multiply by, represented as a bigint. + * @returns The result of the multiplication, represented as a bigint. + */ static percentMul = (a: bigint, bps: bigint): bigint => { const numerator = this.halfPercentage() + a * bps; return numerator / this.percentageFactor(); }; + /** + * Divides two big integers using ray precision. + * + * @param a - The dividend as a bigint. + * @param b - The divisor as a bigint. + * @returns The result of the division as a bigint. + */ static percentDiv = (a: bigint, bps: bigint): bigint => { const numerator = bps / 2n + a * this.percentageFactor(); return numerator / bps; }; + /** + * Converts a value from ray to wad. + * + * @param a - The value in ray to be converted. + * @returns The converted value in wad. + */ static rayToWad(a: bigint): bigint { const numerator = this.wad() / 2n + a; return numerator / this.wadRayRatio(); } + /** + * Converts a value from WAD (18 decimal places) to RAY (27 decimal places). + * + * @param a - The value in WAD to be converted to RAY. + * @returns The value converted to RAY. + */ static wadToRay(a: bigint): bigint { return a * this.wadRayRatio(); } + /** + * Negates the given bigint value. + * + * @param a - The bigint value to be negated. + * @returns The negated bigint value. + */ static negated(a: bigint): bigint { return -a; } diff --git a/typedoc.json b/typedoc.json index 777c69a..da11364 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,9 +1,11 @@ { - "sidebarLinks": { - "Core clients": "clients/aclClient.html", - "Configurations": "configs/index.html", - }, - "navigationLinks": { - "Main documentation": "https://docs.aave.net/" - } -} \ No newline at end of file + "entryPoints": ["src/index.ts"], + "out": "docs/documentation/html", + "excludePrivate": true, + "excludeProtected": true, + "excludeExternals": true, + "includeVersion": true, + "hideGenerator": true, + "name": "@aave/aave-v3-aptos-ts-sdk", + "tsconfig": "tsconfig.json" + } \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index c745e67..7ca7a48 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,11 +19,15 @@ const baseConfig = { extensions: [".ts", ".js"], }, + optimization: { + splitChunks: { chunks: "all" }, // Code splitting + }, + // Configuration for source maps - devtool: "source-map", + // devtool: "source-map", // The mode to use for the webpack build - mode: "development", + mode: "production", }; // Base configuration @@ -34,7 +38,7 @@ const baseConfigUmd = { output: { // The filename of the output file will be specified in each config // The path to the output directory, __dirname is the directory of the current module - path: path.resolve(__dirname, "."), + path: path.resolve(__dirname, "dist"), // The type of the exported library libraryTarget: "window", // for UMD we use window // The name of the library as it should be exposed in the global scope @@ -56,6 +60,7 @@ const baseConfigUmd = { exclude: /node_modules/, options: { configFile: "tsconfig.commonjs.json", + transpileOnly: true, }, }, ],