diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e8711579..247cfe2e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -16,6 +16,7 @@ jobs: build: name: Lint, Build & Unit, E2E Tests runs-on: ubuntu-latest + timeout-minutes: 60 permissions: contents: read packages: read @@ -23,30 +24,30 @@ jobs: INTERNAL_EVENT: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 20.x + - uses: pnpm/action-setup@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - version: 9 + node-version: 22 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint - - name: Run linter - run: pnpm run lint + - name: Type check + run: pnpm typecheck - - name: Run tests - run: pnpm run test + - name: Test + run: pnpm test - - name: Build project - run: pnpm run build + - name: Build + run: pnpm build - name: Release a nightly build if: env.INTERNAL_EVENT == 'true' @@ -110,7 +111,7 @@ jobs: PAIRING_SECRET: '12345678' ENC_PW: '12345678' APP_NAME: 'lattice-manager' - run: pnpm run e2e --reporter=basic + run: pnpm run e2e -- --reporter=basic - name: Show simulator logs on failure if: failure() && env.INTERNAL_EVENT == 'true' diff --git a/.github/workflows/docs-build-deploy.yml b/.github/workflows/docs-build-deploy.yml index 267f0baa..afce6ec8 100644 --- a/.github/workflows/docs-build-deploy.yml +++ b/.github/workflows/docs-build-deploy.yml @@ -6,26 +6,24 @@ jobs: build: name: Build runs-on: ubuntu-latest + timeout-minutes: 60 steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 20.x + - uses: pnpm/action-setup@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - version: 9 + node-version: 22 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Build docs - run: pnpm --filter gridplus-sdk-docs run build + run: pnpm turbo run build --filter=gridplus-sdk-docs - name: Upload production-ready build files uses: actions/upload-artifact@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6dc568b5..784c0769 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,26 +8,24 @@ jobs: publish-npm: name: Publish runs-on: ubuntu-latest + timeout-minutes: 60 steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 20.x - registry-url: 'https://registry.npmjs.org' + - uses: pnpm/action-setup@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - version: 9 + node-version: 22 + registry-url: 'https://registry.npmjs.org' + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Build project - run: pnpm run build + run: pnpm turbo run build - name: Publish to NPM run: pnpm --filter gridplus-sdk publish --no-git-checks diff --git a/.gitignore b/.gitignore index cddb2a58..17ca84b7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ coverage *.temp ~/node_modules cache +.turbo diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 042126f4..00000000 --- a/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -# JSONC files with comments - parser incompatibility -src/__test__/vectors.jsonc - -# Generated lockfiles -pnpm-lock.yaml diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 23899362..00000000 --- a/.prettierrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "overrides": [ - { - "files": "**/src/*.ts", - "options": { - "parser": "typescript" - } - } - ], - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "all" -} diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..aed23215 --- /dev/null +++ b/biome.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "attributePosition": "auto" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "complexity": { + "noForEach": "warn" + }, + "correctness": { + "noUnusedImports": { + "level": "error" + }, + "noUnusedVariables": { + "level": "warn", + "fix": "none" + }, + "noUnusedFunctionParameters": { + "level": "warn", + "fix": "none" + } + }, + "style": { + "noParameterAssign": "warn", + "noNonNullAssertion": "error", + "noUselessElse": "warn", + "noUnusedTemplateLiteral": "error", + "useAsConstAssertion": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useSingleVarDeclarator": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error" + }, + "performance": { + "noAccumulatingSpread": "warn" + }, + "suspicious": { + "noArrayIndexKey": "warn", + "noAssignInExpressions": "warn", + "noExplicitAny": "warn" + } + } + }, + "organizeImports": { + "enabled": false + }, + "files": { + "ignoreUnknown": true, + "include": ["packages/*/src/**"], + "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**"] + }, + "javascript": { + "formatter": { + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingCommas": "all", + "semicolons": "always", + "arrowParentheses": "always", + "bracketSpacing": true, + "bracketSameLine": false, + "quoteStyle": "single", + "attributePosition": "auto" + } + } +} diff --git a/package.json b/package.json index dd8ca507..d26cc23c 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,22 @@ { "name": "gridplus-sdk-monorepo", "private": true, + "packageManager": "pnpm@10.6.2", "scripts": { - "build": "pnpm --filter @gridplus/btc run build && pnpm --filter gridplus-sdk run build", - "test": "pnpm --filter @gridplus/btc run build && pnpm --filter @gridplus/btc run test && pnpm --filter gridplus-sdk run test", - "test-unit": "pnpm --filter @gridplus/btc run build && pnpm --filter @gridplus/btc run test && pnpm --filter gridplus-sdk run test-unit", - "lint": "pnpm --filter @gridplus/btc run lint && pnpm --filter gridplus-sdk run lint", - "lint:fix": "pnpm --filter @gridplus/btc run lint:fix && pnpm --filter gridplus-sdk run lint:fix", - "e2e": "pnpm --filter gridplus-sdk run e2e", + "build": "turbo run build --filter=gridplus-sdk --filter=@gridplus/btc", + "test": "turbo run test --filter=gridplus-sdk --filter=@gridplus/btc", + "test-unit": "turbo run test-unit --filter=gridplus-sdk --filter=@gridplus/btc", + "lint": "turbo run lint --filter=gridplus-sdk --filter=@gridplus/btc", + "lint:fix": "turbo run lint:fix --filter=gridplus-sdk --filter=@gridplus/btc", + "typecheck": "turbo run typecheck --filter=gridplus-sdk --filter=@gridplus/btc", + "e2e": "turbo run e2e --filter=gridplus-sdk", "docs:build": "pnpm --filter gridplus-sdk-docs run build", "docs:start": "pnpm --filter gridplus-sdk-docs run start" }, + "devDependencies": { + "@biomejs/biome": "^1.9.0", + "turbo": "^2.3.0" + }, "engines": { "node": ">=20" } diff --git a/packages/btc/biome.json b/packages/btc/biome.json new file mode 100644 index 00000000..c365284a --- /dev/null +++ b/packages/btc/biome.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "extends": ["../../biome.json"], + "files": { + "include": ["src/**/*.ts"], + "ignore": ["**/dist/**", "**/node_modules/**"] + } +} diff --git a/packages/btc/package.json b/packages/btc/package.json index b7a37b35..aa25d38e 100644 --- a/packages/btc/package.json +++ b/packages/btc/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "tsup", "test": "vitest run ./src/__test__/unit", - "lint": "eslint src --config eslint.config.mjs", - "lint:fix": "eslint src --config eslint.config.mjs --fix" + "lint": "biome check src", + "lint:fix": "biome check --write src", + "typecheck": "tsc --noEmit" }, "files": [ "dist" @@ -32,14 +33,8 @@ "bs58check": "^4.0.0" }, "devDependencies": { - "@eslint/js": "^9.36.0", + "@biomejs/biome": "^1.9.0", "@types/node": "^24.10.4", - "@typescript-eslint/eslint-plugin": "^8.44.1", - "@typescript-eslint/parser": "^8.44.1", - "eslint": "^9.36.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-prettier": "^5.5.4", - "prettier": "^3.6.2", "tsup": "^8.5.0", "typescript": "^5.9.2", "vitest": "3.2.4" diff --git a/packages/btc/src/provider/blockbook.ts b/packages/btc/src/provider/blockbook.ts index 2706c9fe..23defda6 100644 --- a/packages/btc/src/provider/blockbook.ts +++ b/packages/btc/src/provider/blockbook.ts @@ -152,7 +152,7 @@ export class BlockbookProvider implements BtcProvider { `Fee estimation failed: invalid response format for ${blocks} blocks`, ); } - const btcPerKb = parseFloat(response.result); + const btcPerKb = Number.parseFloat(response.result); if (Number.isNaN(btcPerKb) || btcPerKb <= 0) { throw new Error( `Fee estimation failed: invalid fee rate "${response.result}" for ${blocks} blocks`, diff --git a/packages/btc/src/wallet.ts b/packages/btc/src/wallet.ts index ba42d16a..845f4e40 100644 --- a/packages/btc/src/wallet.ts +++ b/packages/btc/src/wallet.ts @@ -18,7 +18,7 @@ import { HARDENED_OFFSET } from './constants'; * @throws Error if the value cannot be parsed to a valid integer */ function safeParseInt(value: string, fieldName: string): number { - const parsed = parseInt(value, 10); + const parsed = Number.parseInt(value, 10); if (Number.isNaN(parsed)) { throw new Error( `Invalid ${fieldName}: expected numeric string but received "${value}"`, diff --git a/packages/docs/package.json b/packages/docs/package.json index e56aa9e1..bfca7e64 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@docusaurus/module-type-aliases": "^3.4.0", "@tsconfig/docusaurus": "^2.0.3", + "@types/node": "^22.0.0", "docusaurus-plugin-typedoc": "~1.0.1", "typedoc": "~0.25.13", "typedoc-plugin-markdown": "~4.0.1", diff --git a/packages/docs/src/components/HomepageFeatures.tsx b/packages/docs/src/components/HomepageFeatures.tsx index dd30caf1..72309dd8 100644 --- a/packages/docs/src/components/HomepageFeatures.tsx +++ b/packages/docs/src/components/HomepageFeatures.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import clsx from 'clsx'; import styles from './HomepageFeatures.module.css'; diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.css index 8f5c3276..efa9f15e 100644 --- a/packages/docs/src/css/custom.css +++ b/packages/docs/src/css/custom.css @@ -23,6 +23,6 @@ padding: 0 var(--ifm-pre-padding); } -html[data-theme='dark'] .docusaurus-highlight-code-line { +html[data-theme="dark"] .docusaurus-highlight-code-line { background-color: rgba(0, 0, 0, 0.3); } diff --git a/packages/docs/src/pages/_index.tsx b/packages/docs/src/pages/_index.tsx index cf264684..a52585e6 100644 --- a/packages/docs/src/pages/_index.tsx +++ b/packages/docs/src/pages/_index.tsx @@ -1,10 +1,15 @@ +import type React from 'react'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; +import Layout, { type Props as LayoutProps } from '@theme/Layout'; import clsx from 'clsx'; -import React from 'react'; import styles from './index.module.css'; +interface ExtendedLayoutProps extends LayoutProps { + title?: string; + description?: string; +} + function HomepageHeader() { const { siteConfig } = useDocusaurusContext(); return ( @@ -27,13 +32,14 @@ function HomepageHeader() { export default function Home(): JSX.Element { const { siteConfig } = useDocusaurusContext(); + const ExtendedLayout = Layout as React.ComponentType; return ( -
{/* */}
-
+ ); } diff --git a/packages/docs/tsconfig.json b/packages/docs/tsconfig.json index 203c4455..d1970d23 100644 --- a/packages/docs/tsconfig.json +++ b/packages/docs/tsconfig.json @@ -2,8 +2,9 @@ "extends": "@tsconfig/docusaurus/tsconfig.json", "compilerOptions": { "baseUrl": ".", - "skipLibCheck": true + "skipLibCheck": true, + "jsx": "react-jsx", + "types": ["node", "@docusaurus/module-type-aliases"] }, - "include": ["../src"], - "types": ["node", "jest", "vitest", "vitest/globals"] + "include": ["src"] } diff --git a/packages/example/package.json b/packages/example/package.json index eaac56ed..417bbfb3 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -13,7 +13,7 @@ "@ethereumjs/common": "^3.0.2", "@ethereumjs/tx": "^4.0.2", "buffer": "^6.0.3", - "gridplus-sdk": "^2.4.3", + "gridplus-sdk": "workspace:*", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -21,7 +21,7 @@ "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "@vitejs/plugin-react": "^3.0.0", - "typescript": "^4.9.3", + "typescript": "^5.0.0", "vite": "^4.0.0" } } diff --git a/packages/example/src/App.tsx b/packages/example/src/App.tsx index cd6bd031..07d3d3e8 100644 --- a/packages/example/src/App.tsx +++ b/packages/example/src/App.tsx @@ -1,27 +1,33 @@ -import { useEffect, useState } from 'react'; -import { getClient, pair, setup } from '../../src/api/index'; +import { useCallback, useEffect, useState } from 'react'; +import { getClient, pair, setup } from 'gridplus-sdk'; import './App.css'; import { Lattice } from './Lattice'; function App() { const [label, setLabel] = useState('No Device'); - const getStoredClient = () => - window.localStorage.getItem('storedClient') || ''; + const getStoredClient = useCallback( + async () => window.localStorage.getItem('storedClient') || '', + [], + ); - const setStoredClient = (storedClient: string | null) => { + const setStoredClient = useCallback(async (storedClient: string | null) => { if (!storedClient) return; window.localStorage.setItem('storedClient', storedClient); - const client = getClient(); + const client = await getClient(); setLabel(client?.getDeviceId() || 'No Device'); - }; + }, []); useEffect(() => { - if (getStoredClient()) { - setup({ getStoredClient, setStoredClient }); - } - }, []); + const initClient = async () => { + const storedClient = await getStoredClient(); + if (storedClient) { + await setup({ getStoredClient, setStoredClient }); + } + }; + initClient(); + }, [getStoredClient, setStoredClient]); const submitInit = (e: any) => { e.preventDefault(); diff --git a/packages/example/src/Button.tsx b/packages/example/src/Button.tsx index 86f16bc0..8b0c8e90 100644 --- a/packages/example/src/Button.tsx +++ b/packages/example/src/Button.tsx @@ -1,6 +1,11 @@ -import { useState } from 'react'; +import { type ReactNode, useState } from 'react'; -export const Button = ({ onClick, children }) => { +interface ButtonProps { + onClick: () => Promise; + children: ReactNode; +} + +export const Button = ({ onClick, children }: ButtonProps) => { const [isLoading, setIsLoading] = useState(false); const handleOnClick = () => { @@ -8,7 +13,7 @@ export const Button = ({ onClick, children }) => { onClick().finally(() => setIsLoading(false)); }; return ( - ); diff --git a/packages/example/src/Lattice.tsx b/packages/example/src/Lattice.tsx index 842067da..d0f3a9dd 100644 --- a/packages/example/src/Lattice.tsx +++ b/packages/example/src/Lattice.tsx @@ -1,41 +1,29 @@ -import { Chain, Common, Hardfork } from '@ethereumjs/common'; -import { TransactionFactory } from '@ethereumjs/tx'; import { useState } from 'react'; import { addAddressTags, - fetchAddresses, fetchAddressTags, + fetchAddresses, fetchLedgerLiveAddresses, removeAddressTags, sign, signMessage, -} from '../../src/api'; + type AddressTag, +} from 'gridplus-sdk'; import { Button } from './Button'; -export const Lattice = ({ label }) => { +interface LatticeProps { + label: string; +} + +export const Lattice = ({ label }: LatticeProps) => { const [addresses, setAddresses] = useState([]); - const [addressTags, setAddressTags] = useState<{ id: string }[]>([]); - const [ledgerAddresses, setLedgerAddresses] = useState([]); + const [addressTags, setAddressTags] = useState([]); + const [ledgerAddresses, setLedgerAddresses] = useState([]); - const getTxPayload = () => { - const txData = { - type: 1, - maxFeePerGas: 1200000000, - maxPriorityFeePerGas: 1200000000, - nonce: 0, - gasLimit: 50000, - to: '0xe242e54155b1abc71fc118065270cecaaf8b7768', - value: 1000000000000, - data: '0x17e914679b7e160613be4f8c2d3203d236286d74eb9192f6d6f71b9118a42bb033ccd8e8', - gasPrice: 1200000000, - }; - const common = new Common({ - chain: Chain.Mainnet, - hardfork: Hardfork.London, - }); - const tx = TransactionFactory.fromTxData(txData, { common }); - const payload = tx.getMessageToSign(false); - return payload; + // Example EIP-1559 transaction payload using raw hex format + const getTxPayload = (): `0x${string}` => { + // Pre-serialized EIP-1559 transaction for example purposes + return '0x02f8620180843b9aca00843b9aca0082c350940000000000000000000000000000000000000000880de0b6b3a764000080c0'; }; return ( @@ -49,8 +37,20 @@ export const Lattice = ({ label }) => { }} >

{label}

- - + +

Addresses

@@ -97,7 +97,7 @@ export const Lattice = ({ label }) => {

Address Tags

    - {addressTags?.map((tag: any) => ( + {addressTags?.map((tag) => (
  • {tag.key}: {tag.val}
  • @@ -108,7 +108,7 @@ export const Lattice = ({ label }) => {

    Ledger Addresses

      - {ledgerAddresses?.map((ledgerAddress: any) => ( + {ledgerAddresses?.map((ledgerAddress) => (
    • {ledgerAddress}
    • ))}
    diff --git a/packages/sdk/biome.json b/packages/sdk/biome.json new file mode 100644 index 00000000..5fb64252 --- /dev/null +++ b/packages/sdk/biome.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json", + "extends": ["../../biome.json"], + "files": { + "include": ["src/**/*.ts"], + "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**"] + } +} diff --git a/packages/sdk/eslint.config.mjs b/packages/sdk/eslint.config.mjs deleted file mode 100644 index 08822ecc..00000000 --- a/packages/sdk/eslint.config.mjs +++ /dev/null @@ -1,110 +0,0 @@ -import js from '@eslint/js'; -import tsPlugin from '@typescript-eslint/eslint-plugin'; -import tsParser from '@typescript-eslint/parser'; -import prettierConfig from 'eslint-config-prettier'; -import prettierPlugin from 'eslint-plugin-prettier'; - -const restrictedNodeImports = [ - { name: 'crypto', message: 'Use node:crypto instead.' }, - { name: 'fs', message: 'Use node:fs instead.' }, - { name: 'os', message: 'Use node:os instead.' }, - { name: 'path', message: 'Use node:path instead.' }, - { name: 'stream', message: 'Use node:stream instead.' }, - { name: 'url', message: 'Use node:url instead.' }, - { name: 'util', message: 'Use node:util instead.' }, -]; - -export default [ - js.configs.recommended, - { - files: ['src/**/*.ts', 'src/**/*.tsx'], - plugins: { - '@typescript-eslint': tsPlugin, - prettier: prettierPlugin, - }, - languageOptions: { - parser: tsParser, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - globals: { - Buffer: 'readonly', - URL: 'readonly', - fetch: 'readonly', - Response: 'readonly', - Request: 'readonly', - RequestInit: 'readonly', - AbortController: 'readonly', - caches: 'readonly', - setTimeout: 'readonly', - clearTimeout: 'readonly', - // Test globals - vi: 'readonly', - describe: 'readonly', - it: 'readonly', - test: 'readonly', - expect: 'readonly', - beforeAll: 'readonly', - afterAll: 'readonly', - beforeEach: 'readonly', - afterEach: 'readonly', - // Node.js globals - process: 'readonly', - // Browser globals - window: 'readonly', - document: 'readonly', - console: 'readonly', - }, - }, - rules: { - ...tsPlugin.configs.recommended.rules, - ...prettierPlugin.configs.recommended.rules, - 'prettier/prettier': 'error', - eqeqeq: ['error'], - 'no-var': ['warn'], - 'no-duplicate-imports': ['error'], - 'prefer-const': ['error'], - 'prefer-spread': ['error'], - 'no-console': ['off'], - 'react/react-in-jsx-scope': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unused-vars': [ - 'warn', - { argsIgnorePattern: '^_' }, - ], - quotes: [ - 'warn', - 'single', - { avoidEscape: true, allowTemplateLiterals: true }, - ], - 'no-restricted-imports': ['error', { paths: restrictedNodeImports }], - 'no-restricted-syntax': [ - 'error', - { - selector: "CallExpression[callee.name='require']", - message: 'Use ESM imports instead of require.', - }, - { - selector: - "AssignmentExpression[left.object.name='module'][left.property.name='exports']", - message: 'Use ESM exports instead of module.exports.', - }, - ], - }, - }, - prettierConfig, - { - ignores: [ - 'dist/**', - 'node_modules/**', - 'coverage/**', - '*.js', - '*.cjs', - '*.mjs', - 'build/**', - 'docs/**', - 'patches/**', - ], - }, -]; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 9e0cab57..5f007ee6 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "tsup", "commit": "git-cz", - "lint:fix": "eslint src --c .ts,.tsx --config eslint.config.mjs --fix && prettier --write .", - "lint": "eslint src --c .ts,.tsx --config eslint.config.mjs", - "format": "prettier --write .", + "lint": "biome check src", + "lint:fix": "biome check src --write", + "typecheck": "tsc --noEmit", "pair-device": "tsx scripts/pair-device.ts", "precommit": "npm run lint:fix && npm run test", "test": "vitest run ./src/__test__/unit ./src/__test__/integration", @@ -40,15 +40,15 @@ ], "main": "./dist/index.cjs", "module": "./dist/index.mjs", + "types": "./dist/index.d.cts", "exports": { ".": { - "types": "./dist/index.d.ts", + "types": "./dist/index.d.cts", "import": "./dist/index.mjs", "require": "./dist/index.cjs" }, "./package.json": "./package.json" }, - "types": "./dist/index.d.ts", "repository": { "type": "git", "url": "https://github.com/GridPlus/gridplus-sdk.git" @@ -81,7 +81,6 @@ }, "devDependencies": { "@chainsafe/bls-keystore": "^3.1.0", - "@eslint/js": "^9.36.0", "@noble/bls12-381": "^1.4.0", "@solana/web3.js": "^1.98.4", "@types/bn.js": "^5.2.0", @@ -92,8 +91,6 @@ "@types/readline-sync": "^1.4.8", "@types/secp256k1": "^4.0.6", "@types/seedrandom": "^3.0.8", - "@typescript-eslint/eslint-plugin": "^8.44.1", - "@typescript-eslint/parser": "^8.44.1", "@vitest/coverage-istanbul": "^2.1.3", "bip32": "^4.0.0", "bip39": "^3.1.0", @@ -102,21 +99,16 @@ "dotenv": "^17.2.2", "ecpair": "^3.0.0", "ed25519-hd-key": "^1.3.0", - "eslint": "^9.36.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-prettier": "^5.5.4", "ethereumjs-util": "^7.1.5", "jsonc": "^2.0.0", "msw": "^2.11.3", - "prettier": "^3.6.2", - "prettier-eslint": "^16.4.2", "random-words": "^2.0.1", "readline-sync": "^1.4.10", "seedrandom": "^3.0.5", + "tiny-secp256k1": "^2.2.4", "tsup": "^8.5.0", "tsx": "^4.20.6", "tweetnacl": "^1.0.3", - "tiny-secp256k1": "^2.2.4", "typescript": "^5.9.2", "vite": "^7.1.7", "vite-plugin-dts": "^4.5.4", diff --git a/packages/sdk/src/__test__/e2e/api.test.ts b/packages/sdk/src/__test__/e2e/api.test.ts index 81f670b1..a7cc353b 100644 --- a/packages/sdk/src/__test__/e2e/api.test.ts +++ b/packages/sdk/src/__test__/e2e/api.test.ts @@ -21,7 +21,6 @@ vi.mock('../../util', async () => { }); import { RLP } from '@ethereumjs/rlp'; -import { getClient } from './../../api/utilities'; import { fetchActiveWallets, fetchAddress, @@ -46,8 +45,9 @@ import { } from '../../api/index'; import { HARDENED_OFFSET } from '../../constants'; import { buildRandomMsg } from '../utils/builders'; -import { setupClient } from '../utils/setup'; import { BTC_PURPOSE_P2SH_P2WPKH, BTC_TESTNET_COIN } from '../utils/helpers'; +import { setupClient } from '../utils/setup'; +import { getClient } from './../../api/utilities'; import { dexlabProgram } from './signing/solana/__mocks__/programs'; describe('API', () => { diff --git a/packages/sdk/src/__test__/e2e/btc.test.ts b/packages/sdk/src/__test__/e2e/btc.test.ts index 01b55588..a345f787 100644 --- a/packages/sdk/src/__test__/e2e/btc.test.ts +++ b/packages/sdk/src/__test__/e2e/btc.test.ts @@ -15,7 +15,6 @@ import BIP32Factory, { type BIP32Interface } from 'bip32'; import * as ecc from 'tiny-secp256k1'; import type { Client } from '../../client'; -import { setupClient } from '../utils/setup'; import { getPrng, getTestnet } from '../utils/getters'; import { BTC_PURPOSE_P2PKH, @@ -24,6 +23,7 @@ import { setup_btc_sig_test, stripDER, } from '../utils/helpers'; +import { setupClient } from '../utils/setup'; import { TEST_SEED } from '../utils/testConstants'; const prng = getPrng(); @@ -61,9 +61,7 @@ async function testSign({ txReq, signingKeys, sigHashes, client }: any) { const verification = signingKeys[i].verify(sigHashes[i], sig); expect(verification).toEqualElseLog( true, - `Signature validation failed for priv=${signingKeys[ - i - ].privateKey.toString('hex')}, ` + + `Signature validation failed for priv=${signingKeys[i].privateKey.toString('hex')}, ` + `hash=${sigHashes[i].toString('hex')}, sig=${sig.toString('hex')}`, ); } diff --git a/packages/sdk/src/__test__/e2e/eth.msg.test.ts b/packages/sdk/src/__test__/e2e/eth.msg.test.ts index 6ad007c0..a827211e 100644 --- a/packages/sdk/src/__test__/e2e/eth.msg.test.ts +++ b/packages/sdk/src/__test__/e2e/eth.msg.test.ts @@ -17,20 +17,21 @@ */ import { HARDENED_OFFSET } from '../../constants'; -import { SigningPath } from '../../types'; +import type { SigningPath } from '../../types'; import { randomBytes } from '../../util'; import { buildEthMsgReq, buildRandomMsg } from '../utils/builders'; import { runEthMsg } from '../utils/runners'; import { setupClient } from '../utils/setup'; +import type { Client } from '../../client'; describe('ETH Messages', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); }); - describe('Test ETH personalSign', function () { + describe('Test ETH personalSign', () => { it('Should throw error when message contains non-ASCII characters', async () => { const protocol = 'signPersonal'; const msg = '⚠️'; @@ -118,7 +119,7 @@ describe('ETH Messages', () => { }); }); - describe('Test ETH EIP712', function () { + describe('Test ETH EIP712', () => { it('Should test a message that needs to be prehashed', async () => { const msg = { types: { diff --git a/packages/sdk/src/__test__/e2e/general.test.ts b/packages/sdk/src/__test__/e2e/general.test.ts index 5629d144..021d6e1f 100644 --- a/packages/sdk/src/__test__/e2e/general.test.ts +++ b/packages/sdk/src/__test__/e2e/general.test.ts @@ -34,11 +34,12 @@ import { } from '../utils/helpers'; import { setupClient } from '../utils/setup'; +import type { Client } from '../../client'; const id = getDeviceId(); describe('General', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); @@ -72,11 +73,11 @@ describe('General', () => { startPath: [BTC_PURPOSE_P2SH_P2WPKH, BTC_COIN, HARDENED_OFFSET, 0, 0], n: 5, }; - let addrs; + let addrs: string[] | undefined; // Bitcoin addresses // NOTE: The format of address will be based on the user's Lattice settings // By default, this will be P2SH(P2WPKH), i.e. addresses that start with `3` - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; expect(addrs.length).toEqual(5); expect(addrs[0]?.[0]).toEqual('3'); @@ -84,7 +85,7 @@ describe('General', () => { addrData.startPath[0] = BTC_PURPOSE_P2PKH; addrData.startPath[1] = ETH_COIN; addrData.n = 1; - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; expect(addrs.length).toEqual(1); expect(addrs[0]?.slice(0, 2)).toEqual('0x'); // If firmware supports it, try shorter paths @@ -93,7 +94,7 @@ describe('General', () => { startPath: [BTC_PURPOSE_P2PKH, ETH_COIN, HARDENED_OFFSET, 0], n: 1, }; - addrs = await client.getAddresses(flexData); + addrs = (await client.getAddresses(flexData)) as string[]; expect(addrs.length).toEqual(1); expect(addrs[0]?.slice(0, 2)).toEqual('0x'); } @@ -109,7 +110,7 @@ describe('General', () => { // Switch to BTC coin. Should work now. addrData.startPath[1] = BTC_COIN; // Bech32 - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; expect(addrs.length).toEqual(1); expect(addrs[0]?.slice(0, 3)).to.be.oneOf(['bc1']); addrData.startPath[0] = BTC_PURPOSE_P2SH_P2WPKH; @@ -117,7 +118,7 @@ describe('General', () => { addrData.startPath[4] = 1000000; addrData.n = 3; - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; expect(addrs.length).toEqual(addrData.n); addrData.startPath[4] = 0; addrData.n = 1; @@ -125,7 +126,7 @@ describe('General', () => { // Unsupported purpose (m//) addrData.startPath[0] = 0; // Purpose 0 -- undefined try { - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; } catch (err: any) { expect(err.message).not.toEqual(null); } @@ -134,7 +135,7 @@ describe('General', () => { // Unsupported currency addrData.startPath[1] = HARDENED_OFFSET + 5; // 5' currency - aka unknown try { - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; throw new Error(null); } catch (err: any) { expect(err.message).not.toEqual(null); @@ -143,7 +144,7 @@ describe('General', () => { // Too many addresses (n>10) addrData.n = 11; try { - addrs = await client.getAddresses(addrData); + addrs = (await client.getAddresses(addrData)) as string[]; throw new Error(null); } catch (err: any) { expect(err.message).not.toEqual(null); @@ -225,7 +226,7 @@ describe('General', () => { ], }; const req = { - currency: 'BTC', + currency: 'BTC' as const, data: txData, }; @@ -264,7 +265,7 @@ describe('General', () => { ], }; const req = { - currency: 'BTC', + currency: 'BTC' as const, data: txData, }; // Sign a legit tx @@ -302,7 +303,7 @@ describe('General', () => { ], }; const req = { - currency: 'BTC', + currency: 'BTC' as const, data: txData, }; // Sign a legit tx @@ -341,7 +342,7 @@ describe('General', () => { ], }; const req = { - currency: 'BTC', + currency: 'BTC' as const, data: txData, }; // Sign a legit tx diff --git a/packages/sdk/src/__test__/e2e/kv.test.ts b/packages/sdk/src/__test__/e2e/kv.test.ts index 8f8fc89a..73dd85d3 100644 --- a/packages/sdk/src/__test__/e2e/kv.test.ts +++ b/packages/sdk/src/__test__/e2e/kv.test.ts @@ -1,4 +1,3 @@ -import { DEFAULT_SIGNER } from '../utils/builders'; /** * Test kv (key-value) file functionality. These types of files are simple mappings * between a 64 byte key and a 64 byte value of any type. The main use case for these @@ -7,9 +6,12 @@ import { DEFAULT_SIGNER } from '../utils/builders'; import { question } from 'readline-sync'; import { HARDENED_OFFSET } from '../../constants'; import { LatticeResponseCode, ProtocolConstants } from '../../protocol'; +import { DEFAULT_SIGNER } from '../utils/builders'; import { BTC_PURPOSE_P2PKH, ETH_COIN } from '../utils/helpers'; import { setupClient } from '../utils/setup'; +import type { Client } from '../../client'; +import type { SignRequestParams } from '../../types'; // Random address to test the screen with. // IMPORTANT NOTE: For Ethereum addresses you should always add the lower case variety since @@ -19,7 +21,7 @@ const UNISWAP_TAG = 'Uniswap V2 Router'; const RANDOM_ADDR = '0x30da3d7A865C934b389c919c737510054111AB3A'; const RANDOM_TAG = 'Test Address Name'; let _numStartingRecords = 0; -let _fetchedRecords: any = []; +let _fetchedRecords: unknown[] = []; const ETH_REQ = { currency: 'ETH', data: { @@ -35,7 +37,7 @@ const ETH_REQ = { }; describe('key-value', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); @@ -92,7 +94,7 @@ describe('key-value', () => { }); it('Should make a request to an unknown address', async () => { - await client.sign(ETH_REQ).catch((err) => { + await client.sign(ETH_REQ as unknown as SignRequestParams).catch((err) => { expect(err.message).toContain( ProtocolConstants.responseMsg[LatticeResponseCode.userDeclined], ); @@ -148,7 +150,7 @@ describe('key-value', () => { }); it('Should make a request to an address which is now known', async () => { - await client.sign(ETH_REQ); + await client.sign(ETH_REQ as unknown as SignRequestParams); }); it('Should make an EIP712 request that uses the record', async () => { @@ -181,15 +183,13 @@ describe('key-value', () => { payload: msg, }, }; - await client.sign(req); + await client.sign(req as unknown as SignRequestParams); }); it('Should make a request with calldata', async () => { // TODO: Add decoder data const req = JSON.parse(JSON.stringify(ETH_REQ)); - req.data.data = `0x23b872dd00000000000000000000000057974eb88e50cc61049b44e43e90d3bc40fa61c0000000000000000000000000${RANDOM_ADDR.slice( - 2, - )}000000000000000000000000000000000000000000000000000000000000270f`; + req.data.data = `0x23b872dd00000000000000000000000057974eb88e50cc61049b44e43e90d3bc40fa61c0000000000000000000000000${RANDOM_ADDR.slice(2)}000000000000000000000000000000000000000000000000000000000000270f`; await client.sign(req); }); @@ -225,7 +225,7 @@ describe('key-value', () => { }); it('Should make another request to make sure case sensitivity is enforced', async () => { - await client.sign(ETH_REQ).catch((err) => { + await client.sign(ETH_REQ as unknown as SignRequestParams).catch((err) => { expect(err.message).toContain( ProtocolConstants.responseMsg[LatticeResponseCode.userDeclined], ); diff --git a/packages/sdk/src/__test__/e2e/non-exportable.test.ts b/packages/sdk/src/__test__/e2e/non-exportable.test.ts index dbc9c113..7edd6d13 100644 --- a/packages/sdk/src/__test__/e2e/non-exportable.test.ts +++ b/packages/sdk/src/__test__/e2e/non-exportable.test.ts @@ -25,13 +25,15 @@ import { createTx } from '@ethereumjs/tx'; import { question } from 'readline-sync'; import { Constants } from '../..'; import { DEFAULT_SIGNER } from '../utils/builders'; -import { setupClient } from '../utils/setup'; import { getSigStr, validateSig } from '../utils/helpers'; +import { setupClient } from '../utils/setup'; +import type { Client } from '../../client'; +import type { SignRequestParams } from '../../types'; let runTests = true; describe('Non-Exportable Seed', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); @@ -134,20 +136,32 @@ describe('Non-Exportable Seed', () => { it('Should test that ETH message sigs differ and validate on secp256k1', async () => { // Validate that signPersonal message sigs are non-uniform const msgReq = { - currency: 'ETH_MSG', + currency: 'ETH_MSG' as const, data: { signerPath: DEFAULT_SIGNER, - protocol: 'signPersonal', + protocol: 'signPersonal' as const, payload: 'test message', + curveType: Constants.SIGNING.CURVES.SECP256K1, + hashType: Constants.SIGNING.HASHES.KECCAK256, }, }; // NOTE: This uses the legacy signing pathway, which validates the signature // Once we move this to generic signing, we will need to validate these. - const msg1Resp = await client.sign(msgReq); - const msg2Resp = await client.sign(msgReq); - const msg3Resp = await client.sign(msgReq); - const msg4Resp = await client.sign(msgReq); - const msg5Resp = await client.sign(msgReq); + const msg1Resp = await client.sign( + msgReq as unknown as SignRequestParams, + ); + const msg2Resp = await client.sign( + msgReq as unknown as SignRequestParams, + ); + const msg3Resp = await client.sign( + msgReq as unknown as SignRequestParams, + ); + const msg4Resp = await client.sign( + msgReq as unknown as SignRequestParams, + ); + const msg5Resp = await client.sign( + msgReq as unknown as SignRequestParams, + ); // Check sig 1 expect(getSigStr(msg1Resp)).not.toEqual(getSigStr(msg2Resp)); expect(getSigStr(msg1Resp)).not.toEqual(getSigStr(msg3Resp)); diff --git a/packages/sdk/src/__test__/e2e/signing/bls.test.ts b/packages/sdk/src/__test__/e2e/signing/bls.test.ts index b676805b..e37edf40 100644 --- a/packages/sdk/src/__test__/e2e/signing/bls.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/bls.test.ts @@ -25,14 +25,17 @@ import { getPublicKey, sign } from '@noble/bls12-381'; import { deriveSeedTree } from 'bls12-381-keygen'; import { question } from 'readline-sync'; +import type { Client } from '../../../client'; import { Constants } from '../../../index'; import { getPathStr } from '../../../shared/utilities'; -import { setupClient } from '../../utils/setup'; import { getEncPw } from '../../utils/getters'; import { buildPath } from '../../utils/helpers'; +import { setupClient } from '../../utils/setup'; import { TEST_SEED } from '../../utils/testConstants'; -let client, encPw, supportsBLS; +let client: Client; +let encPw: string | undefined; +let supportsBLS: boolean | undefined; const DEPOSIT_PATH = [12381, 3600, 0, 0, 0]; const WITHDRAWAL_PATH = [12381, 3600, 0, 0]; // Number of signers to test for each of deposit and withdrawal paths @@ -52,32 +55,30 @@ describe('[BLS keys]', () => { } // Check if firmware supports BLS (requires >= 0.17.0) - const fwVersion = client.fwVersion; - const versionStr = - fwVersion && fwVersion.length >= 3 - ? `${fwVersion[2]}.${fwVersion[1]}.${fwVersion[0]}` - : 'unknown'; + const fwVersion = client.getFwVersion(); + const versionStr = fwVersion + ? `${fwVersion.major}.${fwVersion.minor}.${fwVersion.fix}` + : 'unknown'; console.log(`\n[BLS Test] Firmware version: ${versionStr}`); - console.log(`[BLS Test] Raw fwVersion buffer:`, fwVersion); + console.log('[BLS Test] Raw fwVersion:', fwVersion); const fwConstants = client.getFwConstants(); - console.log(`[BLS Test] getAddressFlags:`, fwConstants?.getAddressFlags); + console.log('[BLS Test] getAddressFlags:', fwConstants?.getAddressFlags); console.log( - `[BLS Test] BLS12_381_G1_PUB constant:`, + '[BLS Test] BLS12_381_G1_PUB constant:', Constants.GET_ADDR_FLAGS.BLS12_381_G1_PUB, ); supportsBLS = fwConstants?.getAddressFlags?.includes( - Constants.GET_ADDR_FLAGS.BLS12_381_G1_PUB, + Constants.GET_ADDR_FLAGS.BLS12_381_G1_PUB as number, ); console.log(`[BLS Test] supportsBLS: ${supportsBLS}\n`); if (!supportsBLS) { console.warn( - `\nSkipping BLS tests: Firmware version ${versionStr} does not support BLS operations.\n` + - `BLS support requires firmware version >= 0.17.0\n`, + `\nSkipping BLS tests: Firmware version ${versionStr} does not support BLS operations.\nBLS support requires firmware version >= 0.17.0\n`, ); } }); @@ -94,7 +95,7 @@ describe('[BLS keys]', () => { c: 999, // if this is not specified, the default value will be used }, }; - let encData; + let encData: unknown; // Test custom iteration count (c) encData = await client.fetchEncryptedData(req); await validateExportedKeystore(KNOWN_SEED, req.params.path, encPw, encData); @@ -114,9 +115,7 @@ describe('[BLS keys]', () => { for (let i = 0; i < N_TEST_SIGS; i++) { describe(`[Validate Derived Signature #${i + 1}/${N_TEST_SIGS}]`, () => { - it(`Should validate derivation and signing at deposit index #${ - i + 1 - }`, async (ctx) => { + it(`Should validate derivation and signing at deposit index #${i + 1}`, async (ctx) => { if (!supportsBLS) { ctx.skip(); return; @@ -126,9 +125,7 @@ describe('[BLS keys]', () => { await testBLSDerivationAndSig(KNOWN_SEED, depositPath); }); - it(`Should validate derivation and signing at withdrawal index #${ - i + 1 - }`, async (ctx) => { + it(`Should validate derivation and signing at withdrawal index #${i + 1}`, async (ctx) => { if (!supportsBLS) { ctx.skip(); return; @@ -144,11 +141,12 @@ describe('[BLS keys]', () => { //========================================================= // INTERNAL HELPERS //========================================================= -async function getBLSPub(startPath) { +async function getBLSPub(startPath: number[]) { const pubs = await client.getAddresses({ startPath, + n: 1, flag: Constants.GET_ADDR_FLAGS.BLS12_381_G1_PUB, - }); + } as Parameters[0]); return pubs[0]; } @@ -182,10 +180,9 @@ async function testBLSDerivationAndSig(seed, signerPath) { refPubStr, 'Lattice signature returned wrong pubkey', ); - expect(latticeSig.sig.toString('hex')).to.equal( - refSigStr, - 'Signature mismatch', - ); + expect( + Buffer.from(latticeSig.sig as unknown as Buffer).toString('hex'), + ).to.equal(refSigStr, 'Signature mismatch'); } async function validateExportedKeystore(seed, path, pw, expKeystoreBuffer) { const exportedKeystore = JSON.parse(expKeystoreBuffer.toString()); diff --git a/packages/sdk/src/__test__/e2e/signing/determinism.test.ts b/packages/sdk/src/__test__/e2e/signing/determinism.test.ts index 1b13e4b6..064950ea 100644 --- a/packages/sdk/src/__test__/e2e/signing/determinism.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/determinism.test.ts @@ -1,13 +1,5 @@ -/** - * REQUIRED TEST MNEMONIC: - * These tests require a SafeCard loaded with the standard test mnemonic: - * "test test test test test test test test test test test junk" - * - * Running with a different mnemonic will cause test failures due to - * incorrect address derivations and signature mismatches. - */ -import { getDeviceId } from '../../utils/getters'; import { HARDENED_OFFSET } from '../../../constants'; +import type { SignRequestParams, WalletPath } from '../../../types'; import { randomBytes } from '../../../util'; import { DEFAULT_SIGNER, @@ -18,17 +10,26 @@ import { } from '../../utils/builders'; import { deriveAddress, - signPersonalJS, signEip712JS, + signPersonalJS, testUniformSigs, } from '../../utils/determinism'; +/** + * REQUIRED TEST MNEMONIC: + * These tests require a SafeCard loaded with the standard test mnemonic: + * "test test test test test test test test test test test junk" + * + * Running with a different mnemonic will cause test failures due to + * incorrect address derivations and signature mismatches. + */ +import { getDeviceId } from '../../utils/getters'; import { BTC_PURPOSE_P2PKH, ETH_COIN, getSigStr } from '../../utils/helpers'; import { setupClient } from '../../utils/setup'; import { TEST_SEED } from '../../utils/testConstants'; -import type { WalletPath } from '../../../types'; +import type { Client } from '../../../client'; describe('[Determinism]', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); @@ -75,19 +76,19 @@ describe('[Determinism]', () => { n: 1, }; const latAddr0 = await client.getAddresses(req); - expect(latAddr0[0].toLowerCase()).toEqualElseLog( + expect((latAddr0[0] as string).toLowerCase()).toEqualElseLog( addr0.toLowerCase(), 'Incorrect address 0 fetched. Ensure your SafeCard is loaded with the test mnemonic: "test test test test test test test test test test test junk"', ); req.startPath = path1; const latAddr1 = await client.getAddresses(req); - expect(latAddr1[0].toLowerCase()).toEqualElseLog( + expect((latAddr1[0] as string).toLowerCase()).toEqualElseLog( addr1.toLowerCase(), 'Incorrect address 1 fetched. Ensure your SafeCard is loaded with the test mnemonic: "test test test test test test test test test test test junk"', ); req.startPath = path8; const latAddr8 = await client.getAddresses(req); - expect(latAddr8[0].toLowerCase()).toEqualElseLog( + expect((latAddr8[0] as string).toLowerCase()).toEqualElseLog( addr8.toLowerCase(), 'Incorrect address 8 fetched. Ensure your SafeCard is loaded with the test mnemonic: "test test test test test test test test test test test junk"', ); @@ -142,7 +143,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { const msgReq = buildMsgReq(); msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -154,7 +155,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr1', async () => { const msgReq = buildMsgReq(); msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -166,7 +167,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr8', async () => { const msgReq = buildMsgReq(); msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -180,7 +181,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { const msgReq = buildMsgReq('hello ethereum this is another message'); msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -192,7 +193,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr1', async () => { const msgReq = buildMsgReq('hello ethereum this is another message'); msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -204,7 +205,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr8', async () => { const msgReq = buildMsgReq('hello ethereum this is another message'); msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -218,7 +219,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { const msgReq = buildMsgReq('third vector yo'); msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -230,7 +231,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr1', async () => { const msgReq = buildMsgReq('third vector yo'); msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -242,7 +243,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr8', async () => { const msgReq = buildMsgReq('third vector yo'); msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signPersonalJS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -296,7 +297,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -307,7 +308,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr1', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -318,7 +319,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr8', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -362,7 +363,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -373,7 +374,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr1', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -384,7 +385,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr8', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -428,7 +429,7 @@ describe('[Determinism]', () => { it('Should validate signature from addr0', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -438,7 +439,7 @@ describe('[Determinism]', () => { }); it('Should validate signature from addr1', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 1; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -448,7 +449,7 @@ describe('[Determinism]', () => { }); it('Should validate signature from addr8', async () => { msgReq.data.signerPath[2] = HARDENED_OFFSET + 8; - const res = await client.sign(msgReq); + const res = await client.sign(msgReq as unknown as SignRequestParams); const sig = getSigStr(res); const jsSig = signEip712JS(msgReq.data.payload, msgReq.data.signerPath); expect(sig).toEqualElseLog( @@ -475,7 +476,7 @@ describe('[Determinism]', () => { }; req.data.signerPath[2] = HARDENED_OFFSET + offset; const jsSig = signPersonalJS(req.data.payload, req.data.signerPath); - const res = await client.sign(req); + const res = await client.sign(req as unknown as SignRequestParams); const sig = getSigStr(res); expect(sig).toEqualElseLog(jsSig, `Addr${offset} sig failed`); }); diff --git a/packages/sdk/src/__test__/e2e/signing/eip712-msg.test.ts b/packages/sdk/src/__test__/e2e/signing/eip712-msg.test.ts index 18a5f6f0..8fec45b5 100644 --- a/packages/sdk/src/__test__/e2e/signing/eip712-msg.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/eip712-msg.test.ts @@ -1,3 +1,4 @@ +import { setupClient } from '../../utils/setup'; /** * EIP-712 Typed Data Message Signing Test Suite * @@ -5,7 +6,6 @@ * Replaces the forge-based contract test with a pure signature comparison approach. */ import { signAndCompareEIP712Message } from '../../utils/viemComparison'; -import { setupClient } from '../../utils/setup'; import { EIP712_MESSAGE_VECTORS } from './eip712-vectors'; describe('EIP-712 Message Signing - Viem Compatibility', () => { diff --git a/packages/sdk/src/__test__/e2e/signing/solana/solana.programs.test.ts b/packages/sdk/src/__test__/e2e/signing/solana/solana.programs.test.ts index c92b9ea9..3ecadd40 100644 --- a/packages/sdk/src/__test__/e2e/signing/solana/solana.programs.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/solana/solana.programs.test.ts @@ -7,11 +7,12 @@ * incorrect key derivations and signature mismatches. */ import { Constants } from '../../../..'; +import type { Client } from '../../../../client'; import { setupClient } from '../../../utils/setup'; import { dexlabProgram, raydiumProgram } from './__mocks__/programs'; describe('Solana Programs', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); diff --git a/packages/sdk/src/__test__/e2e/signing/solana/solana.test.ts b/packages/sdk/src/__test__/e2e/signing/solana/solana.test.ts index 47f463f9..94a0e596 100644 --- a/packages/sdk/src/__test__/e2e/signing/solana/solana.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/solana/solana.test.ts @@ -15,11 +15,12 @@ import { import { Constants } from '../../../..'; import { HARDENED_OFFSET } from '../../../../constants'; import { ensureHexBuffer } from '../../../../util'; -import { setupClient } from '../../../utils/setup'; import { getPrng } from '../../../utils/getters'; import { deriveED25519Key, prandomBuf } from '../../../utils/helpers'; import { runGeneric } from '../../../utils/runners'; +import { setupClient } from '../../../utils/setup'; import { TEST_SEED } from '../../../utils/testConstants'; +import type { Client } from '../../../../client'; //--------------------------------------- // STATE DATA @@ -33,7 +34,7 @@ const DEFAULT_SOLANA_SIGNER_PATH = [ const prng = getPrng(); describe('[Solana]', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); diff --git a/packages/sdk/src/__test__/e2e/signing/solana/solana.versioned.test.ts b/packages/sdk/src/__test__/e2e/signing/solana/solana.versioned.test.ts index 87d7e24f..249d05c5 100644 --- a/packages/sdk/src/__test__/e2e/signing/solana/solana.versioned.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/solana/solana.versioned.test.ts @@ -14,7 +14,7 @@ import { PublicKey, SystemProgram, Transaction, - TransactionInstruction, + type TransactionInstruction, TransactionMessage, VersionedTransaction, } from '@solana/web3.js'; diff --git a/packages/sdk/src/__test__/e2e/signing/unformatted.test.ts b/packages/sdk/src/__test__/e2e/signing/unformatted.test.ts index c76ea72c..5ae2bcef 100644 --- a/packages/sdk/src/__test__/e2e/signing/unformatted.test.ts +++ b/packages/sdk/src/__test__/e2e/signing/unformatted.test.ts @@ -1,10 +1,11 @@ import { Constants } from '../../..'; +import { HARDENED_OFFSET } from '../../../constants'; import { getNumIter } from '../../utils/builders'; +import { getPrng } from '../../utils/getters'; import { ethPersonalSignMsg, prandomBuf } from '../../utils/helpers'; import { runGeneric } from '../../utils/runners'; -import { HARDENED_OFFSET } from '../../../constants'; -import { getPrng } from '../../utils/getters'; import { setupClient } from '../../utils/setup'; +import type { Client } from '../../../client'; const prng = getPrng(); const numIter = getNumIter(); @@ -17,7 +18,7 @@ const DEFAULT_SIGNER = [ ]; describe('[Unformatted]', () => { - let client; + let client: Client; beforeAll(async () => { client = await setupClient(); @@ -120,19 +121,23 @@ describe('[Unformatted]', () => { // Legacy request const legacyReq = { - currency: 'ETH_MSG', + currency: 'ETH_MSG' as const, data: { signerPath: req.data.signerPath, payload: msg, - protocol: 'signPersonal', + protocol: 'signPersonal' as const, + curveType: Constants.SIGNING.CURVES.SECP256K1, + hashType: Constants.SIGNING.HASHES.KECCAK256, }, }; - const respLegacy = await client.sign(legacyReq); + const respLegacy = await client.sign( + legacyReq as Parameters[0], + ); - const genSigR = respGeneric.sig?.r.toString('hex') ?? ''; - const genSigS = respGeneric.sig?.s.toString('hex') ?? ''; - const legSigR = respLegacy.sig?.r.toString('hex') ?? ''; - const legSigS = respLegacy.sig?.s.toString('hex') ?? ''; + const genSigR = (respGeneric.sig?.r as Buffer)?.toString('hex') ?? ''; + const genSigS = (respGeneric.sig?.s as Buffer)?.toString('hex') ?? ''; + const legSigR = (respLegacy.sig?.r as Buffer)?.toString('hex') ?? ''; + const legSigS = (respLegacy.sig?.s as Buffer)?.toString('hex') ?? ''; const genSig = `${genSigR}${genSigS}`; const legSig = `${legSigR}${legSigS}`; diff --git a/packages/sdk/src/__test__/e2e/signing/vectors.ts b/packages/sdk/src/__test__/e2e/signing/vectors.ts index df5bf1c6..752df529 100644 --- a/packages/sdk/src/__test__/e2e/signing/vectors.ts +++ b/packages/sdk/src/__test__/e2e/signing/vectors.ts @@ -467,7 +467,7 @@ export const EDGE_CASE_TEST_VECTORS: TestVector[] = [ type: 'eip1559', to: '0xe242e54155b1abc71fc118065270cecaaf8b7768' as `0x${string}`, value: BigInt(0), - data: ('0x' + 'a'.repeat(1000)) as `0x${string}`, // Large data payload + data: `0x${'a'.repeat(1000)}` as `0x${string}`, // Large data payload nonce: 0, maxFeePerGas: BigInt('30000000000'), // 30 gwei maxPriorityFeePerGas: BigInt('2000000000'), // 2 gwei @@ -632,7 +632,7 @@ export const EDGE_CASE_TEST_VECTORS: TestVector[] = [ type: 'eip1559', to: undefined, // Contract creation value: BigInt(0), - data: ('0x' + '60'.repeat(96)) as `0x${string}`, // Simple contract bytecode + data: `0x${'60'.repeat(96)}` as `0x${string}`, // Simple contract bytecode nonce: 0, maxFeePerGas: BigInt('30000000000'), // 30 gwei maxPriorityFeePerGas: BigInt('2000000000'), // 2 gwei @@ -647,7 +647,7 @@ export const EDGE_CASE_TEST_VECTORS: TestVector[] = [ type: 'eip2930', to: undefined, // Contract creation value: BigInt(0), - data: ('0x' + '60'.repeat(96)) as `0x${string}`, // Simple contract bytecode + data: `0x${'60'.repeat(96)}` as `0x${string}`, // Simple contract bytecode nonce: 0, gasPrice: BigInt('25000000000'), // 25 gwei gas: BigInt('2000000'), // High gas for contract creation @@ -865,7 +865,7 @@ export const PAYLOAD_SIZE_VECTORS: TestVector[] = [ maxPriorityFeePerGas: BigInt('2000000000'), // 2 gwei gas: BigInt('50000'), chainId: 1, - data: ('0x' + '00'.repeat(32)) as `0x${string}`, + data: `0x${'00'.repeat(32)}` as `0x${string}`, }, category: 'small-data', }, @@ -880,7 +880,7 @@ export const PAYLOAD_SIZE_VECTORS: TestVector[] = [ maxPriorityFeePerGas: BigInt('2000000000'), // 2 gwei gas: BigInt('100000'), chainId: 1, - data: ('0x' + 'ab'.repeat(256)) as `0x${string}`, + data: `0x${'ab'.repeat(256)}` as `0x${string}`, }, category: 'medium-data', }, @@ -895,7 +895,7 @@ export const PAYLOAD_SIZE_VECTORS: TestVector[] = [ maxPriorityFeePerGas: BigInt('3000000000'), // 3 gwei gas: BigInt('500000'), chainId: 1, - data: ('0x' + 'cd'.repeat(1024)) as `0x${string}`, + data: `0x${'cd'.repeat(1024)}` as `0x${string}`, }, category: 'large-data', }, @@ -910,7 +910,7 @@ export const PAYLOAD_SIZE_VECTORS: TestVector[] = [ maxPriorityFeePerGas: BigInt('3000000000'), // 3 gwei gas: BigInt('1000000'), chainId: 1, - data: ('0x' + 'ef'.repeat(2000)) as `0x${string}`, + data: `0x${'ef'.repeat(2000)}` as `0x${string}`, }, category: 'very-large-data', }, @@ -1021,7 +1021,7 @@ export const REAL_WORLD_PATTERN_VECTORS: TestVector[] = [ type: 'eip1559', to: '0xe242e54155b1abc71fc118065270cecaaf8b7768' as `0x${string}`, value: BigInt(0), - data: ('0x8d80ff0a' + '00'.repeat(500)) as `0x${string}`, // multiSend with batch data + data: `0x8d80ff0a${'00'.repeat(500)}` as `0x${string}`, // multiSend with batch data nonce: 15, maxFeePerGas: BigInt('40000000000'), // 40 gwei maxPriorityFeePerGas: BigInt('4000000000'), // 4 gwei @@ -1060,7 +1060,7 @@ export function getVectorsByCategory(category: string): TestVector[] { /** * Get a specific number of vectors from each transaction type for balanced testing */ -export function getBalancedTestVectors(perType: number = 3): TestVector[] { +export function getBalancedTestVectors(perType = 3): TestVector[] { const legacyVectors = LEGACY_VECTORS.slice(0, perType); const eip1559Vectors = EIP1559_TEST_VECTORS.slice(0, perType); const eip2930Vectors = EIP2930_TEST_VECTORS.slice(0, perType); diff --git a/packages/sdk/src/__test__/integration/__mocks__/handlers.ts b/packages/sdk/src/__test__/integration/__mocks__/handlers.ts index 88258130..80e26132 100644 --- a/packages/sdk/src/__test__/integration/__mocks__/handlers.ts +++ b/packages/sdk/src/__test__/integration/__mocks__/handlers.ts @@ -1,25 +1,25 @@ import { http, HttpResponse } from 'msw'; -import connectResponse from './connect.json'; -import getAddressesResponse from './getAddresses.json'; -import signResponse from './sign.json'; -import fetchActiveWalletResponse from './fetchActiveWallet.json'; -import addKvRecordsResponse from './addKvRecords.json'; -import getKvRecordsResponse from './getKvRecords.json'; -import removeKvRecordsResponse from './removeKvRecords.json'; -import { - etherscanResponse0x06412d7e, - etherscanResponse0x7a250d56, - etherscanResponse0xa0b86991, - etherscanResponse0xc36442b6, -} from './etherscan'; import { fourbyteResponse0c49ccbe, - fourbyteResponse0x38ed1739, fourbyteResponse0x6a761202, + fourbyteResponse0x38ed1739, fourbyteResponse0xa9059cbb, fourbyteResponseac9650d8, fourbyteResponsefc6f7865, } from './4byte'; +import addKvRecordsResponse from './addKvRecords.json'; +import connectResponse from './connect.json'; +import { + etherscanResponse0x06412d7e, + etherscanResponse0x7a250d56, + etherscanResponse0xa0b86991, + etherscanResponse0xc36442b6, +} from './etherscan'; +import fetchActiveWalletResponse from './fetchActiveWallet.json'; +import getAddressesResponse from './getAddresses.json'; +import getKvRecordsResponse from './getKvRecords.json'; +import removeKvRecordsResponse from './removeKvRecords.json'; +import signResponse from './sign.json'; export const handlers = [ http.post('https://signing.gridpl.us/test/connect', () => { diff --git a/packages/sdk/src/__test__/unit/compareEIP7702Serialization.test.ts b/packages/sdk/src/__test__/unit/compareEIP7702Serialization.test.ts index 618fa50f..4eb31b8e 100644 --- a/packages/sdk/src/__test__/unit/compareEIP7702Serialization.test.ts +++ b/packages/sdk/src/__test__/unit/compareEIP7702Serialization.test.ts @@ -151,16 +151,8 @@ describe('EIP7702 Transaction Serialization Comparison', () => { const viemSerialized = serializeTransaction(viemTx as any); // Compute hashes for comparison - const ourHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex')), - ).toString('hex'); - const viemHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex')), - ).toString('hex'); + const ourHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex'))).toString('hex')}`; + const viemHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex'))).toString('hex')}`; // Output for debugging console.log('Our serialized:', ourSerialized); @@ -251,16 +243,8 @@ describe('EIP7702 Transaction Serialization Comparison', () => { const viemSerialized = serializeTransaction(viemTx as any); // Compute hashes for comparison - const ourHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex')), - ).toString('hex'); - const viemHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex')), - ).toString('hex'); + const ourHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex'))).toString('hex')}`; + const viemHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex'))).toString('hex')}`; // Output for debugging console.log('Our serialized (auth list):', ourSerialized); @@ -332,16 +316,8 @@ describe('EIP7702 Transaction Serialization Comparison', () => { const viemSerialized = serializeTransaction(viemTx as any); // Compute hashes for comparison - const ourHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex')), - ).toString('hex'); - const viemHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex')), - ).toString('hex'); + const ourHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex'))).toString('hex')}`; + const viemHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex'))).toString('hex')}`; // Output for debugging console.log('Our serialized (realistic):', ourSerialized); @@ -412,16 +388,8 @@ describe('EIP7702 Transaction Serialization Comparison', () => { const viemSerialized = serializeTransaction(viemTx as any); // Compute hashes for comparison - const ourHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex')), - ).toString('hex'); - const viemHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex')), - ).toString('hex'); + const ourHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(ourSerialized.slice(2), 'hex'))).toString('hex')}`; + const viemHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(viemSerialized.slice(2), 'hex'))).toString('hex')}`; // Output for debugging console.log('Our serialized (contract auth):', ourSerialized); diff --git a/packages/sdk/src/__test__/unit/decoders.test.ts b/packages/sdk/src/__test__/unit/decoders.test.ts index 3039cf17..9ab692fc 100644 --- a/packages/sdk/src/__test__/unit/decoders.test.ts +++ b/packages/sdk/src/__test__/unit/decoders.test.ts @@ -5,7 +5,7 @@ import { decodeGetKvRecordsResponse, decodeSignResponse, } from '../../functions'; -import { DecodeSignResponseParams } from '../../types'; +import type { DecodeSignResponseParams } from '../../types'; import { clientKeyPair, connectDecoderData, diff --git a/packages/sdk/src/__test__/unit/eip7702.test.ts b/packages/sdk/src/__test__/unit/eip7702.test.ts index 9c4329db..080f111f 100644 --- a/packages/sdk/src/__test__/unit/eip7702.test.ts +++ b/packages/sdk/src/__test__/unit/eip7702.test.ts @@ -1,10 +1,10 @@ -import { - EIP7702AuthTransactionRequest, +import { Hash } from 'ox'; +import { parseEther, toHex } from 'viem'; +import { serializeEIP7702Transaction } from '../../ethereum'; +import type { EIP7702AuthListTransactionRequest, + EIP7702AuthTransactionRequest, } from '../../types'; -import { serializeEIP7702Transaction } from '../../ethereum'; -import { parseEther, toHex } from 'viem'; -import { Hash } from 'ox'; describe('EIP-7702 Transaction Serialization', () => { /** @@ -45,11 +45,7 @@ describe('EIP-7702 Transaction Serialization', () => { const serialized = serializeEIP7702Transaction(tx); // Compute the keccak256 hash of the serialized transaction - const txHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(serialized.slice(2), 'hex')), - ).toString('hex'); + const txHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(serialized.slice(2), 'hex'))).toString('hex')}`; // Store the serialized value for debugging console.log('Serialized transaction:', serialized); @@ -106,11 +102,7 @@ describe('EIP-7702 Transaction Serialization', () => { const serialized = serializeEIP7702Transaction(tx); // Compute the keccak256 hash of the serialized transaction - const txHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(serialized.slice(2), 'hex')), - ).toString('hex'); + const txHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(serialized.slice(2), 'hex'))).toString('hex')}`; // Store the serialized value for debugging console.log('Serialized auth list transaction:', serialized); @@ -162,11 +154,7 @@ describe('EIP-7702 Transaction Serialization', () => { const serialized = serializeEIP7702Transaction(tx); // Compute the keccak256 hash of the serialized transaction - const txHash = - '0x' + - Buffer.from( - Hash.keccak256(Buffer.from(serialized.slice(2), 'hex')), - ).toString('hex'); + const txHash = `0x${Buffer.from(Hash.keccak256(Buffer.from(serialized.slice(2), 'hex'))).toString('hex')}`; console.log('Reference serialized transaction:', serialized); console.log('Reference transaction hash:', txHash); diff --git a/packages/sdk/src/__test__/unit/ethereum.validate.test.ts b/packages/sdk/src/__test__/unit/ethereum.validate.test.ts index dac12126..18c696c9 100644 --- a/packages/sdk/src/__test__/unit/ethereum.validate.test.ts +++ b/packages/sdk/src/__test__/unit/ethereum.validate.test.ts @@ -1,14 +1,14 @@ import { + type MessageTypes, SignTypedDataVersion, TypedDataUtils, - type MessageTypes, type TypedMessage, } from '@metamask/eth-sig-util'; import { ecsign, privateToAddress } from 'ethereumjs-util'; import { mnemonicToAccount } from 'viem/accounts'; import { HARDENED_OFFSET } from '../../constants'; import ethereum from '../../ethereum'; -import { buildFirmwareConstants, DEFAULT_SIGNER } from '../utils/builders'; +import { DEFAULT_SIGNER, buildFirmwareConstants } from '../utils/builders'; import { TEST_MNEMONIC } from '../utils/testConstants'; const typedData: TypedMessage = { @@ -32,7 +32,9 @@ const typedData: TypedMessage = { describe('validateEthereumMsgResponse', () => { it('recovers expected signature for EIP712 payload', () => { const account = mnemonicToAccount(TEST_MNEMONIC); - const priv = Buffer.from(account.getHdKey().privateKey!); + const hdKey = account.getHdKey(); + if (!hdKey.privateKey) throw new Error('No private key'); + const priv = Buffer.from(hdKey.privateKey); const signer = privateToAddress(priv); const digest = TypedDataUtils.eip712Hash( typedData, @@ -70,7 +72,9 @@ describe('validateEthereumMsgResponse', () => { }); const account = mnemonicToAccount(TEST_MNEMONIC); - const priv = Buffer.from(account.getHdKey().privateKey!); + const hdKey = account.getHdKey(); + if (!hdKey.privateKey) throw new Error('No private key'); + const priv = Buffer.from(hdKey.privateKey); const signer = privateToAddress(priv); const digest = TypedDataUtils.eip712Hash( typedData, diff --git a/packages/sdk/src/__test__/unit/module.interop.test.ts b/packages/sdk/src/__test__/unit/module.interop.test.ts index 89127b8e..98bed751 100644 --- a/packages/sdk/src/__test__/unit/module.interop.test.ts +++ b/packages/sdk/src/__test__/unit/module.interop.test.ts @@ -1,3 +1,4 @@ +import { execSync, spawnSync } from 'node:child_process'; import { existsSync, mkdirSync, @@ -8,7 +9,6 @@ import { import os from 'node:os'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { execSync, spawnSync } from 'node:child_process'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/packages/sdk/src/__test__/unit/parseGenericSigningResponse.test.ts b/packages/sdk/src/__test__/unit/parseGenericSigningResponse.test.ts index e9750546..8874c50d 100644 --- a/packages/sdk/src/__test__/unit/parseGenericSigningResponse.test.ts +++ b/packages/sdk/src/__test__/unit/parseGenericSigningResponse.test.ts @@ -1,5 +1,5 @@ +import { Buffer } from 'node:buffer'; import { RLP } from '@ethereumjs/rlp'; -import { Buffer } from 'buffer'; import { Hash } from 'ox'; import secp256k1 from 'secp256k1'; import { parseGenericSigningResponse } from '../../genericSigning'; diff --git a/packages/sdk/src/__test__/unit/personalSignValidation.test.ts b/packages/sdk/src/__test__/unit/personalSignValidation.test.ts index 5ad98018..ee225c57 100644 --- a/packages/sdk/src/__test__/unit/personalSignValidation.test.ts +++ b/packages/sdk/src/__test__/unit/personalSignValidation.test.ts @@ -1,4 +1,4 @@ -import { Buffer } from 'buffer'; +import { Buffer } from 'node:buffer'; import { Hash } from 'ox'; import secp256k1 from 'secp256k1'; import { addRecoveryParam } from '../../ethereum'; diff --git a/packages/sdk/src/__test__/unit/signatureUtils.test.ts b/packages/sdk/src/__test__/unit/signatureUtils.test.ts index e645d176..f1dfbec7 100644 --- a/packages/sdk/src/__test__/unit/signatureUtils.test.ts +++ b/packages/sdk/src/__test__/unit/signatureUtils.test.ts @@ -1,4 +1,4 @@ -import { Buffer } from 'buffer'; +import { Buffer } from 'node:buffer'; import { Hash } from 'ox'; import secp256k1 from 'secp256k1'; import { getV, getYParity, randomBytes } from '../../util'; @@ -119,7 +119,7 @@ describe('getYParity', () => { it('should handle hex string as pre-computed hash', () => { // When passing a hex string, it's treated as a pre-computed hash const hash = randomBytes(32); - const txHex = '0x' + hash.toString('hex'); + const txHex = `0x${hash.toString('hex')}`; const { signature, publicKey, recovery } = createValidSignature(hash); const resp = { @@ -424,7 +424,7 @@ describe('getV function', () => { ), }, // This is a fake pubkey, so recovery will fail - pubkey: Buffer.from('04' + '1'.repeat(128), 'hex'), + pubkey: Buffer.from(`04${'1'.repeat(128)}`, 'hex'), }; expect(() => getV(signedTx, mockResp)).toThrow(); @@ -436,10 +436,10 @@ describe('getV function', () => { const mockResp = { sig: { - r: '0x' + '1'.repeat(64), // 32 bytes as hex string - s: '0x' + '2'.repeat(64), // 32 bytes as hex string + r: `0x${'1'.repeat(64)}`, // 32 bytes as hex string + s: `0x${'2'.repeat(64)}`, // 32 bytes as hex string }, - pubkey: Buffer.from('04' + '1'.repeat(128), 'hex'), + pubkey: Buffer.from(`04${'1'.repeat(128)}`, 'hex'), }; expect(() => getV(txHex, mockResp)).toThrow(); diff --git a/packages/sdk/src/__test__/unit/validators.test.ts b/packages/sdk/src/__test__/unit/validators.test.ts index 9f0b6522..a50978ed 100644 --- a/packages/sdk/src/__test__/unit/validators.test.ts +++ b/packages/sdk/src/__test__/unit/validators.test.ts @@ -1,3 +1,4 @@ +import { normalizeToViemTransaction } from '../../ethereum'; import { validateAddKvRequest, validateConnectRequest, @@ -9,7 +10,6 @@ import { isValid4ByteResponse, isValidBlockExplorerResponse, } from '../../shared/validators'; -import { normalizeToViemTransaction } from '../../ethereum'; import { buildGetAddressesObject, buildValidateConnectObject, @@ -147,11 +147,11 @@ describe('validators', () => { describe('EIP-7702 transactions', () => { test('rejects missing fee fields', () => { const tx = { - to: '0x' + '1'.repeat(40), + to: `0x${'1'.repeat(40)}`, value: '1000000000000000000', chainId: 1, authorizationList: [ - { chainId: 1, address: '0x' + '2'.repeat(40), nonce: 0 }, + { chainId: 1, address: `0x${'2'.repeat(40)}`, nonce: 0 }, ], gasPrice: '15000000000', }; @@ -163,7 +163,7 @@ describe('validators', () => { describe('negative values', () => { test('rejects negative value', () => { const tx = { - to: '0x' + '1'.repeat(40), + to: `0x${'1'.repeat(40)}`, value: -100, gasPrice: '10000000000', }; @@ -173,7 +173,7 @@ describe('validators', () => { test('rejects negative nonce', () => { const tx = { - to: '0x' + '1'.repeat(40), + to: `0x${'1'.repeat(40)}`, value: '100', gasPrice: '10000000000', nonce: -1, @@ -184,7 +184,7 @@ describe('validators', () => { test('rejects negative gas price', () => { const tx = { - to: '0x' + '1'.repeat(40), + to: `0x${'1'.repeat(40)}`, value: '100', gasPrice: -10, }; @@ -199,7 +199,7 @@ describe('validators', () => { to: '0x1234567890123456789012345678901234567890', value: true, chainId: '0x1', - gasPrice: NaN, + gasPrice: Number.NaN, nonce: null, data: false, }; diff --git a/packages/sdk/src/__test__/utils/builders.ts b/packages/sdk/src/__test__/utils/builders.ts index 78f07bfe..0e3b8a50 100644 --- a/packages/sdk/src/__test__/utils/builders.ts +++ b/packages/sdk/src/__test__/utils/builders.ts @@ -1,23 +1,23 @@ import { Common, Hardfork, Mainnet } from '@ethereumjs/common'; import { RLP } from '@ethereumjs/rlp'; -import { createTx, type TypedTransaction } from '@ethereumjs/tx'; +import { type TypedTransaction, createTx } from '@ethereumjs/tx'; import { generate as randomWords } from 'random-words'; import { Constants } from '../..'; import { Client } from '../../client'; import { CURRENCIES, - getFwVersionConst, HARDENED_OFFSET, + getFwVersionConst, } from '../../constants'; -import type { Currency, SigningPath, SignRequestParams } from '../../types'; +import type { Currency, SignRequestParams, SigningPath } from '../../types'; import type { FirmwareConstants } from '../../types/firmware'; import { randomBytes } from '../../util'; import { MSG_PAYLOAD_METADATA_SZ } from './constants'; import { getN, getPrng } from './getters'; import { BTC_PURPOSE_P2PKH, - buildRandomEip712Object, ETH_COIN, + buildRandomEip712Object, getTestVectors, } from './helpers'; @@ -120,7 +120,7 @@ export const buildSharedSecret = () => { }; export const getNumIter = (n: number | string | undefined = getN()) => - n ? parseInt(`${n}`) : 5; + n ? Number.parseInt(`${n}`) : 5; /** Generate a bunch of random test vectors using the PRNG */ export const buildRandomVectors = (n: number | string | undefined = getN()) => { @@ -225,13 +225,15 @@ export const buildTxReq = (tx: TypedTransaction) => ({ export const buildMsgReq = ( payload = 'hello ethereum', - protocol = 'signPersonal', + protocol: 'signPersonal' | 'eip712' = 'signPersonal', ) => ({ - currency: 'ETH_MSG', + currency: 'ETH_MSG' as const, data: { signerPath: DEFAULT_SIGNER, protocol, payload, + curveType: Constants.SIGNING.CURVES.SECP256K1, + hashType: Constants.SIGNING.HASHES.KECCAK256, }, }); @@ -288,14 +290,14 @@ export const buildEncDefs = (vectors: any) => { return { encDefs, encDefsCalldata }; }; -export function buildRandomMsg(type = 'signPersonal', client: Client) { +export function buildRandomMsg(type, client: Client) { function randInt(n: number) { return Math.floor(n * prng.quick()); } if (type === 'signPersonal') { // A random string will do - const isHexStr = randInt(2) > 0 ? true : false; + const isHexStr = randInt(2) > 0; const fwConstants = client.getFwConstants(); const L = randInt(fwConstants.ethMaxDataSz - MSG_PAYLOAD_METADATA_SZ); if (isHexStr) return `0x${randomBytes(L).toString('hex')}`; diff --git a/packages/sdk/src/__test__/utils/ethers.ts b/packages/sdk/src/__test__/utils/ethers.ts index d77aa3e3..a0dbf54f 100644 --- a/packages/sdk/src/__test__/utils/ethers.ts +++ b/packages/sdk/src/__test__/utils/ethers.ts @@ -9,7 +9,7 @@ const EVM_TYPES = [ 'tuple', ]; -export function convertDecoderToEthers(def) { +export function convertDecoderToEthers(def: unknown[]) { const converted = getConvertedDef(def); const types: any[] = []; const data: any[] = []; @@ -24,35 +24,36 @@ export function convertDecoderToEthers(def) { // type names and data fields. The data should be random but it // doesn't matter much for these tests, which mainly just test // structure of the definitions -function getConvertedDef(def) { - const converted: any[] = []; - def.forEach((param) => { - const arrSzs = param[3]; - const evmType = EVM_TYPES[parseInt(param[1].toString('hex'), 16)]; +function getConvertedDef(def: unknown[]) { + const converted: { type: string | null; data: unknown }[] = []; + def.forEach((param: unknown) => { + const p = param as { toString: (fmt: string) => string }[]; + const arrSzs = p[3] as { toString: (fmt: string) => string }[]; + const evmType = EVM_TYPES[Number.parseInt(p[1].toString('hex'), 16)]; let type = evmType; - const numBytes = parseInt(param[2].toString('hex'), 16); + const numBytes = Number.parseInt(p[2].toString('hex'), 16); if (numBytes > 0) { type = `${type}${numBytes * 8}`; } // Handle tuples by recursively generating data - let tupleData; + let tupleData: unknown[] | undefined; if (evmType === 'tuple') { tupleData = []; type = `${type}(`; - const tupleDef = getConvertedDef(param[4]); - tupleDef.forEach((tupleParam: any) => { + const tupleDef = getConvertedDef(p[4] as unknown[]); + tupleDef.forEach((tupleParam) => { type = `${type}${tupleParam.type}, `; - tupleData.push(tupleParam.data); + tupleData?.push(tupleParam.data); }); type = type.slice(0, type.length - 2); type = `${type})`; } // Get the data of a single function (i.e. excluding arrays) - const funcData = tupleData ? tupleData : genParamData(param); + const funcData = tupleData ? tupleData : genParamData(p); // Apply the data to arrays for (let i = 0; i < arrSzs.length; i++) { - const sz = parseInt(arrSzs[i].toString('hex')); - if (isNaN(sz)) { + const sz = Number.parseInt(arrSzs[i].toString('hex')); + if (Number.isNaN(sz)) { // This is a 0 size, which means we need to // define a size to generate data type = `${type}[]`; @@ -64,7 +65,7 @@ function getConvertedDef(def) { // across all dimensions. The individual params are already // arraified this way, but not the tuple type if (tupleData) { - converted.push({ type, data: getArrayData(param, funcData) }); + converted.push({ type, data: getArrayData(p, funcData) }); } else { converted.push({ type, data: funcData }); } @@ -72,33 +73,40 @@ function getConvertedDef(def) { return converted; } -function genTupleData(tupleParam) { - const nestedData: any = []; - tupleParam.forEach((nestedParam) => { +function genTupleData(tupleParam: unknown[]) { + const nestedData: unknown[] = []; + tupleParam.forEach((nestedParam: unknown) => { + const np = nestedParam as { toString: (fmt: string) => string }[]; nestedData.push( - genData( - EVM_TYPES[parseInt(nestedParam[1].toString('hex'), 16)] ?? '', - nestedParam, - ), + genData(EVM_TYPES[Number.parseInt(np[1].toString('hex'), 16)] ?? '', np), ); }); return nestedData; } -function genParamData(param: any[]) { - const evmType = EVM_TYPES[parseInt(param[1].toString('hex'), 16)] ?? ''; +function genParamData(param: { toString: (fmt: string) => string }[]) { + const evmType = + EVM_TYPES[Number.parseInt(param[1].toString('hex'), 16)] ?? ''; const baseData = genData(evmType, param); return getArrayData(param, baseData); } -function getArrayData(param: any, baseData: any) { - let arrayData, data; - const arrSzs = param[3]; +function getArrayData( + param: { toString: (fmt: string) => string }[], + baseData: unknown, +) { + let arrayData: unknown[] | undefined; + let data: unknown; + const arrSzs = param[3] as unknown as { toString: (fmt: string) => string }[]; for (let i = 0; i < arrSzs.length; i++) { // let sz = parseInt(arrSzs[i].toString('hex')); TODO: fix this - const dimData: any = []; - let sz = parseInt(param[3][i].toString('hex')); - if (isNaN(sz)) { + const dimData: unknown[] = []; + let sz = Number.parseInt( + (param[3] as unknown as { toString: (fmt: string) => string }[])[ + i + ].toString('hex'), + ); + if (Number.isNaN(sz)) { sz = 2; //1; } if (!arrayData) { @@ -120,7 +128,7 @@ function getArrayData(param: any, baseData: any) { return data; } -function genData(type: string, param: any[]) { +function genData(type: string, param: { toString: (fmt: string) => string }[]) { switch (type) { case 'address': return '0xdead00000000000000000000000000000000beef'; @@ -138,7 +146,7 @@ function genData(type: string, param: any[]) { if (!param || param.length < 4) { throw new Error('Invalid tuple data'); } - return genTupleData(param[4]); + return genTupleData(param[4] as unknown[]); default: throw new Error('Unrecognized type'); } diff --git a/packages/sdk/src/__test__/utils/getters.ts b/packages/sdk/src/__test__/utils/getters.ts index efdc4434..f9ccf730 100644 --- a/packages/sdk/src/__test__/utils/getters.ts +++ b/packages/sdk/src/__test__/utils/getters.ts @@ -4,12 +4,12 @@ export const getEnv = () => { if (!process.env) throw new Error('env cannot be found'); return process.env; }; -export const getDeviceId = (): string => getEnv()['DEVICE_ID'] ?? ''; -export const getN = (): number => parseInt(getEnv()['N'] ?? '5'); -export const getSeed = (): string => getEnv()['SEED'] ?? 'myrandomseed'; -export const getTestnet = (): string => getEnv()['TESTNET'] ?? ''; -export const getEtherscanKey = (): string => getEnv()['ETHERSCAN_KEY'] ?? ''; -export const getEncPw = (): string => getEnv()['ENC_PW'] ?? null; +export const getDeviceId = (): string => getEnv().DEVICE_ID ?? ''; +export const getN = (): number => Number.parseInt(getEnv().N ?? '5'); +export const getSeed = (): string => getEnv().SEED ?? 'myrandomseed'; +export const getTestnet = (): string => getEnv().TESTNET ?? ''; +export const getEtherscanKey = (): string => getEnv().ETHERSCAN_KEY ?? ''; +export const getEncPw = (): string => getEnv().ENC_PW ?? null; export const getPrng = (seed?: string) => { return seedrandom(seed ? seed : getSeed()); diff --git a/packages/sdk/src/__test__/utils/helpers.ts b/packages/sdk/src/__test__/utils/helpers.ts index 749919e6..75189c15 100644 --- a/packages/sdk/src/__test__/utils/helpers.ts +++ b/packages/sdk/src/__test__/utils/helpers.ts @@ -20,8 +20,8 @@ import { Constants } from '../..'; import { Client } from '../../client'; import { BIP_CONSTANTS, - ethMsgProtocol, HARDENED_OFFSET, + ethMsgProtocol, } from '../../constants'; import { ProtocolConstants } from '../../protocol'; import { getPathStr } from '../../shared/utilities'; @@ -138,7 +138,7 @@ export function setupTestClient( // Separate check -- if we are connecting for the first time but want to be able // to reconnect quickly with the same device ID as an env var, we need to pair // with a reusable key - if (parseInt(env.REUSE_KEY) === 1) { + if (Number.parseInt(env.REUSE_KEY) === 1) { setup.privKey = Buffer.from(REUSABLE_KEY, 'hex'); } // Initialize a global SDK client @@ -224,7 +224,8 @@ export function _start_tx_builder( const pubkeyBuf = Buffer.from(keyPair.publicKey); const p2pkh = bitcoin.payments.p2pkh({ pubkey: pubkeyBuf, network }); // For P2WPKH and P2SH-P2WPKH the BIP143 scriptCode is the standard P2PKH script - const scriptCode = p2pkh.output!; + if (!p2pkh.output) throw new Error('No P2PKH output'); + const scriptCode = p2pkh.output; inputsMeta.push({ scriptCode, value: input.value }); }); return { tx, inputsMeta }; @@ -471,8 +472,8 @@ export const gpErrors = { //--------------------------------------------------- export const getCodeMsg = (code, expected) => { if (code !== expected) { - let codeTxt = code, - expectedTxt = expected; + let codeTxt = code; + let expectedTxt = expected; Object.keys(gpErrors).forEach((key) => { if (code === gpErrors[key]) { codeTxt = key; @@ -686,7 +687,7 @@ export const validateDerivedPublicKeys = ( }; export const ethPersonalSignMsg = (msg) => - '\u0019Ethereum Signed Message:\n' + String(msg.length) + msg; + `\u0019Ethereum Signed Message:\n${String(msg.length)}${msg}`; //--------------------------------------------------- // Sign Transaction helpers @@ -845,7 +846,7 @@ export const serializeLoadSeedJobData = (data) => { //--------------------------------------------------- export const buildRandomEip712Object = (randInt) => { function randStr(n) { - const words = wordlists['english']; + const words = wordlists.english; let s = ''; while (s.length < n) { s += `${words?.[randInt(words?.length)]}_`; @@ -869,17 +870,17 @@ export const buildRandomEip712Object = (randInt) => { } function getRandomEIP712Val(type) { if (type !== 'bytes' && type.slice(0, 5) === 'bytes') { - return `0x${randomBytes(parseInt(type.slice(5))).toString('hex')}`; + return `0x${randomBytes(Number.parseInt(type.slice(5))).toString('hex')}`; } if (type === 'uint' || type.indexOf('uint') === 0) { - const bits = parseInt(type.slice(4) || '256', 10); + const bits = Number.parseInt(type.slice(4) || '256', 10); const byteLength = Math.max(1, Math.ceil(bits / 8)); return `0x${randomBytes(byteLength).toString('hex')}`; } if (type === 'int' || type.indexOf('int') === 0) { - const bits = parseInt(type.slice(3) || '256', 10); + const bits = Number.parseInt(type.slice(3) || '256', 10); const byteLength = Math.max(1, Math.ceil(bits / 8)); const raw = randomBytes(byteLength).toString('hex'); const modulus = 1n << BigInt(bits); @@ -897,7 +898,7 @@ export const buildRandomEip712Object = (randInt) => { case 'string': return randStr(100); case 'bool': - return randInt(1) > 0 ? true : false; + return randInt(1) > 0; case 'address': return `0x${randomBytes(20).toString('hex')}`; default: @@ -1035,7 +1036,7 @@ export const getSigStr = (resp: any, tx?: TypedTransaction) => { if (resp.sig.v !== undefined) { const vBuf = normalizeSigComponent(resp.sig.v); const vHex = vBuf.toString('hex'); - let vInt = vHex ? parseInt(vHex, 16) : 0; + let vInt = vHex ? Number.parseInt(vHex, 16) : 0; if (!Number.isFinite(vInt)) { vInt = 0; } @@ -1142,9 +1143,11 @@ export const compressPubKey = (pub) => { }; function _stripTrailingCommas(input: string): string { + // Use non-backtracking pattern to avoid ReDoS vulnerability + // Unrolled loop for multi-line comments: \/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/ return input.replace( - /,\s*(?:(?:\/\/[^\n]*\n)|\/\*[\s\S]*?\*\/|\s)*([}\]])/g, - '$1', + /,([\s]*(?:\/\/[^\n]*\n[\s]*|\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/[\s]*)*)([}\]])/g, + '$1$2', ); } diff --git a/packages/sdk/src/__test__/utils/runners.ts b/packages/sdk/src/__test__/utils/runners.ts index 4db6bf4f..1302e5a7 100644 --- a/packages/sdk/src/__test__/utils/runners.ts +++ b/packages/sdk/src/__test__/utils/runners.ts @@ -1,9 +1,13 @@ -import { Client } from '../../client'; -import type { TestRequestPayload, SignRequestParams } from '../../types'; +import type { Client } from '../../client'; import { getEncodedPayload } from '../../genericSigning'; +import type { + SigningPayload, + SignRequestParams, + TestRequestPayload, +} from '../../types'; import { parseWalletJobResp, validateGenericSig } from './helpers'; -import { testRequest } from './testRequest'; import { TEST_SEED } from './testConstants'; +import { testRequest } from './testRequest'; export async function runTestCase( payload: TestRequestPayload, @@ -19,22 +23,18 @@ export async function runTestCase( export async function runGeneric(request: SignRequestParams, client: Client) { const response = await client.sign(request); + // runGeneric is only used for generic signing, not Bitcoin + const data = request.data as SigningPayload; // If no encoding type is specified we encode in hex or ascii - const encodingType = request.data.encodingType || null; + const encodingType = data.encodingType || null; const allowedEncodings = client.getFwConstants().genericSigning.encodingTypes; const { payloadBuf } = getEncodedPayload( - request.data.payload, + data.payload, encodingType, allowedEncodings, ); const seed = TEST_SEED; - validateGenericSig( - seed, - response.sig, - payloadBuf, - request.data, - response.pubkey, - ); + validateGenericSig(seed, response.sig, payloadBuf, data, response.pubkey); return response; } diff --git a/packages/sdk/src/__test__/utils/viemComparison.ts b/packages/sdk/src/__test__/utils/viemComparison.ts index 89ffd5b1..4f5fcab8 100644 --- a/packages/sdk/src/__test__/utils/viemComparison.ts +++ b/packages/sdk/src/__test__/utils/viemComparison.ts @@ -1,17 +1,17 @@ import { type Address, type Hex, - parseTransaction, - serializeTransaction, type TransactionSerializable, type TypedDataDefinition, + parseTransaction, + serializeTransaction, } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; import { sign, signMessage } from '../../api'; import { normalizeLatticeSignature } from '../../ethereum'; +import { ensureHexBuffer } from '../../util'; import { deriveAddress } from './determinism'; import { TEST_SEED } from './testConstants'; -import { ensureHexBuffer } from '../../util'; // Utility function to create foundry account address for comparison export const getFoundryAddress = (): Address => { @@ -45,14 +45,10 @@ export const signAndCompareTransaction = async ( // Sign with Lattice using the new sign API that accepts TransactionSerializable directly const latticeResult = await sign(tx).catch((err) => { if (err.responseCode === 128) { - err.message = - 'NOTE: You must have `FEATURE_TEST_RUNNER=1` enabled in firmware to run these tests.\n' + - err.message; + err.message = `NOTE: You must have \`FEATURE_TEST_RUNNER=1\` enabled in firmware to run these tests.\n${err.message}`; } if (err.responseCode === 132) { - err.message = - 'NOTE: Please approve the transaction on your Lattice device.\n' + - err.message; + err.message = `NOTE: Please approve the transaction on your Lattice device.\n${err.message}`; } throw err; }); @@ -109,15 +105,17 @@ export const signAndCompareTransaction = async ( const hexString = typeof value === 'string' ? value - : '0x' + Buffer.from(value).toString('hex'); + : `0x${Buffer.from(value).toString('hex')}`; const stripped = hexString.replace(/^0x/, '').toLowerCase(); return `0x${stripped.padStart(64, '0')}`; }; const latticeR = normalizeSigComponent(latticeResult.sig.r); const latticeS = normalizeSigComponent(latticeResult.sig.s); - const viemR = normalizeSigComponent(parsedViemTx.r!); - const viemS = normalizeSigComponent(parsedViemTx.s!); + if (!parsedViemTx.r || !parsedViemTx.s) + throw new Error('Missing signature components'); + const viemR = normalizeSigComponent(parsedViemTx.r); + const viemS = normalizeSigComponent(parsedViemTx.s); // Verify r and s components match exactly expect(latticeR).toBe(viemR); @@ -179,14 +177,10 @@ export const signAndCompareEIP712Message = async ( const latticeResult = await signMessage(latticePayload).catch((err) => { if (err.responseCode === 128) { - err.message = - 'NOTE: You must have `FEATURE_TEST_RUNNER=1` enabled in firmware to run these tests.\n' + - err.message; + err.message = `NOTE: You must have \`FEATURE_TEST_RUNNER=1\` enabled in firmware to run these tests.\n${err.message}`; } if (err.responseCode === 132) { - err.message = - 'NOTE: Please approve the message signature on your Lattice device.\n' + - err.message; + err.message = `NOTE: Please approve the message signature on your Lattice device.\n${err.message}`; } throw err; }); diff --git a/packages/sdk/src/__test__/vectors.jsonc b/packages/sdk/src/__test__/vectors.jsonc index 1bf9ad44..7287f8d3 100644 --- a/packages/sdk/src/__test__/vectors.jsonc +++ b/packages/sdk/src/__test__/vectors.jsonc @@ -14,18 +14,18 @@ // If you look at this example on Polygonscan, you'll notice the function being // called is not actually available in the source code of the contract... // So we needed to add a param to skip that test. - "skipBlockExplorerReq": true, + "skipBlockExplorerReq": true }, // swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, // address to, uint256 deadline) { "chainID": 1, - "hash": "0xeee0752109c6d31038bab6c2b0a3e3857e8bffb9c229de71f0196fda6fb28a5e", + "hash": "0xeee0752109c6d31038bab6c2b0a3e3857e8bffb9c229de71f0196fda6fb28a5e" }, // remove_liquidity_one_coin(uint256 _token_amount, int128 i, uint256 _min_amount) { "chainID": 1, - "hash": "0xa6173b4890303e12ca1b195ea4a04d8891b0d83768b734d2ecdb9c6dd9d828c4", + "hash": "0xa6173b4890303e12ca1b195ea4a04d8891b0d83768b734d2ecdb9c6dd9d828c4" }, // atomicMatch_(address[14],uint256[18],uint8[8],bytes,bytes,bytes,bytes,bytes,bytes, // uint8[2],bytes32[5]) @@ -34,39 +34,39 @@ // exactInput((bytes,address,uint256,uint256,uint256)) { "chainID": 1, - "hash": "0xee9710119c13dba6fe2de240ef1e24a2489e98d9c7dd5881e2901056764ee234", + "hash": "0xee9710119c13dba6fe2de240ef1e24a2489e98d9c7dd5881e2901056764ee234" }, // exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160)) { "chainID": 1, - "hash": "0xc33308ca105630b99a0c24ddde4f4506aa4115ec6f1a25f1138f3bd8cfa32b49", + "hash": "0xc33308ca105630b99a0c24ddde4f4506aa4115ec6f1a25f1138f3bd8cfa32b49" }, // proveAndClaimWithResolver(bytes,(bytes,bytes)[],bytes,address,address) { "chainID": 1, - "hash": "0xe15e6205c6696d444fc426468defdf08e89a0f5b3b8a17c68428f7aeefd53ca1", + "hash": "0xe15e6205c6696d444fc426468defdf08e89a0f5b3b8a17c68428f7aeefd53ca1" }, // bulkTransfer(((uint8,address,uint256,uint256)[],address,bool)[],bytes32) { "chainID": 1, - "hash": "0x6f0ba3cb3c08e0ee443e4b7a78e1397413762e63287e348829c18f287c5a457f", + "hash": "0x6f0ba3cb3c08e0ee443e4b7a78e1397413762e63287e348829c18f287c5a457f" }, // RECURSIVE DEFS // multicall(bytes[]) { "chainID": 1, - "hash": "0xf4c48f0300acb2982fe8861ffd9291634115a33dc4107a66b4f9f43efb66896b", + "hash": "0xf4c48f0300acb2982fe8861ffd9291634115a33dc4107a66b4f9f43efb66896b" }, // execTransaction(address,uint256,(disperseTokenSimple(address,address[],uint256[])),uint8,uint256,uint256,uint256,address,address,bytes) { "chainID": 1, - "hash": "0xb6349347a1dec402c59cd94c5715513af7ecf3e532376f2a5a47c99ee224de2a", + "hash": "0xb6349347a1dec402c59cd94c5715513af7ecf3e532376f2a5a47c99ee224de2a" }, // execTransaction(address,uint256,(multicall(bytes[])),uint8,uint256,uint256,uint256,address,address,bytes) { "chainID": 1, - "hash": "0x2af244a02066c0a8e3998d247e071a03cd38ecbec60f93ddf63da0dce3932f86", - }, + "hash": "0x2af244a02066c0a8e3998d247e071a03cd38ecbec60f93ddf63da0dce3932f86" + } ], // These are canonical ABI definitions that we use to test more unusual function types. // The names are parsed and dummy data is filled in (see helpers in ./evm.ts). @@ -159,7 +159,7 @@ "nestedTup((uint256,(bytes)[2],bool))", "nestedTup((bytes,(bytes)[2],bool))", "nestedTup(bytes,(uint256,(bool)[2],bool))", - "nestedTup(bytes,(uint256,(bytes)[2],bool))", + "nestedTup(bytes,(uint256,(bytes)[2],bool))" // --- // Extreme edge cases that do not currently decode // --- @@ -170,8 +170,8 @@ // "nestedTup(bytes,(uint256,(bool,bytes)[2],bool)[])", // does not decode // "nestedTup(bytes,(uint256,(bool,bytes)[2],bool)[2])", // does not decode // "nestedTup(bytes,(uint256,(bool,bytes)[][],bool)[2][])", // too large - ], - }, + ] + } }, "ethDeposit": { "mnemonic": "winner much erosion weird rubber onion diagram mandate assist fluid slush theory", @@ -188,7 +188,7 @@ "deposit_data_root": "aa95cc7b31056cbc524fb82bc5641f60a0f3592bf960bdc875d24b332cd730ca", "fork_version": "00000000", "network_name": "mainnet", - "deposit_cli_version": "2.3.0", + "deposit_cli_version": "2.3.0" }, "eth1WithdrawalRef": { "pubkey": "b77d6918d5edb4073a4ea4408073b698f00df478ff2726cdb8190e3be1fe5496f22b089f6ae4cf7cafaccb74683be5e4", @@ -199,8 +199,8 @@ "deposit_data_root": "603160dc42fe11f2e2c057c85179cc008dd64c9d11ae20b8ffc9a5ceecece847", "fork_version": "00000000", "network_name": "mainnet", - "deposit_cli_version": "2.3.0", - }, + "deposit_cli_version": "2.3.0" + } }, { "depositPath": [12381, 3600, 1, 0, 0], @@ -214,7 +214,7 @@ "deposit_data_root": "2dd6d49609584c73ec12194cb9a5f39841b6854e04e0df043bdb9eaa5b65bb86", "fork_version": "00000000", "network_name": "mainnet", - "deposit_cli_version": "2.3.0", + "deposit_cli_version": "2.3.0" }, "eth1WithdrawalRef": { "pubkey": "a0aa536f68981cb705e506036e40b4373f67e10ff66f64835d63ffb3ca5e5eeea5396b2569315b060f0b90a2862a740c", @@ -225,11 +225,11 @@ "deposit_data_root": "1cc71b9a34ef5730154985c36ac2f9e4f9017959c144e9083d0e8f79311eed59", "fork_version": "00000000", "network_name": "mainnet", - "deposit_cli_version": "2.3.0", - }, - }, - ], + "deposit_cli_version": "2.3.0" + } + } + ] }, // Dehydrated state for unit/integration tests - "dehydratedClientState": "{\"activeWallets\":{\"internal\":{\"uid\":\"162b56efe561c12bc93f703dc7026b3ec3d53923270c9259e2b08015fb9defd2\"},\"external\":{\"uid\":\"0000000000000000000000000000000000000000000000000000000000000000\"}},\"ephemeralPub\":\"04627c74680bee7907c07fdea2bde0ab1ac17c95213f379ccc1dce87f3586babe8ba0ed02688fd5539a54ea1b7b8ab0860d1853006f55f22a2e3ea4e190a17ab30\",\"fwVersion\":\"00110000\",\"deviceId\":\"Cd3dtg\",\"name\":\"SDK Test\",\"baseUrl\":\"https: //signing.gridpl.us\",\"privKey\":\"3fb53b677f73e4d2b8c89c303f6f6b349f0075ad88ea126cb9f6632085815dca\",\"retryCount\":3,\"timeout\":120000}", + "dehydratedClientState": "{\"activeWallets\":{\"internal\":{\"uid\":\"162b56efe561c12bc93f703dc7026b3ec3d53923270c9259e2b08015fb9defd2\"},\"external\":{\"uid\":\"0000000000000000000000000000000000000000000000000000000000000000\"}},\"ephemeralPub\":\"04627c74680bee7907c07fdea2bde0ab1ac17c95213f379ccc1dce87f3586babe8ba0ed02688fd5539a54ea1b7b8ab0860d1853006f55f22a2e3ea4e190a17ab30\",\"fwVersion\":\"00110000\",\"deviceId\":\"Cd3dtg\",\"name\":\"SDK Test\",\"baseUrl\":\"https: //signing.gridpl.us\",\"privKey\":\"3fb53b677f73e4d2b8c89c303f6f6b349f0075ad88ea126cb9f6632085815dca\",\"retryCount\":3,\"timeout\":120000}" } diff --git a/packages/sdk/src/api/addressTags.ts b/packages/sdk/src/api/addressTags.ts index fdf9b886..4e4ebcf5 100644 --- a/packages/sdk/src/api/addressTags.ts +++ b/packages/sdk/src/api/addressTags.ts @@ -1,6 +1,6 @@ -import { Client } from '../client'; +import type { Client } from '../client'; import { MAX_ADDR } from '../constants'; -import { AddressTag } from '../types'; +import type { AddressTag } from '../types'; import { queue } from './utilities'; /** diff --git a/packages/sdk/src/api/addresses.ts b/packages/sdk/src/api/addresses.ts index e5d1b4ad..c2414af3 100644 --- a/packages/sdk/src/api/addresses.ts +++ b/packages/sdk/src/api/addresses.ts @@ -16,12 +16,12 @@ import { SOLANA_DERIVATION, } from '../constants'; import { LatticeGetAddressesFlag } from '../protocol/latticeConstants'; -import { GetAddressesRequestParams, WalletPath } from '../types'; +import type { GetAddressesRequestParams, WalletPath } from '../types'; import { + getFlagFromPath, getStartPath, parseDerivationPathComponents, queue, - getFlagFromPath, } from './utilities'; type FetchAddressesParams = { diff --git a/packages/sdk/src/api/index.ts b/packages/sdk/src/api/index.ts index c65bd61d..4013e0f1 100644 --- a/packages/sdk/src/api/index.ts +++ b/packages/sdk/src/api/index.ts @@ -11,3 +11,5 @@ export { BTC_WRAPPED_SEGWIT_YPUB_PATH, BTC_SEGWIT_ZPUB_PATH, } from '../constants'; + +export type { AddressTag } from '../types'; diff --git a/packages/sdk/src/api/setup.ts b/packages/sdk/src/api/setup.ts index 491ac239..6471528f 100644 --- a/packages/sdk/src/api/setup.ts +++ b/packages/sdk/src/api/setup.ts @@ -1,6 +1,6 @@ import { Utils } from '..'; import { Client } from '../client'; -import { setSaveClient, setLoadClient, saveClient, loadClient } from './state'; +import { loadClient, saveClient, setLoadClient, setSaveClient } from './state'; import { buildLoadClientFn, buildSaveClientFn, queue } from './utilities'; /** diff --git a/packages/sdk/src/api/signing.ts b/packages/sdk/src/api/signing.ts index 3b8fc54a..fd98777a 100644 --- a/packages/sdk/src/api/signing.ts +++ b/packages/sdk/src/api/signing.ts @@ -1,12 +1,12 @@ import { RLP } from '@ethereumjs/rlp'; import { Hash } from 'ox'; import { - serializeTransaction, type Address, type Authorization, type Hex, type TransactionSerializable, type TransactionSerializableEIP7702, + serializeTransaction, } from 'viem'; import { Constants } from '..'; import { @@ -18,12 +18,12 @@ import { SOLANA_DERIVATION, } from '../constants'; import { fetchDecoder } from '../functions/fetchDecoder'; -import { +import type { BitcoinSignPayload, EIP712MessagePayload, SignData, - SigningPayload, SignRequestParams, + SigningPayload, TransactionRequest, } from '../types'; import { getYParity } from '../util'; diff --git a/packages/sdk/src/api/state.ts b/packages/sdk/src/api/state.ts index 7bc416e1..22aac567 100644 --- a/packages/sdk/src/api/state.ts +++ b/packages/sdk/src/api/state.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export let saveClient: (clientData: string | null) => Promise; diff --git a/packages/sdk/src/api/utilities.ts b/packages/sdk/src/api/utilities.ts index 3f9d3742..20072a67 100644 --- a/packages/sdk/src/api/utilities.ts +++ b/packages/sdk/src/api/utilities.ts @@ -107,9 +107,9 @@ export function parseDerivationPathComponents(components: string[]): number[] { if (lowerPart === 'x') return 0; // Wildcard if (lowerPart === "x'") return HARDENED_OFFSET; // Hardened wildcard if (part.endsWith("'")) - return parseInt(part.slice(0, -1)) + HARDENED_OFFSET; - const val = parseInt(part); - if (isNaN(val)) { + return Number.parseInt(part.slice(0, -1)) + HARDENED_OFFSET; + const val = Number.parseInt(part); + if (Number.isNaN(val)) { throw new Error(`Invalid part in derivation path: ${part}`); } return val; diff --git a/packages/sdk/src/api/wallets.ts b/packages/sdk/src/api/wallets.ts index 165a1b7f..a3c9b698 100644 --- a/packages/sdk/src/api/wallets.ts +++ b/packages/sdk/src/api/wallets.ts @@ -1,4 +1,4 @@ -import { ActiveWallets } from '../types'; +import type { ActiveWallets } from '../types'; import { queue } from './utilities'; /** diff --git a/packages/sdk/src/bitcoin.ts b/packages/sdk/src/bitcoin.ts index 59365b2b..190fa812 100644 --- a/packages/sdk/src/bitcoin.ts +++ b/packages/sdk/src/bitcoin.ts @@ -1,8 +1,8 @@ // Util for Bitcoin-specific functionality import { bech32 } from 'bech32'; import bs58check from 'bs58check'; -import { Hash } from 'ox'; import { ripemd160 } from 'hash.js/lib/hash/ripemd.js'; +import { Hash } from 'ox'; import { BIP_CONSTANTS } from './constants'; import { LatticeSignSchema } from './protocol'; const DEFAULT_SEQUENCE = 0xffffffff; @@ -49,7 +49,7 @@ const BTC_SCRIPT_TYPE_P2WPKH_V0 = 0x04; // already based on the number of inputs plus two outputs // `version`: Transaction version of the inputs. All inputs must be of the same version! // `isSegwit`: a boolean which determines how we serialize the data and parameterize txb -const buildBitcoinTxRequest = function (data) { +const buildBitcoinTxRequest = (data) => { const { prevOuts, recipient, value, changePath, fee } = data; if (!changePath) throw new Error('No changePath provided.'); if (changePath.length !== 5) @@ -129,7 +129,7 @@ const buildBitcoinTxRequest = function (data) { // -- isSegwitSpend = true if the inputs are being spent using segwit // (NOTE: either ALL are being spent, or none are) // -- lockTime = Will probably always be 0 -const serializeTx = function (data) { +const serializeTx = (data) => { const { inputs, outputs, lockTime = 0 } = data; let payload = Buffer.alloc(4); let off = 0; @@ -212,7 +212,7 @@ const serializeTx = function (data) { }; // Convert a pubkeyhash to a bitcoin base58check address with a version byte -const getBitcoinAddress = function (pubkeyhash, version) { +const getBitcoinAddress = (pubkeyhash, version) => { let bech32Prefix = null; let bech32Version = null; if (version === FMT_SEGWIT_NATIVE_V0) { @@ -387,7 +387,8 @@ function writeUInt64LE(n, buf, off) { } function decodeAddress(address) { - let versionByte, pkh; + let versionByte: number | undefined; + let pkh: Buffer | undefined; try { // Attempt to base58 decode the address. This will work for older // P2PKH, P2SH, and P2SH-P2WPKH addresses @@ -420,9 +421,7 @@ function decodeAddress(address) { if (bech32Dec.words.length !== 33) { const isP2wpsh = bech32Dec.words.length === 53; throw new Error( - `Unsupported address${ - isP2wpsh ? ' (P2WSH not supported)' : '' - }: ${address}`, + `Unsupported address${isP2wpsh ? ' (P2WSH not supported)' : ''}: ${address}`, ); } diff --git a/packages/sdk/src/btc/xpub.ts b/packages/sdk/src/btc/xpub.ts index f6068856..d5ed9a98 100644 --- a/packages/sdk/src/btc/xpub.ts +++ b/packages/sdk/src/btc/xpub.ts @@ -99,7 +99,7 @@ export async function getXpubs( */ export async function getAllXpubs( coinType: BtcCoinType = BTC_COIN_TYPES.MAINNET, - account: number = 0, + account = 0, ): Promise<{ xpub: string; ypub: string; zpub: string }> { const xpubs = await getXpubs({ purposes: [BTC_PURPOSES.LEGACY, BTC_PURPOSES.WRAPPED, BTC_PURPOSES.NATIVE], @@ -107,9 +107,13 @@ export async function getAllXpubs( account, }); - return { - xpub: xpubs.get(BTC_PURPOSES.LEGACY)!, - ypub: xpubs.get(BTC_PURPOSES.WRAPPED)!, - zpub: xpubs.get(BTC_PURPOSES.NATIVE)!, - }; + const xpub = xpubs.get(BTC_PURPOSES.LEGACY); + const ypub = xpubs.get(BTC_PURPOSES.WRAPPED); + const zpub = xpubs.get(BTC_PURPOSES.NATIVE); + + if (!xpub || !ypub || !zpub) { + throw new Error('Failed to fetch all xpubs'); + } + + return { xpub, ypub, zpub }; } diff --git a/packages/sdk/src/calldata/evm.ts b/packages/sdk/src/calldata/evm.ts index 59a7e48b..4e8449b9 100644 --- a/packages/sdk/src/calldata/evm.ts +++ b/packages/sdk/src/calldata/evm.ts @@ -7,10 +7,10 @@ import { decodeAbiParameters, parseAbiParameters } from 'viem'; * @returns Buffer containing RLP-serialized array of calldata info to pass to signing request * @public */ -export const parseSolidityJSONABI = function ( +export const parseSolidityJSONABI = ( sig: string, abi: any[], -): { def: EVMDef } { +): { def: EVMDef } => { sig = coerceSig(sig); // Find the first match in the ABI const match = abi @@ -35,7 +35,7 @@ export const parseSolidityJSONABI = function ( * @returns Buffer containing RLP-serialized array of calldata info to pass to signing request * @public */ -export const parseCanonicalName = function (sig: string, name: string) { +export const parseCanonicalName = (sig: string, name: string) => { sig = coerceSig(sig); if (sig !== getFuncSig(name)) { throw new Error('Name does not match provided sig.'); @@ -70,12 +70,12 @@ export const parseCanonicalName = function (sig: string, name: string) { * item has data (0x-prefixed hex string), it should be * checked as a possible nested def */ -export const getNestedCalldata = function (def, calldata) { +export const getNestedCalldata = (def, calldata) => { const possibleNestedDefs = []; // Skip past first item, which is the function name const defParams = def.slice(1); const strParams = getParamStrNames(defParams); - const hexStr = ('0x' + calldata.slice(4).toString('hex')) as `0x${string}`; + const hexStr = `0x${calldata.slice(4).toString('hex')}` as `0x${string}`; // Convert strParams to viem's format const viemParams = strParams.map((type) => { // Convert tuple format from 'tuple(uint256,uint128)' to '(uint256,uint128)' @@ -160,7 +160,7 @@ export const getNestedCalldata = function (def, calldata) { * defs which must be added to `def` * @return - Possibly modified version of `def` */ -export const replaceNestedDefs = function (def, nestedDefs) { +export const replaceNestedDefs = (def, nestedDefs) => { for (let i = 0; i < nestedDefs.length; i++) { const isArrItem = isBytesArrItem(def[1 + i]); const isItem = isBytesItem(def[1 + i]); @@ -309,8 +309,8 @@ function parseBasicTypeStr(typeStr: string): EVMParamInfo { const arrStart = param.arraySzs.length > 0 ? typeStr.indexOf('[') : typeStr.length; const typeStrNum = typeStr.slice(t.length, arrStart); - if (parseInt(typeStrNum)) { - param.szBytes = parseInt(typeStrNum) / 8; + if (Number.parseInt(typeStrNum)) { + param.szBytes = Number.parseInt(typeStrNum) / 8; if (param.szBytes > 32) { throw new Error(BAD_CANONICAL_ERR); } @@ -440,7 +440,7 @@ function getParamTypeInfo(type: string): EVMParamInfo { typeIdx: 0, arraySzs: [], }; - let baseType; + let baseType: string | undefined; EVM_TYPES.forEach((t, i) => { if (type.indexOf(t) > -1 && !baseType) { baseType = t; @@ -453,7 +453,7 @@ function getParamTypeInfo(type: string): EVMParamInfo { const szIdx = param.arraySzs.length > 0 ? type.indexOf('[') : type.length; if (['uint', 'int', 'bytes'].indexOf(baseType) > -1) { // If this can have a fixed size, capture that - const szBits = parseInt(type.slice(baseType.length, szIdx)) || 0; + const szBits = Number.parseInt(type.slice(baseType.length, szIdx)) || 0; if (szBits > 256) { throw new Error('Invalid param size'); } @@ -492,7 +492,7 @@ function getArraySzs(type: string): number[] { szs.push(0); } else { // Fixed size - szs.push(parseInt(t3)); + szs.push(Number.parseInt(t3)); } t1 = t2.slice(closeIdx + 1); } @@ -501,8 +501,8 @@ function getArraySzs(type: string): number[] { /** @internal */ function getTupleName(name, withArr = true) { - let brackets = 0, - addedFirstBracket = false; + let brackets = 0; + let addedFirstBracket = false; for (let i = 0; i < name.length; i++) { if (name[i] === '(') { brackets += 1; diff --git a/packages/sdk/src/client.ts b/packages/sdk/src/client.ts index 3fcf2bfe..797a6159 100644 --- a/packages/sdk/src/client.ts +++ b/packages/sdk/src/client.ts @@ -19,17 +19,17 @@ import { import { buildRetryWrapper } from './shared/functions'; import { getPubKeyBytes } from './shared/utilities'; import { validateEphemeralPub } from './shared/validators'; -import { - KeyPair, +import type { ActiveWallets, - GetAddressesRequestParams, - SignRequestParams, - SignData, AddKvRecordsRequestParams, - GetKvRecordsRequestParams, + FetchEncDataRequest, + GetAddressesRequestParams, GetKvRecordsData, + GetKvRecordsRequestParams, + KeyPair, RemoveKvRecordsRequestParams, - FetchEncDataRequest, + SignData, + SignRequestParams, } from './types'; import { getP256KeyPair, getP256KeyPairFromPub, randomBytes } from './util'; diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index f7679814..d29182d9 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -6,10 +6,10 @@ import { LatticeSignEncoding, LatticeSignHash, } from './protocol/latticeConstants'; -import { - FirmwareConstants, - FirmwareArr, +import type { ActiveWallets, + FirmwareArr, + FirmwareConstants, WalletPath, } from './types/index.js'; @@ -465,8 +465,8 @@ function getFwVersionConst(v: Buffer): FirmwareConstants { } /** @internal */ -// eslint-disable-next-line no-control-regex -const ASCII_REGEX = /^[\x00-\x7F]+$/; +// biome-ignore lint/suspicious/noControlCharactersInRegex: Intentional - matching ASCII range +const ASCII_REGEX = /^[\u0000-\u007F]+$/; /** @internal */ const EXTERNAL_NETWORKS_BY_CHAIN_ID_URL = diff --git a/packages/sdk/src/ethereum.ts b/packages/sdk/src/ethereum.ts index c5f8e35c..15f2ae82 100644 --- a/packages/sdk/src/ethereum.ts +++ b/packages/sdk/src/ethereum.ts @@ -1,48 +1,48 @@ +import { RLP } from '@ethereumjs/rlp'; +import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util'; // Utils for Ethereum transactions. This is effecitvely a shim of ethereumjs-util, which // does not have browser (or, by proxy, React-Native) support. import BN from 'bignumber.js'; -import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util'; +import cbor from 'cbor'; +import bdec from 'cbor-bigdecimal'; import { Hash } from 'ox'; -import { RLP } from '@ethereumjs/rlp'; import secp256k1 from 'secp256k1'; +import { + type Hex, + type TransactionSerializable, + hexToNumber, + serializeTransaction, +} from 'viem'; import { ASCII_REGEX, + EXTERNAL, HANDLE_LARGER_CHAIN_ID, MAX_CHAIN_ID_BYTES, ethMsgProtocol, - EXTERNAL, } from './constants'; +import { buildGenericSigningMsgRequest } from './genericSigning'; import { LatticeSignSchema } from './protocol'; +import { type FlexibleTransaction, TransactionSchema } from './schemas'; +import { + type FirmwareConstants, + type SigningPath, + TRANSACTION_TYPE, + type TransactionRequest, +} from './types'; import { buildSignerPathBuf, + convertRecoveryToV, ensureHexBuffer, fixLen, isAsciiStr, splitFrames, - convertRecoveryToV, } from './util'; -import cbor from 'cbor'; -import bdec from 'cbor-bigdecimal'; -import { - TransactionSerializable, - serializeTransaction, - type Hex, - hexToNumber, -} from 'viem'; -import { - type SigningPath, - type FirmwareConstants, - TransactionRequest, - TRANSACTION_TYPE, -} from './types'; -import { buildGenericSigningMsgRequest } from './genericSigning'; -import { TransactionSchema, type FlexibleTransaction } from './schemas'; const { ecdsaRecover } = secp256k1; bdec(cbor); -const buildEthereumMsgRequest = function (input) { +const buildEthereumMsgRequest = (input) => { if (!input.payload || !input.protocol || !input.signerPath) throw new Error( 'You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request', @@ -69,7 +69,7 @@ const buildEthereumMsgRequest = function (input) { } }; -const validateEthereumMsgResponse = function (res, req) { +const validateEthereumMsgResponse = (res, req) => { const { signer, sig } = res; const { input, msg, prehash = null } = req; if (input.protocol === 'signPersonal') { @@ -105,8 +105,8 @@ const validateEthereumMsgResponse = function (res, req) { input.payload.domain?.chainId || payloadForHashing.domain?.chainId; if (typeof chainId === 'string') { chainId = chainId.startsWith('0x') - ? parseInt(chainId, 16) - : parseInt(chainId, 10); + ? Number.parseInt(chainId, 16) + : Number.parseInt(chainId, 10); } else if (typeof chainId === 'bigint') { chainId = Number(chainId); } @@ -233,7 +233,7 @@ const structuredCloneFn: StructuredCloneFn | null = ? (globalThis as { structuredClone: StructuredCloneFn }).structuredClone : null; -const buildEthereumTxRequest = function (data) { +const buildEthereumTxRequest = (data) => { try { let { chainId = 1 } = data; const { signerPath, eip155 = null, fwConstants, type = null } = data; @@ -301,12 +301,13 @@ const buildEthereumTxRequest = function (data) { // Build the transaction buffer array const chainIdBytes = ensureHexBuffer(chainId); const nonceBytes = ensureHexBuffer(data.nonce); - let gasPriceBytes; + let gasPriceBytes: Buffer; const gasLimitBytes = ensureHexBuffer(data.gasLimit); // Handle contract deployment (indicated by `to` being `null`) // For contract deployment we write a 20-byte key to the request // buffer, which gets swapped for an empty buffer in firmware. - let toRlpElem, toBytes; + let toRlpElem: Buffer; + let toBytes: Buffer; if (isDeployment) { toRlpElem = Buffer.alloc(0); toBytes = ensureHexBuffer(contractDeployKey); @@ -322,7 +323,8 @@ const buildEthereumTxRequest = function (data) { rawTx.push(chainIdBytes); } rawTx.push(nonceBytes); - let maxPriorityFeePerGasBytes, maxFeePerGasBytes; + let maxPriorityFeePerGasBytes: Buffer; + let maxFeePerGasBytes: Buffer; if (isEip1559) { if (!data.maxPriorityFeePerGas) throw new Error( @@ -379,7 +381,7 @@ const buildEthereumTxRequest = function (data) { // NOTE: Originally we designed for a 1-byte chainID, but modern rollup chains use much larger // chainID values. To account for these, we will put the chainID into the `data` buffer if it // is >=255. Values up to UINT64_MAX will be allowed. - let chainIdBuf; + let chainIdBuf: Buffer; let chainIdBufSz = 0; if (useChainIdBuffer(chainId) === true) { chainIdBuf = getChainIdBuf(chainId); @@ -480,9 +482,7 @@ const buildEthereumTxRequest = function (data) { (EXTRA_DATA_ALLOWED && totalSz > maxSzAllowed) ) throw new Error( - `Data field too large (got ${dataBytes.length}; must be <=${ - maxSzAllowed - chainIdExtraSz - } bytes)`, + `Data field too large (got ${dataBytes.length}; must be <=${maxSzAllowed - chainIdExtraSz} bytes)`, ); // Split overflow data into extraData frames const frames = splitFrames( @@ -549,7 +549,7 @@ function stripZeros(a) { // Given a 64-byte signature [r,s] we need to figure out the v value // and attah the full signature to the end of the transaction payload -const buildEthRawTx = function (tx, sig, address) { +const buildEthRawTx = (tx, sig, address) => { // RLP-encode the data we sent to the lattice const hash = Buffer.from( Hash.keccak256(get_rlp_encoded_preimage(tx.rawTx, tx.type)), @@ -650,7 +650,7 @@ export function normalizeLatticeSignature( vValue = latticeResult.sig.v.readUInt32BE(Math.max(0, 4 - bufferLength)); } else { // For very large buffers, read as hex and convert - vValue = parseInt(latticeResult.sig.v.toString('hex'), 16); + vValue = Number.parseInt(latticeResult.sig.v.toString('hex'), 16); } } else if (typeof latticeResult.sig.v === 'number') { vValue = latticeResult.sig.v; @@ -680,22 +680,21 @@ export function normalizeLatticeSignature( }; // For legacy transactions, remove the type field to ensure Viem treats it as legacy - delete result.type; + result.type = undefined; // Also remove any typed transaction fields that might confuse viem - delete result.maxFeePerGas; - delete result.maxPriorityFeePerGas; - delete result.accessList; - delete result.authorizationList; + result.maxFeePerGas = undefined; + result.maxPriorityFeePerGas = undefined; + result.accessList = undefined; + result.authorizationList = undefined; return result; } } // Convert an RLP-serialized transaction (plus signature) into a transaction hash -const hashTransaction = function (serializedTx) { - return Hash.keccak256(Buffer.from(serializedTx, 'hex')); -}; +const hashTransaction = (serializedTx) => + Hash.keccak256(Buffer.from(serializedTx, 'hex')); // Returns address string given public key buffer function pubToAddrStr(pub) { @@ -730,7 +729,7 @@ const chainIds = { // Get a buffer containing the chainId value. // Returns a 1, 2, 4, or 8 byte buffer with the chainId encoded in big endian function getChainIdBuf(chainId) { - let b; + let b: Buffer; // If our chainID is a hex string, we can convert it to a hex // buffer directly if (true === isValidChainIdHexNumStr(chainId)) b = ensureHexBuffer(chainId); @@ -741,7 +740,7 @@ function getChainIdBuf(chainId) { // If this matches a u16, u32, or u64 size, return it now if (b.length <= 2 || b.length === 4 || b.length === 8) return b; // For other size buffers, we need to pack into u32 or u64 before returning; - let buf; + let buf: Buffer; if (b.length === 3) { buf = Buffer.alloc(4); buf.writeUInt32BE(chainId); @@ -758,9 +757,6 @@ function chainUsesEIP155(chainID) { case 3: // ropsten case 4: // rinkeby return false; - case 1: // mainnet - case 42: // kovan - case 5: // goerli default: // all others should use eip155 return true; @@ -1077,7 +1073,7 @@ function parseEIP712Item(data, type, forJSParser = false) { } } else if (type.slice(0, 5) === 'bytes') { // Fixed sizes bytes need to be buffer type. We also add some sanity checks. - const nBytes = parseInt(type.slice(5)); + const nBytes = Number.parseInt(type.slice(5)); data = ensureHexBuffer(data); // Edge case to handle empty bytesN values if (data.length === 0) { @@ -1213,9 +1209,9 @@ export const normalizeToViemTransaction = ( * Convert Ethereum transaction to serialized bytes for generic signing. * Bridge function for firmware v0.15.0+ which removed legacy ETH signing paths. */ -const convertEthereumTransactionToGenericRequest = function ( +const convertEthereumTransactionToGenericRequest = ( req: FlexibleTransaction, -) { +) => { // Use the unified normalization and serialization pipeline. // 1. Normalize the potentially varied input to a standard viem format. const viemTx = normalizeToViemTransaction(req); @@ -1234,9 +1230,9 @@ type EthereumGenericSigningRequestParams = FlexibleTransaction & { * Build complete generic signing request for Ethereum transactions. * One-step function combining transaction conversion and generic signing setup. */ -export const buildEthereumGenericSigningRequest = function ( +export const buildEthereumGenericSigningRequest = ( req: EthereumGenericSigningRequestParams, -) { +) => { const { fwConstants, signerPath, ...txData } = req; const payload = convertEthereumTransactionToGenericRequest(txData); @@ -1354,7 +1350,7 @@ export function serializeEIP7702Transaction(tx: TransactionRequest): Hex { ? address.startsWith('0x') ? address : `0x${address}` - : `0x`; + : '0x'; if (!addressStr || addressStr === '0x') { throw new Error( diff --git a/packages/sdk/src/functions/addKvRecords.ts b/packages/sdk/src/functions/addKvRecords.ts index f26cff66..0ce54783 100644 --- a/packages/sdk/src/functions/addKvRecords.ts +++ b/packages/sdk/src/functions/addKvRecords.ts @@ -7,10 +7,10 @@ import { validateKvRecord, validateKvRecords, } from '../shared/validators'; -import { +import type { AddKvRecordsRequestFunctionParams, - KVRecords, FirmwareConstants, + KVRecords, } from '../types'; /** diff --git a/packages/sdk/src/functions/connect.ts b/packages/sdk/src/functions/connect.ts index 8f4a4d55..bd03b931 100644 --- a/packages/sdk/src/functions/connect.ts +++ b/packages/sdk/src/functions/connect.ts @@ -6,7 +6,11 @@ import { validateDeviceId, validateKey, } from '../shared/validators'; -import { ConnectRequestFunctionParams, KeyPair, ActiveWallets } from '../types'; +import type { + ActiveWallets, + ConnectRequestFunctionParams, + KeyPair, +} from '../types'; import { aes256_decrypt, getP256KeyPairFromPub } from '../util'; export async function connect({ diff --git a/packages/sdk/src/functions/fetchActiveWallet.ts b/packages/sdk/src/functions/fetchActiveWallet.ts index d6f6af5e..c426bbfc 100644 --- a/packages/sdk/src/functions/fetchActiveWallet.ts +++ b/packages/sdk/src/functions/fetchActiveWallet.ts @@ -7,9 +7,9 @@ import { validateActiveWallets, validateConnectedClient, } from '../shared/validators'; -import { - FetchActiveWalletRequestFunctionParams, +import type { ActiveWallets, + FetchActiveWalletRequestFunctionParams, } from '../types'; /** diff --git a/packages/sdk/src/functions/fetchDecoder.ts b/packages/sdk/src/functions/fetchDecoder.ts index af1afb5d..70b4367c 100644 --- a/packages/sdk/src/functions/fetchDecoder.ts +++ b/packages/sdk/src/functions/fetchDecoder.ts @@ -1,8 +1,8 @@ import { validateConnectedClient } from '../shared/validators'; import { getClient } from '../api'; +import type { TransactionRequest } from '../types'; import { fetchCalldataDecoder } from '../util'; -import { TransactionRequest } from '../types'; /** * `fetchDecoder` fetches the ABI for a given contract address and chain ID. diff --git a/packages/sdk/src/functions/fetchEncData.ts b/packages/sdk/src/functions/fetchEncData.ts index dc7facc6..3b71139f 100644 --- a/packages/sdk/src/functions/fetchEncData.ts +++ b/packages/sdk/src/functions/fetchEncData.ts @@ -14,12 +14,12 @@ import { validateStartPath, validateWallet, } from '../shared/validators'; -import { - FetchEncDataRequestFunctionParams, +import type { + EIP2335KeyExportData, EIP2335KeyExportReq, + FetchEncDataRequestFunctionParams, FirmwareVersion, Wallet, - EIP2335KeyExportData, } from '../types'; const { ENC_DATA } = EXTERNAL; diff --git a/packages/sdk/src/functions/getAddresses.ts b/packages/sdk/src/functions/getAddresses.ts index e57e32f7..da366d23 100644 --- a/packages/sdk/src/functions/getAddresses.ts +++ b/packages/sdk/src/functions/getAddresses.ts @@ -11,9 +11,9 @@ import { validateStartPath, validateWallet, } from '../shared/validators'; -import { - GetAddressesRequestFunctionParams, +import type { FirmwareConstants, + GetAddressesRequestFunctionParams, Wallet, } from '../types'; import { isValidAssetPath } from '../util'; @@ -200,12 +200,11 @@ export const decodeGetAddressesResponse = ( // Return the UTF-8 representation const len = addrBytes.indexOf(0); // First 0 is the null terminator if (len > 0) { - // Clean control characters from the string before adding to array const cleanStr = addrBytes .slice(0, len) .toString() - // eslint-disable-next-line no-control-regex - .replace(/[\x00-\x1F\x7F-\x9F]/g, ''); + // biome-ignore lint/suspicious/noControlCharactersInRegex: Intentional - stripping control characters + .replace(/[\u0000-\u001F\u007F-\u009F]/g, ''); addrs.push(cleanStr); } } diff --git a/packages/sdk/src/functions/getKvRecords.ts b/packages/sdk/src/functions/getKvRecords.ts index 2b328624..4c788592 100644 --- a/packages/sdk/src/functions/getKvRecords.ts +++ b/packages/sdk/src/functions/getKvRecords.ts @@ -3,10 +3,10 @@ import { encryptedSecureRequest, } from '../protocol'; import { validateConnectedClient } from '../shared/validators'; -import { - GetKvRecordsRequestFunctionParams, - GetKvRecordsData, +import type { FirmwareConstants, + GetKvRecordsData, + GetKvRecordsRequestFunctionParams, } from '../types'; export async function getKvRecords({ @@ -97,7 +97,10 @@ export const decodeGetKvRecordsResponse = ( let off = 0; const nTotal = data.readUInt32BE(off); off += 4; - const nFetched = parseInt(data.slice(off, off + 1).toString('hex'), 16); + const nFetched = Number.parseInt( + data.slice(off, off + 1).toString('hex'), + 16, + ); off += 1; if (nFetched > fwConstants.kvActionMaxNum) throw new Error('Too many records fetched. Firmware error.'); @@ -109,15 +112,13 @@ export const decodeGetKvRecordsResponse = ( r.type = data.readUInt32BE(off); off += 4; r.caseSensitive = - parseInt(data.slice(off, off + 1).toString('hex'), 16) === 1 - ? true - : false; + Number.parseInt(data.slice(off, off + 1).toString('hex'), 16) === 1; off += 1; - const keySz = parseInt(data.slice(off, off + 1).toString('hex'), 16); + const keySz = Number.parseInt(data.slice(off, off + 1).toString('hex'), 16); off += 1; r.key = data.slice(off, off + keySz - 1).toString(); off += fwConstants.kvKeyMaxStrSz + 1; - const valSz = parseInt(data.slice(off, off + 1).toString('hex'), 16); + const valSz = Number.parseInt(data.slice(off, off + 1).toString('hex'), 16); off += 1; r.val = data.slice(off, off + valSz - 1).toString(); off += fwConstants.kvValMaxStrSz + 1; diff --git a/packages/sdk/src/functions/pair.ts b/packages/sdk/src/functions/pair.ts index 941bd0e4..aa119d0a 100644 --- a/packages/sdk/src/functions/pair.ts +++ b/packages/sdk/src/functions/pair.ts @@ -4,7 +4,7 @@ import { } from '../protocol'; import { getPubKeyBytes } from '../shared/utilities'; import { validateConnectedClient } from '../shared/validators'; -import { PairRequestParams, KeyPair } from '../types'; +import type { KeyPair, PairRequestParams } from '../types'; import { generateAppSecret, toPaddedDER } from '../util'; /** diff --git a/packages/sdk/src/functions/removeKvRecords.ts b/packages/sdk/src/functions/removeKvRecords.ts index 29da850e..b78637eb 100644 --- a/packages/sdk/src/functions/removeKvRecords.ts +++ b/packages/sdk/src/functions/removeKvRecords.ts @@ -3,9 +3,9 @@ import { encryptedSecureRequest, } from '../protocol'; import { validateConnectedClient } from '../shared/validators'; -import { - RemoveKvRecordsRequestFunctionParams, +import type { FirmwareConstants, + RemoveKvRecordsRequestFunctionParams, } from '../types'; /** @@ -87,7 +87,7 @@ export const encodeRemoveKvRecordsRequest = ({ payload.writeUInt32LE(type, 0); payload.writeUInt8(ids.length, 4); for (let i = 0; i < ids.length; i++) { - const id = parseInt(ids[i] as string); + const id = Number.parseInt(ids[i] as string); payload.writeUInt32LE(id, 5 + 4 * i); } return payload; diff --git a/packages/sdk/src/functions/sign.ts b/packages/sdk/src/functions/sign.ts index 92a94023..fafbbb3f 100644 --- a/packages/sdk/src/functions/sign.ts +++ b/packages/sdk/src/functions/sign.ts @@ -1,5 +1,5 @@ import { Hash } from 'ox'; -import { type Hex, type Address } from 'viem'; +import type { Address, Hex } from 'viem'; import bitcoin from '../bitcoin'; import { CURRENCIES } from '../constants'; import ethereum from '../ethereum'; @@ -11,16 +11,16 @@ import { } from '../protocol'; import { buildTransaction } from '../shared/functions'; import { validateConnectedClient, validateWallet } from '../shared/validators'; -import { parseDER } from '../util'; -import { - SignRequestFunctionParams, - SigningRequestResponse, - EncodeSignRequestParams, +import type { + BitcoinSignRequest, DecodeSignResponseParams, + EncodeSignRequestParams, SignData, - BitcoinSignRequest, SignRequest, + SignRequestFunctionParams, + SigningRequestResponse, } from '../types'; +import { parseDER } from '../util'; /** * `sign` builds and sends a request for signing to the device. diff --git a/packages/sdk/src/genericSigning.ts b/packages/sdk/src/genericSigning.ts index a406b248..baf80d16 100644 --- a/packages/sdk/src/genericSigning.ts +++ b/packages/sdk/src/genericSigning.ts @@ -1,3 +1,4 @@ +import { RLP } from '@ethereumjs/rlp'; /** Generic signing module. Any payload can be sent to the Lattice and will be displayed in full (note that \n and \t characters will be @@ -9,12 +10,11 @@ This payload should be coupled with: * Hash function to use on the message */ import { Hash } from 'ox'; -import { RLP } from '@ethereumjs/rlp'; import { - parseTransaction, - serializeTransaction, type Hex, type TransactionSerializable, + parseTransaction, + serializeTransaction, } from 'viem'; // keccak256 now imported from ox via Hash module import { HARDENED_OFFSET } from './constants'; @@ -24,13 +24,13 @@ import { buildSignerPathBuf, existsIn, fixLen, - getYParity, getV, + getYParity, parseDER, splitFrames, } from './util'; -export const buildGenericSigningMsgRequest = function (req) { +export const buildGenericSigningMsgRequest = (req) => { const { signerPath, curveType, @@ -209,7 +209,7 @@ export const buildGenericSigningMsgRequest = function (req) { }; }; -export const parseGenericSigningResponse = function (res, off, req) { +export const parseGenericSigningResponse = (res, off, req) => { const parsed = { pubkey: null, sig: null, @@ -436,11 +436,7 @@ function populateViemSignedTx( } } -export const getEncodedPayload = function ( - payload, - encoding, - allowedEncodings, -) { +export const getEncodedPayload = (payload, encoding, allowedEncodings) => { if (!encoding) { encoding = Constants.SIGNING.ENCODINGS.NONE; } @@ -450,7 +446,7 @@ export const getEncodedPayload = function ( 'Encoding not supported by Lattice firmware. You may want to update.', ); } - let payloadBuf; + let payloadBuf: Buffer; if (!payload) { throw new Error('No payload included'); } diff --git a/packages/sdk/src/protocol/secureMessages.ts b/packages/sdk/src/protocol/secureMessages.ts index a4dc6d4e..5a7acf59 100644 --- a/packages/sdk/src/protocol/secureMessages.ts +++ b/packages/sdk/src/protocol/secureMessages.ts @@ -1,3 +1,21 @@ +import { getEphemeralId, request } from '../shared/functions'; +import { validateEphemeralPub } from '../shared/validators'; +import type { + DecryptedResponse, + KeyPair, + LatticeMessageHeader, + LatticeSecureConnectRequestPayloadData, + LatticeSecureDecryptedResponse, + LatticeSecureRequest, + LatticeSecureRequestPayload, +} from '../types'; +import { + aes256_decrypt, + aes256_encrypt, + checksum, + getP256KeyPairFromPub, + randomBytes, +} from '../util'; /** * All messages sent to the Lattice from this SDK will be * "secure messages", of which there are two types: @@ -22,27 +40,9 @@ import { ProtocolConstants as Constants, LatticeMsgType, LatticeProtocolVersion, - LatticeSecureEncryptedRequestType, + type LatticeSecureEncryptedRequestType, LatticeSecureMsgType, } from './latticeConstants'; -import { - aes256_decrypt, - aes256_encrypt, - checksum, - getP256KeyPairFromPub, - randomBytes, -} from '../util'; -import { getEphemeralId, request } from '../shared/functions'; -import { validateEphemeralPub } from '../shared/validators'; -import { - DecryptedResponse, - LatticeSecureRequestPayload, - LatticeMessageHeader, - LatticeSecureRequest, - LatticeSecureConnectRequestPayloadData, - LatticeSecureDecryptedResponse, - KeyPair, -} from '../types'; const { msgSizes } = Constants; const { secure: szs } = msgSizes; @@ -187,7 +187,7 @@ function serializeSecureRequestMsg( // Build payload and size let msgSz = msgSizes.header + msgSizes.checksum; - let payloadLen; + let payloadLen: number; const payload: LatticeSecureRequestPayload = { requestType: secureRequestType, data: payloadData, diff --git a/packages/sdk/src/schemas/transaction.ts b/packages/sdk/src/schemas/transaction.ts index c1bc8fd1..63f06eed 100644 --- a/packages/sdk/src/schemas/transaction.ts +++ b/packages/sdk/src/schemas/transaction.ts @@ -1,5 +1,5 @@ +import { type Hex, getAddress, hexToBigInt, isAddress, isHex } from 'viem'; import { z } from 'zod'; -import { type Hex, isHex, hexToBigInt, isAddress, getAddress } from 'viem'; import { TRANSACTION_TYPE } from '../types'; // Helper to handle various numeric inputs and convert them to BigInt. @@ -248,13 +248,13 @@ export const TransactionSchema = z } // Remove fields that are not part of the final type - if (type !== 'legacy' && type !== 'eip2930') delete data.gasPrice; + if (type !== 'legacy' && type !== 'eip2930') data.gasPrice = undefined; if (type !== 'eip1559' && type !== 'eip7702') { - delete data.maxFeePerGas; - delete data.maxPriorityFeePerGas; + data.maxFeePerGas = undefined; + data.maxPriorityFeePerGas = undefined; } - delete data.gasLimit; - if (type !== 'eip7702') delete data.authorizationList; + data.gasLimit = undefined; + if (type !== 'eip7702') data.authorizationList = undefined; return data; }); diff --git a/packages/sdk/src/shared/errors.ts b/packages/sdk/src/shared/errors.ts index b2c7d055..c3e828db 100644 --- a/packages/sdk/src/shared/errors.ts +++ b/packages/sdk/src/shared/errors.ts @@ -1,4 +1,4 @@ -import { LatticeResponseCode, ProtocolConstants } from '../protocol'; +import { type LatticeResponseCode, ProtocolConstants } from '../protocol'; const buildLatticeResponseErrorMessage = ({ responseCode, diff --git a/packages/sdk/src/shared/functions.ts b/packages/sdk/src/shared/functions.ts index 0c4805ce..e03aa25e 100644 --- a/packages/sdk/src/shared/functions.ts +++ b/packages/sdk/src/shared/functions.ts @@ -1,9 +1,10 @@ import { Hash } from 'ox'; -import { Client } from '..'; +import type { Client } from '..'; import bitcoin from '../bitcoin'; import { EXTERNAL } from '../constants'; import ethereum from '../ethereum'; import { buildGenericSigningMsgRequest } from '../genericSigning'; +import type { Currency, FirmwareConstants, RequestParams } from '../types'; import { fetchWithTimeout, parseLattice1Response } from '../util'; import { LatticeResponseError } from './errors'; import { @@ -13,7 +14,6 @@ import { shouldUseEVMLegacyConverter, } from './predicates'; import { validateRequestError } from './validators'; -import { Currency, FirmwareConstants, RequestParams } from '../types'; export const buildTransaction = ({ data, @@ -39,7 +39,7 @@ export const buildTransaction = ({ 'Using the legacy ETH signing path. This will soon be deprecated. ' + 'Please switch to general signing request.', ); - let payload; + let payload: Buffer | undefined; try { payload = ethereum.convertEthereumTransactionToGenericRequest(data); } catch (err) { @@ -206,5 +206,5 @@ export const retryWrapper = async ({ export const getEphemeralId = (sharedSecret: Buffer) => { // EphemId is the first 4 bytes of the hash of the shared secret const hash = Buffer.from(Hash.sha256(sharedSecret)); - return parseInt(hash.slice(0, 4).toString('hex'), 16); + return Number.parseInt(hash.slice(0, 4).toString('hex'), 16); }; diff --git a/packages/sdk/src/shared/predicates.ts b/packages/sdk/src/shared/predicates.ts index f6d6481a..25477720 100644 --- a/packages/sdk/src/shared/predicates.ts +++ b/packages/sdk/src/shared/predicates.ts @@ -1,5 +1,5 @@ import { LatticeResponseCode } from '../protocol'; -import { FirmwareVersion, FirmwareConstants } from '../types'; +import type { FirmwareConstants, FirmwareVersion } from '../types'; import { isFWSupported } from './utilities'; export const isDeviceBusy = (responseCode: number) => @@ -16,6 +16,4 @@ export const doesFetchWalletsOnLoad = (fwVersion: FirmwareVersion) => isFWSupported(fwVersion, { major: 0, minor: 14, fix: 1 }); export const shouldUseEVMLegacyConverter = (fwConstants: FirmwareConstants) => - fwConstants.genericSigning && - fwConstants.genericSigning.encodingTypes && - fwConstants.genericSigning.encodingTypes.EVM; + fwConstants.genericSigning?.encodingTypes?.EVM; diff --git a/packages/sdk/src/shared/utilities.ts b/packages/sdk/src/shared/utilities.ts index b1502dfc..08367194 100644 --- a/packages/sdk/src/shared/utilities.ts +++ b/packages/sdk/src/shared/utilities.ts @@ -1,5 +1,5 @@ import { HARDENED_OFFSET } from '../constants'; -import { KeyPair, ActiveWallets, FirmwareVersion } from '../types'; +import type { ActiveWallets, FirmwareVersion, KeyPair } from '../types'; /** * Get 64 bytes representing the public key This is the uncompressed key without the leading 04 @@ -99,7 +99,7 @@ export const isFWSupported = ( * Convert a set of BIP39 path indices to a string * @param path - Set of indices */ -export const getPathStr = function (path) { +export const getPathStr = (path) => { let pathStr = 'm'; path.forEach((idx) => { if (idx >= HARDENED_OFFSET) { diff --git a/packages/sdk/src/shared/validators.ts b/packages/sdk/src/shared/validators.ts index eec4886c..5b5a9da9 100644 --- a/packages/sdk/src/shared/validators.ts +++ b/packages/sdk/src/shared/validators.ts @@ -1,17 +1,17 @@ -import { UInt4 } from 'bitwise/types'; -import { Client } from '../client'; -import { ASCII_REGEX, EMPTY_WALLET_UID, MAX_ADDR } from '../constants'; -import { isUInt4 } from '../util'; +import type { UInt4 } from 'bitwise/types'; import isEmpty from 'lodash/isEmpty.js'; -import { +import type { Client } from '../client'; +import { ASCII_REGEX, EMPTY_WALLET_UID, MAX_ADDR } from '../constants'; +import type { + ActiveWallets, FirmwareConstants, FirmwareVersion, + KVRecords, + KeyPair, LatticeError, Wallet, - KeyPair, - ActiveWallets, - KVRecords, } from '../types'; +import { isUInt4 } from '../util'; export const validateIsUInt4 = (n?: number) => { if (typeof n !== 'number' || !isUInt4(n)) { diff --git a/packages/sdk/src/types/addKvRecords.ts b/packages/sdk/src/types/addKvRecords.ts index e7dfdadb..892f0de9 100644 --- a/packages/sdk/src/types/addKvRecords.ts +++ b/packages/sdk/src/types/addKvRecords.ts @@ -1,5 +1,5 @@ -import { Client } from '../client'; -import { KVRecords } from './shared'; +import type { Client } from '../client'; +import type { KVRecords } from './shared'; export interface AddKvRecordsRequestParams { records: KVRecords; @@ -7,6 +7,7 @@ export interface AddKvRecordsRequestParams { caseSensitive?: boolean; } -export interface AddKvRecordsRequestFunctionParams extends AddKvRecordsRequestParams { +export interface AddKvRecordsRequestFunctionParams + extends AddKvRecordsRequestParams { client: Client; } diff --git a/packages/sdk/src/types/client.ts b/packages/sdk/src/types/client.ts index c96aaa55..61554783 100644 --- a/packages/sdk/src/types/client.ts +++ b/packages/sdk/src/types/client.ts @@ -1,18 +1,29 @@ -import { CURRENCIES } from '../constants'; -import { KeyPair } from './shared'; -import type { Address, Hash, Signature } from 'viem'; +import type { Address, Hash } from 'viem'; +import type { CURRENCIES } from '../constants'; +import type { KeyPair } from './shared'; export type Currency = keyof typeof CURRENCIES; export type SigningPath = number[]; +/** + * Signature components as returned by the Lattice device. + * Values can be Buffer (raw) or string (hex) depending on context. + */ +export interface LatticeSignature { + r: Buffer | string; + s: Buffer | string; + v?: Buffer | string | number | bigint; +} + export interface SignData { tx?: string; txHash?: Hash; changeRecipient?: string; - sig?: Signature; + sig?: LatticeSignature; sigs?: Buffer[]; signer?: Address; + pubkey?: Buffer; err?: string; } diff --git a/packages/sdk/src/types/connect.ts b/packages/sdk/src/types/connect.ts index fe723d20..c07ad41e 100644 --- a/packages/sdk/src/types/connect.ts +++ b/packages/sdk/src/types/connect.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface ConnectRequestParams { id: string; diff --git a/packages/sdk/src/types/declarations.d.ts b/packages/sdk/src/types/declarations.d.ts index 739a96ff..cb9cc0aa 100644 --- a/packages/sdk/src/types/declarations.d.ts +++ b/packages/sdk/src/types/declarations.d.ts @@ -21,7 +21,5 @@ declare module 'lodash/isEmpty.js' { // Add more flexible typing to reduce strict type checking for complex modules declare global { - interface NodeRequire { - (id: string): any; - } + type NodeRequire = (id: string) => any; } diff --git a/packages/sdk/src/types/fetchActiveWallet.ts b/packages/sdk/src/types/fetchActiveWallet.ts index 1dfd6f0a..da6c7dae 100644 --- a/packages/sdk/src/types/fetchActiveWallet.ts +++ b/packages/sdk/src/types/fetchActiveWallet.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface FetchActiveWalletRequestFunctionParams { client: Client; diff --git a/packages/sdk/src/types/fetchEncData.ts b/packages/sdk/src/types/fetchEncData.ts index 23ab496a..f6d1d76b 100644 --- a/packages/sdk/src/types/fetchEncData.ts +++ b/packages/sdk/src/types/fetchEncData.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface EIP2335KeyExportReq { path: number[]; diff --git a/packages/sdk/src/types/firmware.ts b/packages/sdk/src/types/firmware.ts index f00a4098..d3b6bab3 100644 --- a/packages/sdk/src/types/firmware.ts +++ b/packages/sdk/src/types/firmware.ts @@ -1,4 +1,4 @@ -import { EXTERNAL } from '../constants'; +import type { EXTERNAL } from '../constants'; export type FirmwareArr = [number, number, number]; diff --git a/packages/sdk/src/types/getAddresses.ts b/packages/sdk/src/types/getAddresses.ts index bf80ccfb..7ec1bff5 100644 --- a/packages/sdk/src/types/getAddresses.ts +++ b/packages/sdk/src/types/getAddresses.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface GetAddressesRequestParams { startPath: number[]; @@ -7,6 +7,7 @@ export interface GetAddressesRequestParams { iterIdx?: number; } -export interface GetAddressesRequestFunctionParams extends GetAddressesRequestParams { +export interface GetAddressesRequestFunctionParams + extends GetAddressesRequestParams { client: Client; } diff --git a/packages/sdk/src/types/getKvRecords.ts b/packages/sdk/src/types/getKvRecords.ts index 05fb172b..f4c1d0e0 100644 --- a/packages/sdk/src/types/getKvRecords.ts +++ b/packages/sdk/src/types/getKvRecords.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface GetKvRecordsRequestParams { type?: number; @@ -6,7 +6,8 @@ export interface GetKvRecordsRequestParams { start?: number; } -export interface GetKvRecordsRequestFunctionParams extends GetKvRecordsRequestParams { +export interface GetKvRecordsRequestFunctionParams + extends GetKvRecordsRequestParams { client: Client; } diff --git a/packages/sdk/src/types/messages.ts b/packages/sdk/src/types/messages.ts index 4dde6e3a..78a77821 100644 --- a/packages/sdk/src/types/messages.ts +++ b/packages/sdk/src/types/messages.ts @@ -1,4 +1,4 @@ -import { LatticeMsgType } from '../protocol'; +import type { LatticeMsgType } from '../protocol'; export interface LatticeMessageHeader { // Protocol version. Should always be 0x01 diff --git a/packages/sdk/src/types/pair.ts b/packages/sdk/src/types/pair.ts index faac0d28..6fb54b83 100644 --- a/packages/sdk/src/types/pair.ts +++ b/packages/sdk/src/types/pair.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface PairRequestParams { pairingSecret: string; diff --git a/packages/sdk/src/types/removeKvRecords.ts b/packages/sdk/src/types/removeKvRecords.ts index fe205e22..a8cfc747 100644 --- a/packages/sdk/src/types/removeKvRecords.ts +++ b/packages/sdk/src/types/removeKvRecords.ts @@ -1,10 +1,11 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface RemoveKvRecordsRequestParams { type?: number; ids?: string[]; } -export interface RemoveKvRecordsRequestFunctionParams extends RemoveKvRecordsRequestParams { +export interface RemoveKvRecordsRequestFunctionParams + extends RemoveKvRecordsRequestParams { client: Client; } diff --git a/packages/sdk/src/types/secureMessages.ts b/packages/sdk/src/types/secureMessages.ts index c17b489a..ebbb9127 100644 --- a/packages/sdk/src/types/secureMessages.ts +++ b/packages/sdk/src/types/secureMessages.ts @@ -1,5 +1,5 @@ -import { LatticeSecureMsgType, LatticeResponseCode } from '../protocol'; -import { LatticeMessageHeader } from './messages'; +import type { LatticeResponseCode, LatticeSecureMsgType } from '../protocol'; +import type { LatticeMessageHeader } from './messages'; export interface LatticeSecureRequest { // Message header diff --git a/packages/sdk/src/types/sign.ts b/packages/sdk/src/types/sign.ts index 4c3a8063..f9ed2121 100644 --- a/packages/sdk/src/types/sign.ts +++ b/packages/sdk/src/types/sign.ts @@ -1,15 +1,15 @@ import type { + AccessList, Address, Hex, - TypedData, - TypedDataDefinition, - AccessList, SignedAuthorization, SignedAuthorizationList, + TypedData, + TypedDataDefinition, } from 'viem'; -import { Client } from '../client'; -import { Currency, SigningPath, Wallet } from './client'; -import { FirmwareConstants } from './firmware'; +import type { Client } from '../client'; +import type { Currency, SigningPath, Wallet } from './client'; +import type { FirmwareConstants } from './firmware'; export type ETH_MESSAGE_PROTOCOLS = 'eip712' | 'signPersonal'; diff --git a/packages/sdk/src/types/utils.ts b/packages/sdk/src/types/utils.ts index e7504a55..c82b10cc 100644 --- a/packages/sdk/src/types/utils.ts +++ b/packages/sdk/src/types/utils.ts @@ -1,4 +1,4 @@ -import { Client } from '../client'; +import type { Client } from '../client'; export interface TestRequestPayload { payload: Buffer; diff --git a/packages/sdk/src/util.ts b/packages/sdk/src/util.ts index 93331be7..ee80e6ff 100644 --- a/packages/sdk/src/util.ts +++ b/packages/sdk/src/util.ts @@ -1,16 +1,16 @@ +import { Buffer } from 'node:buffer'; // Static utility functions import { RLP } from '@ethereumjs/rlp'; import aes from 'aes-js'; import BigNum from 'bignumber.js'; import { BN } from 'bn.js'; -import { Buffer } from 'buffer'; import crc32 from 'crc-32'; import elliptic from 'elliptic'; -import { Hash } from 'ox'; import inRange from 'lodash/inRange.js'; import isInteger from 'lodash/isInteger.js'; +import { Hash } from 'ox'; import secp256k1 from 'secp256k1'; -import { parseTransaction, type Hex } from 'viem'; +import { type Hex, parseTransaction } from 'viem'; const EC = elliptic.ec; const { ecdsaRecover } = secp256k1; @@ -27,7 +27,7 @@ import { isValid4ByteResponse, isValidBlockExplorerResponse, } from './shared/validators'; -import { FirmwareConstants } from './types'; +import type { FirmwareConstants } from './types'; const { COINS, PURPOSES } = BIP_CONSTANTS; let ec: any; @@ -37,11 +37,13 @@ let ec: any; //-------------------------------------------------- /** @internal Parse a response from the Lattice1 */ -export const parseLattice1Response = function (r: string): { +export const parseLattice1Response = ( + r: string, +): { errorMessage?: string; responseCode?: number; data?: Buffer; -} { +} => { const parsed: { errorMessage: string | null; data: Buffer | null; @@ -102,7 +104,7 @@ export const parseLattice1Response = function (r: string): { }; /** @internal */ -export const checksum = function (x: Buffer): number { +export const checksum = (x: Buffer): number => { // crc32 returns a signed integer - need to cast it to unsigned // Note that this uses the default 0xedb88320 polynomial return crc32.buf(x) >>> 0; // Need this to be a uint, hence the bit shift @@ -111,7 +113,7 @@ export const checksum = function (x: Buffer): number { // Get a 74-byte padded DER-encoded signature buffer // `sig` must be the signature output from elliptic.js /** @internal */ -export const toPaddedDER = function (sig: any): Buffer { +export const toPaddedDER = (sig: any): Buffer => { // We use 74 as the maximum length of a DER signature. All sigs must // be right-padded with zeros so that this can be a fixed size field const b = Buffer.alloc(74); @@ -124,10 +126,10 @@ export const toPaddedDER = function (sig: any): Buffer { // TRANSACTION UTILS //-------------------------------------------------- /** @internal */ -export const isValidAssetPath = function ( +export const isValidAssetPath = ( path: number[], fwConstants: FirmwareConstants, -): boolean { +): boolean => { const allowedPurposes = [ PURPOSES.ETH, PURPOSES.BTC_LEGACY, @@ -158,7 +160,7 @@ export const isValidAssetPath = function ( }; /** @internal */ -export const splitFrames = function (data: Buffer, frameSz: number): Buffer[] { +export const splitFrames = (data: Buffer, frameSz: number): Buffer[] => { const frames = []; const n = Math.ceil(data.length / frameSz); let off = 0; @@ -179,10 +181,10 @@ function isBase10NumStr(x: string): boolean { } /** @internal Ensure a param is represented by a buffer */ -export const ensureHexBuffer = function ( +export const ensureHexBuffer = ( x: string | number | bigint | Buffer, zeroIsNull = true, -): Buffer { +): Buffer => { try { const isZeroNumber = typeof x === 'number' && x === 0; const isZeroBigInt = typeof x === 'bigint' && x === 0n; @@ -215,7 +217,7 @@ export const ensureHexBuffer = function ( }; /** @internal */ -export const fixLen = function (msg: Buffer, length: number): Buffer { +export const fixLen = (msg: Buffer, length: number): Buffer => { const buf = Buffer.alloc(length); if (msg.length < length) { msg.copy(buf, length - msg.length); @@ -228,7 +230,7 @@ export const fixLen = function (msg: Buffer, length: number): Buffer { // CRYPTO UTILS //-------------------------------------------------- /** @internal */ -export const aes256_encrypt = function (data: Buffer, key: Buffer): Buffer { +export const aes256_encrypt = (data: Buffer, key: Buffer): Buffer => { const iv = Buffer.from(ProtocolConstants.aesIv); const aesCbc = new aes.ModeOfOperation.cbc(key, iv); const paddedData = @@ -237,7 +239,7 @@ export const aes256_encrypt = function (data: Buffer, key: Buffer): Buffer { }; /** @internal */ -export const aes256_decrypt = function (data: Buffer, key: Buffer): Buffer { +export const aes256_decrypt = (data: Buffer, key: Buffer): Buffer => { const iv = Buffer.from(ProtocolConstants.aesIv); const aesCbc = new aes.ModeOfOperation.cbc(key, iv); return Buffer.from(aesCbc.decrypt(data)); @@ -245,7 +247,7 @@ export const aes256_decrypt = function (data: Buffer, key: Buffer): Buffer { // Decode a DER signature. Returns signature object {r, s } or null if there is an error /** @internal */ -export const parseDER = function (sigBuf: Buffer) { +export const parseDER = (sigBuf: Buffer) => { if (sigBuf[0] !== 0x30 || sigBuf[2] !== 0x02) throw new Error('Failed to decode DER signature'); let off = 3; @@ -262,13 +264,13 @@ export const parseDER = function (sigBuf: Buffer) { }; /** @internal */ -export const getP256KeyPair = function (priv: Buffer | string): any { +export const getP256KeyPair = (priv: Buffer | string): any => { if (ec === undefined) ec = new EC('p256'); return ec.keyFromPrivate(priv, 'hex'); }; /** @internal */ -export const getP256KeyPairFromPub = function (pub: Buffer | string): any { +export const getP256KeyPairFromPub = (pub: Buffer | string): any => { if (ec === undefined) ec = new EC('p256'); // Convert Buffer to hex string if needed const pubHex = Buffer.isBuffer(pub) ? pub.toString('hex') : pub; @@ -276,10 +278,10 @@ export const getP256KeyPairFromPub = function (pub: Buffer | string): any { }; /** @internal */ -export const buildSignerPathBuf = function ( +export const buildSignerPathBuf = ( signerPath: number[], varAddrPathSzAllowed: boolean, -): Buffer { +): Buffer => { const buf = Buffer.alloc(24); let off = 0; if (varAddrPathSzAllowed && signerPath.length > 5) @@ -302,10 +304,7 @@ export const buildSignerPathBuf = function ( // OTHER UTILS //-------------------------------------------------- /** @internal */ -export const isAsciiStr = function ( - str: string, - allowFormatChars = false, -): boolean { +export const isAsciiStr = (str: string, allowFormatChars = false): boolean => { if (typeof str !== 'string') { return false; } @@ -325,15 +324,11 @@ export const isAsciiStr = function ( }; /** @internal Check if a value exists in an object. Only checks first level of keys. */ -export const existsIn = function ( - val: T, - obj: { [key: string]: T }, -): boolean { - return Object.keys(obj).some((key) => obj[key] === val); -}; +export const existsIn = (val: T, obj: { [key: string]: T }): boolean => + Object.keys(obj).some((key) => obj[key] === val); /** @internal Create a buffer of size `n` and fill it with random data */ -export const randomBytes = function (n: number): Buffer { +export const randomBytes = (n: number): Buffer => { const buf = Buffer.alloc(n); for (let i = 0; i < n; i++) { buf[i] = Math.round(Math.random() * 255); @@ -393,7 +388,7 @@ export function selectDefFrom4byteABI(abiData: any[], selector: string) { if (abiData.length > 1) { console.warn('WARNING: There are multiple results. Using the first one.'); } - let def; + let def: unknown[] | undefined; abiData .sort((a, b) => { const aTime = new Date(a.created_at).getTime(); @@ -475,7 +470,7 @@ async function fetchSupportedChainData( return fetchAndCache(url) .then((res) => res.json()) .then((body) => { - if (body && body.result) { + if (body?.result) { try { return JSON.parse(body.result); } catch { @@ -498,7 +493,7 @@ async function fetch4byteData(selector: string): Promise { return await fetch(url) .then((res) => res.json()) .then((body) => { - if (body && body.results) { + if (body?.results) { return body.results; } else { throw new Error('No results found'); @@ -729,7 +724,7 @@ export const generateAppSecret = ( * @param resp - Lattice response with sig and pubkey * @returns BN object containing the `v` param */ -export const getV = function (tx: any, resp: any) { +export const getV = (tx: any, resp: any) => { let chainId: string | undefined; let hash: Uint8Array; let type: string | number | undefined; @@ -875,10 +870,10 @@ export const getV = function (tx: any, resp: any) { * @param txData - Transaction data containing chainId, useEIP155, and type * @returns The properly formatted v value as Buffer or BN */ -export const convertRecoveryToV = function ( +export const convertRecoveryToV = ( recovery: number, txData: any = {}, -): Buffer | InstanceType { +): Buffer | InstanceType => { const { chainId, useEIP155, type } = txData; // For typed transactions (EIP-2930, EIP-1559, EIP-7702), we want the recoveryParam (0 or 1) @@ -918,7 +913,7 @@ export const convertRecoveryToV = function ( * @param publicKey - Expected public key * @returns 0 or 1 for the y-parity value */ -export const getYParity = function ( +export const getYParity = ( messageHash: | Buffer | Uint8Array @@ -927,7 +922,7 @@ export const getYParity = function ( | any, signature?: { r: any; s: any } | any, publicKey?: Buffer | Uint8Array | string, -): number { +): number => { // Handle legacy object format for backward compatibility if ( typeof messageHash === 'object' && @@ -942,7 +937,7 @@ export const getYParity = function ( } // Handle legacy transaction format for backward compatibility - if (signature && signature.sig && signature.pubkey && !publicKey) { + if (signature?.sig && signature.pubkey && !publicKey) { return getYParity(messageHash, signature.sig, signature.pubkey); } @@ -1008,9 +1003,7 @@ export const getYParity = function ( if (Buffer.from(recovered).equals(pubkeyBuf)) { return recovery; } - } catch { - continue; - } + } catch {} } throw new Error( diff --git a/packages/sdk/tsup.config.ts b/packages/sdk/tsup.config.ts index c4598578..f2a327a9 100644 --- a/packages/sdk/tsup.config.ts +++ b/packages/sdk/tsup.config.ts @@ -1,31 +1,33 @@ -import { readFileSync } from 'node:fs'; -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { writeFileSync } from 'node:fs'; import { defineConfig } from 'tsup'; -const __dirname = dirname(fileURLToPath(import.meta.url)); -const pkg = JSON.parse( - readFileSync(resolve(__dirname, 'package.json'), 'utf-8'), -); - -const external = Object.keys({ - ...(pkg.dependencies ?? {}), - ...(pkg.peerDependencies ?? {}), -}); +const esmWrapper = `// ESM wrapper - loads the CJS bundle +import { createRequire } from 'node:module'; +const require = createRequire(import.meta.url); +const cjs = require('./index.cjs'); +export const Calldata = cjs.Calldata; +export const Client = cjs.Client; +export const Constants = cjs.Constants; +export const Utils = cjs.Utils; +export * from './index.cjs'; +export default cjs; +`; export default defineConfig({ entry: ['src/index.ts'], outDir: './dist', - format: ['esm', 'cjs'], + format: ['cjs'], target: 'node20', + platform: 'node', sourcemap: true, clean: true, bundle: true, dts: true, silent: true, - outExtension: ({ format }) => ({ - js: format === 'esm' ? '.mjs' : '.cjs', - }), - external, + noExternal: [/.*/], tsconfig: './tsconfig.build.json', + onSuccess: async () => { + writeFileSync('./dist/index.mjs', esmWrapper); + console.log('Generated ESM wrapper: dist/index.mjs'); + }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e1cc7c6..3442ba99 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,14 @@ settings: importers: - .: {} + .: + devDependencies: + '@biomejs/biome': + specifier: ^1.9.0 + version: 1.9.4 + turbo: + specifier: ^2.3.0 + version: 2.7.4 packages/btc: dependencies: @@ -14,30 +21,12 @@ importers: specifier: ^4.0.0 version: 4.0.0 devDependencies: - '@eslint/js': - specifier: ^9.36.0 - version: 9.39.2 + '@biomejs/biome': + specifier: ^1.9.0 + version: 1.9.4 '@types/node': specifier: ^24.10.4 version: 24.10.4 - '@typescript-eslint/eslint-plugin': - specifier: ^8.44.1 - version: 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/parser': - specifier: ^8.44.1 - version: 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - eslint: - specifier: ^9.36.0 - version: 9.39.2(jiti@1.21.7) - eslint-config-prettier: - specifier: ^10.1.8 - version: 10.1.8(eslint@9.39.2(jiti@1.21.7)) - eslint-plugin-prettier: - specifier: ^5.5.4 - version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@1.21.7)))(eslint@9.39.2(jiti@1.21.7))(prettier@3.7.4) - prettier: - specifier: ^3.6.2 - version: 3.7.4 tsup: specifier: ^8.5.0 version: 8.5.1(@microsoft/api-extractor@7.55.2(@types/node@24.10.4))(jiti@1.21.7)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3) @@ -84,6 +73,9 @@ importers: '@tsconfig/docusaurus': specifier: ^2.0.3 version: 2.0.7 + '@types/node': + specifier: ^22.0.0 + version: 22.19.7 docusaurus-plugin-typedoc: specifier: ~1.0.1 version: 1.0.5(typedoc-plugin-markdown@4.0.3(typedoc@0.25.13(typescript@5.9.3))) @@ -112,8 +104,8 @@ importers: specifier: ^6.0.3 version: 6.0.3 gridplus-sdk: - specifier: ^2.4.3 - version: 2.7.1 + specifier: workspace:* + version: link:../sdk react: specifier: ^18.2.0 version: 18.3.1 @@ -131,8 +123,8 @@ importers: specifier: ^3.0.0 version: 3.1.0(vite@4.5.14(@types/node@24.10.4)(terser@5.44.1)) typescript: - specifier: ^4.9.3 - version: 4.9.5 + specifier: ^5.0.0 + version: 5.9.3 vite: specifier: ^4.0.0 version: 4.5.14(@types/node@24.10.4)(terser@5.44.1) @@ -215,9 +207,6 @@ importers: '@chainsafe/bls-keystore': specifier: ^3.1.0 version: 3.1.0 - '@eslint/js': - specifier: ^9.36.0 - version: 9.39.2 '@noble/bls12-381': specifier: ^1.4.0 version: 1.4.0 @@ -248,12 +237,6 @@ importers: '@types/seedrandom': specifier: ^3.0.8 version: 3.0.8 - '@typescript-eslint/eslint-plugin': - specifier: ^8.44.1 - version: 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/parser': - specifier: ^8.44.1 - version: 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) '@vitest/coverage-istanbul': specifier: ^2.1.3 version: 2.1.9(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.4)(jiti@1.21.7)(msw@2.12.7(@types/node@24.10.4)(typescript@5.9.3))(terser@5.44.1)(tsx@4.21.0)) @@ -278,15 +261,6 @@ importers: ed25519-hd-key: specifier: ^1.3.0 version: 1.3.0 - eslint: - specifier: ^9.36.0 - version: 9.39.2(jiti@1.21.7) - eslint-config-prettier: - specifier: ^10.1.8 - version: 10.1.8(eslint@9.39.2(jiti@1.21.7)) - eslint-plugin-prettier: - specifier: ^5.5.4 - version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@1.21.7)))(eslint@9.39.2(jiti@1.21.7))(prettier@3.7.4) ethereumjs-util: specifier: ^7.1.5 version: 7.1.5 @@ -296,12 +270,6 @@ importers: msw: specifier: ^2.11.3 version: 2.12.7(@types/node@24.10.4)(typescript@5.9.3) - prettier: - specifier: ^3.6.2 - version: 3.7.4 - prettier-eslint: - specifier: ^16.4.2 - version: 16.4.2(typescript@5.9.3) random-words: specifier: ^2.0.1 version: 2.0.1 @@ -331,7 +299,7 @@ importers: version: 7.3.1(@types/node@24.10.4)(jiti@1.21.7)(terser@5.44.1)(tsx@4.21.0) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.10.4)(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(jiti@1.21.7)(terser@5.44.1)(tsx@4.21.0)) + version: 4.5.4(@types/node@24.10.4)(rollup@4.55.3)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(jiti@1.21.7)(terser@5.44.1)(tsx@4.21.0)) vitest: specifier: 3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.10.4)(jiti@1.21.7)(msw@2.12.7(@types/node@24.10.4)(typescript@5.9.3))(terser@5.44.1)(tsx@4.21.0) @@ -1022,6 +990,59 @@ packages: resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} engines: {node: '>=6.9.0'} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@braintree/sanitize-url@6.0.4': resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} @@ -1830,61 +1851,12 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/config-array@0.21.1': - resolution: {integrity: sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - 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.3.3': - resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==} - 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.39.2': - resolution: {integrity: sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ethereumjs/common@10.1.0': resolution: {integrity: sha512-zIHCy0i2LFmMDp+QkENyoPGxcoD3QzeNVhx6/vE4nJk4uWGNXzO8xJ2UC4gtGW4UJTAOXja8Z1yZMVeRc2/+Ew==} '@ethereumjs/common@3.2.0': resolution: {integrity: sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA==} - '@ethereumjs/common@4.3.0': - resolution: {integrity: sha512-shBNJ0ewcPNTUfZduHiczPmqkfJDn0Dh/9BR5fq7xUFTuIq7Fu1Vx00XDwQVIrpVL70oycZocOhBM6nDO+4FEQ==} - '@ethereumjs/rlp@10.1.0': resolution: {integrity: sha512-r67BJbwilammAqYI4B5okA66cNdTlFzeWxPNJOolKV52ZS/flo0tUBf4x4gxWXBgh48OgsdFV1Qp5pRoSe8IhQ==} engines: {node: '>=18'} @@ -1895,11 +1867,6 @@ packages: engines: {node: '>=14'} hasBin: true - '@ethereumjs/rlp@5.0.2': - resolution: {integrity: sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==} - engines: {node: '>=18'} - hasBin: true - '@ethereumjs/tx@10.1.0': resolution: {integrity: sha512-svG6pyzUZDpunafszf2BaolA6Izuvo8ZTIETIegpKxAXYudV1hmzPQDdSI+d8nHCFyQfEFbQ6tfUq95lNArmmg==} engines: {node: '>=18'} @@ -1908,10 +1875,6 @@ packages: resolution: {integrity: sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==} engines: {node: '>=14'} - '@ethereumjs/tx@5.3.0': - resolution: {integrity: sha512-uv++XYuIfuqYbvymL3/o14hHuC6zX0nRQ1nI2FHsbkkorLZ2ChEIDqVeeVk7Xc9/jQNU/22sk9qZZkRlsveXxw==} - engines: {node: '>=18'} - '@ethereumjs/util@10.1.0': resolution: {integrity: sha512-GGTCkRu1kWXbz2JoUnIYtJBOoA9T5akzsYa91Bh+DZQ3Cj4qXj3hkNU0Rx6wZlbcmkmhQfrjZfVt52eJO/y2nA==} engines: {node: '>=18'} @@ -1920,95 +1883,12 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} - '@ethereumjs/util@9.1.0': - resolution: {integrity: sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==} - engines: {node: '>=18'} - - '@ethersproject/abi@5.8.0': - resolution: {integrity: sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==} - - '@ethersproject/abstract-provider@5.8.0': - resolution: {integrity: sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==} - - '@ethersproject/abstract-signer@5.8.0': - resolution: {integrity: sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==} - - '@ethersproject/address@5.8.0': - resolution: {integrity: sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==} - - '@ethersproject/base64@5.8.0': - resolution: {integrity: sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==} - - '@ethersproject/bignumber@5.8.0': - resolution: {integrity: sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==} - - '@ethersproject/bytes@5.8.0': - resolution: {integrity: sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==} - - '@ethersproject/constants@5.8.0': - resolution: {integrity: sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==} - - '@ethersproject/hash@5.8.0': - resolution: {integrity: sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==} - - '@ethersproject/keccak256@5.8.0': - resolution: {integrity: sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==} - - '@ethersproject/logger@5.8.0': - resolution: {integrity: sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==} - - '@ethersproject/networks@5.8.0': - resolution: {integrity: sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==} - - '@ethersproject/properties@5.8.0': - resolution: {integrity: sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==} - - '@ethersproject/rlp@5.8.0': - resolution: {integrity: sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==} - - '@ethersproject/signing-key@5.8.0': - resolution: {integrity: sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==} - - '@ethersproject/strings@5.8.0': - resolution: {integrity: sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==} - - '@ethersproject/transactions@5.8.0': - resolution: {integrity: sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==} - - '@ethersproject/web@5.8.0': - resolution: {integrity: sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==} - '@hapi/hoek@9.3.0': resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} '@hapi/topo@5.1.0': resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.7': - resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - - '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} - '@inquirer/ansi@1.0.2': resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} engines: {node: '>=18'} @@ -2159,18 +2039,10 @@ packages: '@types/react': '>=16' react: '>=16' - '@metamask/abi-utils@2.0.4': - resolution: {integrity: sha512-StnIgUB75x7a7AgUhiaUZDpCsqGp7VkNnZh2XivXkJ6mPkE83U8ARGQj5MbRis7VJY8BC5V1AbB1fjdh0hupPQ==} - engines: {node: '>=16.0.0'} - '@metamask/abi-utils@3.0.0': resolution: {integrity: sha512-a/l0DiSIr7+CBYVpHygUa3ztSlYLFCQMsklLna+t6qmNY9+eIO5TedNxhyIyvaJ+4cN7TLy0NQFbp9FV3X2ktg==} engines: {node: ^18.18 || ^20.14 || >=22} - '@metamask/eth-sig-util@7.0.3': - resolution: {integrity: sha512-PAtGnOkYvh90k2lEZldq/FK7GTLF6WxE+2bV85PoA3pqlJnmJCAY62tuvxHSwnVngSKlc4mcNvjnUg2eYO6JGg==} - engines: {node: ^16.20 || ^18.16 || >=20} - '@metamask/eth-sig-util@8.2.0': resolution: {integrity: sha512-LZDglIh4gYGw9Myp+2aIwKrj6lIJpMC4e0m7wKJU+BxLLBFcrTgKrjdjstXGVWvuYG3kutlh9J+uNBRPJqffWQ==} engines: {node: ^18.18 || ^20.14 || >=22} @@ -2183,10 +2055,6 @@ packages: resolution: {integrity: sha512-wRnoSDD9jTWOge/+reFviJQANhS+uy8Y+OEwRanp5mQeGTjBFmK1r2cTOnei2UCZRV1crXHzeJVSFEoDDcgRbA==} engines: {node: ^18.18 || ^20.14 || >=22} - '@metamask/utils@9.3.0': - resolution: {integrity: sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==} - engines: {node: '>=16.0.0'} - '@microsoft/api-extractor-model@7.32.2': resolution: {integrity: sha512-Ussc25rAalc+4JJs9HNQE7TuO9y6jpYQX9nWD1DhqUzYPBr3Lr7O9intf+ZY8kD5HnIqeIRJX7ccCT0QyBy2Ww==} @@ -2264,10 +2132,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.2.9': - resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@pnpm/config.env-replace@1.1.0': resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} @@ -2297,128 +2161,128 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.55.1': - resolution: {integrity: sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==} + '@rollup/rollup-android-arm-eabi@4.55.3': + resolution: {integrity: sha512-qyX8+93kK/7R5BEXPC2PjUt0+fS/VO2BVHjEHyIEWiYn88rcRBHmdLgoJjktBltgAf+NY7RfCGB1SoyKS/p9kg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.55.1': - resolution: {integrity: sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==} + '@rollup/rollup-android-arm64@4.55.3': + resolution: {integrity: sha512-6sHrL42bjt5dHQzJ12Q4vMKfN+kUnZ0atHHnv4V0Wd9JMTk7FDzSY35+7qbz3ypQYMBPANbpGK7JpnWNnhGt8g==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.55.1': - resolution: {integrity: sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==} + '@rollup/rollup-darwin-arm64@4.55.3': + resolution: {integrity: sha512-1ht2SpGIjEl2igJ9AbNpPIKzb1B5goXOcmtD0RFxnwNuMxqkR6AUaaErZz+4o+FKmzxcSNBOLrzsICZVNYa1Rw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.55.1': - resolution: {integrity: sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==} + '@rollup/rollup-darwin-x64@4.55.3': + resolution: {integrity: sha512-FYZ4iVunXxtT+CZqQoPVwPhH7549e/Gy7PIRRtq4t5f/vt54pX6eG9ebttRH6QSH7r/zxAFA4EZGlQ0h0FvXiA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.55.1': - resolution: {integrity: sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==} + '@rollup/rollup-freebsd-arm64@4.55.3': + resolution: {integrity: sha512-M/mwDCJ4wLsIgyxv2Lj7Len+UMHd4zAXu4GQ2UaCdksStglWhP61U3uowkaYBQBhVoNpwx5Hputo8eSqM7K82Q==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.55.1': - resolution: {integrity: sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==} + '@rollup/rollup-freebsd-x64@4.55.3': + resolution: {integrity: sha512-5jZT2c7jBCrMegKYTYTpni8mg8y3uY8gzeq2ndFOANwNuC/xJbVAoGKR9LhMDA0H3nIhvaqUoBEuJoICBudFrA==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.55.1': - resolution: {integrity: sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.55.3': + resolution: {integrity: sha512-YeGUhkN1oA+iSPzzhEjVPS29YbViOr8s4lSsFaZKLHswgqP911xx25fPOyE9+khmN6W4VeM0aevbDp4kkEoHiA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.55.1': - resolution: {integrity: sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==} + '@rollup/rollup-linux-arm-musleabihf@4.55.3': + resolution: {integrity: sha512-eo0iOIOvcAlWB3Z3eh8pVM8hZ0oVkK3AjEM9nSrkSug2l15qHzF3TOwT0747omI6+CJJvl7drwZepT+re6Fy/w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.55.1': - resolution: {integrity: sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==} + '@rollup/rollup-linux-arm64-gnu@4.55.3': + resolution: {integrity: sha512-DJay3ep76bKUDImmn//W5SvpjRN5LmK/ntWyeJs/dcnwiiHESd3N4uteK9FDLf0S0W8E6Y0sVRXpOCoQclQqNg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.55.1': - resolution: {integrity: sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==} + '@rollup/rollup-linux-arm64-musl@4.55.3': + resolution: {integrity: sha512-BKKWQkY2WgJ5MC/ayvIJTHjy0JUGb5efaHCUiG/39sSUvAYRBaO3+/EK0AZT1RF3pSj86O24GLLik9mAYu0IJg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.55.1': - resolution: {integrity: sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==} + '@rollup/rollup-linux-loong64-gnu@4.55.3': + resolution: {integrity: sha512-Q9nVlWtKAG7ISW80OiZGxTr6rYtyDSkauHUtvkQI6TNOJjFvpj4gcH+KaJihqYInnAzEEUetPQubRwHef4exVg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-loong64-musl@4.55.1': - resolution: {integrity: sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==} + '@rollup/rollup-linux-loong64-musl@4.55.3': + resolution: {integrity: sha512-2H5LmhzrpC4fFRNwknzmmTvvyJPHwESoJgyReXeFoYYuIDfBhP29TEXOkCJE/KxHi27mj7wDUClNq78ue3QEBQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.55.1': - resolution: {integrity: sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==} + '@rollup/rollup-linux-ppc64-gnu@4.55.3': + resolution: {integrity: sha512-9S542V0ie9LCTznPYlvaeySwBeIEa7rDBgLHKZ5S9DBgcqdJYburabm8TqiqG6mrdTzfV5uttQRHcbKff9lWtA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-ppc64-musl@4.55.1': - resolution: {integrity: sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==} + '@rollup/rollup-linux-ppc64-musl@4.55.3': + resolution: {integrity: sha512-ukxw+YH3XXpcezLgbJeasgxyTbdpnNAkrIlFGDl7t+pgCxZ89/6n1a+MxlY7CegU+nDgrgdqDelPRNQ/47zs0g==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.55.1': - resolution: {integrity: sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==} + '@rollup/rollup-linux-riscv64-gnu@4.55.3': + resolution: {integrity: sha512-Iauw9UsTTvlF++FhghFJjqYxyXdggXsOqGpFBylaRopVpcbfyIIsNvkf9oGwfgIcf57z3m8+/oSYTo6HutBFNw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.55.1': - resolution: {integrity: sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==} + '@rollup/rollup-linux-riscv64-musl@4.55.3': + resolution: {integrity: sha512-3OqKAHSEQXKdq9mQ4eajqUgNIK27VZPW3I26EP8miIzuKzCJ3aW3oEn2pzF+4/Hj/Moc0YDsOtBgT5bZ56/vcA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.55.1': - resolution: {integrity: sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==} + '@rollup/rollup-linux-s390x-gnu@4.55.3': + resolution: {integrity: sha512-0CM8dSVzVIaqMcXIFej8zZrSFLnGrAE8qlNbbHfTw1EEPnFTg1U1ekI0JdzjPyzSfUsHWtodilQQG/RA55berA==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.55.1': - resolution: {integrity: sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==} + '@rollup/rollup-linux-x64-gnu@4.55.3': + resolution: {integrity: sha512-+fgJE12FZMIgBaKIAGd45rxf+5ftcycANJRWk8Vz0NnMTM5rADPGuRFTYar+Mqs560xuART7XsX2lSACa1iOmQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.55.1': - resolution: {integrity: sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==} + '@rollup/rollup-linux-x64-musl@4.55.3': + resolution: {integrity: sha512-tMD7NnbAolWPzQlJQJjVFh/fNH3K/KnA7K8gv2dJWCwwnaK6DFCYST1QXYWfu5V0cDwarWC8Sf/cfMHniNq21A==} cpu: [x64] os: [linux] - '@rollup/rollup-openbsd-x64@4.55.1': - resolution: {integrity: sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==} + '@rollup/rollup-openbsd-x64@4.55.3': + resolution: {integrity: sha512-u5KsqxOxjEeIbn7bUK1MPM34jrnPwjeqgyin4/N6e/KzXKfpE9Mi0nCxcQjaM9lLmPcHmn/xx1yOjgTMtu1jWQ==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.55.1': - resolution: {integrity: sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==} + '@rollup/rollup-openharmony-arm64@4.55.3': + resolution: {integrity: sha512-vo54aXwjpTtsAnb3ca7Yxs9t2INZg7QdXN/7yaoG7nPGbOBXYXQY41Km+S1Ov26vzOAzLcAjmMdjyEqS1JkVhw==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.55.1': - resolution: {integrity: sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==} + '@rollup/rollup-win32-arm64-msvc@4.55.3': + resolution: {integrity: sha512-HI+PIVZ+m+9AgpnY3pt6rinUdRYrGHvmVdsNQ4odNqQ/eRF78DVpMR7mOq7nW06QxpczibwBmeQzB68wJ+4W4A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.55.1': - resolution: {integrity: sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==} + '@rollup/rollup-win32-ia32-msvc@4.55.3': + resolution: {integrity: sha512-vRByotbdMo3Wdi+8oC2nVxtc3RkkFKrGaok+a62AT8lz/YBuQjaVYAS5Zcs3tPzW43Vsf9J0wehJbUY5xRSekA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.55.1': - resolution: {integrity: sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==} + '@rollup/rollup-win32-x64-gnu@4.55.3': + resolution: {integrity: sha512-POZHq7UeuzMJljC5NjKi8vKMFN6/5EOqcX1yGntNLp7rUTpBAXQ1hW8kWPFxYLv07QMcNM75xqVLGPWQq6TKFA==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.55.1': - resolution: {integrity: sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==} + '@rollup/rollup-win32-x64-msvc@4.55.3': + resolution: {integrity: sha512-aPFONczE4fUFKNXszdvnd2GqKEYQdV5oEsIbKPujJmWlCI9zEsv1Otig8RKK+X9bed9gFUN6LAeN4ZcNuu4zjg==} cpu: [x64] os: [win32] @@ -2528,10 +2392,6 @@ packages: '@solana/web3.js@1.98.4': resolution: {integrity: sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw==} - '@sovpro/delimited-stream@1.1.0': - resolution: {integrity: sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw==} - engines: {node: '>= 8'} - '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -2756,6 +2616,9 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} + '@types/node@22.19.7': + resolution: {integrity: sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw==} + '@types/node@24.10.4': resolution: {integrity: sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==} @@ -2836,9 +2699,6 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@types/uuid@10.0.0': - resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==} - '@types/uuid@11.0.0': resolution: {integrity: sha512-HVyk8nj2m+jcFRNazzqyVKiZezyhDKrGUA3jlEcg/nZ6Ms+qHwocba1Y/AaVaznJTAM9xpdFSh+ptbNrhOGvZA==} deprecated: This is a stub types definition. uuid provides its own type definitions, so you do not need this installed. @@ -2861,96 +2721,6 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.52.0': - resolution: {integrity: sha512-okqtOgqu2qmZJ5iN4TWlgfF171dZmx2FzdOv2K/ixL2LZWDStL8+JgQerI2sa8eAEfoydG9+0V96m7V+P8yE1Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.52.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/parser@6.21.0': - resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.52.0': - resolution: {integrity: sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/project-service@8.52.0': - resolution: {integrity: sha512-xD0MfdSdEmeFa3OmVqonHi+Cciab96ls1UhIF/qX/O/gPu5KXD0bY9lu33jj04fjzrXHcuvjBcBC+D3SNSadaw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/scope-manager@6.21.0': - resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/scope-manager@8.52.0': - resolution: {integrity: sha512-ixxqmmCcc1Nf8S0mS0TkJ/3LKcC8mruYJPOU6Ia2F/zUUR4pApW7LzrpU3JmtePbRUTes9bEqRc1Gg4iyRnDzA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/tsconfig-utils@8.52.0': - resolution: {integrity: sha512-jl+8fzr/SdzdxWJznq5nvoI7qn2tNYV/ZBAEcaFMVXf+K6jmXvAFrgo/+5rxgnL152f//pDEAYAhhBAZGrVfwg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/type-utils@8.52.0': - resolution: {integrity: sha512-JD3wKBRWglYRQkAtsyGz1AewDu3mTc7NtRjR/ceTyGoPqmdS5oCdx/oZMWD5Zuqmo6/MpsYs0wp6axNt88/2EQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/types@6.21.0': - resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/types@8.52.0': - resolution: {integrity: sha512-LWQV1V4q9V4cT4H5JCIx3481iIFxH1UkVk+ZkGGAV1ZGcjGI9IoFOfg3O6ywz8QqCDEp7Inlg6kovMofsNRaGg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@6.21.0': - resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/typescript-estree@8.52.0': - resolution: {integrity: sha512-XP3LClsCc0FsTK5/frGjolyADTh3QmsLp6nKd476xNI9CsSsLnmn4f0jrzNoAulmxlmNIpeXuHYeEQv61Q6qeQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/utils@8.52.0': - resolution: {integrity: sha512-wYndVMWkweqHpEpwPhwqE2lnD2DxC6WVLupU/DOt/0/v+/+iQbbzO3jOHjmBMnhu0DgLULvOaU4h4pwHYi2oRQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/visitor-keys@6.21.0': - resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/visitor-keys@8.52.0': - resolution: {integrity: sha512-ink3/Zofus34nmBsPjow63FP5M7IGff0RKAgqR6+CFpdk22M7aLwC9gOcLGYqr7MczLPzZVERW9hRog3O4n1sQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -3208,10 +2978,6 @@ packages: engines: {'0': node >= 0.8.0} hasBin: true - ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -3223,10 +2989,6 @@ packages: ansi-sequence-parser@1.1.3: resolution: {integrity: sha512-+fksAx9eG3Ab6LDnLs3ZqZa8KVJ/jYnX+D4Qe1azX+LFGFAXqynCQLOdLpNYN/l9e7l6hMWwZbrnctqr6eSQSw==} - ansi-styles@2.2.1: - resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} - engines: {node: '>=0.10.0'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -3439,11 +3201,6 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - borc@3.0.0: - resolution: {integrity: sha512-ec4JmVC46kE0+layfnwM3l15O70MlFiEbmQHY/vpqIKiUtPVntv4BY4NVnz3N4vb21edV3mY97XVckFvYHWF9g==} - engines: {node: '>=4'} - hasBin: true - borsh@0.7.0: resolution: {integrity: sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==} @@ -3593,10 +3350,6 @@ packages: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} engines: {node: '>=18'} - chalk@1.1.3: - resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} - engines: {node: '>=0.10.0'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -3746,10 +3499,6 @@ packages: common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - compare-versions@6.1.1: resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} @@ -4183,9 +3932,6 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -4271,17 +4017,10 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - dlv@1.1.3: - resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - dns-packet@5.6.1: resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} engines: {node: '>=6'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - docusaurus-plugin-typedoc@1.0.5: resolution: {integrity: sha512-mv8LBJYilGOOPLqaIM3vbYc34m4qwOCpb4WfP24DOPFNj2uiTerw8sg9MGvN6Jx2+J8rq9/WMnjcyz3UMqoIIQ==} peerDependencies: @@ -4353,9 +4092,6 @@ packages: elkjs@0.9.3: resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} - elliptic@6.5.6: - resolution: {integrity: sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==} - elliptic@6.6.1: resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==} @@ -4480,79 +4216,15 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-prettier@10.1.8: - resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-plugin-prettier@5.5.4: - resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - eslint@9.39.2: - resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - esquery@1.7.0: - resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} - engines: {node: '>=0.10'} - esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -4692,9 +4364,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} @@ -4705,9 +4374,6 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} @@ -4747,14 +4413,6 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} - file-loader@6.2.0: resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} engines: {node: '>= 10.13.0'} @@ -4773,10 +4431,6 @@ packages: resolution: {integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==} engines: {node: '>=14.16'} - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4784,21 +4438,10 @@ packages: fix-dts-default-cjs-exports@1.0.1: resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.3.3: - resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} - follow-redirects@1.15.11: resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==} engines: {node: '>=4.0'} @@ -4839,9 +4482,6 @@ packages: resolution: {integrity: sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==} engines: {node: '>=14.14'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -4908,22 +4548,10 @@ packages: resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} hasBin: true - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - global-dirs@3.0.1: resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} engines: {node: '>=10'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -4946,9 +4574,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.12.0: resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -4957,9 +4582,6 @@ packages: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} - gridplus-sdk@2.7.1: - resolution: {integrity: sha512-KJgNN0dnLL5/NMUJnQ2sy3vAs3AJnpYDeC5jQSo2rZVyauV6eAS9SJMTYikENbgB/BDnn5gOCbvob/CwbMMKbg==} - gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -4967,10 +4589,6 @@ packages: handle-thing@2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} - has-ansi@2.0.0: - resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} - engines: {node: '>=0.10.0'} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -5174,10 +4792,6 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.5: - resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} - engines: {node: '>= 4'} - image-size@2.0.2: resolution: {integrity: sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w==} engines: {node: '>=16.x'} @@ -5203,10 +4817,6 @@ packages: resolution: {integrity: sha512-uyH0zfr1erU1OohLk0fT4Rrb94AOhguWNOcD9uGrSpRvNB+6gZXUoJX5J0NtvzBO10YZ9PgvA4NFgt+fYg8ojw==} engines: {node: '>=12'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -5396,10 +5006,6 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - iso-url@1.2.1: - resolution: {integrity: sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==} - engines: {node: '>=12'} - isobject@3.0.1: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} @@ -5492,12 +5098,6 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} - - js-sha3@0.9.3: - resolution: {integrity: sha512-BcJPCQeLg6WjEx3FE591wVAevlli8lxsxm9/FzV4HXkV49TmBH38Yvrpce6fjbADGMKFrBMGTqrVz3qPIZ88Gg==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5535,16 +5135,9 @@ packages: json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - json-text-sequence@0.3.0: - resolution: {integrity: sha512-7khKIYPKwXQem4lWXfpIN/FEnhztCeRPSxH4qm3fVlqulwujrRDD54xAwDDn/qVKpFtV550+QAkcWJcufzqQuA==} - engines: {node: '>=10.18.0'} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -5603,10 +5196,6 @@ packages: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -5630,10 +5219,6 @@ packages: resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==} engines: {node: '>=14'} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -5647,22 +5232,12 @@ packages: lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - loglevel-colored-level-prefix@1.0.0: - resolution: {integrity: sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==} - - loglevel@1.9.2: - resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} - engines: {node: '>= 0.6.0'} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -6115,10 +5690,6 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} - engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -6183,9 +5754,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -6311,10 +5879,6 @@ packages: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} @@ -6342,18 +5906,10 @@ packages: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6426,18 +5982,10 @@ packages: path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - path-exists@5.0.0: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-is-inside@1.0.2: resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} @@ -6924,38 +6472,9 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-eslint@16.4.2: - resolution: {integrity: sha512-vtJAQEkaN8fW5QKl08t7A5KCjlZuDUNeIlr9hgolMS5s3+uzbfRHDwaRnzrdqnY2YpHDmeDS/8zY0MKQHXJtaA==} - engines: {node: '>=16.10.0'} - peerDependencies: - prettier-plugin-svelte: ^3.0.0 - svelte-eslint-parser: '*' - peerDependenciesMeta: - prettier-plugin-svelte: - optional: true - svelte-eslint-parser: - optional: true - - prettier-linter-helpers@1.0.1: - resolution: {integrity: sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==} - engines: {node: '>=6.0.0'} - - prettier@3.7.4: - resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} - engines: {node: '>=14'} - hasBin: true - pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - pretty-format@30.2.0: resolution: {integrity: sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -7227,9 +6746,6 @@ packages: require-like@0.1.2: resolution: {integrity: sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==} - require-relative@0.8.7: - resolution: {integrity: sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==} - requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -7270,11 +6786,6 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - ripemd160@2.0.3: resolution: {integrity: sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==} engines: {node: '>= 0.8'} @@ -7291,8 +6802,8 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true - rollup@4.55.1: - resolution: {integrity: sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==} + rollup@4.55.3: + resolution: {integrity: sha512-y9yUpfQvetAjiDLtNMf1hL9NXchIJgWt6zIKeoB+tCd3npX08Eqfzg60V9DhIGVMtQ0AlMkFw5xa+AQ37zxnAA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7354,10 +6865,6 @@ packages: resolution: {integrity: sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==} engines: {node: '>=18.0.0'} - secp256k1@5.0.0: - resolution: {integrity: sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==} - engines: {node: '>=14.0.0'} - secp256k1@5.0.1: resolution: {integrity: sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==} engines: {node: '>=18.0.0'} @@ -7611,10 +7118,6 @@ packages: resolution: {integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==} engines: {node: '>=4'} - strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -7673,10 +7176,6 @@ packages: resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} engines: {node: '>=14.0.0'} - supports-color@2.0.0: - resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} - engines: {node: '>=0.8.0'} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -7702,10 +7201,6 @@ packages: peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - synckit@0.11.11: - resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} - engines: {node: ^14.18.0 || >=16.0.0} - tagged-tag@1.0.0: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} engines: {node: '>=20'} @@ -7751,9 +7246,6 @@ packages: text-encoding-utf-8@1.0.2: resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -7859,18 +7351,6 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@1.4.3: - resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - - ts-api-utils@2.4.0: - resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' - ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -7905,16 +7385,42 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - tweetnacl@1.0.3: - resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} - - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + turbo-darwin-64@2.7.4: + resolution: {integrity: sha512-xDR30ltfkSsRfGzABBckvl1nz1cZ3ssTujvdj+TPwOweeDRvZ0e06t5DS0rmRBvyKpgGs42K/EK6Mn2qLlFY9A==} + cpu: [x64] + os: [darwin] - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} + turbo-darwin-arm64@2.7.4: + resolution: {integrity: sha512-P7sjqXtOL/+nYWPvcDGWhi8wf8M8mZHHB8XEzw2VX7VJrS8IGHyJHGD1AYfDvhAEcr7pnk3gGifz3/xyhI655w==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.7.4: + resolution: {integrity: sha512-GofFOxRO/IhG8BcPyMSSB3Y2+oKQotsaYbHxL9yD6JPb20/o35eo+zUSyazOtilAwDHnak5dorAJFoFU8MIg2A==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.7.4: + resolution: {integrity: sha512-+RQKgNjksVPxYAyAgmDV7w/1qj++qca+nSNTAOKGOfJiDtSvRKoci89oftJ6anGs00uamLKVEQ712TI/tfNAIw==} + cpu: [arm64] + os: [linux] + + turbo-windows-64@2.7.4: + resolution: {integrity: sha512-rfak1+g+ON3czs1mDYsCS4X74ZmK6gOgRQTXjDICtzvR4o61paqtgAYtNPofcVsMWeF4wvCajSeoAkkeAnQ1kg==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.7.4: + resolution: {integrity: sha512-1ZgBNjNRbDu/fPeqXuX9i26x3CJ/Y1gcwUpQ+Vp7kN9Un6RZ9kzs164f/knrjcu5E+szCRexVjRSJay1k5jApA==} + cpu: [arm64] + os: [win32] + + turbo@2.7.4: + resolution: {integrity: sha512-bkO4AddmDishzJB2ze7aYYPaejMoJVfS0XnaR6RCdXFOY8JGJfQE+l9fKiV7uDPa5Ut44gmOWJL3894CIMeH9g==} + hasBin: true + + tweetnacl@1.0.3: + resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} @@ -7958,11 +7464,6 @@ packages: typeforce@1.18.0: resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} - hasBin: true - typescript@5.8.2: resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} engines: {node: '>=14.17'} @@ -7987,6 +7488,9 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -8116,10 +7620,6 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@10.0.0: - resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} - hasBin: true - uuid@13.0.0: resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==} hasBin: true @@ -8300,12 +7800,6 @@ packages: vscode-uri@3.1.0: resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} - vue-eslint-parser@9.4.3: - resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - watchpack@2.5.0: resolution: {integrity: sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==} engines: {node: '>=10.13.0'} @@ -8415,10 +7909,6 @@ packages: wildcard@2.0.1: resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -8506,10 +7996,6 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - yocto-queue@1.2.2: resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} engines: {node: '>=12.20'} @@ -9430,6 +8916,41 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + '@braintree/sanitize-url@6.0.4': {} '@chainsafe/bls-keystore@3.1.0': @@ -10674,73 +10195,6 @@ snapshots: '@esbuild/win32-x64@0.27.2': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2(jiti@1.21.7))': - dependencies: - eslint: 9.39.2(jiti@1.21.7) - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.2': {} - - '@eslint/config-array@0.21.1': - dependencies: - '@eslint/object-schema': 2.1.7 - debug: 4.4.3 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/config-helpers@0.4.2': - dependencies: - '@eslint/core': 0.17.0 - - '@eslint/core@0.17.0': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.4.3 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.1 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.3.3': - dependencies: - ajv: 6.12.6 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.1 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.1': {} - - '@eslint/js@9.39.2': {} - - '@eslint/object-schema@2.1.7': {} - - '@eslint/plugin-kit@0.4.1': - dependencies: - '@eslint/core': 0.17.0 - levn: 0.4.1 - '@ethereumjs/common@10.1.0': dependencies: '@ethereumjs/util': 10.1.0 @@ -10751,16 +10205,10 @@ snapshots: '@ethereumjs/util': 8.1.0 crc-32: 1.2.2 - '@ethereumjs/common@4.3.0': - dependencies: - '@ethereumjs/util': 9.1.0 - '@ethereumjs/rlp@10.1.0': {} '@ethereumjs/rlp@4.0.1': {} - '@ethereumjs/rlp@5.0.2': {} - '@ethereumjs/tx@10.1.0': dependencies: '@ethereumjs/common': 10.1.0 @@ -10775,13 +10223,6 @@ snapshots: '@ethereumjs/util': 8.1.0 ethereum-cryptography: 2.2.1 - '@ethereumjs/tx@5.3.0': - dependencies: - '@ethereumjs/common': 4.3.0 - '@ethereumjs/rlp': 5.0.2 - '@ethereumjs/util': 9.1.0 - ethereum-cryptography: 2.2.1 - '@ethereumjs/util@10.1.0': dependencies: '@ethereumjs/rlp': 10.1.0 @@ -10793,161 +10234,12 @@ snapshots: ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 - '@ethereumjs/util@9.1.0': - dependencies: - '@ethereumjs/rlp': 5.0.2 - ethereum-cryptography: 2.2.1 - - '@ethersproject/abi@5.8.0': - dependencies: - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/hash': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/abstract-provider@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/networks': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/transactions': 5.8.0 - '@ethersproject/web': 5.8.0 - - '@ethersproject/abstract-signer@5.8.0': - dependencies: - '@ethersproject/abstract-provider': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - - '@ethersproject/address@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/rlp': 5.8.0 - - '@ethersproject/base64@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - - '@ethersproject/bignumber@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - bn.js: 5.2.2 - - '@ethersproject/bytes@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/constants@5.8.0': - dependencies: - '@ethersproject/bignumber': 5.8.0 - - '@ethersproject/hash@5.8.0': - dependencies: - '@ethersproject/abstract-signer': 5.8.0 - '@ethersproject/address': 5.8.0 - '@ethersproject/base64': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - - '@ethersproject/keccak256@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - js-sha3: 0.8.0 - - '@ethersproject/logger@5.8.0': {} - - '@ethersproject/networks@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/properties@5.8.0': - dependencies: - '@ethersproject/logger': 5.8.0 - - '@ethersproject/rlp@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/signing-key@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - bn.js: 5.2.2 - elliptic: 6.6.1 - hash.js: 1.1.7 - - '@ethersproject/strings@5.8.0': - dependencies: - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/logger': 5.8.0 - - '@ethersproject/transactions@5.8.0': - dependencies: - '@ethersproject/address': 5.8.0 - '@ethersproject/bignumber': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/constants': 5.8.0 - '@ethersproject/keccak256': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/rlp': 5.8.0 - '@ethersproject/signing-key': 5.8.0 - - '@ethersproject/web@5.8.0': - dependencies: - '@ethersproject/base64': 5.8.0 - '@ethersproject/bytes': 5.8.0 - '@ethersproject/logger': 5.8.0 - '@ethersproject/properties': 5.8.0 - '@ethersproject/strings': 5.8.0 - '@hapi/hoek@9.3.0': {} '@hapi/topo@5.1.0': dependencies: '@hapi/hoek': 9.3.0 - '@humanfs/core@0.19.1': {} - - '@humanfs/node@0.16.7': - dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.4.3 - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@humanwhocodes/retry@0.4.3': {} - '@inquirer/ansi@1.0.2': {} '@inquirer/confirm@5.1.21(@types/node@24.10.4)': @@ -11131,13 +10423,6 @@ snapshots: '@types/react': 18.3.27 react: 18.3.1 - '@metamask/abi-utils@2.0.4': - dependencies: - '@metamask/superstruct': 3.2.1 - '@metamask/utils': 9.3.0 - transitivePeerDependencies: - - supports-color - '@metamask/abi-utils@3.0.0': dependencies: '@metamask/superstruct': 3.2.1 @@ -11145,17 +10430,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/eth-sig-util@7.0.3': - dependencies: - '@ethereumjs/util': 8.1.0 - '@metamask/abi-utils': 2.0.4 - '@metamask/utils': 9.3.0 - '@scure/base': 1.1.9 - ethereum-cryptography: 2.2.1 - tweetnacl: 1.0.3 - transitivePeerDependencies: - - supports-color - '@metamask/eth-sig-util@8.2.0': dependencies: '@ethereumjs/rlp': 4.0.1 @@ -11186,20 +10460,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/utils@9.3.0': - dependencies: - '@ethereumjs/tx': 4.2.0 - '@metamask/superstruct': 3.2.1 - '@noble/hashes': 1.8.0 - '@scure/base': 1.1.9 - '@types/debug': 4.1.12 - debug: 4.4.3 - pony-cause: 2.1.11 - semver: 7.7.3 - uuid: 9.0.1 - transitivePeerDependencies: - - supports-color - '@microsoft/api-extractor-model@7.32.2(@types/node@24.10.4)': dependencies: '@microsoft/tsdoc': 0.16.0 @@ -11295,8 +10555,6 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.2.9': {} - '@pnpm/config.env-replace@1.1.0': {} '@pnpm/network.ca-file@1.0.2': @@ -11328,87 +10586,87 @@ snapshots: - supports-color optional: true - '@rollup/pluginutils@5.3.0(rollup@4.55.1)': + '@rollup/pluginutils@5.3.0(rollup@4.55.3)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: - rollup: 4.55.1 + rollup: 4.55.3 - '@rollup/rollup-android-arm-eabi@4.55.1': + '@rollup/rollup-android-arm-eabi@4.55.3': optional: true - '@rollup/rollup-android-arm64@4.55.1': + '@rollup/rollup-android-arm64@4.55.3': optional: true - '@rollup/rollup-darwin-arm64@4.55.1': + '@rollup/rollup-darwin-arm64@4.55.3': optional: true - '@rollup/rollup-darwin-x64@4.55.1': + '@rollup/rollup-darwin-x64@4.55.3': optional: true - '@rollup/rollup-freebsd-arm64@4.55.1': + '@rollup/rollup-freebsd-arm64@4.55.3': optional: true - '@rollup/rollup-freebsd-x64@4.55.1': + '@rollup/rollup-freebsd-x64@4.55.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.55.1': + '@rollup/rollup-linux-arm-gnueabihf@4.55.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.55.1': + '@rollup/rollup-linux-arm-musleabihf@4.55.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.55.1': + '@rollup/rollup-linux-arm64-gnu@4.55.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.55.1': + '@rollup/rollup-linux-arm64-musl@4.55.3': optional: true - '@rollup/rollup-linux-loong64-gnu@4.55.1': + '@rollup/rollup-linux-loong64-gnu@4.55.3': optional: true - '@rollup/rollup-linux-loong64-musl@4.55.1': + '@rollup/rollup-linux-loong64-musl@4.55.3': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.55.1': + '@rollup/rollup-linux-ppc64-gnu@4.55.3': optional: true - '@rollup/rollup-linux-ppc64-musl@4.55.1': + '@rollup/rollup-linux-ppc64-musl@4.55.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.55.1': + '@rollup/rollup-linux-riscv64-gnu@4.55.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.55.1': + '@rollup/rollup-linux-riscv64-musl@4.55.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.55.1': + '@rollup/rollup-linux-s390x-gnu@4.55.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.55.1': + '@rollup/rollup-linux-x64-gnu@4.55.3': optional: true - '@rollup/rollup-linux-x64-musl@4.55.1': + '@rollup/rollup-linux-x64-musl@4.55.3': optional: true - '@rollup/rollup-openbsd-x64@4.55.1': + '@rollup/rollup-openbsd-x64@4.55.3': optional: true - '@rollup/rollup-openharmony-arm64@4.55.1': + '@rollup/rollup-openharmony-arm64@4.55.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.55.1': + '@rollup/rollup-win32-arm64-msvc@4.55.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.55.1': + '@rollup/rollup-win32-ia32-msvc@4.55.3': optional: true - '@rollup/rollup-win32-x64-gnu@4.55.1': + '@rollup/rollup-win32-x64-gnu@4.55.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.55.1': + '@rollup/rollup-win32-x64-msvc@4.55.3': optional: true '@rushstack/node-core-library@5.19.1(@types/node@24.10.4)': @@ -11552,8 +10810,6 @@ snapshots: - typescript - utf-8-validate - '@sovpro/delimited-stream@1.1.0': {} - '@standard-schema/spec@1.1.0': {} '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.28.5)': @@ -11810,6 +11066,10 @@ snapshots: '@types/node@17.0.45': {} + '@types/node@22.19.7': + dependencies: + undici-types: 6.21.0 + '@types/node@24.10.4': dependencies: undici-types: 7.16.0 @@ -11900,8 +11160,6 @@ snapshots: '@types/unist@3.0.3': {} - '@types/uuid@10.0.0': {} - '@types/uuid@11.0.0': dependencies: uuid: 13.0.0 @@ -11927,137 +11185,6 @@ snapshots: '@types/node': 24.10.4 optional: true - '@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/type-utils': 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/utils': 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.52.0 - eslint: 9.39.2(jiti@1.21.7) - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.4.3 - eslint: 8.57.1 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.52.0 - debug: 4.4.3 - eslint: 9.39.2(jiti@1.21.7) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.52.0(typescript@5.9.3)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.52.0(typescript@5.9.3) - '@typescript-eslint/types': 8.52.0 - debug: 4.4.3 - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@6.21.0': - dependencies: - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/visitor-keys': 6.21.0 - - '@typescript-eslint/scope-manager@8.52.0': - dependencies: - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/visitor-keys': 8.52.0 - - '@typescript-eslint/tsconfig-utils@8.52.0(typescript@5.9.3)': - dependencies: - typescript: 5.9.3 - - '@typescript-eslint/type-utils@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3) - debug: 4.4.3 - eslint: 9.39.2(jiti@1.21.7) - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@6.21.0': {} - - '@typescript-eslint/types@8.52.0': {} - - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.9.3)': - dependencies: - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.4.3 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.7.3 - ts-api-utils: 1.4.3(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.52.0(typescript@5.9.3)': - dependencies: - '@typescript-eslint/project-service': 8.52.0(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.52.0(typescript@5.9.3) - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/visitor-keys': 8.52.0 - debug: 4.4.3 - minimatch: 9.0.5 - semver: 7.7.3 - tinyglobby: 0.2.15 - ts-api-utils: 2.4.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.52.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@1.21.7)) - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3) - eslint: 9.39.2(jiti@1.21.7) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/visitor-keys@6.21.0': - dependencies: - '@typescript-eslint/types': 6.21.0 - eslint-visitor-keys: 3.4.3 - - '@typescript-eslint/visitor-keys@8.52.0': - dependencies: - '@typescript-eslint/types': 8.52.0 - eslint-visitor-keys: 4.2.1 - '@ungap/structured-clone@1.3.0': {} '@vercel/oidc@3.0.5': {} @@ -12388,16 +11515,12 @@ snapshots: ansi-html-community@0.0.8: {} - ansi-regex@2.1.1: {} - ansi-regex@5.0.1: {} ansi-regex@6.2.2: {} ansi-sequence-parser@1.1.3: {} - ansi-styles@2.2.1: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -12610,16 +11733,6 @@ snapshots: boolbase@1.0.0: {} - borc@3.0.0: - dependencies: - bignumber.js: 9.3.1 - buffer: 6.0.3 - commander: 2.20.3 - ieee754: 1.2.1 - iso-url: 1.2.1 - json-text-sequence: 0.3.0 - readable-stream: 3.6.2 - borsh@0.7.0: dependencies: bn.js: 5.2.2 @@ -12813,14 +11926,6 @@ snapshots: loupe: 3.2.1 pathval: 2.0.1 - chalk@1.1.3: - dependencies: - ansi-styles: 2.2.1 - escape-string-regexp: 1.0.5 - has-ansi: 2.0.0 - strip-ansi: 3.0.1 - supports-color: 2.0.0 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -12957,8 +12062,6 @@ snapshots: common-path-prefix@3.0.0: {} - common-tags@1.8.2: {} - compare-versions@6.1.1: {} compressible@2.0.18: @@ -13434,8 +12537,6 @@ snapshots: deep-extend@0.6.0: {} - deep-is@0.1.4: {} - deepmerge@4.3.1: {} default-browser-id@5.0.1: {} @@ -13508,16 +12609,10 @@ snapshots: dependencies: path-type: 4.0.0 - dlv@1.1.3: {} - dns-packet@5.6.1: dependencies: '@leichtgewicht/ip-codec': 2.0.5 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - docusaurus-plugin-typedoc@1.0.5(typedoc-plugin-markdown@4.0.3(typedoc@0.25.13(typescript@5.9.3))): dependencies: typedoc-plugin-markdown: 4.0.3(typedoc@0.25.13(typescript@5.9.3)) @@ -13604,16 +12699,6 @@ snapshots: elkjs@0.9.3: {} - elliptic@6.5.6: - dependencies: - bn.js: 4.12.2 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - elliptic@6.6.1: dependencies: bn.js: 4.12.2 @@ -13770,141 +12855,13 @@ snapshots: source-map: 0.6.1 optional: true - eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@1.21.7)): - dependencies: - eslint: 9.39.2(jiti@1.21.7) - - eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@1.21.7)))(eslint@9.39.2(jiti@1.21.7))(prettier@3.7.4): - dependencies: - eslint: 9.39.2(jiti@1.21.7) - prettier: 3.7.4 - prettier-linter-helpers: 1.0.1 - synckit: 0.11.11 - optionalDependencies: - '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.8(eslint@9.39.2(jiti@1.21.7)) - eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-scope@8.4.0: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@4.2.1: {} - - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@8.57.1) - '@eslint-community/regexpp': 4.12.2 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.3.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.7.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.1 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - eslint@9.39.2(jiti@1.21.7): - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@1.21.7)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.1 - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.3 - '@eslint/js': 9.39.2 - '@eslint/plugin-kit': 0.4.1 - '@humanfs/node': 0.16.7 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.7.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - optionalDependencies: - jiti: 1.21.7 - transitivePeerDependencies: - - supports-color - - espree@10.4.0: - dependencies: - acorn: 8.15.0 - acorn-jsx: 5.3.2(acorn@8.15.0) - eslint-visitor-keys: 4.2.1 - - espree@9.6.1: - dependencies: - acorn: 8.15.0 - acorn-jsx: 5.3.2(acorn@8.15.0) - eslint-visitor-keys: 3.4.3 - esprima@4.0.1: {} - esquery@1.7.0: - dependencies: - estraverse: 5.3.0 - esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -14127,8 +13084,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-fifo@1.3.2: optional: true @@ -14142,8 +13097,6 @@ snapshots: fast-json-stable-stringify@2.1.0: {} - fast-levenshtein@2.0.6: {} - fast-safe-stringify@2.1.1: {} fast-stable-stringify@1.0.0: {} @@ -14179,14 +13132,6 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - file-loader@6.2.0(webpack@5.104.1): dependencies: loader-utils: 2.0.4 @@ -14214,11 +13159,6 @@ snapshots: common-path-prefix: 3.0.0 pkg-dir: 7.0.0 - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - find-up@6.3.0: dependencies: locate-path: 7.2.0 @@ -14228,23 +13168,10 @@ snapshots: dependencies: magic-string: 0.30.21 mlly: 1.8.0 - rollup: 4.55.1 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.3 - keyv: 4.5.4 - rimraf: 3.0.2 - - flat-cache@4.0.1: - dependencies: - flatted: 3.3.3 - keyv: 4.5.4 + rollup: 4.55.3 flat@5.0.2: {} - flatted@3.3.3: {} - follow-redirects@1.15.11: {} for-each@0.3.5: @@ -14272,8 +13199,6 @@ snapshots: jsonfile: 6.2.0 universalify: 2.0.1 - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true @@ -14348,25 +13273,10 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - global-dirs@3.0.1: dependencies: ini: 2.0.0 - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globals@14.0.0: {} - globby@11.1.0: dependencies: array-union: 2.1.0 @@ -14404,8 +13314,6 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - graphql@16.12.0: {} gray-matter@4.0.3: @@ -14415,40 +13323,12 @@ snapshots: section-matter: 1.0.0 strip-bom-string: 1.0.0 - gridplus-sdk@2.7.1: - dependencies: - '@ethereumjs/common': 4.3.0 - '@ethereumjs/rlp': 5.0.2 - '@ethereumjs/tx': 5.3.0 - '@ethersproject/abi': 5.8.0 - '@metamask/eth-sig-util': 7.0.3 - '@types/uuid': 10.0.0 - aes-js: 3.1.2 - bech32: 2.0.0 - bignumber.js: 9.3.1 - bitwise: 2.2.1 - borc: 3.0.0 - bs58check: 4.0.0 - buffer: 6.0.3 - crc-32: 1.2.2 - elliptic: 6.5.6 - hash.js: 1.1.7 - js-sha3: 0.9.3 - secp256k1: 5.0.0 - uuid: 10.0.0 - transitivePeerDependencies: - - supports-color - gzip-size@6.0.0: dependencies: duplexer: 0.1.2 handle-thing@2.0.1: {} - has-ansi@2.0.0: - dependencies: - ansi-regex: 2.1.1 - has-flag@4.0.0: {} has-property-descriptors@1.0.2: @@ -14797,8 +13677,6 @@ snapshots: ignore@5.3.2: {} - ignore@7.0.5: {} - image-size@2.0.2: {} import-fresh@3.3.1: @@ -14814,11 +13692,6 @@ snapshots: infima@0.2.0-alpha.45: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - inherits@2.0.3: {} inherits@2.0.4: {} @@ -14950,8 +13823,6 @@ snapshots: isexe@2.0.0: {} - iso-url@1.2.1: {} - isobject@3.0.1: {} isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.1.0)(utf-8-validate@5.0.10)): @@ -15096,10 +13967,6 @@ snapshots: joycon@3.1.1: {} - js-sha3@0.8.0: {} - - js-sha3@0.9.3: {} - js-tokens@4.0.0: {} js-tokens@9.0.1: {} @@ -15127,14 +13994,8 @@ snapshots: json-schema@0.4.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - json-stringify-safe@5.0.1: {} - json-text-sequence@0.3.0: - dependencies: - '@sovpro/delimited-stream': 1.1.0 - json5@2.2.3: {} jsonc-parser@3.3.1: {} @@ -15191,11 +14052,6 @@ snapshots: leven@3.1.0: {} - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -15216,10 +14072,6 @@ snapshots: pkg-types: 2.3.0 quansync: 0.2.11 - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - locate-path@7.2.0: dependencies: p-locate: 6.0.0 @@ -15230,19 +14082,10 @@ snapshots: lodash.memoize@4.1.2: {} - lodash.merge@4.6.2: {} - lodash.uniq@4.5.0: {} lodash@4.17.21: {} - loglevel-colored-level-prefix@1.0.0: - dependencies: - chalk: 1.1.3 - loglevel: 1.9.2 - - loglevel@1.9.2: {} - longest-streak@3.1.0: {} loose-envify@1.4.0: @@ -16204,10 +15047,6 @@ snapshots: dependencies: brace-expansion: 1.1.12 - minimatch@9.0.3: - dependencies: - brace-expansion: 2.0.2 - minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -16280,8 +15119,6 @@ snapshots: nanoid@3.3.11: {} - natural-compare@1.4.0: {} - negotiator@0.6.3: {} negotiator@0.6.4: {} @@ -16367,6 +15204,7 @@ snapshots: once@1.4.0: dependencies: wrappy: 1.0.2 + optional: true onetime@5.1.2: dependencies: @@ -16387,15 +15225,6 @@ snapshots: opener@1.5.2: {} - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - outvariant@1.4.3: {} ox@0.11.1(typescript@5.9.3)(zod@4.3.5): @@ -16432,18 +15261,10 @@ snapshots: p-finally@1.0.0: {} - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - p-limit@4.0.0: dependencies: yocto-queue: 1.2.2 - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - p-locate@6.0.0: dependencies: p-limit: 4.0.0 @@ -16547,12 +15368,8 @@ snapshots: path-browserify@1.0.1: {} - path-exists@4.0.0: {} - path-exists@5.0.0: {} - path-is-absolute@1.0.1: {} - path-is-inside@1.0.2: {} path-key@3.1.1: {} @@ -17069,43 +15886,11 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier-eslint@16.4.2(typescript@5.9.3): - dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.9.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.7.4 - pretty-format: 29.7.0 - require-relative: 0.8.7 - tslib: 2.8.1 - vue-eslint-parser: 9.4.3(eslint@8.57.1) - transitivePeerDependencies: - - supports-color - - typescript - - prettier-linter-helpers@1.0.1: - dependencies: - fast-diff: 1.3.0 - - prettier@3.7.4: {} - pretty-error@4.0.0: dependencies: lodash: 4.17.21 renderkid: 3.0.0 - pretty-format@29.7.0: - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.3.1 - pretty-format@30.2.0: dependencies: '@jest/schemas': 30.0.5 @@ -17486,8 +16271,6 @@ snapshots: require-like@0.1.2: {} - require-relative@0.8.7: {} - requires-port@1.0.0: {} resolve-alpn@1.2.1: {} @@ -17516,10 +16299,6 @@ snapshots: reusify@1.1.0: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - ripemd160@2.0.3: dependencies: hash-base: 3.1.2 @@ -17535,35 +16314,35 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - rollup@4.55.1: + rollup@4.55.3: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.55.1 - '@rollup/rollup-android-arm64': 4.55.1 - '@rollup/rollup-darwin-arm64': 4.55.1 - '@rollup/rollup-darwin-x64': 4.55.1 - '@rollup/rollup-freebsd-arm64': 4.55.1 - '@rollup/rollup-freebsd-x64': 4.55.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.55.1 - '@rollup/rollup-linux-arm-musleabihf': 4.55.1 - '@rollup/rollup-linux-arm64-gnu': 4.55.1 - '@rollup/rollup-linux-arm64-musl': 4.55.1 - '@rollup/rollup-linux-loong64-gnu': 4.55.1 - '@rollup/rollup-linux-loong64-musl': 4.55.1 - '@rollup/rollup-linux-ppc64-gnu': 4.55.1 - '@rollup/rollup-linux-ppc64-musl': 4.55.1 - '@rollup/rollup-linux-riscv64-gnu': 4.55.1 - '@rollup/rollup-linux-riscv64-musl': 4.55.1 - '@rollup/rollup-linux-s390x-gnu': 4.55.1 - '@rollup/rollup-linux-x64-gnu': 4.55.1 - '@rollup/rollup-linux-x64-musl': 4.55.1 - '@rollup/rollup-openbsd-x64': 4.55.1 - '@rollup/rollup-openharmony-arm64': 4.55.1 - '@rollup/rollup-win32-arm64-msvc': 4.55.1 - '@rollup/rollup-win32-ia32-msvc': 4.55.1 - '@rollup/rollup-win32-x64-gnu': 4.55.1 - '@rollup/rollup-win32-x64-msvc': 4.55.1 + '@rollup/rollup-android-arm-eabi': 4.55.3 + '@rollup/rollup-android-arm64': 4.55.3 + '@rollup/rollup-darwin-arm64': 4.55.3 + '@rollup/rollup-darwin-x64': 4.55.3 + '@rollup/rollup-freebsd-arm64': 4.55.3 + '@rollup/rollup-freebsd-x64': 4.55.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.55.3 + '@rollup/rollup-linux-arm-musleabihf': 4.55.3 + '@rollup/rollup-linux-arm64-gnu': 4.55.3 + '@rollup/rollup-linux-arm64-musl': 4.55.3 + '@rollup/rollup-linux-loong64-gnu': 4.55.3 + '@rollup/rollup-linux-loong64-musl': 4.55.3 + '@rollup/rollup-linux-ppc64-gnu': 4.55.3 + '@rollup/rollup-linux-ppc64-musl': 4.55.3 + '@rollup/rollup-linux-riscv64-gnu': 4.55.3 + '@rollup/rollup-linux-riscv64-musl': 4.55.3 + '@rollup/rollup-linux-s390x-gnu': 4.55.3 + '@rollup/rollup-linux-x64-gnu': 4.55.3 + '@rollup/rollup-linux-x64-musl': 4.55.3 + '@rollup/rollup-openbsd-x64': 4.55.3 + '@rollup/rollup-openharmony-arm64': 4.55.3 + '@rollup/rollup-win32-arm64-msvc': 4.55.3 + '@rollup/rollup-win32-ia32-msvc': 4.55.3 + '@rollup/rollup-win32-x64-gnu': 4.55.3 + '@rollup/rollup-win32-x64-msvc': 4.55.3 fsevents: 2.3.3 rpc-websockets@9.3.2: @@ -17635,12 +16414,6 @@ snapshots: node-addon-api: 5.1.0 node-gyp-build: 4.8.4 - secp256k1@5.0.0: - dependencies: - elliptic: 6.6.1 - node-addon-api: 5.1.0 - node-gyp-build: 4.8.4 - secp256k1@5.0.1: dependencies: elliptic: 6.6.1 @@ -17957,10 +16730,6 @@ snapshots: is-obj: 1.0.1 is-regexp: 1.0.0 - strip-ansi@3.0.1: - dependencies: - ansi-regex: 2.1.1 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -18016,8 +16785,6 @@ snapshots: superstruct@2.0.2: {} - supports-color@2.0.0: {} - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -18046,10 +16813,6 @@ snapshots: react: 18.3.1 use-sync-external-store: 1.6.0(react@18.3.1) - synckit@0.11.11: - dependencies: - '@pkgr/core': 0.2.9 - tagged-tag@1.0.0: {} tapable@2.3.0: {} @@ -18108,8 +16871,6 @@ snapshots: text-encoding-utf-8@1.0.2: {} - text-table@0.2.0: {} - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -18190,14 +16951,6 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.4.3(typescript@5.9.3): - dependencies: - typescript: 5.9.3 - - ts-api-utils@2.4.0(typescript@5.9.3): - dependencies: - typescript: 5.9.3 - ts-dedent@2.2.0: {} ts-interface-checker@0.1.13: {} @@ -18217,7 +16970,7 @@ snapshots: picocolors: 1.1.1 postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.6)(tsx@4.21.0) resolve-from: 5.0.0 - rollup: 4.55.1 + rollup: 4.55.3 source-map: 0.7.6 sucrase: 3.35.1 tinyexec: 0.3.2 @@ -18240,13 +16993,34 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - tweetnacl@1.0.3: {} + turbo-darwin-64@2.7.4: + optional: true - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 + turbo-darwin-arm64@2.7.4: + optional: true + + turbo-linux-64@2.7.4: + optional: true + + turbo-linux-arm64@2.7.4: + optional: true - type-fest@0.20.2: {} + turbo-windows-64@2.7.4: + optional: true + + turbo-windows-arm64@2.7.4: + optional: true + + turbo@2.7.4: + optionalDependencies: + turbo-darwin-64: 2.7.4 + turbo-darwin-arm64: 2.7.4 + turbo-linux-64: 2.7.4 + turbo-linux-arm64: 2.7.4 + turbo-windows-64: 2.7.4 + turbo-windows-arm64: 2.7.4 + + tweetnacl@1.0.3: {} type-fest@0.21.3: {} @@ -18287,8 +17061,6 @@ snapshots: typeforce@1.18.0: {} - typescript@4.9.5: {} - typescript@5.8.2: {} typescript@5.9.3: {} @@ -18305,6 +17077,8 @@ snapshots: through: 2.3.8 optional: true + undici-types@6.21.0: {} + undici-types@7.16.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} @@ -18461,8 +17235,6 @@ snapshots: utils-merge@1.0.1: {} - uuid@10.0.0: {} - uuid@13.0.0: {} uuid@8.3.2: {} @@ -18561,10 +17333,10 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.5.4(@types/node@24.10.4)(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(jiti@1.21.7)(terser@5.44.1)(tsx@4.21.0)): + vite-plugin-dts@4.5.4(@types/node@24.10.4)(rollup@4.55.3)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(jiti@1.21.7)(terser@5.44.1)(tsx@4.21.0)): dependencies: '@microsoft/api-extractor': 7.55.2(@types/node@24.10.4) - '@rollup/pluginutils': 5.3.0(rollup@4.55.1) + '@rollup/pluginutils': 5.3.0(rollup@4.55.3) '@volar/typescript': 2.4.27 '@vue/language-core': 2.2.0(typescript@5.9.3) compare-versions: 6.1.1 @@ -18596,7 +17368,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.55.1 + rollup: 4.55.3 tinyglobby: 0.2.15 optionalDependencies: '@types/node': 24.10.4 @@ -18653,19 +17425,6 @@ snapshots: vscode-uri@3.1.0: {} - vue-eslint-parser@9.4.3(eslint@8.57.1): - dependencies: - debug: 4.4.3 - eslint: 8.57.1 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.7.0 - lodash: 4.17.21 - semver: 7.7.3 - transitivePeerDependencies: - - supports-color - watchpack@2.5.0: dependencies: glob-to-regexp: 0.4.1 @@ -18852,8 +17611,6 @@ snapshots: wildcard@2.0.1: {} - word-wrap@1.2.5: {} - wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -18872,7 +17629,8 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.2 - wrappy@1.0.2: {} + wrappy@1.0.2: + optional: true write-file-atomic@3.0.3: dependencies: @@ -18930,8 +17688,6 @@ snapshots: fd-slicer: 1.1.0 optional: true - yocto-queue@0.1.0: {} - yocto-queue@1.2.2: {} yoctocolors-cjs@2.1.3: {} diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..201a23cc --- /dev/null +++ b/turbo.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://turbo.build/schema.json", + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**"] + }, + "test": { + "dependsOn": ["build"], + "outputs": [] + }, + "lint": { + "outputs": [] + }, + "lint:fix": { + "outputs": [] + }, + "typecheck": { + "dependsOn": ["^build"], + "outputs": [] + }, + "e2e": { + "dependsOn": ["build"], + "cache": false, + "passThroughEnv": [ + "CI", + "DEBUG", + "DEBUG_SIGNING", + "DEVICE_ID", + "PASSWORD", + "PAIRING_SECRET", + "ENC_PW", + "APP_NAME", + "baseUrl" + ] + } + } +}