diff --git a/.env.e2e.example b/.env.e2e.example new file mode 100644 index 0000000..9741418 --- /dev/null +++ b/.env.e2e.example @@ -0,0 +1,4 @@ +E2E_PRIVATE_KEY=your-test-private-key-here +E2E_CHAIN_ID=8453 +E2E_BASE_RPC_URL=https://base-rpc.publicnode.com +E2E_ARBITRUM_RPC_URL=https://arbitrum-rpc.publicnode.com diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5c9a897..ed15e02 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: node-version: "20" - name: Setup Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: latest @@ -38,7 +38,7 @@ jobs: run: bun run build - name: Deploy to Cloudflare Workers - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0 env: PRIVATE_POLYMER_MAINNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_MAINNET_ZONE_API_KEY }} PRIVATE_POLYMER_TESTNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_TESTNET_ZONE_API_KEY }} @@ -50,7 +50,10 @@ jobs: command: deploy --env production deploy-preview: - if: github.event_name == 'pull_request' && github.event.action != 'closed' + if: > + github.event_name == 'pull_request' && + github.event.action != 'closed' && + github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest name: Deploy Preview permissions: @@ -66,7 +69,7 @@ jobs: node-version: "20" - name: Setup Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: latest @@ -82,7 +85,7 @@ jobs: - name: Deploy to Cloudflare Workers id: deploy - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0 env: PRIVATE_POLYMER_MAINNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_MAINNET_ZONE_API_KEY }} PRIVATE_POLYMER_TESTNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_TESTNET_ZONE_API_KEY }} @@ -116,12 +119,15 @@ jobs: } cleanup-preview: - if: github.event_name == 'pull_request' && github.event.action == 'closed' + if: > + github.event_name == 'pull_request' && + github.event.action == 'closed' && + github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest name: Cleanup Preview Worker steps: - name: Delete preview worker - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a69d625..64a06fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,11 +12,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: latest - name: Install dependencies run: bun install --frozen-lockfile + - name: Run checks + run: bun run check + env: + PRIVATE_POLYMER_MAINNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_MAINNET_ZONE_API_KEY }} + PRIVATE_POLYMER_TESTNET_ZONE_API_KEY: ${{ secrets.PRIVATE_POLYMER_TESTNET_ZONE_API_KEY }} + PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_PROJECT_ID }} - name: Run unit tests run: bun run test:unit - name: Upload coverage artifact @@ -33,7 +39,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: latest - name: Install dependencies diff --git a/.gitignore b/.gitignore index 63871d7..6d6d4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,29 @@ +# Dependencies node_modules -# Output +# Build and framework output +.svelte-kit +build .output .vercel .netlify .wrangler -/.svelte-kit -/build -.claude - -# OS -.DS_Store -Thumbs.db +coverage +playwright-report +test-results # Env .env .env.* !.env.example -!.env.test +!.env.e2e.example -# Vite -vite.config.js.timestamp-* -vite.config.ts.timestamp-* -playwright-report -test-results +# Logs +*.log + +# OS / editor +.DS_Store +Thumbs.db + +.claude +.claude/* \ No newline at end of file diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..f66445c --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "*.{js,ts,svelte,css,md,json,html}": "prettier --write" +} diff --git a/.prettierrc b/.prettierrc index 1e5915a..79c3189 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,15 +1,16 @@ { - "useTabs": true, - "singleQuote": false, - "trailingComma": "none", - "printWidth": 100, - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], - "overrides": [ - { - "files": "*.svelte", - "options": { - "parser": "svelte" - } - } - ] + "useTabs": false, + "tabWidth": 2, + "singleQuote": false, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] } diff --git a/README.md b/README.md index 5d4e3f0..845504b 100644 --- a/README.md +++ b/README.md @@ -96,13 +96,13 @@ The app exposes six sequential screens, each representing one step in the OIF fl The app interacts with the following deployed contracts (ABIs are inlined in `src/lib/abi/`). -| Contract | Purpose | -|---|---| -| The Compact | ERC-6909 resource lock registry for compact-based intents | -| Input Settler (Escrow) | Opens and finalises escrow-based intents (single-chain and multichain variants) | -| Input Settler (Compact) | Finalises compact-based intents using combined sponsor and allocator signatures | -| CoinFiller | Output settlement where solvers deliver tokens, also handles same-chain attestations | -| Polymer Oracle | Verifies cross-chain fill proofs submitted via Polymer | +| Contract | Purpose | +| ----------------------- | ------------------------------------------------------------------------------------ | +| The Compact | ERC-6909 resource lock registry for compact-based intents | +| Input Settler (Escrow) | Opens and finalises escrow-based intents (single-chain and multichain variants) | +| Input Settler (Compact) | Finalises compact-based intents using combined sponsor and allocator signatures | +| CoinFiller | Output settlement where solvers deliver tokens, also handles same-chain attestations | +| Polymer Oracle | Verifies cross-chain fill proofs submitted via Polymer | ## Project Structure diff --git a/bun.lock b/bun.lock index d4f424e..b2a90a1 100644 --- a/bun.lock +++ b/bun.lock @@ -5,18 +5,24 @@ "": { "name": "cat-swapper", "dependencies": { + "@base-org/account": "^2.5.1", + "@coinbase/wallet-sdk": "^4.3.6", "@electric-sql/pglite": "^0.3.15", + "@lifi/intent": "file:../intent.ts", + "@metamask/sdk": "^0.34.0", + "@safe-global/safe-apps-provider": "~0.18.6", + "@safe-global/safe-apps-sdk": "^9.1.0", "@sveltejs/adapter-cloudflare": "^7.0.3", - "@web3-onboard/coinbase": "^2.4.2", - "@web3-onboard/core": "^2.24.1", - "@web3-onboard/injected-wallets": "^2.11.3", - "@web3-onboard/walletconnect": "^2.6.2", - "@web3-onboard/zeal": "^2.1.1", - "axios": "^1.9.0", + "@wagmi/connectors": "^7.2.1", + "@wagmi/core": "^3.4.0", + "@walletconnect/ethereum-provider": "^2.21.1", + "axios": "^1.13.6", "base64-js": "^1.5.1", "drizzle-orm": "^0.45.1", + "porto": "~0.2.35", "rxjs": "^7.8.2", - "viem": "^2.48.4", + "viem": "~2.45.1", + "wagmi": "^3.5.0", }, "devDependencies": { "@eslint/compat": "^1.2.5", @@ -26,16 +32,17 @@ "@sveltejs/vite-plugin-svelte": "^6.1.1", "@tailwindcss/vite": "^4.0.0", "@types/bun": "^1.3.8", + "dotenv": "^17.2.3", "drizzle-kit": "^0.31.9", "eslint": "^9.18.0", "eslint-config-prettier": "^10.0.1", "eslint-plugin-svelte": "^3.0.0", "globals": "^16.0.0", - "husky": "^9.1.7", - "lint-staged": "^16.1.0", - "prettier": "^3.4.2", - "prettier-plugin-svelte": "^3.3.3", - "prettier-plugin-tailwindcss": "^0.6.11", + "husky": "9.1.7", + "lint-staged": "16.1.0", + "prettier": "3.4.2", + "prettier-plugin-svelte": "3.3.3", + "prettier-plugin-tailwindcss": "0.6.11", "svelte": "^5.0.0", "svelte-check": "^4.0.0", "tailwindcss": "^4.0.0", @@ -46,10 +53,14 @@ }, }, "packages": { - "@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.10.0", "", {}, "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q=="], + "@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + "@babel/runtime": ["@babel/runtime@7.28.6", "", {}, "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA=="], + + "@base-org/account": ["@base-org/account@2.5.2", "", { "dependencies": { "@coinbase/cdp-sdk": "^1.0.0", "brotli-wasm": "^3.0.0", "clsx": "1.2.1", "eventemitter3": "5.0.1", "idb-keyval": "6.2.1", "ox": "0.6.9", "preact": "10.24.2", "viem": "^2.31.7", "zustand": "5.0.3" } }, "sha512-B3e0XiZWHXgCPLRXk0dDGA2WN8eFk/MDprqRX1Xl4PPx1LAdzynGcGUg6rnidMrIQ/GSL+oelWDHdGbWtCOOoA=="], + "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.4.0", "", { "dependencies": { "mime": "^3.0.0" } }, "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA=="], "@cloudflare/unenv-preset": ["@cloudflare/unenv-preset@2.6.0", "", { "peerDependencies": { "unenv": "2.0.0-rc.19", "workerd": "^1.20250802.0" } }, "sha512-h7Txw0WbDuUbrvZwky6+x7ft+U/Gppfn/rWx6IdR+e9gjygozRJnV26Y2TOr3yrIFa6OsZqqR2lN+jWTrakHXg=="], @@ -66,12 +77,16 @@ "@cloudflare/workers-types": ["@cloudflare/workers-types@4.20250807.0", "", {}, "sha512-Zbrz9egAfwmlkUaZ1tQ+19pt5eomCJ57mAviT1HCsvnSFP1MoffMbYiU/xUomuekHtx0aVO4EacZwchCgjSvmw=="], - "@coinbase/wallet-sdk": ["@coinbase/wallet-sdk@4.3.0", "", { "dependencies": { "@noble/hashes": "^1.4.0", "clsx": "^1.2.1", "eventemitter3": "^5.0.1", "preact": "^10.24.2" } }, "sha512-T3+SNmiCw4HzDm4we9wCHCxlP0pqCiwKe4sOwPH3YAK2KSKjxPRydKu6UQJrdONFVLG7ujXvbd/6ZqmvJb8rkw=="], + "@coinbase/cdp-sdk": ["@coinbase/cdp-sdk@1.45.0", "", { "dependencies": { "@solana-program/system": "^0.10.0", "@solana-program/token": "^0.9.0", "@solana/kit": "^5.1.0", "@solana/web3.js": "^1.98.1", "abitype": "1.0.6", "axios": "^1.12.2", "axios-retry": "^4.5.0", "jose": "^6.0.8", "md5": "^2.3.0", "uncrypto": "^0.1.3", "viem": "^2.21.26", "zod": "^3.24.4" } }, "sha512-4fgGOhyN9g/pTDE9NtsKUapwFsubrk9wafz8ltmBqSwWqLZWfWxXkVmzMYYFAf+qeGf/X9JqJtmvDVaHFlXWlw=="], + + "@coinbase/wallet-sdk": ["@coinbase/wallet-sdk@4.3.7", "", { "dependencies": { "@noble/hashes": "^1.4.0", "clsx": "^1.2.1", "eventemitter3": "^5.0.1", "preact": "^10.24.2", "viem": "^2.27.2" } }, "sha512-z6e5XDw6EF06RqkeyEa+qD0dZ2ZbLci99vx3zwDY//XO8X7166tqKJrR2XlQnzVmtcUuJtCd5fCvr9Cu6zzX7w=="], "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="], "@drizzle-team/brocli": ["@drizzle-team/brocli@0.10.2", "", {}, "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w=="], + "@ecies/ciphers": ["@ecies/ciphers@0.2.5", "", { "peerDependencies": { "@noble/ciphers": "^1.0.0" } }, "sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A=="], + "@electric-sql/pglite": ["@electric-sql/pglite@0.3.15", "", {}, "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ=="], "@emnapi/runtime": ["@emnapi/runtime@1.4.5", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg=="], @@ -152,19 +167,13 @@ "@eslint/plugin-kit": ["@eslint/plugin-kit@0.3.5", "", { "dependencies": { "@eslint/core": "^0.15.2", "levn": "^0.4.1" } }, "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w=="], - "@formatjs/ecma402-abstract": ["@formatjs/ecma402-abstract@2.3.4", "", { "dependencies": { "@formatjs/fast-memoize": "2.2.7", "@formatjs/intl-localematcher": "0.6.1", "decimal.js": "^10.4.3", "tslib": "^2.8.0" } }, "sha512-qrycXDeaORzIqNhBOx0btnhpD1c+/qFIHAN9znofuMJX6QBwtbrmlpWfD4oiUUD2vJUOIYFA/gYtg2KAMGG7sA=="], - - "@formatjs/fast-memoize": ["@formatjs/fast-memoize@2.2.7", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ=="], + "@ethereumjs/common": ["@ethereumjs/common@3.2.0", "", { "dependencies": { "@ethereumjs/util": "^8.1.0", "crc-32": "^1.2.0" } }, "sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA=="], - "@formatjs/icu-messageformat-parser": ["@formatjs/icu-messageformat-parser@2.11.2", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.4", "@formatjs/icu-skeleton-parser": "1.8.14", "tslib": "^2.8.0" } }, "sha512-AfiMi5NOSo2TQImsYAg8UYddsNJ/vUEv/HaNqiFjnI3ZFfWihUtD5QtuX6kHl8+H+d3qvnE/3HZrfzgdWpsLNA=="], + "@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], - "@formatjs/icu-skeleton-parser": ["@formatjs/icu-skeleton-parser@1.8.14", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.4", "tslib": "^2.8.0" } }, "sha512-i4q4V4qslThK4Ig8SxyD76cp3+QJ3sAqr7f6q9VVfeGtxG9OhiAk3y9XF6Q41OymsKzsGQ6OQQoJNY4/lI8TcQ=="], + "@ethereumjs/tx": ["@ethereumjs/tx@4.2.0", "", { "dependencies": { "@ethereumjs/common": "^3.2.0", "@ethereumjs/rlp": "^4.0.1", "@ethereumjs/util": "^8.1.0", "ethereum-cryptography": "^2.0.0" } }, "sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw=="], - "@formatjs/intl-localematcher": ["@formatjs/intl-localematcher@0.6.1", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-ePEgLgVCqi2BBFnTMWPfIghu6FkbZnnBVhO2sSxvLfrdFw7wCHAHiDoM2h4NRgjbaY7+B7HgOLZGkK187pZTZg=="], - - "@hapi/hoek": ["@hapi/hoek@9.3.0", "", {}, "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="], - - "@hapi/topo": ["@hapi/topo@5.1.0", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg=="], + "@ethereumjs/util": ["@ethereumjs/util@8.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", "micro-ftch": "^0.3.1" } }, "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA=="], "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], @@ -222,11 +231,41 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.29", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ=="], - "@lit-labs/ssr-dom-shim": ["@lit-labs/ssr-dom-shim@1.4.0", "", {}, "sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw=="], + "@lifi/intent": ["@lifi/intent@file:../intent.ts", { "dependencies": { "borsh": "^2.0.0", "ky": "^1.12.0", "viem": "~2.45.1" }, "devDependencies": { "@types/bun": "^1.3.8", "bun": "^1.3.5", "husky": "9.1.7", "lint-staged": "16.1.0", "prettier": "3.4.2", "typescript": "^5.6.3" } }], + + "@lit-labs/ssr-dom-shim": ["@lit-labs/ssr-dom-shim@1.5.1", "", {}, "sha512-Aou5UdlSpr5whQe8AA/bZG0jMj96CoJIWbGfZ91qieWu5AWUMKw8VR/pAkQkJYvBNhmCcWnZlyyk5oze8JIqYA=="], + + "@lit/react": ["@lit/react@1.0.8", "", { "peerDependencies": { "@types/react": "17 || 18 || 19" } }, "sha512-p2+YcF+JE67SRX3mMlJ1TKCSTsgyOVdAwd/nxp3NuV1+Cb6MWALbN6nT7Ld4tpmYofcE5kcaSY1YBB9erY+6fw=="], + + "@lit/reactive-element": ["@lit/reactive-element@2.1.2", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.5.0" } }, "sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A=="], + + "@metamask/json-rpc-engine": ["@metamask/json-rpc-engine@8.0.2", "", { "dependencies": { "@metamask/rpc-errors": "^6.2.1", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^8.3.0" } }, "sha512-IoQPmql8q7ABLruW7i4EYVHWUbF74yrp63bRuXV5Zf9BQwcn5H9Ww1eLtROYvI1bUXwOiHZ6qT5CWTrDc/t/AA=="], + + "@metamask/json-rpc-middleware-stream": ["@metamask/json-rpc-middleware-stream@7.0.2", "", { "dependencies": { "@metamask/json-rpc-engine": "^8.0.2", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^8.3.0", "readable-stream": "^3.6.2" } }, "sha512-yUdzsJK04Ev98Ck4D7lmRNQ8FPioXYhEUZOMS01LXW8qTvPGiRVXmVltj2p4wrLkh0vW7u6nv0mNl5xzC5Qmfg=="], + + "@metamask/object-multiplex": ["@metamask/object-multiplex@2.1.0", "", { "dependencies": { "once": "^1.4.0", "readable-stream": "^3.6.2" } }, "sha512-4vKIiv0DQxljcXwfpnbsXcfa5glMj5Zg9mqn4xpIWqkv6uJ2ma5/GtUfLFSxhlxnR8asRMv8dDmWya1Tc1sDFA=="], + + "@metamask/onboarding": ["@metamask/onboarding@1.0.1", "", { "dependencies": { "bowser": "^2.9.0" } }, "sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ=="], + + "@metamask/providers": ["@metamask/providers@16.1.0", "", { "dependencies": { "@metamask/json-rpc-engine": "^8.0.1", "@metamask/json-rpc-middleware-stream": "^7.0.1", "@metamask/object-multiplex": "^2.0.0", "@metamask/rpc-errors": "^6.2.1", "@metamask/safe-event-emitter": "^3.1.1", "@metamask/utils": "^8.3.0", "detect-browser": "^5.2.0", "extension-port-stream": "^3.0.0", "fast-deep-equal": "^3.1.3", "is-stream": "^2.0.0", "readable-stream": "^3.6.2", "webextension-polyfill": "^0.10.0" } }, "sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g=="], + + "@metamask/rpc-errors": ["@metamask/rpc-errors@6.4.0", "", { "dependencies": { "@metamask/utils": "^9.0.0", "fast-safe-stringify": "^2.0.6" } }, "sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg=="], + + "@metamask/safe-event-emitter": ["@metamask/safe-event-emitter@3.1.2", "", {}, "sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA=="], + + "@metamask/sdk": ["@metamask/sdk@0.34.0", "", { "dependencies": { "@babel/runtime": "^7.26.0", "@metamask/onboarding": "^1.0.1", "@metamask/providers": "16.1.0", "@metamask/sdk-analytics": "0.0.5", "@metamask/sdk-communication-layer": "0.33.1", "@metamask/sdk-install-modal-web": "0.32.1", "@paulmillr/qr": "^0.2.1", "bowser": "^2.9.0", "cross-fetch": "^4.0.0", "debug": "4.3.4", "eciesjs": "^0.4.11", "eth-rpc-errors": "^4.0.3", "eventemitter2": "^6.4.9", "obj-multiplex": "^1.0.0", "pump": "^3.0.0", "readable-stream": "^3.6.2", "socket.io-client": "^4.5.1", "tslib": "^2.6.0", "util": "^0.12.4", "uuid": "^8.3.2" } }, "sha512-8dkJUShZ5zFqYjNmhJaqKgDzZVne+F2rNjMQJ3pxs89n3oOUNuJ8dsTo08Grf9vlQ6Ldpdt2RTwqbrxKWyyqlw=="], + + "@metamask/sdk-analytics": ["@metamask/sdk-analytics@0.0.5", "", { "dependencies": { "openapi-fetch": "^0.13.5" } }, "sha512-fDah+keS1RjSUlC8GmYXvx6Y26s3Ax1U9hGpWb6GSY5SAdmTSIqp2CvYy6yW0WgLhnYhW+6xERuD0eVqV63QIQ=="], + + "@metamask/sdk-communication-layer": ["@metamask/sdk-communication-layer@0.33.1", "", { "dependencies": { "@metamask/sdk-analytics": "0.0.5", "bufferutil": "^4.0.8", "date-fns": "^2.29.3", "debug": "4.3.4", "utf-8-validate": "^5.0.2", "uuid": "^8.3.2" }, "peerDependencies": { "cross-fetch": "^4.0.0", "eciesjs": "*", "eventemitter2": "^6.4.9", "readable-stream": "^3.6.2", "socket.io-client": "^4.5.1" } }, "sha512-0bI9hkysxcfbZ/lk0T2+aKVo1j0ynQVTuB3sJ5ssPWlz+Z3VwveCkP1O7EVu1tsVVCb0YV5WxK9zmURu2FIiaA=="], - "@lit/reactive-element": ["@lit/reactive-element@2.1.1", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.4.0" } }, "sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg=="], + "@metamask/sdk-install-modal-web": ["@metamask/sdk-install-modal-web@0.32.1", "", { "dependencies": { "@paulmillr/qr": "^0.2.1" } }, "sha512-MGmAo6qSjf1tuYXhCu2EZLftq+DSt5Z7fsIKr2P+lDgdTPWgLfZB1tJKzNcwKKOdf6q9Qmmxn7lJuI/gq5LrKw=="], - "@msgpack/msgpack": ["@msgpack/msgpack@3.1.2", "", {}, "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ=="], + "@metamask/superstruct": ["@metamask/superstruct@3.2.1", "", {}, "sha512-fLgJnDOXFmuVlB38rUN5SmU7hAFQcCjrg3Vrxz67KTY7YHFnSNEKvX4avmEBdOI0yTCxZjwMCFEqsC8k2+Wd3g=="], + + "@metamask/utils": ["@metamask/utils@8.5.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.0.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ=="], + + "@msgpack/msgpack": ["@msgpack/msgpack@3.1.3", "", {}, "sha512-47XIizs9XZXvuJgoaJUIE2lFoID8ugvc0jzSHP+Ptfk8nTbnR8g788wv48N03Kx0UkAv559HWRQ3yzOgzlRNUA=="], "@noble/ciphers": ["@noble/ciphers@1.3.0", "", {}, "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw=="], @@ -240,6 +279,34 @@ "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="], + "@oven/bun-darwin-aarch64": ["@oven/bun-darwin-aarch64@1.3.13", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qAS6Hg8Q14ckfBuqJ2Zh7gBQSVSUHeibSq4OFqBTv6DzyJuxYlr0sdYQzmYmnbPxbqobekqUDTa/4XEaqRi7vg=="], + + "@oven/bun-darwin-x64": ["@oven/bun-darwin-x64@1.3.13", "", { "os": "darwin", "cpu": "x64" }, "sha512-kGePeDD4IN4imo+H4uLjQGZLmvyYQg+nKr2P0nt4ksXXrWA4HE+mb0/TUPHfRI127DocXQpew+fvrHuHR5mpJQ=="], + + "@oven/bun-darwin-x64-baseline": ["@oven/bun-darwin-x64-baseline@1.3.13", "", { "os": "darwin", "cpu": "x64" }, "sha512-gMEQayUpmCPYaE9zkNBj9TiQqHupnhjOYcuSzxFjzIjHJBUO4VjNnrpbKVeXNs+rKHFothORDd2QKquu5paSPQ=="], + + "@oven/bun-linux-aarch64": ["@oven/bun-linux-aarch64@1.3.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-NbLOJdr+RBFO1vFZ2YUFg4oVJ+2ua6zrwo4ZWRs0jKKcGJWtbY2wY5uz+i0PkwH6b9HYaYDgVTzE4ev06ncYZw=="], + + "@oven/bun-linux-aarch64-musl": ["@oven/bun-linux-aarch64-musl@1.3.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-UV9EE18VE5aRhWtV2L6MTAGGn3slhJJ2OW/m+FJM15maHm0qf1V7TaZY0FovxhdQRvnklSiQ7Ntv0H5TUX4w0g=="], + + "@oven/bun-linux-x64": ["@oven/bun-linux-x64@1.3.13", "", { "os": "linux", "cpu": "x64" }, "sha512-UwttIUXoe9fS+40OcjoaRHgZw+HCPFqBVWEXkXqAJ3W7wA0XPZrWsoMAD9sGh3TaLqrwdiMo5xPogwpXhOtVXA=="], + + "@oven/bun-linux-x64-baseline": ["@oven/bun-linux-x64-baseline@1.3.13", "", { "os": "linux", "cpu": "x64" }, "sha512-fOi4ziKzgJG4UrrNd4AicBs6Fu9GY5xOqg+9tC76nuZNDAdSh6++kzab6TNi1Ck0Yzq6zIBIdGit6/0uSbBn8A=="], + + "@oven/bun-linux-x64-musl": ["@oven/bun-linux-x64-musl@1.3.13", "", { "os": "linux", "cpu": "x64" }, "sha512-+VHhE44kEjCXcTFHyc81zfTxL9+vzh9RqIh7gM1iWNhxpctD9kzntbUkP3UTFTwwNjoou1o8VRyxQafvc4OepA=="], + + "@oven/bun-linux-x64-musl-baseline": ["@oven/bun-linux-x64-musl-baseline@1.3.13", "", { "os": "linux", "cpu": "x64" }, "sha512-fqBKuiiWLEu2dVkowZaXgKS98xfrvBqivdoxRtRP3eINcpI1dcelGbsOz+Xphn7tbGAuBiE1/0AelvvvdqS9rg=="], + + "@oven/bun-windows-aarch64": ["@oven/bun-windows-aarch64@1.3.13", "", { "os": "win32", "cpu": "arm64" }, "sha512-+EvdRWRCRg95Xea4M2lqSJFTjzQBTJDQTMlbG8bmwFkVTN16MdmSH7xhfxVQWUOyZBLEpIwuNFIlBBxVCwSUyQ=="], + + "@oven/bun-windows-x64": ["@oven/bun-windows-x64@1.3.13", "", { "os": "win32", "cpu": "x64" }, "sha512-vqDEFX63ZZQF3YstPSpPD+RxNm5AILPdUuuKpNwsj7ld4NjhdHUYkAmLXDtKNWt9JMRL10bop//W8faY/LV+RQ=="], + + "@oven/bun-windows-x64-baseline": ["@oven/bun-windows-x64-baseline@1.3.13", "", { "os": "win32", "cpu": "x64" }, "sha512-6gy4hhQSjq/T/S9hC9m3NxY0RY+9Ww+XNlB+8koIMTsMSYEjk7Ho+hFHQz1Bn4W61Ub7Vykufg+jgDgPfa2GFA=="], + + "@paulmillr/qr": ["@paulmillr/qr@0.2.1", "", {}, "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ=="], + + "@phosphor-icons/webcomponents": ["@phosphor-icons/webcomponents@2.1.5", "", { "dependencies": { "lit": "^3" } }, "sha512-JcvQkZxvcX2jK+QCclm8+e8HXqtdFW9xV4/kk2aL9Y3dJA2oQVt+pzbv1orkumz3rfx4K9mn9fDoMr1He1yr7Q=="], + "@playwright/test": ["@playwright/test@1.58.2", "", { "dependencies": { "playwright": "1.58.2" }, "bin": { "playwright": "cli.js" } }, "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA=="], "@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="], @@ -250,23 +317,23 @@ "@poppinss/exception": ["@poppinss/exception@1.2.2", "", {}, "sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg=="], - "@reown/appkit": ["@reown/appkit@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-controllers": "1.7.8", "@reown/appkit-pay": "1.7.8", "@reown/appkit-polyfills": "1.7.8", "@reown/appkit-scaffold-ui": "1.7.8", "@reown/appkit-ui": "1.7.8", "@reown/appkit-utils": "1.7.8", "@reown/appkit-wallet": "1.7.8", "@walletconnect/types": "2.21.0", "@walletconnect/universal-provider": "2.21.0", "bs58": "6.0.0", "valtio": "1.13.2", "viem": ">=2.29.0" } }, "sha512-51kTleozhA618T1UvMghkhKfaPcc9JlKwLJ5uV+riHyvSoWPKPRIa5A6M1Wano5puNyW0s3fwywhyqTHSilkaA=="], + "@reown/appkit": ["@reown/appkit@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-controllers": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-pay": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-polyfills": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-scaffold-ui": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-ui": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-utils": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-wallet": "1.8.17-wc-circular-dependencies-fix.0", "@walletconnect/universal-provider": "2.23.2", "bs58": "6.0.0", "semver": "7.7.2", "valtio": "2.1.7", "viem": ">=2.37.9" }, "optionalDependencies": { "@lit/react": "1.0.8" } }, "sha512-7JjEp+JNxRUDOa7CxOCbUbG8uYVo38ojc9FN/fuzJuJADUzKDaH287MLV9qI1ZyQyXA8qXvhXRqjtw+3xo2/7A=="], - "@reown/appkit-common": ["@reown/appkit-common@1.7.8", "", { "dependencies": { "big.js": "6.2.2", "dayjs": "1.11.13", "viem": ">=2.29.0" } }, "sha512-ridIhc/x6JOp7KbDdwGKY4zwf8/iK8EYBl+HtWrruutSLwZyVi5P8WaZa+8iajL6LcDcDF7LoyLwMTym7SRuwQ=="], + "@reown/appkit-common": ["@reown/appkit-common@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "big.js": "6.2.2", "dayjs": "1.11.13", "viem": ">=2.37.9" } }, "sha512-wf53EzDmCJ5ICtDY5B1MddVeCwoqDGPVmaxD4wQJLR9uanhBXfKq1sJou+Uj8lZCyI72Z+r9YlsePOlYH2Ge3A=="], - "@reown/appkit-controllers": ["@reown/appkit-controllers@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-wallet": "1.7.8", "@walletconnect/universal-provider": "2.21.0", "valtio": "1.13.2", "viem": ">=2.29.0" } }, "sha512-IdXlJlivrlj6m63VsGLsjtPHHsTWvKGVzWIP1fXZHVqmK+rZCBDjCi9j267Rb9/nYRGHWBtlFQhO8dK35WfeDA=="], + "@reown/appkit-controllers": ["@reown/appkit-controllers@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-wallet": "1.8.17-wc-circular-dependencies-fix.0", "@walletconnect/universal-provider": "2.23.2", "valtio": "2.1.7", "viem": ">=2.37.9" } }, "sha512-wY5yvMB0o2AwitwDHHO0u2tmqR+n3Crv0AHjIcY037PC3mhF9TPEUKqE9vlrFImQWQRxl0WRfuKfzmUAPxZExw=="], - "@reown/appkit-pay": ["@reown/appkit-pay@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-controllers": "1.7.8", "@reown/appkit-ui": "1.7.8", "@reown/appkit-utils": "1.7.8", "lit": "3.3.0", "valtio": "1.13.2" } }, "sha512-OSGQ+QJkXx0FEEjlpQqIhT8zGJKOoHzVnyy/0QFrl3WrQTjCzg0L6+i91Ad5Iy1zb6V5JjqtfIFpRVRWN4M3pw=="], + "@reown/appkit-pay": ["@reown/appkit-pay@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-controllers": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-ui": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-utils": "1.8.17-wc-circular-dependencies-fix.0", "lit": "3.3.0", "valtio": "2.1.7" } }, "sha512-sVE8UT7CDA8zsg3opvbGjSZHSnohOVPF77vP6Ln4G0+vfoiXNhZaZa89Pg0MDjh+KGy0OulWVUdXuZ9jJQFvPg=="], - "@reown/appkit-polyfills": ["@reown/appkit-polyfills@1.7.8", "", { "dependencies": { "buffer": "6.0.3" } }, "sha512-W/kq786dcHHAuJ3IV2prRLEgD/2iOey4ueMHf1sIFjhhCGMynMkhsOhQMUH0tzodPqUgAC494z4bpIDYjwWXaA=="], + "@reown/appkit-polyfills": ["@reown/appkit-polyfills@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "buffer": "6.0.3" } }, "sha512-OyYavslCegfUlKu8Ah6BZhbqQrK7bImvUm+EKjjvnfNN9J0F9uWMFwbTpZxenBcfAI6cyaD9aTTUunMn5no1Og=="], - "@reown/appkit-scaffold-ui": ["@reown/appkit-scaffold-ui@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-controllers": "1.7.8", "@reown/appkit-ui": "1.7.8", "@reown/appkit-utils": "1.7.8", "@reown/appkit-wallet": "1.7.8", "lit": "3.3.0" } }, "sha512-RCeHhAwOrIgcvHwYlNWMcIDibdI91waaoEYBGw71inE0kDB8uZbE7tE6DAXJmDkvl0qPh+DqlC4QbJLF1FVYdQ=="], + "@reown/appkit-scaffold-ui": ["@reown/appkit-scaffold-ui@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-controllers": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-pay": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-ui": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-utils": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-wallet": "1.8.17-wc-circular-dependencies-fix.0", "lit": "3.3.0" } }, "sha512-f+SYFGDy+uY1EAvWcH6vZgga1bOuzBvYSKYiRX2QQy8INtZqwwiLLvS4cgm5Yp1WvYRal5RdfZkKl5qha498gw=="], - "@reown/appkit-ui": ["@reown/appkit-ui@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-controllers": "1.7.8", "@reown/appkit-wallet": "1.7.8", "lit": "3.3.0", "qrcode": "1.5.3" } }, "sha512-1hjCKjf6FLMFzrulhl0Y9Vb9Fu4royE+SXCPSWh4VhZhWqlzUFc7kutnZKx8XZFVQH4pbBvY62SpRC93gqoHow=="], + "@reown/appkit-ui": ["@reown/appkit-ui@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@phosphor-icons/webcomponents": "2.1.5", "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-controllers": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-wallet": "1.8.17-wc-circular-dependencies-fix.0", "lit": "3.3.0", "qrcode": "1.5.3" } }, "sha512-E1u2ZVZV0iFDSgrgtdQTZAXNbI+Lakj8E8V+jJQ47JaEVKv9SROvPu2fVqfIrqHQF68NmAk1dnbYi4luOiM0Fg=="], - "@reown/appkit-utils": ["@reown/appkit-utils@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-controllers": "1.7.8", "@reown/appkit-polyfills": "1.7.8", "@reown/appkit-wallet": "1.7.8", "@walletconnect/logger": "2.1.2", "@walletconnect/universal-provider": "2.21.0", "valtio": "1.13.2", "viem": ">=2.29.0" }, "peerDependencies": { "valtio": "1.13.2" } }, "sha512-8X7UvmE8GiaoitCwNoB86pttHgQtzy4ryHZM9kQpvjQ0ULpiER44t1qpVLXNM4X35O0v18W0Dk60DnYRMH2WRw=="], + "@reown/appkit-utils": ["@reown/appkit-utils@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-controllers": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-polyfills": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-wallet": "1.8.17-wc-circular-dependencies-fix.0", "@wallet-standard/wallet": "1.1.0", "@walletconnect/logger": "3.0.2", "@walletconnect/universal-provider": "2.23.2", "valtio": "2.1.7", "viem": ">=2.37.9" }, "optionalDependencies": { "@base-org/account": "2.4.0", "@safe-global/safe-apps-provider": "0.18.6", "@safe-global/safe-apps-sdk": "9.1.0" } }, "sha512-9El8sYbXDaMYxg4R6LujA965yYQGjNcPMXqympLtzNl1es5qkniW7eAdEpLmZrsaqNrfTaHT1G65wYy7sA595w=="], - "@reown/appkit-wallet": ["@reown/appkit-wallet@1.7.8", "", { "dependencies": { "@reown/appkit-common": "1.7.8", "@reown/appkit-polyfills": "1.7.8", "@walletconnect/logger": "2.1.2", "zod": "3.22.4" } }, "sha512-kspz32EwHIOT/eg/ZQbFPxgXq0B/olDOj3YMu7gvLEFz4xyOFd/wgzxxAXkp5LbG4Cp++s/elh79rVNmVFdB9A=="], + "@reown/appkit-wallet": ["@reown/appkit-wallet@1.8.17-wc-circular-dependencies-fix.0", "", { "dependencies": { "@reown/appkit-common": "1.8.17-wc-circular-dependencies-fix.0", "@reown/appkit-polyfills": "1.8.17-wc-circular-dependencies-fix.0", "@walletconnect/logger": "3.0.2", "zod": "3.22.4" } }, "sha512-s0RTVNtgPtXGs+eZELVvTu1FRLuN15MyhVS//3/4XafVQkBBJarciXk9pFP71xeSHRzjYR1lXHnVw28687cUvQ=="], "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.46.2", "", { "os": "android", "cpu": "arm" }, "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA=="], @@ -308,19 +375,107 @@ "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.46.2", "", { "os": "win32", "cpu": "x64" }, "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg=="], + "@safe-global/safe-apps-provider": ["@safe-global/safe-apps-provider@0.18.6", "", { "dependencies": { "@safe-global/safe-apps-sdk": "^9.1.0", "events": "^3.3.0" } }, "sha512-4LhMmjPWlIO8TTDC2AwLk44XKXaK6hfBTWyljDm0HQ6TWlOEijVWNrt2s3OCVMSxlXAcEzYfqyu1daHZooTC2Q=="], + + "@safe-global/safe-apps-sdk": ["@safe-global/safe-apps-sdk@9.1.0", "", { "dependencies": { "@safe-global/safe-gateway-typescript-sdk": "^3.5.3", "viem": "^2.1.1" } }, "sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q=="], + + "@safe-global/safe-gateway-typescript-sdk": ["@safe-global/safe-gateway-typescript-sdk@3.23.1", "", {}, "sha512-6ORQfwtEJYpalCeVO21L4XXGSdbEMfyp2hEv6cP82afKXSwvse6d3sdelgaPWUxHIsFRkWvHDdzh8IyyKHZKxw=="], + "@scure/base": ["@scure/base@1.2.6", "", {}, "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg=="], "@scure/bip32": ["@scure/bip32@1.7.0", "", { "dependencies": { "@noble/curves": "~1.9.0", "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw=="], "@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], - "@sideway/address": ["@sideway/address@4.1.5", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q=="], + "@sindresorhus/is": ["@sindresorhus/is@7.0.2", "", {}, "sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw=="], + + "@socket.io/component-emitter": ["@socket.io/component-emitter@3.1.2", "", {}, "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="], - "@sideway/formula": ["@sideway/formula@3.0.1", "", {}, "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg=="], + "@solana-program/system": ["@solana-program/system@0.10.0", "", { "peerDependencies": { "@solana/kit": "^5.0" } }, "sha512-Go+LOEZmqmNlfr+Gjy5ZWAdY5HbYzk2RBewD9QinEU/bBSzpFfzqDRT55JjFRBGJUvMgf3C2vfXEGT4i8DSI4g=="], - "@sideway/pinpoint": ["@sideway/pinpoint@2.0.0", "", {}, "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ=="], + "@solana-program/token": ["@solana-program/token@0.9.0", "", { "peerDependencies": { "@solana/kit": "^5.0" } }, "sha512-vnZxndd4ED4Fc56sw93cWZ2djEeeOFxtaPS8SPf5+a+JZjKA/EnKqzbE1y04FuMhIVrLERQ8uR8H2h72eZzlsA=="], - "@sindresorhus/is": ["@sindresorhus/is@7.0.2", "", {}, "sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw=="], + "@solana/accounts": ["@solana/accounts@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/rpc-spec": "5.5.1", "@solana/rpc-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-TfOY9xixg5rizABuLVuZ9XI2x2tmWUC/OoN556xwfDlhBHBjKfszicYYOyD6nbFmwTGYarCmyGIdteXxTXIdhQ=="], + + "@solana/addresses": ["@solana/addresses@5.5.1", "", { "dependencies": { "@solana/assertions": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/nominal-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-5xoah3Q9G30HQghu/9BiHLb5pzlPKRC3zydQDmE3O9H//WfayxTFppsUDCL6FjYUHqj/wzK6CWHySglc2RkpdA=="], + + "@solana/assertions": ["@solana/assertions@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-YTCSWAlGwSlVPnWtWLm3ukz81wH4j2YaCveK+TjpvUU88hTy6fmUqxi0+hvAMAe4zKXpJyj3Az7BrLJRxbIm4Q=="], + + "@solana/buffer-layout": ["@solana/buffer-layout@4.0.1", "", { "dependencies": { "buffer": "~6.0.3" } }, "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA=="], + + "@solana/codecs": ["@solana/codecs@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/codecs-data-structures": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/options": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-Vea29nJub/bXjfzEV7ZZQ/PWr1pYLZo3z0qW0LQL37uKKVzVFRQlwetd7INk3YtTD3xm9WUYr7bCvYUk3uKy2g=="], + + "@solana/codecs-core": ["@solana/codecs-core@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-TgBt//bbKBct0t6/MpA8ElaOA3sa8eYVvR7LGslCZ84WiAwwjCY0lW/lOYsFHJQzwREMdUyuEyy5YWBKtdh8Rw=="], + + "@solana/codecs-data-structures": ["@solana/codecs-data-structures@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-97bJWGyUY9WvBz3mX1UV3YPWGDTez6btCfD0ip3UVEXJbItVuUiOkzcO5iFDUtQT5riKT6xC+Mzl+0nO76gd0w=="], + + "@solana/codecs-numbers": ["@solana/codecs-numbers@2.3.0", "", { "dependencies": { "@solana/codecs-core": "2.3.0", "@solana/errors": "2.3.0" }, "peerDependencies": { "typescript": ">=5.3.3" } }, "sha512-jFvvwKJKffvG7Iz9dmN51OGB7JBcy2CJ6Xf3NqD/VP90xak66m/Lg48T01u5IQ/hc15mChVHiBm+HHuOFDUrQg=="], + + "@solana/codecs-strings": ["@solana/codecs-strings@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "fastestsmallesttextencoderdecoder": "^1.0.22", "typescript": "^5.0.0" }, "optionalPeers": ["fastestsmallesttextencoderdecoder", "typescript"] }, "sha512-7klX4AhfHYA+uKKC/nxRGP2MntbYQCR3N6+v7bk1W/rSxYuhNmt+FN8aoThSZtWIKwN6BEyR1167ka8Co1+E7A=="], + + "@solana/errors": ["@solana/errors@5.5.1", "", { "dependencies": { "chalk": "5.6.2", "commander": "14.0.2" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"], "bin": { "errors": "bin/cli.mjs" } }, "sha512-vFO3p+S7HoyyrcAectnXbdsMfwUzY2zYFUc2DEe5BwpiE9J1IAxPBGjOWO6hL1bbYdBrlmjNx8DXCslqS+Kcmg=="], + + "@solana/fast-stable-stringify": ["@solana/fast-stable-stringify@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-Ni7s2FN33zTzhTFgRjEbOVFO+UAmK8qi3Iu0/GRFYK4jN696OjKHnboSQH/EacQ+yGqS54bfxf409wU5dsLLCw=="], + + "@solana/functional": ["@solana/functional@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-tTHoJcEQq3gQx5qsdsDJ0LEJeFzwNpXD80xApW9o/PPoCNimI3SALkZl+zNW8VnxRrV3l3yYvfHWBKe/X3WG3w=="], + + "@solana/instruction-plans": ["@solana/instruction-plans@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/instructions": "5.5.1", "@solana/keys": "5.5.1", "@solana/promises": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-7z3CB7YMcFKuVvgcnNY8bY6IsZ8LG61Iytbz7HpNVGX2u1RthOs1tRW8luTzSG1MPL0Ox7afyAVMYeFqSPHnaQ=="], + + "@solana/instructions": ["@solana/instructions@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-h0G1CG6S+gUUSt0eo6rOtsaXRBwCq1+Js2a+Ps9Bzk9q7YHNFA75/X0NWugWLgC92waRp66hrjMTiYYnLBoWOQ=="], + + "@solana/keys": ["@solana/keys@5.5.1", "", { "dependencies": { "@solana/assertions": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/nominal-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-KRD61cL7CRL+b4r/eB9dEoVxIf/2EJ1Pm1DmRYhtSUAJD2dJ5Xw8QFuehobOGm9URqQ7gaQl+Fkc1qvDlsWqKg=="], + + "@solana/kit": ["@solana/kit@5.5.1", "", { "dependencies": { "@solana/accounts": "5.5.1", "@solana/addresses": "5.5.1", "@solana/codecs": "5.5.1", "@solana/errors": "5.5.1", "@solana/functional": "5.5.1", "@solana/instruction-plans": "5.5.1", "@solana/instructions": "5.5.1", "@solana/keys": "5.5.1", "@solana/offchain-messages": "5.5.1", "@solana/plugin-core": "5.5.1", "@solana/programs": "5.5.1", "@solana/rpc": "5.5.1", "@solana/rpc-api": "5.5.1", "@solana/rpc-parsed-types": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "@solana/rpc-subscriptions": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/signers": "5.5.1", "@solana/sysvars": "5.5.1", "@solana/transaction-confirmation": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-irKUGiV2yRoyf+4eGQ/ZeCRxa43yjFEL1DUI5B0DkcfZw3cr0VJtVJnrG8OtVF01vT0OUfYOcUn6zJW5TROHvQ=="], + + "@solana/nominal-types": ["@solana/nominal-types@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-I1ImR+kfrLFxN5z22UDiTWLdRZeKtU0J/pkWkO8qm/8WxveiwdIv4hooi8pb6JnlR4mSrWhq0pCIOxDYrL9GIQ=="], + + "@solana/offchain-messages": ["@solana/offchain-messages@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-data-structures": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/keys": "5.5.1", "@solana/nominal-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-g+xHH95prTU+KujtbOzj8wn+C7ZNoiLhf3hj6nYq3MTyxOXtBEysguc97jJveUZG0K97aIKG6xVUlMutg5yxhw=="], + + "@solana/options": ["@solana/options@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/codecs-data-structures": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-eo971c9iLNLmk+yOFyo7yKIJzJ/zou6uKpy6mBuyb/thKtS/haiKIc3VLhyTXty3OH2PW8yOlORJnv4DexJB8A=="], + + "@solana/plugin-core": ["@solana/plugin-core@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-VUZl30lDQFJeiSyNfzU1EjYt2QZvoBFKEwjn1lilUJw7KgqD5z7mbV7diJhT+dLFs36i0OsjXvq5kSygn8YJ3A=="], + + "@solana/programs": ["@solana/programs@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-7U9kn0Jsx1NuBLn5HRTFYh78MV4XN145Yc3WP/q5BlqAVNlMoU9coG5IUTJIG847TUqC1lRto3Dnpwm6T4YRpA=="], + + "@solana/promises": ["@solana/promises@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-T9lfuUYkGykJmppEcssNiCf6yiYQxJkhiLPP+pyAc2z84/7r3UVIb2tNJk4A9sucS66pzJnVHZKcZVGUUp6wzA=="], + + "@solana/rpc": ["@solana/rpc@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/fast-stable-stringify": "5.5.1", "@solana/functional": "5.5.1", "@solana/rpc-api": "5.5.1", "@solana/rpc-spec": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "@solana/rpc-transformers": "5.5.1", "@solana/rpc-transport-http": "5.5.1", "@solana/rpc-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-ku8zTUMrkCWci66PRIBC+1mXepEnZH/q1f3ck0kJZ95a06bOTl5KU7HeXWtskkyefzARJ5zvCs54AD5nxjQJ+A=="], + + "@solana/rpc-api": ["@solana/rpc-api@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/keys": "5.5.1", "@solana/rpc-parsed-types": "5.5.1", "@solana/rpc-spec": "5.5.1", "@solana/rpc-transformers": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-XWOQQPhKl06Vj0xi3RYHAc6oEQd8B82okYJ04K7N0Vvy3J4PN2cxeK7klwkjgavdcN9EVkYCChm2ADAtnztKnA=="], + + "@solana/rpc-parsed-types": ["@solana/rpc-parsed-types@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-HEi3G2nZqGEsa3vX6U0FrXLaqnUCg4SKIUrOe8CezD+cSFbRTOn3rCLrUmJrhVyXlHoQVaRO9mmeovk31jWxJg=="], + + "@solana/rpc-spec": ["@solana/rpc-spec@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/rpc-spec-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-m3LX2bChm3E3by4mQrH4YwCAFY57QBzuUSWqlUw7ChuZ+oLLOq7b2czi4i6L4Vna67j3eCmB3e+4tqy1j5wy7Q=="], + + "@solana/rpc-spec-types": ["@solana/rpc-spec-types@5.5.1", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-6OFKtRpIEJQs8Jb2C4OO8KyP2h2Hy1MFhatMAoXA+0Ik8S3H+CicIuMZvGZ91mIu/tXicuOOsNNLu3HAkrakrw=="], + + "@solana/rpc-subscriptions": ["@solana/rpc-subscriptions@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/fast-stable-stringify": "5.5.1", "@solana/functional": "5.5.1", "@solana/promises": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "@solana/rpc-subscriptions-api": "5.5.1", "@solana/rpc-subscriptions-channel-websocket": "5.5.1", "@solana/rpc-subscriptions-spec": "5.5.1", "@solana/rpc-transformers": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/subscribable": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-CTMy5bt/6mDh4tc6vUJms9EcuZj3xvK0/xq8IQ90rhkpYvate91RjBP+egvjgSayUg9yucU9vNuUpEjz4spM7w=="], + + "@solana/rpc-subscriptions-api": ["@solana/rpc-subscriptions-api@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/keys": "5.5.1", "@solana/rpc-subscriptions-spec": "5.5.1", "@solana/rpc-transformers": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-5Oi7k+GdeS8xR2ly1iuSFkAv6CZqwG0Z6b1QZKbEgxadE1XGSDrhM2cn59l+bqCozUWCqh4c/A2znU/qQjROlw=="], + + "@solana/rpc-subscriptions-channel-websocket": ["@solana/rpc-subscriptions-channel-websocket@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/functional": "5.5.1", "@solana/rpc-subscriptions-spec": "5.5.1", "@solana/subscribable": "5.5.1", "ws": "^8.19.0" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-7tGfBBrYY8TrngOyxSHoCU5shy86iA9SRMRrPSyBhEaZRAk6dnbdpmUTez7gtdVo0BCvh9nzQtUycKWSS7PnFQ=="], + + "@solana/rpc-subscriptions-spec": ["@solana/rpc-subscriptions-spec@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/promises": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "@solana/subscribable": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-iq+rGq5fMKP3/mKHPNB6MC8IbVW41KGZg83Us/+LE3AWOTWV1WT20KT2iH1F1ik9roi42COv/TpoZZvhKj45XQ=="], + + "@solana/rpc-transformers": ["@solana/rpc-transformers@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/functional": "5.5.1", "@solana/nominal-types": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "@solana/rpc-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-OsWqLCQdcrRJKvHiMmwFhp9noNZ4FARuMkHT5us3ustDLXaxOjF0gfqZLnMkulSLcKt7TGXqMhBV+HCo7z5M8Q=="], + + "@solana/rpc-transport-http": ["@solana/rpc-transport-http@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1", "@solana/rpc-spec": "5.5.1", "@solana/rpc-spec-types": "5.5.1", "undici-types": "^7.19.2" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-yv8GoVSHqEV0kUJEIhkdOVkR2SvJ6yoWC51cJn2rSV7plr6huLGe0JgujCmB7uZhhaLbcbP3zxXxu9sOjsi7Fg=="], + + "@solana/rpc-types": ["@solana/rpc-types@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/nominal-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-bibTFQ7PbHJJjGJPmfYC2I+/5CRFS4O2p9WwbFraX1Keeel+nRrt/NBXIy8veP5AEn2sVJIyJPpWBRpCx1oATA=="], + + "@solana/signers": ["@solana/signers@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1", "@solana/instructions": "5.5.1", "@solana/keys": "5.5.1", "@solana/nominal-types": "5.5.1", "@solana/offchain-messages": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-FY0IVaBT2kCAze55vEieR6hag4coqcuJ31Aw3hqRH7mv6sV8oqwuJmUrx+uFwOp1gwd5OEAzlv6N4hOOple4sQ=="], + + "@solana/subscribable": ["@solana/subscribable@5.5.1", "", { "dependencies": { "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-9K0PsynFq0CsmK1CDi5Y2vUIJpCqkgSS5yfDN0eKPgHqEptLEaia09Kaxc90cSZDZU5mKY/zv1NBmB6Aro9zQQ=="], + + "@solana/sysvars": ["@solana/sysvars@5.5.1", "", { "dependencies": { "@solana/accounts": "5.5.1", "@solana/codecs": "5.5.1", "@solana/errors": "5.5.1", "@solana/rpc-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-k3Quq87Mm+geGUu1GWv6knPk0ALsfY6EKSJGw9xUJDHzY/RkYSBnh0RiOrUhtFm2TDNjOailg8/m0VHmi3reFA=="], + + "@solana/transaction-confirmation": ["@solana/transaction-confirmation@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/keys": "5.5.1", "@solana/promises": "5.5.1", "@solana/rpc": "5.5.1", "@solana/rpc-subscriptions": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/transaction-messages": "5.5.1", "@solana/transactions": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-j4mKlYPHEyu+OD7MBt3jRoX4ScFgkhZC6H65on4Fux6LMScgivPJlwnKoZMnsgxFgWds0pl+BYzSiALDsXlYtw=="], + + "@solana/transaction-messages": ["@solana/transaction-messages@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-data-structures": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/errors": "5.5.1", "@solana/functional": "5.5.1", "@solana/instructions": "5.5.1", "@solana/nominal-types": "5.5.1", "@solana/rpc-types": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-aXyhMCEaAp3M/4fP0akwBBQkFPr4pfwoC5CLDq999r/FUwDax2RE/h4Ic7h2Xk+JdcUwsb+rLq85Y52hq84XvQ=="], + + "@solana/transactions": ["@solana/transactions@5.5.1", "", { "dependencies": { "@solana/addresses": "5.5.1", "@solana/codecs-core": "5.5.1", "@solana/codecs-data-structures": "5.5.1", "@solana/codecs-numbers": "5.5.1", "@solana/codecs-strings": "5.5.1", "@solana/errors": "5.5.1", "@solana/functional": "5.5.1", "@solana/instructions": "5.5.1", "@solana/keys": "5.5.1", "@solana/nominal-types": "5.5.1", "@solana/rpc-types": "5.5.1", "@solana/transaction-messages": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-8hHtDxtqalZ157pnx6p8k10D7J/KY/biLzfgh9R09VNLLY3Fqi7kJvJCr7M2ik3oRll56pxhraAGCC9yIT6eOA=="], + + "@solana/web3.js": ["@solana/web3.js@1.98.4", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "@solana/codecs-numbers": "^2.1.0", "agentkeepalive": "^4.5.0", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw=="], "@speed-highlight/core": ["@speed-highlight/core@1.2.7", "", {}, "sha512-0dxmVj4gxg3Jg879kvFS/msl4s9F3T9UXC1InxgOf7t5NvcPD97u/WTA5vL/IxWHMn7qSxBozqrnnE2wvl1m8g=="], @@ -336,6 +491,8 @@ "@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@5.0.0", "", { "dependencies": { "debug": "^4.4.1" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^6.0.0-next.0", "svelte": "^5.0.0", "vite": "^6.3.0 || ^7.0.0" } }, "sha512-iwQ8Z4ET6ZFSt/gC+tVfcsSBHwsqc6RumSaiLUkAurW3BCpJam65cmHw0oOlDMTO0u+PZi9hilBRYN+LZNHTUQ=="], + "@swc/helpers": ["@swc/helpers@0.5.19", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-QamiFeIK3txNjgUTNppE6MiG3p7TdninpZu0E0PbqVh1a9FNLT2FRhisaa4NcaX52XVhA5l7Pk58Ft7Sqi/2sA=="], + "@tailwindcss/node": ["@tailwindcss/node@4.1.11", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "enhanced-resolve": "^5.18.1", "jiti": "^2.4.2", "lightningcss": "1.30.1", "magic-string": "^0.30.17", "source-map-js": "^1.2.1", "tailwindcss": "4.1.11" } }, "sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q=="], "@tailwindcss/oxide": ["@tailwindcss/oxide@4.1.11", "", { "dependencies": { "detect-libc": "^2.0.4", "tar": "^7.4.3" }, "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.1.11", "@tailwindcss/oxide-darwin-arm64": "4.1.11", "@tailwindcss/oxide-darwin-x64": "4.1.11", "@tailwindcss/oxide-freebsd-x64": "4.1.11", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", "@tailwindcss/oxide-linux-x64-musl": "4.1.11", "@tailwindcss/oxide-wasm32-wasi": "4.1.11", "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", "@tailwindcss/oxide-win32-x64-msvc": "4.1.11" } }, "sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg=="], @@ -366,18 +523,34 @@ "@tailwindcss/vite": ["@tailwindcss/vite@4.1.11", "", { "dependencies": { "@tailwindcss/node": "4.1.11", "@tailwindcss/oxide": "4.1.11", "tailwindcss": "4.1.11" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-RHYhrR3hku0MJFRV+fN2gNbDNEh3dwKvY8XJvTxCSXeMOsCRSr+uKvDWQcbizrHgjML6ZmTE5OwMrl5wKcujCw=="], + "@tanstack/query-core": ["@tanstack/query-core@5.90.20", "", {}, "sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg=="], + + "@tanstack/react-query": ["@tanstack/react-query@5.90.21", "", { "dependencies": { "@tanstack/query-core": "5.90.20" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-0Lu6y5t+tvlTJMTO7oh5NSpJfpg/5D41LlThfepTixPYkJ0sE2Jj0m0f6yYqujBwIXlId87e234+MxG3D3g7kg=="], + "@types/bun": ["@types/bun@1.3.8", "", { "dependencies": { "bun-types": "1.3.8" } }, "sha512-3LvWJ2q5GerAXYxO2mffLTqOzEu5qnhEAlh48Vnu8WQfnmSwbgagjGZV6BoHKJztENYEDn6QmVd949W4uESRJA=="], + "@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="], + "@types/cookie": ["@types/cookie@0.6.0", "", {}, "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="], + "@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="], + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], + "@types/node": ["@types/node@25.2.2", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-BkmoP5/FhRYek5izySdkOneRyXYN35I860MFAGupTdebyE66uZaR+bXLHq8k4DirE5DwQi3NuhvRU1jqTVwUrQ=="], + "@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="], + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + "@types/uuid": ["@types/uuid@10.0.0", "", {}, "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ=="], + + "@types/ws": ["@types/ws@7.4.7", "", { "dependencies": { "@types/node": "*" } }, "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.39.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.39.0", "@typescript-eslint/type-utils": "8.39.0", "@typescript-eslint/utils": "8.39.0", "@typescript-eslint/visitor-keys": "8.39.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.39.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw=="], "@typescript-eslint/parser": ["@typescript-eslint/parser@8.39.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.39.0", "@typescript-eslint/types": "8.39.0", "@typescript-eslint/typescript-estree": "8.39.0", "@typescript-eslint/visitor-keys": "8.39.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg=="], @@ -398,11 +571,19 @@ "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.39.0", "", { "dependencies": { "@typescript-eslint/types": "8.39.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA=="], - "@walletconnect/core": ["@walletconnect/core@2.21.7", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.7", "@walletconnect/utils": "2.21.7", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.39.3", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-q/Au5Ne3g4R+q4GvHR5cvRd3+ha00QZCZiCs058lmy+eDbiZd0YsautvTPJ5a2guD6UaS1k/w5e1JHgixdcgLA=="], + "@wagmi/connectors": ["@wagmi/connectors@7.2.1", "", { "peerDependencies": { "@base-org/account": "^2.5.1", "@coinbase/wallet-sdk": "^4.3.6", "@metamask/sdk": "~0.33.1", "@safe-global/safe-apps-provider": "~0.18.6", "@safe-global/safe-apps-sdk": "^9.1.0", "@wagmi/core": "3.4.0", "@walletconnect/ethereum-provider": "^2.21.1", "porto": "~0.2.35", "typescript": ">=5.7.3", "viem": "2.x" }, "optionalPeers": ["@base-org/account", "@coinbase/wallet-sdk", "@metamask/sdk", "@safe-global/safe-apps-provider", "@safe-global/safe-apps-sdk", "@walletconnect/ethereum-provider", "porto", "typescript"] }, "sha512-/tyDepUMDM8eNzNX3ofjqHNRFZ6XcZ3u0+cQp5x0/LHCpMA8tRh7A1/e7dTrYiIJeL7iLgHzfHUXCsU02OKMLQ=="], + + "@wagmi/core": ["@wagmi/core@3.4.0", "", { "dependencies": { "eventemitter3": "5.0.1", "mipd": "0.0.7", "zustand": "5.0.0" }, "peerDependencies": { "@tanstack/query-core": ">=5.0.0", "ox": ">=0.11.1", "typescript": ">=5.7.3", "viem": "2.x" }, "optionalPeers": ["@tanstack/query-core", "ox", "typescript"] }, "sha512-EU5gDsUp5t7+cuLv12/L8hfyWfCIKsBNiiBqpOqxZJxvAcAiQk4xFe2jMgaQPqApc3Omvxrk032M8AQ4N0cQeg=="], + + "@wallet-standard/base": ["@wallet-standard/base@1.1.0", "", {}, "sha512-DJDQhjKmSNVLKWItoKThJS+CsJQjR9AOBOirBVT1F9YpRyC9oYHE+ZnSf8y8bxUphtKqdQMPVQ2mHohYdRvDVQ=="], + + "@wallet-standard/wallet": ["@wallet-standard/wallet@1.1.0", "", { "dependencies": { "@wallet-standard/base": "^1.1.0" } }, "sha512-Gt8TnSlDZpAl+RWOOAB/kuvC7RpcdWAlFbHNoi4gsXsfaWa1QCT6LBcfIYTPdOZC9OVZUDwqGuGAcqZejDmHjg=="], + + "@walletconnect/core": ["@walletconnect/core@2.23.8", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.8", "@walletconnect/utils": "2.23.8", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.44.0", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-559+fA6Hh9CkEIOtrWKdDWoa3HL47glDF7D75LbqQzv4v325KXq24KEsjzDPBYr7pI49gQo7P2HpPnY1ax+8Aw=="], "@walletconnect/environment": ["@walletconnect/environment@1.0.1", "", { "dependencies": { "tslib": "1.14.1" } }, "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg=="], - "@walletconnect/ethereum-provider": ["@walletconnect/ethereum-provider@2.21.7", "", { "dependencies": { "@reown/appkit": "1.7.8", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/sign-client": "2.21.7", "@walletconnect/types": "2.21.7", "@walletconnect/universal-provider": "2.21.7", "@walletconnect/utils": "2.21.7", "events": "3.3.0" } }, "sha512-T+cBFCw095tDpR35WqwsTFod2ZsizmLfieSbTqpQDpNjhQyFwYf9d+tn2kcBFmxzENXAsWA8BIZK1tjRrXKtog=="], + "@walletconnect/ethereum-provider": ["@walletconnect/ethereum-provider@2.23.8", "", { "dependencies": { "@reown/appkit": "1.8.17-wc-circular-dependencies-fix.0", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/sign-client": "2.23.8", "@walletconnect/types": "2.23.8", "@walletconnect/universal-provider": "2.23.8", "@walletconnect/utils": "2.23.8", "events": "3.3.0" } }, "sha512-nRUWmx8ihUmqVGwQD2PHlJ7+TFT4AZPSR5ssghosVHBt8kpjgtUbE7ej/bYAmmnerDKLyYGrqWtHwjaNBPJHqA=="], "@walletconnect/events": ["@walletconnect/events@1.0.1", "", { "dependencies": { "keyvaluestorage-interface": "^1.0.0", "tslib": "1.14.1" } }, "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ=="], @@ -420,7 +601,7 @@ "@walletconnect/keyvaluestorage": ["@walletconnect/keyvaluestorage@1.1.1", "", { "dependencies": { "@walletconnect/safe-json": "^1.0.1", "idb-keyval": "^6.2.1", "unstorage": "^1.9.0" }, "peerDependencies": { "@react-native-async-storage/async-storage": "1.x" }, "optionalPeers": ["@react-native-async-storage/async-storage"] }, "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA=="], - "@walletconnect/logger": ["@walletconnect/logger@2.1.2", "", { "dependencies": { "@walletconnect/safe-json": "^1.0.2", "pino": "7.11.0" } }, "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw=="], + "@walletconnect/logger": ["@walletconnect/logger@3.0.2", "", { "dependencies": { "@walletconnect/safe-json": "^1.0.2", "pino": "10.0.0" } }, "sha512-7wR3wAwJTOmX4gbcUZcFMov8fjftY05+5cO/d4cpDD8wDzJ+cIlKdYOXaXfxHLSYeDazMXIsxMYjHYVDfkx+nA=="], "@walletconnect/relay-api": ["@walletconnect/relay-api@1.0.11", "", { "dependencies": { "@walletconnect/jsonrpc-types": "^1.0.2" } }, "sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q=="], @@ -428,32 +609,20 @@ "@walletconnect/safe-json": ["@walletconnect/safe-json@1.0.2", "", { "dependencies": { "tslib": "1.14.1" } }, "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA=="], - "@walletconnect/sign-client": ["@walletconnect/sign-client@2.21.7", "", { "dependencies": { "@walletconnect/core": "2.21.7", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "2.1.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.7", "@walletconnect/utils": "2.21.7", "events": "3.3.0" } }, "sha512-9k/JEl9copR6nXRhqnmzWz2Zk1hiWysH+o6bp6Cqo8TgDUrZoMLBZMZ6qbo+2HLI54V02kKf0Vg8M81nNFOpjQ=="], + "@walletconnect/sign-client": ["@walletconnect/sign-client@2.23.8", "", { "dependencies": { "@walletconnect/core": "2.23.8", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "3.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.8", "@walletconnect/utils": "2.23.8", "events": "3.3.0" } }, "sha512-7DtFDQZwOK4E9q+TKWL819d01dpNHA3jMcntSsQqSLNU34orbkDB/BJzW4nyWZ6H9DuGHRvibJA9wvfXjOCWBw=="], "@walletconnect/time": ["@walletconnect/time@1.0.2", "", { "dependencies": { "tslib": "1.14.1" } }, "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g=="], - "@walletconnect/types": ["@walletconnect/types@2.21.7", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-kyGnFje4Iq+XGkZZcSoAIrJWBE4BeghVW4O7n9e1MhUyeOOtO55M/kcqceNGYrvwjHvdN+Kf+aoLnKC0zKlpbQ=="], + "@walletconnect/types": ["@walletconnect/types@2.23.8", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "events": "3.3.0" } }, "sha512-OI/0Z7/8r11EDU9bBPy5nixYgsk6SrTcOvWe9r7Nf2WvkMcPLgV7aS8rb6+nInRmDPfXuyTgzdAox0rtmfJMzg=="], - "@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.21.7", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/sign-client": "2.21.7", "@walletconnect/types": "2.21.7", "@walletconnect/utils": "2.21.7", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-8PB+vA5VuR9PBqt5Y0xj4JC2doYNPlXLGQt3wJORVF9QC227Mm/8R1CAKpmneeLrUH02LkSRwx+wnN/pPnDiQA=="], + "@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.8", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/sign-client": "2.23.8", "@walletconnect/types": "2.23.8", "@walletconnect/utils": "2.23.8", "es-toolkit": "1.44.0", "events": "3.3.0" } }, "sha512-TFn2TNhp5vlbV2HqPU/LfkEIYZEop4WDCTTZKw/RU4DbM1e1+etmvTr5JA+8dkZU7ee48mVUDodY0zQedP+KZA=="], - "@walletconnect/utils": ["@walletconnect/utils@2.21.7", "", { "dependencies": { "@msgpack/msgpack": "3.1.2", "@noble/ciphers": "1.3.0", "@noble/curves": "1.9.2", "@noble/hashes": "1.8.0", "@scure/base": "1.2.6", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.7", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "blakejs": "1.2.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "query-string": "7.1.3", "uint8arrays": "3.1.1", "viem": "2.31.0" } }, "sha512-qyaclTgcFf9AwVuoV8CLLg8wfH3nX7yZdpylNkDqCpS7wawQL9zmFFTaGgma8sQrCsd3Sd9jUIymcpRvCJnSTw=="], + "@walletconnect/utils": ["@walletconnect/utils@2.23.8", "", { "dependencies": { "@msgpack/msgpack": "3.1.3", "@noble/ciphers": "1.3.0", "@noble/curves": "1.9.7", "@noble/hashes": "1.8.0", "@scure/base": "1.2.6", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.8", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "blakejs": "1.2.1", "detect-browser": "5.3.0", "ox": "0.9.3", "uint8arrays": "3.1.1" } }, "sha512-vJrRrZFZANWmnEEnWnfVSnpQ+jdjqBb5fqSgp0VGeRX3pNr2KAHJ0TwNnEN+fbhR76JxuFrpcY7HJUT7DHDJ7w=="], "@walletconnect/window-getters": ["@walletconnect/window-getters@1.0.1", "", { "dependencies": { "tslib": "1.14.1" } }, "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q=="], "@walletconnect/window-metadata": ["@walletconnect/window-metadata@1.0.1", "", { "dependencies": { "@walletconnect/window-getters": "^1.0.1", "tslib": "1.14.1" } }, "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA=="], - "@web3-onboard/coinbase": ["@web3-onboard/coinbase@2.4.2", "", { "dependencies": { "@coinbase/wallet-sdk": "4.3.0", "@web3-onboard/common": "^2.4.1" } }, "sha512-XmxfM55dB/XFI173KPcvHBhXvOY5ygXxwDzdjFvIp/MhwoG6U/8xn4KVg0wavtpX9y9H7jz8jf/ur6AIAi1nmA=="], - - "@web3-onboard/common": ["@web3-onboard/common@2.4.2", "", { "dependencies": { "joi": "17.9.1", "viem": "2.12.0" } }, "sha512-3+zkBru5W2jBYFBPPQsnqZ7tuN1GUyM5PzD9/MmhvjCLNhmjFtMQ0MkLzG4Yshodb4UW/DmZpjUVrpjdhEhj/Q=="], - - "@web3-onboard/core": ["@web3-onboard/core@2.24.1", "", { "dependencies": { "@web3-onboard/common": "^2.4.1", "bnc-sdk": "^4.6.7", "bowser": "^2.11.0", "eventemitter3": "^4.0.7", "joi": "17.9.1", "lodash.merge": "^4.6.2", "lodash.partition": "^4.6.0", "nanoid": "^4.0.0", "rxjs": "^7.5.5", "svelte": "^3.49.0", "svelte-i18n": "^4.0.1", "viem": "2.12.0" } }, "sha512-IhiWF0M4BfnayLdmPoNpckjStlZ4G2N8JylJ92pf6+uWbnvhje8Svka9Oq6nfmfuU7Nbbqx3BVyivEN0kL6dyA=="], - - "@web3-onboard/injected-wallets": ["@web3-onboard/injected-wallets@2.11.3", "", { "dependencies": { "@web3-onboard/common": "^2.4.1", "joi": "17.9.1", "lodash.uniqby": "^4.7.0" } }, "sha512-DSfcJRwe7KgXHSosXSz8QUMpoSTd6ltrb3qb8xhDjwLdpYlSlcmhaH5blP/gvNeB38imiJ9xCQpnI5tpaLKneQ=="], - - "@web3-onboard/walletconnect": ["@web3-onboard/walletconnect@2.6.2", "", { "dependencies": { "@walletconnect/ethereum-provider": "^2.17.3", "@web3-onboard/common": "^2.4.1", "joi": "17.9.1", "rxjs": "^7.5.2" } }, "sha512-eecRCcwgOHbWw2thf03EbbyFnnUsf4G2mcIhLfiWG51Vf0oGSK/QcaINlBEZpY6SK2xH5nnXJtQomLDvfbAM2A=="], - - "@web3-onboard/zeal": ["@web3-onboard/zeal@2.1.1", "", { "dependencies": { "@web3-onboard/common": "^2.4.1" } }, "sha512-xHVPhVQDUA350xfywrbueEXK5YUOwNsDPbff41Go59xpzdEANim4kXVntC3ozoiaBhfiblGKq2AG/v9A2DVbPg=="], - "abitype": ["abitype@1.2.3", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3.22.0 || ^4.0.0" } }, "sha512-Ofer5QUnuUdTFsBRwARMoWKOH1ND5ehwYhJ3OJ/BQO+StkwQjHw0XyVh4vDttzHB7QOFhPHa/o413PJ82gU/Tg=="], "acorn": ["acorn@8.15.0", "", { "bin": "bin/acorn" }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], @@ -462,6 +631,8 @@ "acorn-walk": ["acorn-walk@8.3.2", "", {}, "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A=="], + "agentkeepalive": ["agentkeepalive@4.6.0", "", { "dependencies": { "humanize-ms": "^1.2.1" } }, "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ=="], + "ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], "ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="], @@ -480,7 +651,11 @@ "atomic-sleep": ["atomic-sleep@1.0.0", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="], - "axios": ["axios@1.11.0", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA=="], + "available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="], + + "axios": ["axios@1.13.6", "", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ=="], + + "axios-retry": ["axios-retry@4.5.0", "", { "dependencies": { "is-retry-allowed": "^2.2.0" }, "peerDependencies": { "axios": "0.x || 1.x" } }, "sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ=="], "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], @@ -496,39 +671,51 @@ "blakejs": ["blakejs@1.2.1", "", {}, "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ=="], - "bnc-sdk": ["bnc-sdk@4.6.9", "", { "dependencies": { "crypto-es": "^1.2.2", "nanoid": "^3.3.1", "rxjs": "^6.6.3", "sturdy-websocket": "^0.1.12" } }, "sha512-jenJNMtI1Mx5afbgv4u+eRmnbtAFZ7su6/ias9CYxUs7inZarl5dFTCddSwzXW4i9PoElqlDtIKQN4aeFXuKxg=="], + "bn.js": ["bn.js@5.2.3", "", {}, "sha512-EAcmnPkxpntVL+DS7bO1zhcZNvCkxqtkd0ZY53h06GNQ3DEkkGZ/gKgmDv6DdZQGj9BgfSPKtJJ7Dp1GPP8f7w=="], + + "borsh": ["borsh@2.0.0", "", {}, "sha512-kc9+BgR3zz9+cjbwM8ODoUB4fs3X3I5A/HtX7LZKxCLaMrEeDFoBpnhZY//DTS1VZBSs6S5v46RZRbZjRFspEg=="], - "bowser": ["bowser@2.11.0", "", {}, "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA=="], + "bowser": ["bowser@2.14.1", "", {}, "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg=="], "brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + "brotli-wasm": ["brotli-wasm@3.0.1", "", {}, "sha512-U3K72/JAi3jITpdhZBqzSUq+DUY697tLxOuFXB+FpAE/Ug+5C3VZrv4uA674EUZHxNAuQ9wETXNqQkxZD6oL4A=="], + "bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="], "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="], "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + "bufferutil": ["bufferutil@4.1.0", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-ZMANVnAixE6AWWnPzlW2KpUrxhm9woycYvPOo67jWHyFowASTEd9s+QN1EIMsSDtwhIxN4sWE1jotpuDUIgyIw=="], + + "bun": ["bun@1.3.13", "", { "optionalDependencies": { "@oven/bun-darwin-aarch64": "1.3.13", "@oven/bun-darwin-x64": "1.3.13", "@oven/bun-darwin-x64-baseline": "1.3.13", "@oven/bun-linux-aarch64": "1.3.13", "@oven/bun-linux-aarch64-musl": "1.3.13", "@oven/bun-linux-x64": "1.3.13", "@oven/bun-linux-x64-baseline": "1.3.13", "@oven/bun-linux-x64-musl": "1.3.13", "@oven/bun-linux-x64-musl-baseline": "1.3.13", "@oven/bun-windows-aarch64": "1.3.13", "@oven/bun-windows-x64": "1.3.13", "@oven/bun-windows-x64-baseline": "1.3.13" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ], "bin": { "bun": "bin/bun.exe", "bunx": "bin/bunx.exe" } }, "sha512-b9T4xZ8KqCHs4+TkHJv540LG1B8OD7noKu0Qaizusx3jFtMDHY6osNqgbaOlwW2B8RB2AKzz+sjzlGKIGxIjZw=="], + "bun-types": ["bun-types@1.3.8", "", { "dependencies": { "@types/node": "*" } }, "sha512-fL99nxdOWvV4LqjmC+8Q9kW3M4QTtTR1eePs94v5ctGqU8OeceWrSUaRw3JYb7tU3FkMIAjkueehrHPPPGKi5Q=="], + "call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="], + "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], + "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], + "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], "camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + "charenc": ["charenc@0.0.2", "", {}, "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="], + "chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], - "cli-color": ["cli-color@2.0.4", "", { "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.64", "es6-iterator": "^2.0.3", "memoizee": "^0.4.15", "timers-ext": "^0.1.7" } }, "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA=="], - "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="], - "cli-truncate": ["cli-truncate@5.1.1", "", { "dependencies": { "slice-ansi": "^7.1.0", "string-width": "^8.0.0" } }, "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A=="], + "cli-truncate": ["cli-truncate@4.0.0", "", { "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^7.0.0" } }, "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA=="], "cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="], @@ -554,17 +741,23 @@ "cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="], - "cross-fetch": ["cross-fetch@3.2.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q=="], + "core-util-is": ["core-util-is@1.0.3", "", {}, "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="], + + "crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="], + + "cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "crossws": ["crossws@0.3.5", "", { "dependencies": { "uncrypto": "^0.1.3" } }, "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA=="], - "crypto-es": ["crypto-es@1.2.7", "", {}, "sha512-UUqiVJ2gUuZFmbFsKmud3uuLcNP2+Opt+5ysmljycFCyhA0+T16XJmo1ev/t5kMChMqWh7IEvURNCqsg+SjZGQ=="], + "crypt": ["crypt@0.0.2", "", {}, "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="], "cssesc": ["cssesc@3.0.0", "", { "bin": "bin/cssesc" }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="], - "d": ["d@1.0.2", "", { "dependencies": { "es5-ext": "^0.10.64", "type": "^2.7.2" } }, "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw=="], + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "date-fns": ["date-fns@2.30.0", "", { "dependencies": { "@babel/runtime": "^7.21.0" } }, "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw=="], "dayjs": ["dayjs@1.11.13", "", {}, "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="], @@ -572,19 +765,17 @@ "decamelize": ["decamelize@1.2.0", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="], - "decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="], - - "decode-uri-component": ["decode-uri-component@0.2.2", "", {}, "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="], - "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + "define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="], + "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], - "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], + "delay": ["delay@5.0.0", "", {}, "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw=="], - "derive-valtio": ["derive-valtio@0.1.0", "", { "peerDependencies": { "valtio": "*" } }, "sha512-OCg2UsLbXK7GmmpzMXhYkdO64vhJ1ROUUGaTFyHjVwEdMEcTTRj7W1TxLbSBxdY8QLBPCcp66MTyaSy0RpO17A=="], + "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], @@ -596,13 +787,15 @@ "dijkstrajs": ["dijkstrajs@1.0.3", "", {}, "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="], + "dotenv": ["dotenv@17.3.1", "", {}, "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA=="], + "drizzle-kit": ["drizzle-kit@0.31.9", "", { "dependencies": { "@drizzle-team/brocli": "^0.10.2", "@esbuild-kit/esm-loader": "^2.5.5", "esbuild": "^0.25.4", "esbuild-register": "^3.5.0" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-GViD3IgsXn7trFyBUUHyTFBpH/FsHTxYJ66qdbVggxef4UBPHRYxQaRzYLTuekYnk9i5FIEL9pbBIwMqX/Uwrg=="], "drizzle-orm": ["drizzle-orm@0.45.1", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-Te0FOdKIistGNPMq2jscdqngBRfBpC8uMFVwqjf6gtTVJHIQ/dosgV/CLBU2N4ZJBsXL5savCba9b0YJskKdcA=="], "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="], + "eciesjs": ["eciesjs@0.4.17", "", { "dependencies": { "@ecies/ciphers": "^0.2.5", "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.7", "@noble/hashes": "^1.8.0" } }, "sha512-TOOURki4G7sD1wDCjj7NfLaXZZ49dFOeEb5y39IXpb8p0hRzVvfvzZHOi5JcT+PpyAbi/Y+lxPb8eTag2WYH8w=="], "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], @@ -610,6 +803,10 @@ "end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="], + "engine.io-client": ["engine.io-client@6.6.4", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.4.1", "engine.io-parser": "~5.2.1", "ws": "~8.18.3", "xmlhttprequest-ssl": "~2.1.1" } }, "sha512-+kjUJnZGwzewFDw951CDWcwj35vMNf2fcj7xQWOctq1F2i1jkDdVvdFG9kM/BEChymCH36KgjnW0NsL58JYRxw=="], + + "engine.io-parser": ["engine.io-parser@5.2.3", "", {}, "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q=="], + "enhanced-resolve": ["enhanced-resolve@5.18.3", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" } }, "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww=="], "environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="], @@ -624,15 +821,11 @@ "es-set-tostringtag": ["es-set-tostringtag@2.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="], - "es-toolkit": ["es-toolkit@1.39.3", "", {}, "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww=="], - - "es5-ext": ["es5-ext@0.10.64", "", { "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", "esniff": "^2.0.1", "next-tick": "^1.1.0" } }, "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg=="], - - "es6-iterator": ["es6-iterator@2.0.3", "", { "dependencies": { "d": "1", "es5-ext": "^0.10.35", "es6-symbol": "^3.1.1" } }, "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g=="], + "es-toolkit": ["es-toolkit@1.44.0", "", {}, "sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg=="], - "es6-symbol": ["es6-symbol@3.1.4", "", { "dependencies": { "d": "^1.0.2", "ext": "^1.7.0" } }, "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg=="], + "es6-promise": ["es6-promise@4.2.8", "", {}, "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="], - "es6-weak-map": ["es6-weak-map@2.0.3", "", { "dependencies": { "d": "1", "es5-ext": "^0.10.46", "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.1" } }, "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA=="], + "es6-promisify": ["es6-promisify@5.0.0", "", { "dependencies": { "es6-promise": "^4.0.3" } }, "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ=="], "esbuild": ["esbuild@0.25.8", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.8", "@esbuild/android-arm": "0.25.8", "@esbuild/android-arm64": "0.25.8", "@esbuild/android-x64": "0.25.8", "@esbuild/darwin-arm64": "0.25.8", "@esbuild/darwin-x64": "0.25.8", "@esbuild/freebsd-arm64": "0.25.8", "@esbuild/freebsd-x64": "0.25.8", "@esbuild/linux-arm": "0.25.8", "@esbuild/linux-arm64": "0.25.8", "@esbuild/linux-ia32": "0.25.8", "@esbuild/linux-loong64": "0.25.8", "@esbuild/linux-mips64el": "0.25.8", "@esbuild/linux-ppc64": "0.25.8", "@esbuild/linux-riscv64": "0.25.8", "@esbuild/linux-s390x": "0.25.8", "@esbuild/linux-x64": "0.25.8", "@esbuild/netbsd-arm64": "0.25.8", "@esbuild/netbsd-x64": "0.25.8", "@esbuild/openbsd-arm64": "0.25.8", "@esbuild/openbsd-x64": "0.25.8", "@esbuild/openharmony-arm64": "0.25.8", "@esbuild/sunos-x64": "0.25.8", "@esbuild/win32-arm64": "0.25.8", "@esbuild/win32-ia32": "0.25.8", "@esbuild/win32-x64": "0.25.8" }, "bin": "bin/esbuild" }, "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q=="], @@ -652,8 +845,6 @@ "esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="], - "esniff": ["esniff@2.0.1", "", { "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.62", "event-emitter": "^0.3.5", "type": "^2.7.2" } }, "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg=="], - "espree": ["espree@10.4.0", "", { "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^4.2.1" } }, "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ=="], "esquery": ["esquery@1.6.0", "", { "dependencies": { "estraverse": "^5.1.0" } }, "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg=="], @@ -664,13 +855,15 @@ "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], - "estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], - "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], - "event-emitter": ["event-emitter@0.3.5", "", { "dependencies": { "d": "1", "es5-ext": "~0.10.14" } }, "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA=="], + "eth-rpc-errors": ["eth-rpc-errors@4.0.3", "", { "dependencies": { "fast-safe-stringify": "^2.0.6" } }, "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg=="], + + "ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], - "eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], + "eventemitter2": ["eventemitter2@6.4.9", "", {}, "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg=="], + + "eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], "events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="], @@ -678,7 +871,9 @@ "exsolve": ["exsolve@1.0.7", "", {}, "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw=="], - "ext": ["ext@1.7.0", "", { "dependencies": { "type": "^2.7.2" } }, "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw=="], + "extension-port-stream": ["extension-port-stream@3.0.0", "", { "dependencies": { "readable-stream": "^3.6.2 || ^4.4.2", "webextension-polyfill": ">=0.10.0 <1.0" } }, "sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw=="], + + "eyes": ["eyes@0.1.8", "", {}, "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ=="], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -688,7 +883,9 @@ "fast-levenshtein": ["fast-levenshtein@2.0.6", "", {}, "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="], - "fast-redact": ["fast-redact@3.5.0", "", {}, "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A=="], + "fast-safe-stringify": ["fast-safe-stringify@2.1.1", "", {}, "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="], + + "fast-stable-stringify": ["fast-stable-stringify@1.0.0", "", {}, "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag=="], "fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="], @@ -698,8 +895,6 @@ "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], - "filter-obj": ["filter-obj@1.1.0", "", {}, "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ=="], - "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], "flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="], @@ -708,15 +903,19 @@ "follow-redirects": ["follow-redirects@1.15.11", "", {}, "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ=="], - "form-data": ["form-data@4.0.4", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow=="], + "for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="], + + "form-data": ["form-data@4.0.5", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w=="], "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + "generator-function": ["generator-function@2.0.1", "", {}, "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g=="], + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], - "get-east-asian-width": ["get-east-asian-width@1.4.0", "", {}, "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q=="], + "get-east-asian-width": ["get-east-asian-width@1.5.0", "", {}, "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA=="], "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], @@ -730,29 +929,31 @@ "globals": ["globals@16.3.0", "", {}, "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ=="], - "globalyzer": ["globalyzer@0.1.0", "", {}, "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="], - - "globrex": ["globrex@0.1.2", "", {}, "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="], - "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], "graphemer": ["graphemer@1.4.0", "", {}, "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag=="], - "h3": ["h3@1.15.4", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.2", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ=="], + "h3": ["h3@1.15.6", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.4", "radix3": "^1.1.2", "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, "sha512-oi15ESLW5LRthZ+qPCi5GNasY/gvynSKUQxgiovrY63bPAtG59wtM+LSrlcwvOHAXzGrXVLnI97brbkdPF9WoQ=="], "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + "has-property-descriptors": ["has-property-descriptors@1.0.2", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="], + "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], "has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="], "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], - "husky": ["husky@9.1.7", "", { "bin": "bin.js" }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="], + "hono": ["hono@4.12.7", "", {}, "sha512-jq9l1DM0zVIvsm3lv9Nw9nlJnMNPOcAtsbsgiUhWcFzPE99Gvo6yRTlszSLLYacMeQ6quHD6hMfId8crVHvexw=="], + + "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], - "idb-keyval": ["idb-keyval@6.2.2", "", {}, "sha512-yjD9nARJ/jb1g+CvD0tlhUHOrJ9Sy0P8T9MF3YaLlHnSRpwPfpTX0XIvpmw3gAJUmEu3FiICLBDPXVwyEvrleg=="], + "husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="], + + "idb-keyval": ["idb-keyval@6.2.1", "", {}, "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg=="], "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], @@ -764,33 +965,49 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "intl-messageformat": ["intl-messageformat@10.7.16", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.4", "@formatjs/fast-memoize": "2.2.7", "@formatjs/icu-messageformat-parser": "2.11.2", "tslib": "^2.8.0" } }, "sha512-UmdmHUmp5CIKKjSoE10la5yfU+AYJAaiYLsodbjL4lji83JNvgOQUjGaGhGrpFCb0Uh7sl7qfP1IyILa8Z40ug=="], - "iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="], + "is-arguments": ["is-arguments@1.2.0", "", { "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" } }, "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA=="], + "is-arrayish": ["is-arrayish@0.3.2", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="], + "is-buffer": ["is-buffer@1.1.6", "", {}, "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="], + + "is-callable": ["is-callable@1.2.7", "", {}, "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="], + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], - "is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], + "is-fullwidth-code-point": ["is-fullwidth-code-point@4.0.0", "", {}, "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ=="], + + "is-generator-function": ["is-generator-function@1.1.2", "", { "dependencies": { "call-bound": "^1.0.4", "generator-function": "^2.0.0", "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" } }, "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA=="], "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], - "is-promise": ["is-promise@2.2.2", "", {}, "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="], - "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], + "is-regex": ["is-regex@1.2.1", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="], + + "is-retry-allowed": ["is-retry-allowed@2.2.0", "", {}, "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg=="], + + "is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "is-typed-array": ["is-typed-array@1.1.15", "", { "dependencies": { "which-typed-array": "^1.1.16" } }, "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ=="], + + "isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + "isomorphic-ws": ["isomorphic-ws@4.0.1", "", { "peerDependencies": { "ws": "*" } }, "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w=="], + "isows": ["isows@1.0.7", "", { "peerDependencies": { "ws": "*" } }, "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg=="], - "jiti": ["jiti@2.5.1", "", { "bin": "lib/jiti-cli.mjs" }, "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w=="], + "jayson": ["jayson@4.3.0", "", { "dependencies": { "@types/connect": "^3.4.33", "@types/node": "^12.12.54", "@types/ws": "^7.4.4", "commander": "^2.20.3", "delay": "^5.0.0", "es6-promisify": "^5.0.0", "eyes": "^0.1.8", "isomorphic-ws": "^4.0.1", "json-stringify-safe": "^5.0.1", "stream-json": "^1.9.1", "uuid": "^8.3.2", "ws": "^7.5.10" }, "bin": { "jayson": "bin/jayson.js" } }, "sha512-AauzHcUcqs8OBnCHOkJY280VaTiCm57AbuO7lqzcw7JapGj50BisE3xhksye4zlTSR1+1tAz67wLTl8tEH1obQ=="], - "joi": ["joi@17.9.1", "", { "dependencies": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", "@sideway/address": "^4.1.3", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, "sha512-FariIi9j6QODKATGBrEX7HZcja8Bsh3rfdGYy/Sb65sGlZWK/QWesU1ghk7aJWDj95knjXlQfSmzFSPPkLVsfw=="], + "jiti": ["jiti@2.5.1", "", { "bin": "lib/jiti-cli.mjs" }, "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w=="], - "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + "jose": ["jose@6.2.1", "", {}, "sha512-jUaKr1yrbfaImV7R2TN/b3IcZzsw38/chqMpo2XJ7i2F8AfM/lA4G1goC3JVEwg0H7UldTmSt3P68nt31W7/mw=="], "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": "bin/js-yaml.js" }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], @@ -800,6 +1017,8 @@ "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], + "json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="], + "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], "keyvaluestorage-interface": ["keyvaluestorage-interface@1.0.0", "", {}, "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g=="], @@ -808,6 +1027,8 @@ "known-css-properties": ["known-css-properties@0.37.0", "", {}, "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ=="], + "ky": ["ky@1.14.3", "", {}, "sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw=="], + "levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="], "lightningcss": ["lightningcss@1.30.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-darwin-arm64": "1.30.1", "lightningcss-darwin-x64": "1.30.1", "lightningcss-freebsd-x64": "1.30.1", "lightningcss-linux-arm-gnueabihf": "1.30.1", "lightningcss-linux-arm64-gnu": "1.30.1", "lightningcss-linux-arm64-musl": "1.30.1", "lightningcss-linux-x64-gnu": "1.30.1", "lightningcss-linux-x64-musl": "1.30.1", "lightningcss-win32-arm64-msvc": "1.30.1", "lightningcss-win32-x64-msvc": "1.30.1" } }, "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg=="], @@ -832,46 +1053,38 @@ "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.30.1", "", { "os": "win32", "cpu": "x64" }, "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg=="], - "lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="], + "lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="], - "lint-staged": ["lint-staged@16.2.7", "", { "dependencies": { "commander": "^14.0.2", "listr2": "^9.0.5", "micromatch": "^4.0.8", "nano-spawn": "^2.0.0", "pidtree": "^0.6.0", "string-argv": "^0.3.2", "yaml": "^2.8.1" }, "bin": { "lint-staged": "bin/lint-staged.js" } }, "sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow=="], + "lint-staged": ["lint-staged@16.1.0", "", { "dependencies": { "chalk": "^5.4.1", "commander": "^14.0.0", "debug": "^4.4.1", "lilconfig": "^3.1.3", "listr2": "^8.3.3", "micromatch": "^4.0.8", "nano-spawn": "^1.0.2", "pidtree": "^0.6.0", "string-argv": "^0.3.2", "yaml": "^2.8.0" }, "bin": { "lint-staged": "bin/lint-staged.js" } }, "sha512-HkpQh69XHxgCjObjejBT3s2ILwNjFx8M3nw+tJ/ssBauDlIpkx2RpqWSi1fBgkXLSSXnbR3iEq1NkVtpvV+FLQ=="], - "listr2": ["listr2@9.0.5", "", { "dependencies": { "cli-truncate": "^5.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^9.0.0" } }, "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g=="], + "listr2": ["listr2@8.3.3", "", { "dependencies": { "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^9.0.0" } }, "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ=="], "lit": ["lit@3.3.0", "", { "dependencies": { "@lit/reactive-element": "^2.1.0", "lit-element": "^4.2.0", "lit-html": "^3.3.0" } }, "sha512-DGVsqsOIHBww2DqnuZzW7QsuCdahp50ojuDaBPC7jUDRpYoH0z7kHBBYZewRzer75FwtrkmkKk7iOAwSaWdBmw=="], - "lit-element": ["lit-element@4.2.1", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.4.0", "@lit/reactive-element": "^2.1.0", "lit-html": "^3.3.0" } }, "sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw=="], + "lit-element": ["lit-element@4.2.2", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.5.0", "@lit/reactive-element": "^2.1.0", "lit-html": "^3.3.0" } }, "sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w=="], - "lit-html": ["lit-html@3.3.1", "", { "dependencies": { "@types/trusted-types": "^2.0.2" } }, "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA=="], + "lit-html": ["lit-html@3.3.2", "", { "dependencies": { "@types/trusted-types": "^2.0.2" } }, "sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw=="], "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], - "lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="], - "lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="], - "lodash.partition": ["lodash.partition@4.6.0", "", {}, "sha512-35L3dSF3Q6V1w5j6V3NhNlQjzsRDC/pYKCTdYTmwqSib+Q8ponkAmt/PwEOq3EmI38DSCl+SkIVwLd+uSlVdrg=="], - - "lodash.uniqby": ["lodash.uniqby@4.7.0", "", {}, "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww=="], - "log-update": ["log-update@6.1.0", "", { "dependencies": { "ansi-escapes": "^7.0.0", "cli-cursor": "^5.0.0", "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w=="], - "loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": "cli.js" }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="], - - "lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], - - "lru-queue": ["lru-queue@0.1.0", "", { "dependencies": { "es5-ext": "~0.10.2" } }, "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ=="], + "lru-cache": ["lru-cache@11.2.6", "", {}, "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ=="], "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - "memoizee": ["memoizee@0.4.17", "", { "dependencies": { "d": "^1.0.2", "es5-ext": "^0.10.64", "es6-weak-map": "^2.0.3", "event-emitter": "^0.3.5", "is-promise": "^2.2.2", "lru-queue": "^0.1.0", "next-tick": "^1.1.0", "timers-ext": "^0.1.7" } }, "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA=="], + "md5": ["md5@2.3.0", "", { "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", "is-buffer": "~1.1.6" } }, "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + "micro-ftch": ["micro-ftch@0.3.1", "", {}, "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg=="], + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], "mime": ["mime@3.0.0", "", { "bin": "cli.js" }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="], @@ -890,6 +1103,8 @@ "minizlib": ["minizlib@3.0.2", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA=="], + "mipd": ["mipd@0.0.7", "", { "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg=="], + "mkdirp": ["mkdirp@3.0.1", "", { "bin": "dist/cjs/src/bin.js" }, "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg=="], "mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="], @@ -900,35 +1115,41 @@ "multiformats": ["multiformats@9.9.0", "", {}, "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="], - "nano-spawn": ["nano-spawn@2.0.0", "", {}, "sha512-tacvGzUY5o2D8CBh2rrwxyNojUsZNU2zjNTzKQrkgGJQTbGAfArVWXSKMBokBeeg6C7OLRGUEyoFlYbfeWQIqw=="], + "nano-spawn": ["nano-spawn@1.0.3", "", {}, "sha512-jtpsQDetTnvS2Ts1fiRdci5rx0VYws5jGyC+4IYOTnIQ/wwdf6JdomlHBwqC3bJYOvaKu0C2GSZ1A60anrYpaA=="], - "nanoid": ["nanoid@4.0.2", "", { "bin": "bin/nanoid.js" }, "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw=="], + "nanoid": ["nanoid@3.3.11", "", { "bin": "bin/nanoid.cjs" }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], - "next-tick": ["next-tick@1.1.0", "", {}, "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="], - "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], - "node-mock-http": ["node-mock-http@1.0.2", "", {}, "sha512-zWaamgDUdo9SSLw47we78+zYw/bDr5gH8pH7oRRs8V3KmBtu8GLgGIbV2p/gRPd3LWpEOpjQj7X1FOU3VFMJ8g=="], + "node-gyp-build": ["node-gyp-build@4.8.4", "", { "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ=="], + + "node-mock-http": ["node-mock-http@1.0.4", "", {}, "sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ=="], "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], - "ofetch": ["ofetch@1.4.1", "", { "dependencies": { "destr": "^2.0.3", "node-fetch-native": "^1.6.4", "ufo": "^1.5.4" } }, "sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw=="], + "obj-multiplex": ["obj-multiplex@1.0.0", "", { "dependencies": { "end-of-stream": "^1.4.0", "once": "^1.4.0", "readable-stream": "^2.3.3" } }, "sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA=="], + + "ofetch": ["ofetch@1.5.1", "", { "dependencies": { "destr": "^2.0.5", "node-fetch-native": "^1.6.7", "ufo": "^1.6.1" } }, "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA=="], "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], - "on-exit-leak-free": ["on-exit-leak-free@0.2.0", "", {}, "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg=="], + "on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="], "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="], + "openapi-fetch": ["openapi-fetch@0.13.8", "", { "dependencies": { "openapi-typescript-helpers": "^0.0.15" } }, "sha512-yJ4QKRyNxE44baQ9mY5+r/kAzZ8yXMemtNAOFwOzRXJscdjSxxzWSNlyBAr+o5JjkUw9Lc3W7OIoca0cY3PYnQ=="], + + "openapi-typescript-helpers": ["openapi-typescript-helpers@0.0.15", "", {}, "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw=="], + "optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="], - "ox": ["ox@0.14.20", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-rby38C3nDn8eQkf29Zgw4hkCZJ64Qqi0zRPWL8ENUQ7JVuoITqrVtwWQgM/He19SCMUEc7hS/Sjw0jIOSLJhOw=="], + "ox": ["ox@0.6.9", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-wi5ShvzE4eOcTwQVsIPdFr+8ycyX+5le/96iAJutaZAvCes1J0+RvpEPg5QDPDiaR0XQQAvZVl7AwqQcINuUug=="], "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], @@ -952,11 +1173,11 @@ "pidtree": ["pidtree@0.6.0", "", { "bin": { "pidtree": "bin/pidtree.js" } }, "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g=="], - "pino": ["pino@7.11.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.0.0", "on-exit-leak-free": "^0.2.0", "pino-abstract-transport": "v0.5.0", "pino-std-serializers": "^4.0.0", "process-warning": "^1.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.1.0", "safe-stable-stringify": "^2.1.0", "sonic-boom": "^2.2.1", "thread-stream": "^0.15.1" }, "bin": "bin.js" }, "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg=="], + "pino": ["pino@10.0.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "slow-redact": "^0.3.0", "sonic-boom": "^4.0.1", "thread-stream": "^3.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-eI9pKwWEix40kfvSzqEP6ldqOoBIN7dwD/o91TY5z8vQI12sAffpR/pOqAD1IVVwIVHDpHjkq0joBPdJD0rafA=="], - "pino-abstract-transport": ["pino-abstract-transport@0.5.0", "", { "dependencies": { "duplexify": "^4.1.2", "split2": "^4.0.0" } }, "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ=="], + "pino-abstract-transport": ["pino-abstract-transport@2.0.0", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw=="], - "pino-std-serializers": ["pino-std-serializers@4.0.0", "", {}, "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q=="], + "pino-std-serializers": ["pino-std-serializers@7.1.0", "", {}, "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw=="], "playwright": ["playwright@1.58.2", "", { "dependencies": { "playwright-core": "1.58.2" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A=="], @@ -964,6 +1185,12 @@ "pngjs": ["pngjs@5.0.0", "", {}, "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="], + "pony-cause": ["pony-cause@2.1.11", "", {}, "sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg=="], + + "porto": ["porto@0.2.37", "", { "dependencies": { "hono": "^4.10.3", "idb-keyval": "^6.2.1", "mipd": "^0.0.7", "ox": "^0.9.6", "zod": "^4.1.5", "zustand": "^5.0.1" }, "peerDependencies": { "@tanstack/react-query": ">=5.59.0", "@wagmi/core": ">=2.16.3", "expo-auth-session": ">=7.0.8", "expo-crypto": ">=15.0.7", "expo-web-browser": ">=15.0.8", "react": ">=18", "react-native": ">=0.81.4", "typescript": ">=5.4.0", "viem": ">=2.37.0", "wagmi": ">=2.0.0" }, "optionalPeers": ["@tanstack/react-query", "expo-auth-session", "expo-crypto", "expo-web-browser", "react", "react-native", "typescript", "wagmi"], "bin": { "porto": "dist/cli/bin/index.js" } }, "sha512-l3IOUvf5O9rM82VW7v/R5Y2X2niU1kmfXMYYPr/VLMvtKKySr7PiAO3TXWjGft5PV17800VnMCmEaRuxA+N4ug=="], + + "possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="], + "postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="], "postcss-load-config": ["postcss-load-config@3.1.4", "", { "dependencies": { "lilconfig": "^2.0.5", "yaml": "^1.10.2" }, "peerDependencies": { "postcss": ">=8.0.9", "ts-node": ">=9.0.0" }, "optionalPeers": ["ts-node"] }, "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg=="], @@ -974,27 +1201,29 @@ "postcss-selector-parser": ["postcss-selector-parser@7.1.0", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA=="], - "preact": ["preact@10.27.0", "", {}, "sha512-/DTYoB6mwwgPytiqQTh/7SFRL98ZdiD8Sk8zIUVOxtwq4oWcwrcd1uno9fE/zZmUaUrFNYzbH14CPebOz9tZQw=="], + "preact": ["preact@10.24.2", "", {}, "sha512-1cSoF0aCC8uaARATfrlz4VCBqE8LwZwRfLgkxJOQwAlQt6ayTmi0D9OF7nXid1POI5SZidFuG9CnlXbDfLqY/Q=="], "prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="], - "prettier": ["prettier@3.6.2", "", { "bin": "bin/prettier.cjs" }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], + "prettier": ["prettier@3.4.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ=="], - "prettier-plugin-svelte": ["prettier-plugin-svelte@3.4.0", "", { "peerDependencies": { "prettier": "^3.0.0", "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" } }, "sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ=="], + "prettier-plugin-svelte": ["prettier-plugin-svelte@3.3.3", "", { "peerDependencies": { "prettier": "^3.0.0", "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" } }, "sha512-yViK9zqQ+H2qZD1w/bH7W8i+bVfKrD8GIFjkFe4Thl6kCT9SlAsXVNmt3jCvQOCsnOhcvYgsoVlRV/Eu6x5nNw=="], - "prettier-plugin-tailwindcss": ["prettier-plugin-tailwindcss@0.6.14", "", { "peerDependencies": { "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-hermes": "*", "@prettier/plugin-oxc": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", "@zackad/prettier-plugin-twig": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", "prettier-plugin-marko": "*", "prettier-plugin-multiline-arrays": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-sort-imports": "*", "prettier-plugin-style-order": "*", "prettier-plugin-svelte": "*" }, "optionalPeers": ["@ianvs/prettier-plugin-sort-imports", "@prettier/plugin-hermes", "@prettier/plugin-oxc", "@prettier/plugin-pug", "@shopify/prettier-plugin-liquid", "@trivago/prettier-plugin-sort-imports", "@zackad/prettier-plugin-twig", "prettier-plugin-astro", "prettier-plugin-css-order", "prettier-plugin-import-sort", "prettier-plugin-jsdoc", "prettier-plugin-marko", "prettier-plugin-multiline-arrays", "prettier-plugin-organize-attributes", "prettier-plugin-organize-imports", "prettier-plugin-sort-imports", "prettier-plugin-style-order"] }, "sha512-pi2e/+ZygeIqntN+vC573BcW5Cve8zUB0SSAGxqpB4f96boZF4M3phPVoOFCeypwkpRYdi7+jQ5YJJUwrkGUAg=="], + "prettier-plugin-tailwindcss": ["prettier-plugin-tailwindcss@0.6.11", "", { "peerDependencies": { "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", "@zackad/prettier-plugin-twig": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", "prettier-plugin-marko": "*", "prettier-plugin-multiline-arrays": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-sort-imports": "*", "prettier-plugin-style-order": "*", "prettier-plugin-svelte": "*" }, "optionalPeers": ["@ianvs/prettier-plugin-sort-imports", "@prettier/plugin-pug", "@shopify/prettier-plugin-liquid", "@trivago/prettier-plugin-sort-imports", "@zackad/prettier-plugin-twig", "prettier-plugin-astro", "prettier-plugin-css-order", "prettier-plugin-import-sort", "prettier-plugin-jsdoc", "prettier-plugin-marko", "prettier-plugin-multiline-arrays", "prettier-plugin-organize-attributes", "prettier-plugin-organize-imports", "prettier-plugin-sort-imports", "prettier-plugin-style-order", "prettier-plugin-svelte"] }, "sha512-YxaYSIvZPAqhrrEpRtonnrXdghZg1irNg4qrjboCXrpybLWVs55cW2N3juhspVJiO0JBvYJT8SYsJpc8OQSnsA=="], - "process-warning": ["process-warning@1.0.0", "", {}, "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q=="], + "process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="], - "proxy-compare": ["proxy-compare@2.6.0", "", {}, "sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw=="], + "process-warning": ["process-warning@5.0.0", "", {}, "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA=="], + + "proxy-compare": ["proxy-compare@3.0.1", "", {}, "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q=="], "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], - "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], + "pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="], - "qrcode": ["qrcode@1.5.3", "", { "dependencies": { "dijkstrajs": "^1.0.1", "encode-utf8": "^1.0.3", "pngjs": "^5.0.0", "yargs": "^15.3.1" }, "bin": "bin/qrcode" }, "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg=="], + "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], - "query-string": ["query-string@7.1.3", "", { "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" } }, "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg=="], + "qrcode": ["qrcode@1.5.3", "", { "dependencies": { "dijkstrajs": "^1.0.1", "encode-utf8": "^1.0.3", "pngjs": "^5.0.0", "yargs": "^15.3.1" }, "bin": { "qrcode": "bin/qrcode" } }, "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg=="], "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], @@ -1002,13 +1231,13 @@ "radix3": ["radix3@1.1.2", "", {}, "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="], - "react": ["react@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ=="], + "react": ["react@19.2.4", "", {}, "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ=="], "readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="], "readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], - "real-require": ["real-require@0.1.0", "", {}, "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg=="], + "real-require": ["real-require@0.2.0", "", {}, "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg=="], "regexparam": ["regexparam@3.0.0", "", {}, "sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q=="], @@ -1028,13 +1257,17 @@ "rollup": ["rollup@4.46.2", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.46.2", "@rollup/rollup-android-arm64": "4.46.2", "@rollup/rollup-darwin-arm64": "4.46.2", "@rollup/rollup-darwin-x64": "4.46.2", "@rollup/rollup-freebsd-arm64": "4.46.2", "@rollup/rollup-freebsd-x64": "4.46.2", "@rollup/rollup-linux-arm-gnueabihf": "4.46.2", "@rollup/rollup-linux-arm-musleabihf": "4.46.2", "@rollup/rollup-linux-arm64-gnu": "4.46.2", "@rollup/rollup-linux-arm64-musl": "4.46.2", "@rollup/rollup-linux-loongarch64-gnu": "4.46.2", "@rollup/rollup-linux-ppc64-gnu": "4.46.2", "@rollup/rollup-linux-riscv64-gnu": "4.46.2", "@rollup/rollup-linux-riscv64-musl": "4.46.2", "@rollup/rollup-linux-s390x-gnu": "4.46.2", "@rollup/rollup-linux-x64-gnu": "4.46.2", "@rollup/rollup-linux-x64-musl": "4.46.2", "@rollup/rollup-win32-arm64-msvc": "4.46.2", "@rollup/rollup-win32-ia32-msvc": "4.46.2", "@rollup/rollup-win32-x64-msvc": "4.46.2", "fsevents": "~2.3.2" }, "bin": "dist/bin/rollup" }, "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg=="], + "rpc-websockets": ["rpc-websockets@9.3.5", "", { "dependencies": { "@swc/helpers": "^0.5.11", "@types/uuid": "^10.0.0", "@types/ws": "^8.2.2", "buffer": "^6.0.3", "eventemitter3": "^5.0.1", "uuid": "^11.0.0", "ws": "^8.5.0" }, "optionalDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^6.0.0" } }, "sha512-4mAmr+AEhPYJ9TmDtxF3r3ZcbWy7W8kvZ4PoZYw/Xgp2J7WixjwTgiQZsoTDvch5nimmg3Ay6/0Kuh9oIvVs9A=="], + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], "rxjs": ["rxjs@7.8.2", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="], "sade": ["sade@1.8.1", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="], - "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + "safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], + + "safe-regex-test": ["safe-regex-test@1.1.0", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-regex": "^1.2.1" } }, "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw=="], "safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="], @@ -1044,6 +1277,8 @@ "set-cookie-parser": ["set-cookie-parser@2.7.1", "", {}, "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="], + "set-function-length": ["set-function-length@1.2.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="], + "sharp": ["sharp@0.33.5", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], @@ -1056,9 +1291,15 @@ "sirv": ["sirv@3.0.1", "", { "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } }, "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A=="], - "slice-ansi": ["slice-ansi@7.1.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w=="], + "slice-ansi": ["slice-ansi@5.0.0", "", { "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" } }, "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ=="], + + "slow-redact": ["slow-redact@0.3.2", "", {}, "sha512-MseHyi2+E/hBRqdOi5COy6wZ7j7DxXRz9NkseavNYSvvWC06D8a5cidVZX3tcG5eCW3NIyVU4zT63hw0Q486jw=="], + + "socket.io-client": ["socket.io-client@4.8.3", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.4.1", "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" } }, "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g=="], - "sonic-boom": ["sonic-boom@2.8.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg=="], + "socket.io-parser": ["socket.io-parser@4.2.5", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.4.1" } }, "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ=="], + + "sonic-boom": ["sonic-boom@4.2.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q=="], "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -1066,27 +1307,25 @@ "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], - "split-on-first": ["split-on-first@1.1.0", "", {}, "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="], - "split2": ["split2@4.2.0", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="], "stoppable": ["stoppable@1.1.0", "", {}, "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw=="], - "stream-shift": ["stream-shift@1.0.3", "", {}, "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ=="], + "stream-chain": ["stream-chain@2.2.5", "", {}, "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA=="], - "strict-uri-encode": ["strict-uri-encode@2.0.0", "", {}, "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ=="], + "stream-json": ["stream-json@1.9.1", "", { "dependencies": { "stream-chain": "^2.2.5" } }, "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw=="], "string-argv": ["string-argv@0.3.2", "", {}, "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q=="], - "string-width": ["string-width@8.1.1", "", { "dependencies": { "get-east-asian-width": "^1.3.0", "strip-ansi": "^7.1.0" } }, "sha512-KpqHIdDL9KwYk22wEOg/VIqYbrnLeSApsKT/bSj6Ez7pn3CftUiLAv2Lccpq1ALcpLV9UX1Ppn92npZWu2w/aw=="], + "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], "string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="], - "strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], - "sturdy-websocket": ["sturdy-websocket@0.1.12", "", { "dependencies": { "lodash.defaults": "^4.2.0" } }, "sha512-PA7h8LdjaMoIlC5HAwLVzae4raGWgyroscV4oUpEiTtEFINcNa47/CKYT3e98o+FfsJgrclI2pYpaJrz0aaoew=="], + "superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], @@ -1096,19 +1335,15 @@ "svelte-eslint-parser": ["svelte-eslint-parser@1.3.1", "", { "dependencies": { "eslint-scope": "^8.2.0", "eslint-visitor-keys": "^4.0.0", "espree": "^10.0.0", "postcss": "^8.4.49", "postcss-scss": "^4.0.9", "postcss-selector-parser": "^7.0.0" }, "peerDependencies": { "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" } }, "sha512-0Iztj5vcOVOVkhy1pbo5uA9r+d3yaVoE5XPc9eABIWDOSJZ2mOsZ4D+t45rphWCOr0uMw3jtSG2fh2e7GvKnPg=="], - "svelte-i18n": ["svelte-i18n@4.0.1", "", { "dependencies": { "cli-color": "^2.0.3", "deepmerge": "^4.2.2", "esbuild": "^0.19.2", "estree-walker": "^2", "intl-messageformat": "^10.5.3", "sade": "^1.8.1", "tiny-glob": "^0.2.9" }, "peerDependencies": { "svelte": "^3 || ^4 || ^5" }, "bin": "dist/cli.js" }, "sha512-jaykGlGT5PUaaq04JWbJREvivlCnALtT+m87Kbm0fxyYHynkQaxQMnIKHLm2WeIuBRoljzwgyvz0Z6/CMwfdmQ=="], - "tailwindcss": ["tailwindcss@4.1.11", "", {}, "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA=="], "tapable": ["tapable@2.2.2", "", {}, "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg=="], "tar": ["tar@7.4.3", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.0.1", "mkdirp": "^3.0.1", "yallist": "^5.0.0" } }, "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw=="], - "thread-stream": ["thread-stream@0.15.2", "", { "dependencies": { "real-require": "^0.1.0" } }, "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA=="], - - "timers-ext": ["timers-ext@0.1.8", "", { "dependencies": { "es5-ext": "^0.10.64", "next-tick": "^1.1.0" } }, "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww=="], + "text-encoding-utf-8": ["text-encoding-utf-8@1.0.2", "", {}, "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg=="], - "tiny-glob": ["tiny-glob@0.2.9", "", { "dependencies": { "globalyzer": "0.1.0", "globrex": "^0.1.2" } }, "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg=="], + "thread-stream": ["thread-stream@3.1.0", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A=="], "tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="], @@ -1122,8 +1357,6 @@ "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "type": ["type@2.7.3", "", {}, "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ=="], - "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], "typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="], @@ -1142,22 +1375,32 @@ "unenv": ["unenv@2.0.0-rc.19", "", { "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.7", "ohash": "^2.0.11", "pathe": "^2.0.3", "ufo": "^1.6.1" } }, "sha512-t/OMHBNAkknVCI7bVB9OWjUUAwhVv9vsPIAGnNUxnu3FxPQN11rjh0sksLMzc3g7IlTgvHmOTl4JM7JHpcv5wA=="], - "unstorage": ["unstorage@1.16.1", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", "destr": "^2.0.5", "h3": "^1.15.3", "lru-cache": "^10.4.3", "node-fetch-native": "^1.6.6", "ofetch": "^1.4.1", "ufo": "^1.6.1" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3 || ^7.0.0", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/kv": "^1.0.1", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/kv", "aws4fetch", "db0", "ioredis", "uploadthing"] }, "sha512-gdpZ3guLDhz+zWIlYP1UwQ259tG5T5vYRzDaHMkQ1bBY1SQPutvZnrRjTFaWUUpseErJIgAZS51h6NOcZVZiqQ=="], + "unstorage": ["unstorage@1.17.4", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^5.0.0", "destr": "^2.0.5", "h3": "^1.15.5", "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw=="], "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], - "use-sync-external-store": ["use-sync-external-store@1.2.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA=="], + "use-sync-external-store": ["use-sync-external-store@1.4.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw=="], + + "utf-8-validate": ["utf-8-validate@5.0.10", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ=="], + + "util": ["util@0.12.5", "", { "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", "is-generator-function": "^1.0.7", "is-typed-array": "^1.1.3", "which-typed-array": "^1.1.2" } }, "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA=="], "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], - "valtio": ["valtio@1.13.2", "", { "dependencies": { "derive-valtio": "0.1.0", "proxy-compare": "2.6.0", "use-sync-external-store": "1.2.0" }, "peerDependencies": { "@types/react": ">=16.8", "react": ">=16.8" }, "optionalPeers": ["@types/react"] }, "sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A=="], + "uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], - "viem": ["viem@2.48.4", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.14.20", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-mReP/rgY2P+WeeRSG4sUvccCLKfyAW1C73Y3KkobAqgzYmVna9qyUMNE44xIUkDtfvRuC33r24UhF4baBYovsg=="], + "valtio": ["valtio@2.1.7", "", { "dependencies": { "proxy-compare": "^3.0.1" }, "peerDependencies": { "@types/react": ">=18.0.0", "react": ">=18.0.0" }, "optionalPeers": ["@types/react", "react"] }, "sha512-DwJhCDpujuQuKdJ2H84VbTjEJJteaSmqsuUltsfbfdbotVfNeTE4K/qc/Wi57I9x8/2ed4JNdjEna7O6PfavRg=="], + + "viem": ["viem@2.45.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.11.3", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-LN6Pp7vSfv50LgwhkfSbIXftAM5J89lP9x8TeDa8QM7o41IxlHrDh0F9X+FfnCWtsz11pEVV5sn+yBUoOHNqYA=="], "vite": ["vite@7.1.1", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.6", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.14" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx"], "bin": "bin/vite.js" }, "sha512-yJ+Mp7OyV+4S+afWo+QyoL9jFWD11QFH0i5i7JypnfTcA1rmgxCbiA8WwAICDEtZ1Z1hzrVhN8R8rGTqkTY8ZQ=="], "vitefu": ["vitefu@1.1.1", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" } }, "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ=="], + "wagmi": ["wagmi@3.5.0", "", { "dependencies": { "@wagmi/connectors": "7.2.1", "@wagmi/core": "3.4.0", "use-sync-external-store": "1.4.0" }, "peerDependencies": { "@tanstack/react-query": ">=5.0.0", "react": ">=18", "typescript": ">=5.7.3", "viem": "2.x" }, "optionalPeers": ["typescript"] }, "sha512-39uiY6Vkc28NiAHrxJzVTodoRgSVGG97EewwUxRf+jcFMTe8toAnaM8pJZA3Zw/6snMg4tSgWLJAtMnOacLe7w=="], + + "webextension-polyfill": ["webextension-polyfill@0.10.0", "", {}, "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g=="], + "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], "whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], @@ -1166,6 +1409,8 @@ "which-module": ["which-module@2.0.1", "", {}, "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="], + "which-typed-array": ["which-typed-array@1.1.20", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.4", "for-each": "^0.3.5", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" } }, "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg=="], + "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], "workerd": ["workerd@1.20250803.0", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20250803.0", "@cloudflare/workerd-darwin-arm64": "1.20250803.0", "@cloudflare/workerd-linux-64": "1.20250803.0", "@cloudflare/workerd-linux-arm64": "1.20250803.0", "@cloudflare/workerd-windows-64": "1.20250803.0" }, "bin": "bin/workerd" }, "sha512-oYH29mE/wNolPc32NHHQbySaNorj6+KASUtOvQHySxB5mO1NWdGuNv49woxNCF5971UYceGQndY+OLT+24C3wQ=="], @@ -1180,6 +1425,8 @@ "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "xmlhttprequest-ssl": ["xmlhttprequest-ssl@2.1.2", "", {}, "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ=="], + "y18n": ["y18n@4.0.3", "", {}, "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="], "yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], @@ -1198,11 +1445,19 @@ "zimmerframe": ["zimmerframe@1.1.2", "", {}, "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w=="], - "zod": ["zod@3.22.4", "", {}, "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg=="], + "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + + "zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], + + "@base-org/account/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="], + + "@coinbase/cdp-sdk/abitype": ["abitype@1.0.6", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A=="], + + "@coinbase/cdp-sdk/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], "@coinbase/wallet-sdk/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="], - "@coinbase/wallet-sdk/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + "@coinbase/wallet-sdk/preact": ["preact@10.28.4", "", {}, "sha512-uKFfOHWuSNpRFVTnljsCluEFq57OKT+0QdOiQo8XWnQ/pSvg7OpX5eNOejELXJMWy+BwM2nobz0FkvzmnpCNsQ=="], "@cspotcode/source-map-support/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], @@ -1214,38 +1469,82 @@ "@humanfs/node/@humanwhocodes/retry": ["@humanwhocodes/retry@0.3.1", "", {}, "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA=="], - "@poppinss/dumper/supports-color": ["supports-color@10.1.0", "", {}, "sha512-GBuewsPrhJPftT+fqDa9oI/zc5HNsG9nREqwzoSFDOIqf0NggOZbHQj2TE1P1CDJK8ZogFnlZY9hWoUiur7I/A=="], + "@metamask/rpc-errors/@metamask/utils": ["@metamask/utils@9.3.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.1.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g=="], - "@reown/appkit/@walletconnect/types": ["@walletconnect/types@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw=="], + "@metamask/sdk/debug": ["debug@4.3.4", "", { "dependencies": { "ms": "2.1.2" } }, "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="], - "@reown/appkit/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/sign-client": "2.21.0", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "es-toolkit": "1.33.0", "events": "3.3.0" } }, "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg=="], + "@metamask/sdk-communication-layer/debug": ["debug@4.3.4", "", { "dependencies": { "ms": "2.1.2" } }, "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="], - "@reown/appkit/viem": ["viem@2.45.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.11.3", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-LN6Pp7vSfv50LgwhkfSbIXftAM5J89lP9x8TeDa8QM7o41IxlHrDh0F9X+FfnCWtsz11pEVV5sn+yBUoOHNqYA=="], + "@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], - "@reown/appkit-common/viem": ["viem@2.45.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.11.3", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-LN6Pp7vSfv50LgwhkfSbIXftAM5J89lP9x8TeDa8QM7o41IxlHrDh0F9X+FfnCWtsz11pEVV5sn+yBUoOHNqYA=="], + "@poppinss/dumper/supports-color": ["supports-color@10.1.0", "", {}, "sha512-GBuewsPrhJPftT+fqDa9oI/zc5HNsG9nREqwzoSFDOIqf0NggOZbHQj2TE1P1CDJK8ZogFnlZY9hWoUiur7I/A=="], + + "@reown/appkit/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/sign-client": "2.23.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-vs9iorPUAiVesFJ95O6XvLjmRgF+B2TspxJNL90ZULbrkRw4JFsmaRdb965PZKc+s182k1MkS/MQ0o964xRcEw=="], - "@reown/appkit-controllers/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/sign-client": "2.21.0", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "es-toolkit": "1.33.0", "events": "3.3.0" } }, "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg=="], + "@reown/appkit-controllers/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/sign-client": "2.23.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-vs9iorPUAiVesFJ95O6XvLjmRgF+B2TspxJNL90ZULbrkRw4JFsmaRdb965PZKc+s182k1MkS/MQ0o964xRcEw=="], - "@reown/appkit-controllers/viem": ["viem@2.45.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.11.3", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-LN6Pp7vSfv50LgwhkfSbIXftAM5J89lP9x8TeDa8QM7o41IxlHrDh0F9X+FfnCWtsz11pEVV5sn+yBUoOHNqYA=="], + "@reown/appkit-utils/@base-org/account": ["@base-org/account@2.4.0", "", { "dependencies": { "@coinbase/cdp-sdk": "^1.0.0", "@noble/hashes": "1.4.0", "clsx": "1.2.1", "eventemitter3": "5.0.1", "idb-keyval": "6.2.1", "ox": "0.6.9", "preact": "10.24.2", "viem": "^2.31.7", "zustand": "5.0.3" } }, "sha512-A4Umpi8B9/pqR78D1Yoze4xHyQaujioVRqqO3d6xuDFw9VRtjg6tK3bPlwE0aW+nVH/ntllCpPa2PbI8Rnjcug=="], - "@reown/appkit-utils/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/sign-client": "2.21.0", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "es-toolkit": "1.33.0", "events": "3.3.0" } }, "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg=="], + "@reown/appkit-utils/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/sign-client": "2.23.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-vs9iorPUAiVesFJ95O6XvLjmRgF+B2TspxJNL90ZULbrkRw4JFsmaRdb965PZKc+s182k1MkS/MQ0o964xRcEw=="], - "@reown/appkit-utils/viem": ["viem@2.45.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.2.3", "isows": "1.0.7", "ox": "0.11.3", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-LN6Pp7vSfv50LgwhkfSbIXftAM5J89lP9x8TeDa8QM7o41IxlHrDh0F9X+FfnCWtsz11pEVV5sn+yBUoOHNqYA=="], + "@reown/appkit-wallet/zod": ["zod@3.22.4", "", {}, "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg=="], "@scure/bip32/@noble/curves": ["@noble/curves@1.9.6", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA=="], + "@solana/codecs/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/codecs-data-structures/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/codecs-numbers/@solana/codecs-core": ["@solana/codecs-core@2.3.0", "", { "dependencies": { "@solana/errors": "2.3.0" }, "peerDependencies": { "typescript": ">=5.3.3" } }, "sha512-oG+VZzN6YhBHIoSKgS5ESM9VIGzhWjEHEGNPSibiDTxFhsFWxNaz8LbMDPjBUE69r9wmdGLkrQ+wVPbnJcZPvw=="], + + "@solana/codecs-numbers/@solana/errors": ["@solana/errors@2.3.0", "", { "dependencies": { "chalk": "^5.4.1", "commander": "^14.0.0" }, "peerDependencies": { "typescript": ">=5.3.3" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-66RI9MAbwYV0UtP7kGcTBVLxJgUxoZGm8Fbc0ah+lGiAw17Gugco6+9GrJCV83VyF2mDWyYnYM9qdI3yjgpnaQ=="], + + "@solana/codecs-strings/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/errors/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + + "@solana/errors/commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="], + + "@solana/offchain-messages/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/options/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/rpc-subscriptions-channel-websocket/ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="], + + "@solana/rpc-transport-http/undici-types": ["undici-types@7.22.0", "", {}, "sha512-RKZvifiL60xdsIuC80UY0dq8Z7DbJUV8/l2hOVbyZAxBzEeQU4Z58+4ZzJ6WN2Lidi9KzT5EbiGX+PI/UGYuRw=="], + + "@solana/rpc-types/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/transaction-messages/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/transactions/@solana/codecs-numbers": ["@solana/codecs-numbers@5.5.1", "", { "dependencies": { "@solana/codecs-core": "5.5.1", "@solana/errors": "5.5.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"] }, "sha512-rllMIZAHqmtvC0HO/dc/21wDuWaD0B8Ryv8o+YtsICQBuiL/0U4AGwH7Pi5GNFySYk0/crSuwfIqQFtmxNSPFw=="], + + "@solana/web3.js/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], + + "@solana/web3.js/borsh": ["borsh@0.7.0", "", { "dependencies": { "bn.js": "^5.2.0", "bs58": "^4.0.0", "text-encoding-utf-8": "^1.0.2" } }, "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA=="], + + "@solana/web3.js/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + "@wagmi/core/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], + + "@wagmi/core/zustand": ["zustand@5.0.0", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ=="], + "@walletconnect/environment/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], "@walletconnect/events/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + "@walletconnect/jsonrpc-http-connection/cross-fetch": ["cross-fetch@3.2.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q=="], + "@walletconnect/jsonrpc-utils/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], "@walletconnect/jsonrpc-ws-connection/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "@walletconnect/keyvaluestorage/idb-keyval": ["idb-keyval@6.2.2", "", {}, "sha512-yjD9nARJ/jb1g+CvD0tlhUHOrJ9Sy0P8T9MF3YaLlHnSRpwPfpTX0XIvpmw3gAJUmEu3FiICLBDPXVwyEvrleg=="], + "@walletconnect/relay-auth/@noble/curves": ["@noble/curves@1.8.0", "", { "dependencies": { "@noble/hashes": "1.7.0" } }, "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ=="], "@walletconnect/relay-auth/@noble/hashes": ["@noble/hashes@1.7.0", "", {}, "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w=="], @@ -1254,35 +1553,45 @@ "@walletconnect/time/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], - "@walletconnect/utils/@noble/curves": ["@noble/curves@1.9.2", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g=="], + "@walletconnect/utils/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "@walletconnect/utils/viem": ["viem@2.31.0", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.0.8", "isows": "1.0.7", "ox": "0.7.1", "ws": "8.18.2" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-U7OMQ6yqK+bRbEIarf2vqxL7unSEQvNxvML/1zG7suAmKuJmipqdVTVJGKBCJiYsm/EremyO2FS4dHIPpGv+eA=="], + "@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], "@walletconnect/window-getters/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], "@walletconnect/window-metadata/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], - "@web3-onboard/common/viem": ["viem@2.12.0", "", { "dependencies": { "@adraffy/ens-normalize": "1.10.0", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", "@scure/bip32": "1.3.2", "@scure/bip39": "1.2.1", "abitype": "1.0.0", "isows": "1.0.4", "ws": "8.13.0" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-XBvORspE4x2/gfy7idH6IVFwkJiXirygFCU3lxUH6fttsj8zufLtgiokfvZF/LAZUEDvdxSgL08whSYgffM2fw=="], + "anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], - "@web3-onboard/core/svelte": ["svelte@3.59.2", "", {}, "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA=="], + "cliui/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], - "@web3-onboard/core/viem": ["viem@2.12.0", "", { "dependencies": { "@adraffy/ens-normalize": "1.10.0", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", "@scure/bip32": "1.3.2", "@scure/bip39": "1.2.1", "abitype": "1.0.0", "isows": "1.0.4", "ws": "8.13.0" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-XBvORspE4x2/gfy7idH6IVFwkJiXirygFCU3lxUH6fttsj8zufLtgiokfvZF/LAZUEDvdxSgL08whSYgffM2fw=="], + "cliui/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], - "anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "cliui/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], - "bnc-sdk/nanoid": ["nanoid@3.3.11", "", { "bin": "bin/nanoid.cjs" }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + "eciesjs/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "bnc-sdk/rxjs": ["rxjs@6.6.7", "", { "dependencies": { "tslib": "^1.9.0" } }, "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ=="], + "ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], - "cliui/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + "ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], - "cliui/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + "ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], - "cliui/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], + "ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], - "listr2/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + "h3/ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], + + "jayson/@types/node": ["@types/node@12.20.55", "", {}, "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="], + + "jayson/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + + "jayson/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + + "lint-staged/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + + "log-update/slice-ansi": ["slice-ansi@7.1.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w=="], "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], @@ -1292,26 +1601,44 @@ "miniflare/zod": ["zod@3.22.3", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="], - "ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], + "obj-multiplex/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + + "ofetch/ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], - "ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + "ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "playwright/fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], - "postcss/nanoid": ["nanoid@3.3.11", "", { "bin": "bin/nanoid.cjs" }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + "porto/idb-keyval": ["idb-keyval@6.2.2", "", {}, "sha512-yjD9nARJ/jb1g+CvD0tlhUHOrJ9Sy0P8T9MF3YaLlHnSRpwPfpTX0XIvpmw3gAJUmEu3FiICLBDPXVwyEvrleg=="], + + "porto/ox": ["ox@0.9.17", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-rKAnhzhRU3Xh3hiko+i1ZxywZ55eWQzeS/Q4HRKLx2PqfHOolisZHErSsJVipGlmQKHW5qwOED/GighEw9dbLg=="], + + "porto/zustand": ["zustand@5.0.11", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg=="], + + "postcss-load-config/lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="], "postcss-load-config/yaml": ["yaml@1.10.2", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="], + "rpc-websockets/@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + + "rpc-websockets/utf-8-validate": ["utf-8-validate@6.0.6", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-q3l3P9UtEEiAHcsgsqTgf9PPjctrDWoIXW3NpOHFdRDbLvu4DLIcxHangJ4RLrWkBcKjmcs/6NkerI8T/rE4LA=="], + + "rpc-websockets/uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], + "slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - "svelte-i18n/esbuild": ["esbuild@0.19.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.19.12", "@esbuild/android-arm": "0.19.12", "@esbuild/android-arm64": "0.19.12", "@esbuild/android-x64": "0.19.12", "@esbuild/darwin-arm64": "0.19.12", "@esbuild/darwin-x64": "0.19.12", "@esbuild/freebsd-arm64": "0.19.12", "@esbuild/freebsd-x64": "0.19.12", "@esbuild/linux-arm": "0.19.12", "@esbuild/linux-arm64": "0.19.12", "@esbuild/linux-ia32": "0.19.12", "@esbuild/linux-loong64": "0.19.12", "@esbuild/linux-mips64el": "0.19.12", "@esbuild/linux-ppc64": "0.19.12", "@esbuild/linux-riscv64": "0.19.12", "@esbuild/linux-s390x": "0.19.12", "@esbuild/linux-x64": "0.19.12", "@esbuild/netbsd-x64": "0.19.12", "@esbuild/openbsd-x64": "0.19.12", "@esbuild/sunos-x64": "0.19.12", "@esbuild/win32-arm64": "0.19.12", "@esbuild/win32-ia32": "0.19.12", "@esbuild/win32-x64": "0.19.12" }, "bin": "bin/esbuild" }, "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg=="], + "string_decoder/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + + "unstorage/chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + + "unstorage/ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], + + "viem/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], "wrangler/esbuild": ["esbuild@0.25.4", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.4", "@esbuild/android-arm": "0.25.4", "@esbuild/android-arm64": "0.25.4", "@esbuild/android-x64": "0.25.4", "@esbuild/darwin-arm64": "0.25.4", "@esbuild/darwin-x64": "0.25.4", "@esbuild/freebsd-arm64": "0.25.4", "@esbuild/freebsd-x64": "0.25.4", "@esbuild/linux-arm": "0.25.4", "@esbuild/linux-arm64": "0.25.4", "@esbuild/linux-ia32": "0.25.4", "@esbuild/linux-loong64": "0.25.4", "@esbuild/linux-mips64el": "0.25.4", "@esbuild/linux-ppc64": "0.25.4", "@esbuild/linux-riscv64": "0.25.4", "@esbuild/linux-s390x": "0.25.4", "@esbuild/linux-x64": "0.25.4", "@esbuild/netbsd-arm64": "0.25.4", "@esbuild/netbsd-x64": "0.25.4", "@esbuild/openbsd-arm64": "0.25.4", "@esbuild/openbsd-x64": "0.25.4", "@esbuild/sunos-x64": "0.25.4", "@esbuild/win32-arm64": "0.25.4", "@esbuild/win32-ia32": "0.25.4", "@esbuild/win32-x64": "0.25.4" }, "bin": "bin/esbuild" }, "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q=="], "wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], - "yargs/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], "yargs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], @@ -1362,75 +1689,47 @@ "@esbuild-kit/core-utils/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.18.20", "", { "os": "win32", "cpu": "x64" }, "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ=="], - "@reown/appkit-common/viem/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.21.0", "", { "dependencies": { "@walletconnect/core": "2.21.0", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "2.1.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "events": "3.3.0" } }, "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.21.0", "", { "dependencies": { "@noble/ciphers": "1.2.1", "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "query-string": "7.1.3", "uint8arrays": "3.1.0", "viem": "2.23.2" } }, "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.33.0", "", {}, "sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg=="], - - "@reown/appkit-controllers/viem/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.21.0", "", { "dependencies": { "@walletconnect/core": "2.21.0", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "2.1.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "events": "3.3.0" } }, "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.21.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.21.0", "", { "dependencies": { "@noble/ciphers": "1.2.1", "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "query-string": "7.1.3", "uint8arrays": "3.1.0", "viem": "2.23.2" } }, "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig=="], + "@metamask/rpc-errors/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], - "@reown/appkit-utils/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.33.0", "", {}, "sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg=="], + "@metamask/sdk-communication-layer/debug/ms": ["ms@2.1.2", "", {}, "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="], - "@reown/appkit-utils/viem/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], + "@metamask/sdk/debug/ms": ["ms@2.1.2", "", {}, "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="], - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.21.0", "", { "dependencies": { "@walletconnect/core": "2.21.0", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "2.1.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "events": "3.3.0" } }, "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.23.2", "", { "dependencies": { "@walletconnect/core": "2.23.2", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "3.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "events": "3.3.0" } }, "sha512-LL5KgmJHvY5NqQn+ZHQJLia1p6fpUWXHtiG97S5rNfyuPx6gT/Jkkwqc2LwdmAjFkr61t8zTagHC9ETq203mNA=="], - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.21.0", "", { "dependencies": { "@noble/ciphers": "1.2.1", "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "query-string": "7.1.3", "uint8arrays": "3.1.0", "viem": "2.23.2" } }, "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "events": "3.3.0" } }, "sha512-5dxBCdUM+4Dqe1/A7uqkm2tWPXce4UUGSr+ImfI0YjwEExQS8+TzdOlhMt3n32ncnBCllU5paG+fsndT06R0iw=="], - "@reown/appkit/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.33.0", "", {}, "sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.23.2", "", { "dependencies": { "@msgpack/msgpack": "3.1.2", "@noble/ciphers": "1.3.0", "@noble/curves": "1.9.7", "@noble/hashes": "1.8.0", "@scure/base": "1.2.6", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "blakejs": "1.2.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "ox": "0.9.3", "uint8arrays": "3.1.1" } }, "sha512-ReSjU3kX+3i3tYJQZbVfetY5SSUL+iM6uiIVVD1PJalePa/5A40VgLVRTF7sDCJTIFfpf3Mt4bFjeaYuoxWtIw=="], - "@reown/appkit/viem/ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.39.3", "", {}, "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww=="], - "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], - - "@walletconnect/utils/viem/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], - - "@walletconnect/utils/viem/abitype": ["abitype@1.0.8", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="], - - "@walletconnect/utils/viem/ox": ["ox@0.7.1", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-+k9fY9PRNuAMHRFIUbiK9Nt5seYHHzSQs9Bj+iMETcGtlpS7SmBzcGSVUQO3+nqGLEiNK4598pHNFlVRaZbRsg=="], - - "@walletconnect/utils/viem/ws": ["ws@8.18.2", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ=="], + "@reown/appkit-utils/@base-org/account/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], - "@web3-onboard/common/viem/@noble/curves": ["@noble/curves@1.2.0", "", { "dependencies": { "@noble/hashes": "1.3.2" } }, "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw=="], + "@reown/appkit-utils/@base-org/account/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="], - "@web3-onboard/common/viem/@noble/hashes": ["@noble/hashes@1.3.2", "", {}, "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.23.2", "", { "dependencies": { "@walletconnect/core": "2.23.2", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "3.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "events": "3.3.0" } }, "sha512-LL5KgmJHvY5NqQn+ZHQJLia1p6fpUWXHtiG97S5rNfyuPx6gT/Jkkwqc2LwdmAjFkr61t8zTagHC9ETq203mNA=="], - "@web3-onboard/common/viem/@scure/bip32": ["@scure/bip32@1.3.2", "", { "dependencies": { "@noble/curves": "~1.2.0", "@noble/hashes": "~1.3.2", "@scure/base": "~1.1.2" } }, "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "events": "3.3.0" } }, "sha512-5dxBCdUM+4Dqe1/A7uqkm2tWPXce4UUGSr+ImfI0YjwEExQS8+TzdOlhMt3n32ncnBCllU5paG+fsndT06R0iw=="], - "@web3-onboard/common/viem/@scure/bip39": ["@scure/bip39@1.2.1", "", { "dependencies": { "@noble/hashes": "~1.3.0", "@scure/base": "~1.1.0" } }, "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.23.2", "", { "dependencies": { "@msgpack/msgpack": "3.1.2", "@noble/ciphers": "1.3.0", "@noble/curves": "1.9.7", "@noble/hashes": "1.8.0", "@scure/base": "1.2.6", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "blakejs": "1.2.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "ox": "0.9.3", "uint8arrays": "3.1.1" } }, "sha512-ReSjU3kX+3i3tYJQZbVfetY5SSUL+iM6uiIVVD1PJalePa/5A40VgLVRTF7sDCJTIFfpf3Mt4bFjeaYuoxWtIw=="], - "@web3-onboard/common/viem/abitype": ["abitype@1.0.0", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ=="], + "@reown/appkit-utils/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.39.3", "", {}, "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww=="], - "@web3-onboard/common/viem/isows": ["isows@1.0.4", "", { "peerDependencies": { "ws": "*" } }, "sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.23.2", "", { "dependencies": { "@walletconnect/core": "2.23.2", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "3.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "events": "3.3.0" } }, "sha512-LL5KgmJHvY5NqQn+ZHQJLia1p6fpUWXHtiG97S5rNfyuPx6gT/Jkkwqc2LwdmAjFkr61t8zTagHC9ETq203mNA=="], - "@web3-onboard/common/viem/ws": ["ws@8.13.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.23.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "events": "3.3.0" } }, "sha512-5dxBCdUM+4Dqe1/A7uqkm2tWPXce4UUGSr+ImfI0YjwEExQS8+TzdOlhMt3n32ncnBCllU5paG+fsndT06R0iw=="], - "@web3-onboard/core/viem/@noble/curves": ["@noble/curves@1.2.0", "", { "dependencies": { "@noble/hashes": "1.3.2" } }, "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils": ["@walletconnect/utils@2.23.2", "", { "dependencies": { "@msgpack/msgpack": "3.1.2", "@noble/ciphers": "1.3.0", "@noble/curves": "1.9.7", "@noble/hashes": "1.8.0", "@scure/base": "1.2.6", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/window-getters": "1.0.1", "@walletconnect/window-metadata": "1.0.1", "blakejs": "1.2.1", "bs58": "6.0.0", "detect-browser": "5.3.0", "ox": "0.9.3", "uint8arrays": "3.1.1" } }, "sha512-ReSjU3kX+3i3tYJQZbVfetY5SSUL+iM6uiIVVD1PJalePa/5A40VgLVRTF7sDCJTIFfpf3Mt4bFjeaYuoxWtIw=="], - "@web3-onboard/core/viem/@noble/hashes": ["@noble/hashes@1.3.2", "", {}, "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ=="], + "@reown/appkit/@walletconnect/universal-provider/es-toolkit": ["es-toolkit@1.39.3", "", {}, "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww=="], - "@web3-onboard/core/viem/@scure/bip32": ["@scure/bip32@1.3.2", "", { "dependencies": { "@noble/curves": "~1.2.0", "@noble/hashes": "~1.3.2", "@scure/base": "~1.1.2" } }, "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA=="], + "@solana/codecs-numbers/@solana/errors/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], - "@web3-onboard/core/viem/@scure/bip39": ["@scure/bip39@1.2.1", "", { "dependencies": { "@noble/hashes": "~1.3.0", "@scure/base": "~1.1.0" } }, "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg=="], + "@solana/web3.js/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], - "@web3-onboard/core/viem/abitype": ["abitype@1.0.0", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ=="], - - "@web3-onboard/core/viem/isows": ["isows@1.0.4", "", { "peerDependencies": { "ws": "*" } }, "sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ=="], - - "@web3-onboard/core/viem/ws": ["ws@8.13.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA=="], + "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], - "bnc-sdk/rxjs/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + "@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], "cliui/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], @@ -1438,51 +1737,17 @@ "cliui/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], - "svelte-i18n/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.19.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA=="], - - "svelte-i18n/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.19.12", "", { "os": "android", "cpu": "arm" }, "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w=="], - - "svelte-i18n/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.19.12", "", { "os": "android", "cpu": "arm64" }, "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA=="], + "ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], - "svelte-i18n/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.19.12", "", { "os": "android", "cpu": "x64" }, "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew=="], + "ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], - "svelte-i18n/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.19.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g=="], + "log-update/slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - "svelte-i18n/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.19.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A=="], + "log-update/slice-ansi/is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], - "svelte-i18n/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.19.12", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA=="], + "obj-multiplex/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], - "svelte-i18n/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.19.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg=="], - - "svelte-i18n/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.19.12", "", { "os": "linux", "cpu": "arm" }, "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w=="], - - "svelte-i18n/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.19.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA=="], - - "svelte-i18n/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.19.12", "", { "os": "linux", "cpu": "ia32" }, "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA=="], - - "svelte-i18n/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.19.12", "", { "os": "linux", "cpu": "none" }, "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA=="], - - "svelte-i18n/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.19.12", "", { "os": "linux", "cpu": "none" }, "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w=="], - - "svelte-i18n/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.19.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg=="], - - "svelte-i18n/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.19.12", "", { "os": "linux", "cpu": "none" }, "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg=="], - - "svelte-i18n/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.19.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg=="], - - "svelte-i18n/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.19.12", "", { "os": "linux", "cpu": "x64" }, "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg=="], - - "svelte-i18n/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.19.12", "", { "os": "none", "cpu": "x64" }, "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA=="], - - "svelte-i18n/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.19.12", "", { "os": "openbsd", "cpu": "x64" }, "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw=="], - - "svelte-i18n/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.19.12", "", { "os": "sunos", "cpu": "x64" }, "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA=="], - - "svelte-i18n/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.19.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A=="], - - "svelte-i18n/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.19.12", "", { "os": "win32", "cpu": "ia32" }, "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ=="], - - "svelte-i18n/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.19.12", "", { "os": "win32", "cpu": "x64" }, "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA=="], + "unstorage/chokidar/readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="], "wrangler/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.4", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q=="], @@ -1542,130 +1807,42 @@ "yargs/string-width/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], - "@reown/appkit-common/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@reown/appkit-common/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.21.0", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.33.0", "events": "3.3.0", "uint8arrays": "3.1.0" } }, "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.23.2", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.39.3", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-KkaTELRu8t/mt3J9doCQ1fBGCbYsCNfpo2JpKdCwKQR7PVjVKeVpYQK/blVkA5m6uLPpBtVRbOMKjnHW1m7JLw=="], - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@msgpack/msgpack": ["@msgpack/msgpack@3.1.2", "", {}, "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ=="], - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem": ["viem@2.23.2", "", { "dependencies": { "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@scure/bip32": "1.6.2", "@scure/bip39": "1.5.4", "abitype": "1.0.8", "isows": "1.0.6", "ox": "0.6.7", "ws": "8.18.0" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "@reown/appkit-controllers/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], - "@reown/appkit-controllers/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.23.2", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.39.3", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-KkaTELRu8t/mt3J9doCQ1fBGCbYsCNfpo2JpKdCwKQR7PVjVKeVpYQK/blVkA5m6uLPpBtVRbOMKjnHW1m7JLw=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.21.0", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.33.0", "events": "3.3.0", "uint8arrays": "3.1.0" } }, "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/@msgpack/msgpack": ["@msgpack/msgpack@3.1.2", "", {}, "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.23.2", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.2", "@walletconnect/utils": "2.23.2", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.39.3", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-KkaTELRu8t/mt3J9doCQ1fBGCbYsCNfpo2JpKdCwKQR7PVjVKeVpYQK/blVkA5m6uLPpBtVRbOMKjnHW1m7JLw=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/@msgpack/msgpack": ["@msgpack/msgpack@3.1.2", "", {}, "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem": ["viem@2.23.2", "", { "dependencies": { "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@scure/bip32": "1.6.2", "@scure/bip39": "1.5.4", "abitype": "1.0.8", "isows": "1.0.6", "ox": "0.6.7", "ws": "8.18.0" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "@reown/appkit-utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], - "@reown/appkit-utils/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.21.0", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.21.0", "@walletconnect/utils": "2.21.0", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.33.0", "events": "3.3.0", "uint8arrays": "3.1.0" } }, "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem": ["viem@2.23.2", "", { "dependencies": { "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@scure/bip32": "1.6.2", "@scure/bip39": "1.5.4", "abitype": "1.0.8", "isows": "1.0.6", "ox": "0.6.7", "ws": "8.18.0" }, "peerDependencies": { "typescript": ">=5.0.4" } }, "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA=="], - - "@reown/appkit/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@reown/appkit/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.2", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g=="], - - "@walletconnect/utils/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@web3-onboard/common/viem/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], - - "@web3-onboard/common/viem/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], - - "@web3-onboard/core/viem/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], - - "@web3-onboard/core/viem/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + "@solana/web3.js/bs58/base-x/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], "yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="], "yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip32": ["@scure/bip32@1.6.2", "", { "dependencies": { "@noble/curves": "~1.8.1", "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.2" } }, "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip39": ["@scure/bip39@1.5.4", "", { "dependencies": { "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.4" } }, "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/abitype": ["abitype@1.0.8", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/ox": ["ox@0.6.7", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip32": ["@scure/bip32@1.6.2", "", { "dependencies": { "@noble/curves": "~1.8.1", "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.2" } }, "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip39": ["@scure/bip39@1.5.4", "", { "dependencies": { "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.4" } }, "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/abitype": ["abitype@1.0.8", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/ox": ["ox@0.6.7", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip32": ["@scure/bip32@1.6.2", "", { "dependencies": { "@noble/curves": "~1.8.1", "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.2" } }, "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/@scure/bip39": ["@scure/bip39@1.5.4", "", { "dependencies": { "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.4" } }, "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/abitype": ["abitype@1.0.8", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" } }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox": ["ox@0.6.7", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" } }, "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], "yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="], - - "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], } } diff --git a/drizzle.config.ts b/drizzle.config.ts index 1aadffa..9007998 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from "drizzle-kit"; export default defineConfig({ - dialect: "postgresql", - schema: "./src/lib/schema.ts", - out: "./drizzle" + dialect: "postgresql", + schema: "./src/lib/schema.ts", + out: "./drizzle" }); diff --git a/drizzle/0000_absent_moonstone.sql b/drizzle/0000_absent_moonstone.sql deleted file mode 100644 index fe9c33b..0000000 --- a/drizzle/0000_absent_moonstone.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE "intents" ( - "id" text PRIMARY KEY NOT NULL, - "order_id" text NOT NULL, - "intent_type" text NOT NULL, - "data" text NOT NULL, - "created_at" integer NOT NULL -); diff --git a/drizzle/0000_brief_corsair.sql b/drizzle/0000_brief_corsair.sql new file mode 100644 index 0000000..755927a --- /dev/null +++ b/drizzle/0000_brief_corsair.sql @@ -0,0 +1,43 @@ +DROP TABLE IF EXISTS "transaction_receipts"; +--> statement-breakpoint +DROP TABLE IF EXISTS "tokens"; +--> statement-breakpoint +DROP TABLE IF EXISTS "intents"; +--> statement-breakpoint +DROP TABLE IF EXISTS "fill_transactions"; +--> statement-breakpoint +CREATE TABLE "fill_transactions" ( + "id" text PRIMARY KEY NOT NULL, + "output_hash" text NOT NULL, + "tx_hash" text NOT NULL, + CONSTRAINT "fill_transactions_output_hash_unique" UNIQUE("output_hash") +); +--> statement-breakpoint +CREATE TABLE "intents" ( + "id" text PRIMARY KEY NOT NULL, + "order_id" text NOT NULL, + "intent_type" text NOT NULL, + "data" text NOT NULL, + "created_at" bigint NOT NULL, + CONSTRAINT "intents_order_id_unique" UNIQUE("order_id") +); +--> statement-breakpoint +CREATE TABLE "tokens" ( + "id" text PRIMARY KEY NOT NULL, + "address" text NOT NULL, + "name" text NOT NULL, + "chain_id" bigint NOT NULL, + "decimals" bigint NOT NULL, + "is_manual" boolean DEFAULT false NOT NULL, + "is_testnet" boolean DEFAULT false NOT NULL +); +--> statement-breakpoint +CREATE TABLE "transaction_receipts" ( + "id" text PRIMARY KEY NOT NULL, + "chain_id" bigint NOT NULL, + "tx_hash" text NOT NULL, + "receipt" text NOT NULL, + "created_at" bigint NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX "tokens_address_chain_idx" ON "tokens" USING btree ("address","chain_id"); diff --git a/drizzle/0001_nifty_mephisto.sql b/drizzle/0001_nifty_mephisto.sql deleted file mode 100644 index bef3c71..0000000 --- a/drizzle/0001_nifty_mephisto.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE "fill_transactions" ( - "id" text PRIMARY KEY NOT NULL, - "output_hash" text NOT NULL, - "tx_hash" text NOT NULL, - CONSTRAINT "fill_transactions_output_hash_unique" UNIQUE("output_hash") -); diff --git a/drizzle/0002_expand_intent_created_at.sql b/drizzle/0002_expand_intent_created_at.sql deleted file mode 100644 index 945724b..0000000 --- a/drizzle/0002_expand_intent_created_at.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "intents" ALTER COLUMN "created_at" TYPE bigint; diff --git a/drizzle/0003_unique_intent_order_id.sql b/drizzle/0003_unique_intent_order_id.sql deleted file mode 100644 index bfae5b2..0000000 --- a/drizzle/0003_unique_intent_order_id.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE UNIQUE INDEX IF NOT EXISTS "intents_order_id_unique" ON "intents" ("order_id"); diff --git a/drizzle/0004_store_transaction_receipts.sql b/drizzle/0004_store_transaction_receipts.sql deleted file mode 100644 index 939ed95..0000000 --- a/drizzle/0004_store_transaction_receipts.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE "transaction_receipts" ( - "id" text PRIMARY KEY NOT NULL, - "chain_id" bigint NOT NULL, - "tx_hash" text NOT NULL, - "receipt" text NOT NULL, - "created_at" bigint NOT NULL -); diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index e5721f5..9f75d1e 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,62 +1,227 @@ { - "id": "acb031ae-9317-47af-b9af-c685b7c17bda", - "prevId": "00000000-0000-0000-0000-000000000000", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.intents": { - "name": "intents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "order_id": { - "name": "order_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "intent_type": { - "name": "intent_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } + "id": "8baee9a6-7db9-41f1-b049-9187bb2edafc", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.fill_transactions": { + "name": "fill_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "output_hash": { + "name": "output_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tx_hash": { + "name": "tx_hash", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "fill_transactions_output_hash_unique": { + "name": "fill_transactions_output_hash_unique", + "nullsNotDistinct": false, + "columns": ["output_hash"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.intents": { + "name": "intents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "order_id": { + "name": "order_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "intent_type": { + "name": "intent_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "intents_order_id_unique": { + "name": "intents_order_id_unique", + "nullsNotDistinct": false, + "columns": ["order_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tokens": { + "name": "tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "address": { + "name": "address", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chain_id": { + "name": "chain_id", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "decimals": { + "name": "decimals", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "is_manual": { + "name": "is_manual", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_testnet": { + "name": "is_testnet", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "tokens_address_chain_idx": { + "name": "tokens_address_chain_idx", + "columns": [ + { + "expression": "address", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chain_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.transaction_receipts": { + "name": "transaction_receipts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "chain_id": { + "name": "chain_id", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "tx_hash": { + "name": "tx_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "receipt": { + "name": "receipt", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } } diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 1923420..0000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "id": "9f78f425-71cd-4f66-b756-5c8433118a62", - "prevId": "acb031ae-9317-47af-b9af-c685b7c17bda", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.fill_transactions": { - "name": "fill_transactions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "output_hash": { - "name": "output_hash", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tx_hash": { - "name": "tx_hash", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "fill_transactions_output_hash_unique": { - "name": "fill_transactions_output_hash_unique", - "nullsNotDistinct": false, - "columns": ["output_hash"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.intents": { - "name": "intents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "order_id": { - "name": "order_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "intent_type": { - "name": "intent_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 6af4e86..092c8b2 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,34 +1,13 @@ { - "version": "7", - "dialect": "postgresql", - "entries": [ - { - "idx": 0, - "version": "7", - "when": 1770712231202, - "tag": "0000_absent_moonstone", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1770803119280, - "tag": "0001_nifty_mephisto", - "breakpoints": true - }, - { - "idx": 2, - "version": "7", - "when": 1770809000000, - "tag": "0002_expand_intent_created_at", - "breakpoints": true - }, - { - "idx": 3, - "version": "7", - "when": 1770810000000, - "tag": "0003_unique_intent_order_id", - "breakpoints": true - } - ] + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1773159031946, + "tag": "0000_brief_corsair", + "breakpoints": true + } + ] } diff --git a/eslint.config.js b/eslint.config.js index b41ad17..85a53ce 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -10,27 +10,27 @@ import svelteConfig from "./svelte.config.js"; const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url)); export default ts.config( - includeIgnoreFile(gitignorePath), - js.configs.recommended, - ...ts.configs.recommended, - ...svelte.configs.recommended, - prettier, - ...svelte.configs.prettier, - { - languageOptions: { - globals: { ...globals.browser, ...globals.node } - }, - rules: { "no-undef": "off" } - }, - { - files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"], - languageOptions: { - parserOptions: { - projectService: true, - extraFileExtensions: [".svelte"], - parser: ts.parser, - svelteConfig - } - } - } + includeIgnoreFile(gitignorePath), + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs.recommended, + prettier, + ...svelte.configs.prettier, + { + languageOptions: { + globals: { ...globals.browser, ...globals.node } + }, + rules: { "no-undef": "off" } + }, + { + files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"], + languageOptions: { + parserOptions: { + projectService: true, + extraFileExtensions: [".svelte"], + parser: ts.parser, + svelteConfig + } + } + } ); diff --git a/package.json b/package.json index 5ab3dc9..8916358 100644 --- a/package.json +++ b/package.json @@ -1,65 +1,72 @@ { - "name": "cat-swapper", - "private": true, - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "prepare": "husky", - "test": "bun run test:all", - "test:unit": "svelte-kit sync && bun test tests/unit tests/db.test.ts --coverage", - "test:e2e": "svelte-kit sync && bunx playwright test", - "test:e2e:headed": "svelte-kit sync && bunx playwright test --headed", - "test:e2e:ui": "svelte-kit sync && bunx playwright test --ui", - "test:all": "bun run test:unit && bun run test:e2e", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "format": "prettier --write .", - "lint": "prettier --check . && eslint .", - "migrate": "bunx drizzle-kit generate && bun run ./src/lib/compile-migrations.ts" - }, - "devDependencies": { - "@eslint/compat": "^1.2.5", - "@eslint/js": "^9.18.0", - "@playwright/test": "^1.55.0", - "@sveltejs/kit": "^2.16.0", - "@sveltejs/vite-plugin-svelte": "^6.1.1", - "@tailwindcss/vite": "^4.0.0", - "@types/bun": "^1.3.8", - "drizzle-kit": "^0.31.9", - "eslint": "^9.18.0", - "eslint-config-prettier": "^10.0.1", - "eslint-plugin-svelte": "^3.0.0", - "globals": "^16.0.0", - "husky": "^9.1.7", - "lint-staged": "^16.1.0", - "prettier": "^3.4.2", - "prettier-plugin-svelte": "^3.3.3", - "prettier-plugin-tailwindcss": "^0.6.11", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "tailwindcss": "^4.0.0", - "typescript": "^5.0.0", - "typescript-eslint": "^8.20.0", - "vite": "^7.1.1" - }, - "lint-staged": { - "*.{js,ts,svelte,css,md,json,html}": "prettier --write" - }, - "dependencies": { - "@electric-sql/pglite": "^0.3.15", - "@sveltejs/adapter-cloudflare": "^7.0.3", - "@web3-onboard/coinbase": "^2.4.2", - "@web3-onboard/core": "^2.24.1", - "@web3-onboard/injected-wallets": "^2.11.3", - "@web3-onboard/walletconnect": "^2.6.2", - "@web3-onboard/zeal": "^2.1.1", - "axios": "^1.9.0", - "base64-js": "^1.5.1", - "drizzle-orm": "^0.45.1", - "rxjs": "^7.8.2", - "viem": "^2.48.4" - } + "name": "cat-swapper", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "husky", + "test": "bun run test:all", + "test:unit": "svelte-kit sync && bun test tests/unit tests/db.test.ts --coverage", + "test:e2e": "svelte-kit sync && bunx playwright test", + "test:e2e:headed": "svelte-kit sync && bunx playwright test --headed", + "test:e2e:ui": "svelte-kit sync && bunx playwright test --ui", + "test:all": "bun run test:unit && bun run test:e2e", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "prettier --write .", + "lint": "prettier --check . && eslint .", + "migrate": "bunx drizzle-kit generate && bun run ./src/lib/compile-migrations.ts" + }, + "devDependencies": { + "@eslint/compat": "^1.2.5", + "@eslint/js": "^9.18.0", + "@sveltejs/kit": "^2.16.0", + "@sveltejs/vite-plugin-svelte": "^6.1.1", + "@tailwindcss/vite": "^4.0.0", + "@types/bun": "^1.3.8", + "@playwright/test": "^1.55.0", + "drizzle-kit": "^0.31.9", + "dotenv": "^17.2.3", + "eslint": "^9.18.0", + "eslint-config-prettier": "^10.0.1", + "eslint-plugin-svelte": "^3.0.0", + "globals": "^16.0.0", + "husky": "9.1.7", + "lint-staged": "16.1.0", + "prettier": "3.4.2", + "prettier-plugin-svelte": "3.3.3", + "prettier-plugin-tailwindcss": "0.6.11", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "tailwindcss": "^4.0.0", + "typescript": "^5.0.0", + "typescript-eslint": "^8.20.0", + "vite": "^7.1.1" + }, + "lint-staged": { + "*.{js,ts,svelte,css,md,json,html}": "prettier --write" + }, + "dependencies": { + "@base-org/account": "^2.5.1", + "@coinbase/wallet-sdk": "^4.3.6", + "@electric-sql/pglite": "^0.3.15", + "@lifi/intent": "file:../intent.ts", + "@metamask/sdk": "^0.34.0", + "@safe-global/safe-apps-provider": "~0.18.6", + "@safe-global/safe-apps-sdk": "^9.1.0", + "@sveltejs/adapter-cloudflare": "^7.0.3", + "@wagmi/connectors": "^7.2.1", + "@wagmi/core": "^3.4.0", + "@walletconnect/ethereum-provider": "^2.21.1", + "axios": "^1.13.6", + "base64-js": "^1.5.1", + "drizzle-orm": "^0.45.1", + "porto": "~0.2.35", + "rxjs": "^7.8.2", + "viem": "~2.45.1", + "wagmi": "^3.5.0" + } } diff --git a/playwright.config.ts b/playwright.config.ts index 6500ec0..a7d277a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,29 +1,31 @@ import { defineConfig, devices } from "@playwright/test"; export default defineConfig({ - testDir: "tests/e2e", - timeout: 45_000, - expect: { - timeout: 10_000 - }, - fullyParallel: true, - retries: process.env.CI ? 2 : 0, - use: { - baseURL: "http://127.0.0.1:4173", - trace: "retain-on-failure", - video: "retain-on-failure", - screenshot: "only-on-failure" - }, - projects: [ - { - name: "chromium", - use: { ...devices["Desktop Chrome"] } - } - ], - webServer: { - command: "bunx vite dev --host 127.0.0.1 --port 4173", - url: "http://127.0.0.1:4173", - reuseExistingServer: !process.env.CI, - timeout: 120_000 - } + testDir: "tests/e2e", + reporter: [["line"], ["html", { open: "never" }]], + timeout: 45_000, + expect: { + timeout: 10_000 + }, + fullyParallel: false, + workers: 1, + retries: process.env.CI ? 2 : 0, + use: { + baseURL: "http://127.0.0.1:4173", + trace: "retain-on-failure", + video: process.env.PW_VIDEO_ALL ? "on" : "retain-on-failure", + screenshot: "only-on-failure" + }, + projects: [ + { + name: "chromium", + use: { ...devices["Desktop Chrome"] } + } + ], + webServer: { + command: "bunx vite dev --force --host 127.0.0.1 --port 4173", + url: "http://127.0.0.1:4173", + reuseExistingServer: !process.env.CI, + timeout: 120_000 + } }); diff --git a/src/app.d.ts b/src/app.d.ts index da08e6d..3a0a4bf 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,13 +1,16 @@ // See https://svelte.dev/docs/kit/types#app.d.ts // for information about these interfaces declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } + interface BigInt { + toJSON(): string; + } } export {}; diff --git a/src/app.html b/src/app.html index 56644d4..cef9650 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/abi/compact.ts b/src/lib/abi/compact.ts index 3bc183f..ad32824 100644 --- a/src/lib/abi/compact.ts +++ b/src/lib/abi/compact.ts @@ -1,2769 +1,2769 @@ export const COMPACT_ABI = [ - { - type: "function", - name: "DOMAIN_SEPARATOR", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "__activateTstore", - inputs: [], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "__benchmark", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "__registerAllocator", - inputs: [ - { - name: "allocator", - type: "address", - internalType: "address" - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint96", - internalType: "uint96" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "allocatedBatchTransfer", - inputs: [ - { - name: "transfer", - type: "tuple", - internalType: "struct AllocatedBatchTransfer", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "transfers", - type: "tuple[]", - internalType: "struct ComponentsById[]", - components: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "portions", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "allocatedTransfer", - inputs: [ - { - name: "transfer", - type: "tuple", - internalType: "struct AllocatedTransfer", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipients", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "allowance", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address" - }, - { - name: "spender", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "approve", - inputs: [ - { - name: "spender", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "assignEmissary", - inputs: [ - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "emissary", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "balanceOf", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "batchClaim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct BatchClaim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "claims", - type: "tuple[]", - internalType: "struct BatchClaimComponent[]", - components: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "portions", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "batchDeposit", - inputs: [ - { - name: "idsAndAmounts", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "recipient", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "batchDepositAndRegisterFor", - inputs: [ - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "idsAndAmounts", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "arbiter", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "registeredAmounts", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "batchDepositAndRegisterMultiple", - inputs: [ - { - name: "idsAndAmounts", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "claimHashesAndTypehashes", - type: "bytes32[2][]", - internalType: "bytes32[2][]" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "batchDepositAndRegisterViaPermit2", - inputs: [ - { - name: "depositor", - type: "address", - internalType: "address" - }, - { - name: "permitted", - type: "tuple[]", - internalType: "struct ISignatureTransfer.TokenPermissions[]", - components: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "", - type: "tuple", - internalType: "struct DepositDetails", - components: [ - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "deadline", - type: "uint256", - internalType: "uint256" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - } - ] - }, - { - name: "", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "", - type: "uint8", - internalType: "enum CompactCategory" - }, - { - name: "witness", - type: "string", - internalType: "string" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "batchDepositViaPermit2", - inputs: [ - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "permitted", - type: "tuple[]", - internalType: "struct ISignatureTransfer.TokenPermissions[]", - components: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "", - type: "tuple", - internalType: "struct DepositDetails", - components: [ - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "deadline", - type: "uint256", - internalType: "uint256" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - } - ] - }, - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "batchMultichainClaim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct BatchMultichainClaim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "claims", - type: "tuple[]", - internalType: "struct BatchClaimComponent[]", - components: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "portions", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "claim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct Claim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimants", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "consume", - inputs: [ - { - name: "nonces", - type: "uint256[]", - internalType: "uint256[]" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "decimals", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "uint8" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "depositERC20", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "depositERC20AndRegister", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "depositERC20AndRegisterFor", - inputs: [ - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "arbiter", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "registeredAmount", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "depositERC20AndRegisterViaPermit2", - inputs: [ - { - name: "permit", - type: "tuple", - internalType: "struct ISignatureTransfer.PermitTransferFrom", - components: [ - { - name: "permitted", - type: "tuple", - internalType: "struct ISignatureTransfer.TokenPermissions", - components: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "deadline", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "depositor", - type: "address", - internalType: "address" - }, - { - name: "", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "", - type: "uint8", - internalType: "enum CompactCategory" - }, - { - name: "witness", - type: "string", - internalType: "string" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "depositERC20ViaPermit2", - inputs: [ - { - name: "permit", - type: "tuple", - internalType: "struct ISignatureTransfer.PermitTransferFrom", - components: [ - { - name: "permitted", - type: "tuple", - internalType: "struct ISignatureTransfer.TokenPermissions", - components: [ - { - name: "token", - type: "address", - internalType: "address" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "deadline", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "depositNative", - inputs: [ - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "recipient", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "depositNativeAndRegister", - inputs: [ - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "depositNativeAndRegisterFor", - inputs: [ - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "arbiter", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "disableForcedWithdrawal", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "enableForcedWithdrawal", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "exogenousBatchClaim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct ExogenousBatchMultichainClaim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "claims", - type: "tuple[]", - internalType: "struct BatchClaimComponent[]", - components: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "portions", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "notarizedChainId", - type: "uint256", - internalType: "uint256" - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "exogenousClaim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct ExogenousMultichainClaim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimants", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "notarizedChainId", - type: "uint256", - internalType: "uint256" - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "extsload", - inputs: [ - { - name: "slot", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "extsload", - inputs: [ - { - name: "slots", - type: "bytes32[]", - internalType: "bytes32[]" - } - ], - outputs: [ - { - name: "", - type: "bytes32[]", - internalType: "bytes32[]" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "exttload", - inputs: [ - { - name: "slot", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "forcedWithdrawal", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "address", - internalType: "address" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "getEmissaryStatus", - inputs: [ - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - } - ], - outputs: [ - { - name: "status", - type: "uint8", - internalType: "enum EmissaryStatus" - }, - { - name: "emissaryAssignmentAvailableAt", - type: "uint256", - internalType: "uint256" - }, - { - name: "currentEmissary", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getForcedWithdrawalStatus", - inputs: [ - { - name: "account", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum ForcedWithdrawalStatus" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getLockDetails", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint8", - internalType: "enum ResetPeriod" - }, - { - name: "", - type: "uint8", - internalType: "enum Scope" - }, - { - name: "", - type: "bytes12", - internalType: "bytes12" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getRequiredWithdrawalFallbackStipends", - inputs: [], - outputs: [ - { - name: "nativeTokenStipend", - type: "uint256", - internalType: "uint256" - }, - { - name: "erc20TokenStipend", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "hasConsumedAllocatorNonce", - inputs: [ - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocator", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isOperator", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address" - }, - { - name: "spender", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "status", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isRegistered", - inputs: [ - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "isActive", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "multichainClaim", - inputs: [ - { - name: "claimPayload", - type: "tuple", - internalType: "struct MultichainClaim", - components: [ - { - name: "allocatorData", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint256", - internalType: "uint256" - }, - { - name: "witness", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "witnessTypestring", - type: "string", - internalType: "string" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "claimants", - type: "tuple[]", - internalType: "struct Component[]", - components: [ - { - name: "claimant", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "name", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "name", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "register", - inputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "registerBatchFor", - inputs: [ - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "registerFor", - inputs: [ - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "bytes12", - internalType: "bytes12" - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "registerMultichainFor", - inputs: [ - { - name: "typehash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "notarizedChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "sponsorSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "claimHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "registerMultiple", - inputs: [ - { - name: "claimHashesAndTypehashes", - type: "bytes32[2][]", - internalType: "bytes32[2][]" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "scheduleEmissaryAssignment", - inputs: [ - { - name: "lockTag", - type: "bytes12", - internalType: "bytes12" - } - ], - outputs: [ - { - name: "emissaryAssignmentAvailableAt", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "setOperator", - inputs: [ - { - name: "operator", - type: "address", - internalType: "address" - }, - { - name: "approved", - type: "bool", - internalType: "bool" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "supportsInterface", - inputs: [ - { - name: "interfaceId", - type: "bytes4", - internalType: "bytes4" - } - ], - outputs: [ - { - name: "result", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "symbol", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "tokenURI", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "transfer", - inputs: [ - { - name: "to", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "transferFrom", - inputs: [ - { - name: "from", - type: "address", - internalType: "address" - }, - { - name: "to", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "payable" - }, - { - type: "event", - name: "AllocatorRegistered", - inputs: [ - { - name: "allocatorId", - type: "uint96", - indexed: false, - internalType: "uint96" - }, - { - name: "allocator", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Approval", - inputs: [ - { - name: "owner", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "spender", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "id", - type: "uint256", - indexed: true, - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "Claim", - inputs: [ - { - name: "sponsor", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "allocator", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "arbiter", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "claimHash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "nonce", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "CompactRegistered", - inputs: [ - { - name: "sponsor", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "claimHash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "typehash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "EmissaryAssigned", - inputs: [ - { - name: "sponsor", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - indexed: true, - internalType: "bytes12" - }, - { - name: "emissary", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "EmissaryAssignmentScheduled", - inputs: [ - { - name: "sponsor", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "lockTag", - type: "bytes12", - indexed: true, - internalType: "bytes12" - }, - { - name: "assignableAt", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "ForcedWithdrawalStatusUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "id", - type: "uint256", - indexed: true, - internalType: "uint256" - }, - { - name: "activating", - type: "bool", - indexed: false, - internalType: "bool" - }, - { - name: "withdrawableAt", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "NonceConsumedDirectly", - inputs: [ - { - name: "allocator", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "OperatorSet", - inputs: [ - { - name: "owner", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "operator", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "approved", - type: "bool", - indexed: false, - internalType: "bool" - } - ], - anonymous: false - }, - { - type: "event", - name: "Transfer", - inputs: [ - { - name: "by", - type: "address", - indexed: false, - internalType: "address" - }, - { - name: "from", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "id", - type: "uint256", - indexed: true, - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "error", - name: "AllocatedAmountExceeded", - inputs: [ - { - name: "allocatedAmount", - type: "uint256", - internalType: "uint256" - }, - { - name: "providedAmount", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "BalanceOverflow", - inputs: [] - }, - { - type: "error", - name: "ChainIndexOutOfRange", - inputs: [] - }, - { - type: "error", - name: "EmissaryAssignmentUnavailable", - inputs: [ - { - name: "assignableAt", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "Expired", - inputs: [ - { - name: "expiration", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "ForcedWithdrawalAlreadyDisabled", - inputs: [ - { - name: "account", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "ForcedWithdrawalFailed", - inputs: [] - }, - { - type: "error", - name: "InconsistentAllocators", - inputs: [] - }, - { - type: "error", - name: "InsufficientBalance", - inputs: [] - }, - { - type: "error", - name: "InsufficientPermission", - inputs: [] - }, - { - type: "error", - name: "InvalidAllocation", - inputs: [ - { - name: "allocator", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "InvalidBatchAllocation", - inputs: [] - }, - { - type: "error", - name: "InvalidBatchDepositStructure", - inputs: [] - }, - { - type: "error", - name: "InvalidDepositBalanceChange", - inputs: [] - }, - { - type: "error", - name: "InvalidDepositTokenOrdering", - inputs: [] - }, - { - type: "error", - name: "InvalidEmissaryAssignment", - inputs: [] - }, - { - type: "error", - name: "InvalidLockTag", - inputs: [] - }, - { - type: "error", - name: "InvalidRegistrationProof", - inputs: [ - { - name: "allocator", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "InvalidScope", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "InvalidSignature", - inputs: [] - }, - { - type: "error", - name: "InvalidToken", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "NoIdsAndAmountsProvided", - inputs: [] - }, - { - type: "error", - name: "Permit2CallFailed", - inputs: [] - }, - { - type: "error", - name: "PrematureWithdrawal", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "ReentrantCall", - inputs: [ - { - name: "existingCaller", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "TStoreAlreadyActivated", - inputs: [] - }, - { - type: "error", - name: "TStoreNotSupported", - inputs: [] - }, - { - type: "error", - name: "TloadTestContractDeploymentFailed", - inputs: [] - }, - { - type: "error", - name: "UnallocatedTransfer", - inputs: [ - { - name: "operator", - type: "address", - internalType: "address" - }, - { - name: "from", - type: "address", - internalType: "address" - }, - { - name: "to", - type: "address", - internalType: "address" - }, - { - name: "id", - type: "uint256", - internalType: "uint256" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - } - ] - } + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "__activateTstore", + inputs: [], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "__benchmark", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "__registerAllocator", + inputs: [ + { + name: "allocator", + type: "address", + internalType: "address" + }, + { + name: "proof", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "", + type: "uint96", + internalType: "uint96" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "allocatedBatchTransfer", + inputs: [ + { + name: "transfer", + type: "tuple", + internalType: "struct AllocatedBatchTransfer", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "transfers", + type: "tuple[]", + internalType: "struct ComponentsById[]", + components: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "portions", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + } + ] + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "allocatedTransfer", + inputs: [ + { + name: "transfer", + type: "tuple", + internalType: "struct AllocatedTransfer", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipients", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address" + }, + { + name: "spender", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "assignEmissary", + inputs: [ + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "emissary", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "batchClaim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct BatchClaim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "claims", + type: "tuple[]", + internalType: "struct BatchClaimComponent[]", + components: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "portions", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "batchDeposit", + inputs: [ + { + name: "idsAndAmounts", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "recipient", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "batchDepositAndRegisterFor", + inputs: [ + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "idsAndAmounts", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "arbiter", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "registeredAmounts", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "batchDepositAndRegisterMultiple", + inputs: [ + { + name: "idsAndAmounts", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "claimHashesAndTypehashes", + type: "bytes32[2][]", + internalType: "bytes32[2][]" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "batchDepositAndRegisterViaPermit2", + inputs: [ + { + name: "depositor", + type: "address", + internalType: "address" + }, + { + name: "permitted", + type: "tuple[]", + internalType: "struct ISignatureTransfer.TokenPermissions[]", + components: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "", + type: "tuple", + internalType: "struct DepositDetails", + components: [ + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + } + ] + }, + { + name: "", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "", + type: "uint8", + internalType: "enum CompactCategory" + }, + { + name: "witness", + type: "string", + internalType: "string" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "batchDepositViaPermit2", + inputs: [ + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "permitted", + type: "tuple[]", + internalType: "struct ISignatureTransfer.TokenPermissions[]", + components: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "", + type: "tuple", + internalType: "struct DepositDetails", + components: [ + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + } + ] + }, + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "batchMultichainClaim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct BatchMultichainClaim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "claims", + type: "tuple[]", + internalType: "struct BatchClaimComponent[]", + components: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "portions", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "claim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct Claim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimants", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "consume", + inputs: [ + { + name: "nonces", + type: "uint256[]", + internalType: "uint256[]" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "decimals", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "depositERC20", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "depositERC20AndRegister", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "depositERC20AndRegisterFor", + inputs: [ + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "arbiter", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "registeredAmount", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "depositERC20AndRegisterViaPermit2", + inputs: [ + { + name: "permit", + type: "tuple", + internalType: "struct ISignatureTransfer.PermitTransferFrom", + components: [ + { + name: "permitted", + type: "tuple", + internalType: "struct ISignatureTransfer.TokenPermissions", + components: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "depositor", + type: "address", + internalType: "address" + }, + { + name: "", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "", + type: "uint8", + internalType: "enum CompactCategory" + }, + { + name: "witness", + type: "string", + internalType: "string" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "depositERC20ViaPermit2", + inputs: [ + { + name: "permit", + type: "tuple", + internalType: "struct ISignatureTransfer.PermitTransferFrom", + components: [ + { + name: "permitted", + type: "tuple", + internalType: "struct ISignatureTransfer.TokenPermissions", + components: [ + { + name: "token", + type: "address", + internalType: "address" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "depositNative", + inputs: [ + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "recipient", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "depositNativeAndRegister", + inputs: [ + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "depositNativeAndRegisterFor", + inputs: [ + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "arbiter", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "disableForcedWithdrawal", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "enableForcedWithdrawal", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "exogenousBatchClaim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct ExogenousBatchMultichainClaim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "claims", + type: "tuple[]", + internalType: "struct BatchClaimComponent[]", + components: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "portions", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "notarizedChainId", + type: "uint256", + internalType: "uint256" + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "exogenousClaim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct ExogenousMultichainClaim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimants", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "notarizedChainId", + type: "uint256", + internalType: "uint256" + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "extsload", + inputs: [ + { + name: "slot", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "extsload", + inputs: [ + { + name: "slots", + type: "bytes32[]", + internalType: "bytes32[]" + } + ], + outputs: [ + { + name: "", + type: "bytes32[]", + internalType: "bytes32[]" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "exttload", + inputs: [ + { + name: "slot", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "forcedWithdrawal", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "address", + internalType: "address" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "getEmissaryStatus", + inputs: [ + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + } + ], + outputs: [ + { + name: "status", + type: "uint8", + internalType: "enum EmissaryStatus" + }, + { + name: "emissaryAssignmentAvailableAt", + type: "uint256", + internalType: "uint256" + }, + { + name: "currentEmissary", + type: "address", + internalType: "address" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getForcedWithdrawalStatus", + inputs: [ + { + name: "account", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum ForcedWithdrawalStatus" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getLockDetails", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "", + type: "uint8", + internalType: "enum ResetPeriod" + }, + { + name: "", + type: "uint8", + internalType: "enum Scope" + }, + { + name: "", + type: "bytes12", + internalType: "bytes12" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getRequiredWithdrawalFallbackStipends", + inputs: [], + outputs: [ + { + name: "nativeTokenStipend", + type: "uint256", + internalType: "uint256" + }, + { + name: "erc20TokenStipend", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "hasConsumedAllocatorNonce", + inputs: [ + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocator", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isOperator", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address" + }, + { + name: "spender", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "status", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isRegistered", + inputs: [ + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "isActive", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "multichainClaim", + inputs: [ + { + name: "claimPayload", + type: "tuple", + internalType: "struct MultichainClaim", + components: [ + { + name: "allocatorData", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint256", + internalType: "uint256" + }, + { + name: "witness", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "witnessTypestring", + type: "string", + internalType: "string" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "claimants", + type: "tuple[]", + internalType: "struct Component[]", + components: [ + { + name: "claimant", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "name", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "string", + internalType: "string" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string" + } + ], + stateMutability: "pure" + }, + { + type: "function", + name: "register", + inputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "registerBatchFor", + inputs: [ + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "registerFor", + inputs: [ + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "bytes12", + internalType: "bytes12" + }, + { + name: "", + type: "address", + internalType: "address" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "registerMultichainFor", + inputs: [ + { + name: "typehash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "uint256", + internalType: "uint256" + }, + { + name: "", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "notarizedChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "sponsorSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "claimHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "registerMultiple", + inputs: [ + { + name: "claimHashesAndTypehashes", + type: "bytes32[2][]", + internalType: "bytes32[2][]" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "scheduleEmissaryAssignment", + inputs: [ + { + name: "lockTag", + type: "bytes12", + internalType: "bytes12" + } + ], + outputs: [ + { + name: "emissaryAssignmentAvailableAt", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "setOperator", + inputs: [ + { + name: "operator", + type: "address", + internalType: "address" + }, + { + name: "approved", + type: "bool", + internalType: "bool" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4" + } + ], + outputs: [ + { + name: "result", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "symbol", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "string", + internalType: "string" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "tokenURI", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "string", + internalType: "string" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address" + }, + { + name: "to", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "payable" + }, + { + type: "event", + name: "AllocatorRegistered", + inputs: [ + { + name: "allocatorId", + type: "uint96", + indexed: false, + internalType: "uint96" + }, + { + name: "allocator", + type: "address", + indexed: false, + internalType: "address" + } + ], + anonymous: false + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "id", + type: "uint256", + indexed: true, + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "Claim", + inputs: [ + { + name: "sponsor", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "arbiter", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "claimHash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "nonce", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "CompactRegistered", + inputs: [ + { + name: "sponsor", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "claimHash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "typehash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "EmissaryAssigned", + inputs: [ + { + name: "sponsor", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + indexed: true, + internalType: "bytes12" + }, + { + name: "emissary", + type: "address", + indexed: true, + internalType: "address" + } + ], + anonymous: false + }, + { + type: "event", + name: "EmissaryAssignmentScheduled", + inputs: [ + { + name: "sponsor", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "lockTag", + type: "bytes12", + indexed: true, + internalType: "bytes12" + }, + { + name: "assignableAt", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "ForcedWithdrawalStatusUpdated", + inputs: [ + { + name: "account", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "id", + type: "uint256", + indexed: true, + internalType: "uint256" + }, + { + name: "activating", + type: "bool", + indexed: false, + internalType: "bool" + }, + { + name: "withdrawableAt", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "NonceConsumedDirectly", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "OperatorSet", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "operator", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "approved", + type: "bool", + indexed: false, + internalType: "bool" + } + ], + anonymous: false + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "by", + type: "address", + indexed: false, + internalType: "address" + }, + { + name: "from", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "id", + type: "uint256", + indexed: true, + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "error", + name: "AllocatedAmountExceeded", + inputs: [ + { + name: "allocatedAmount", + type: "uint256", + internalType: "uint256" + }, + { + name: "providedAmount", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "BalanceOverflow", + inputs: [] + }, + { + type: "error", + name: "ChainIndexOutOfRange", + inputs: [] + }, + { + type: "error", + name: "EmissaryAssignmentUnavailable", + inputs: [ + { + name: "assignableAt", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "Expired", + inputs: [ + { + name: "expiration", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "ForcedWithdrawalAlreadyDisabled", + inputs: [ + { + name: "account", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "ForcedWithdrawalFailed", + inputs: [] + }, + { + type: "error", + name: "InconsistentAllocators", + inputs: [] + }, + { + type: "error", + name: "InsufficientBalance", + inputs: [] + }, + { + type: "error", + name: "InsufficientPermission", + inputs: [] + }, + { + type: "error", + name: "InvalidAllocation", + inputs: [ + { + name: "allocator", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "InvalidBatchAllocation", + inputs: [] + }, + { + type: "error", + name: "InvalidBatchDepositStructure", + inputs: [] + }, + { + type: "error", + name: "InvalidDepositBalanceChange", + inputs: [] + }, + { + type: "error", + name: "InvalidDepositTokenOrdering", + inputs: [] + }, + { + type: "error", + name: "InvalidEmissaryAssignment", + inputs: [] + }, + { + type: "error", + name: "InvalidLockTag", + inputs: [] + }, + { + type: "error", + name: "InvalidRegistrationProof", + inputs: [ + { + name: "allocator", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "InvalidScope", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "InvalidSignature", + inputs: [] + }, + { + type: "error", + name: "InvalidToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "NoIdsAndAmountsProvided", + inputs: [] + }, + { + type: "error", + name: "Permit2CallFailed", + inputs: [] + }, + { + type: "error", + name: "PrematureWithdrawal", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "ReentrantCall", + inputs: [ + { + name: "existingCaller", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "TStoreAlreadyActivated", + inputs: [] + }, + { + type: "error", + name: "TStoreNotSupported", + inputs: [] + }, + { + type: "error", + name: "TloadTestContractDeploymentFailed", + inputs: [] + }, + { + type: "error", + name: "UnallocatedTransfer", + inputs: [ + { + name: "operator", + type: "address", + internalType: "address" + }, + { + name: "from", + type: "address", + internalType: "address" + }, + { + name: "to", + type: "address", + internalType: "address" + }, + { + name: "id", + type: "uint256", + internalType: "uint256" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + } + ] + } ] as const; diff --git a/src/lib/abi/erc20.ts b/src/lib/abi/erc20.ts index fe07ae2..f7565b5 100644 --- a/src/lib/abi/erc20.ts +++ b/src/lib/abi/erc20.ts @@ -1,222 +1,222 @@ export const ERC20_ABI = [ - { - constant: true, - inputs: [], - name: "name", - outputs: [ - { - name: "", - type: "string" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - constant: false, - inputs: [ - { - name: "_spender", - type: "address" - }, - { - name: "_value", - type: "uint256" - } - ], - name: "approve", - outputs: [ - { - name: "", - type: "bool" - } - ], - payable: false, - stateMutability: "nonpayable", - type: "function" - }, - { - constant: true, - inputs: [], - name: "totalSupply", - outputs: [ - { - name: "", - type: "uint256" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - constant: false, - inputs: [ - { - name: "_from", - type: "address" - }, - { - name: "_to", - type: "address" - }, - { - name: "_value", - type: "uint256" - } - ], - name: "transferFrom", - outputs: [ - { - name: "", - type: "bool" - } - ], - payable: false, - stateMutability: "nonpayable", - type: "function" - }, - { - constant: true, - inputs: [], - name: "decimals", - outputs: [ - { - name: "", - type: "uint8" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - constant: true, - inputs: [ - { - name: "_owner", - type: "address" - } - ], - name: "balanceOf", - outputs: [ - { - name: "balance", - type: "uint256" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - constant: true, - inputs: [], - name: "symbol", - outputs: [ - { - name: "", - type: "string" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - constant: false, - inputs: [ - { - name: "_to", - type: "address" - }, - { - name: "_value", - type: "uint256" - } - ], - name: "transfer", - outputs: [ - { - name: "", - type: "bool" - } - ], - payable: false, - stateMutability: "nonpayable", - type: "function" - }, - { - constant: true, - inputs: [ - { - name: "_owner", - type: "address" - }, - { - name: "_spender", - type: "address" - } - ], - name: "allowance", - outputs: [ - { - name: "", - type: "uint256" - } - ], - payable: false, - stateMutability: "view", - type: "function" - }, - { - payable: true, - stateMutability: "payable", - type: "fallback" - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: "owner", - type: "address" - }, - { - indexed: true, - name: "spender", - type: "address" - }, - { - indexed: false, - name: "value", - type: "uint256" - } - ], - name: "Approval", - type: "event" - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: "from", - type: "address" - }, - { - indexed: true, - name: "to", - type: "address" - }, - { - indexed: false, - name: "value", - type: "uint256" - } - ], - name: "Transfer", - type: "event" - } + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address" + }, + { + name: "_value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address" + }, + { + name: "_to", + type: "address" + }, + { + name: "_value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address" + }, + { + name: "_value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address" + }, + { + name: "_spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + payable: true, + stateMutability: "payable", + type: "fallback" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address" + }, + { + indexed: true, + name: "spender", + type: "address" + }, + { + indexed: false, + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address" + }, + { + indexed: true, + name: "to", + type: "address" + }, + { + indexed: false, + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + } ] as const; diff --git a/src/lib/abi/escrow.ts b/src/lib/abi/escrow.ts index 61a0992..ae77c24 100644 --- a/src/lib/abi/escrow.ts +++ b/src/lib/abi/escrow.ts @@ -1,1409 +1,1409 @@ export const SETTLER_ESCROW_ABI = [ - { - type: "constructor", - inputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "DOMAIN_SEPARATOR", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { - name: "fields", - type: "bytes1", - internalType: "bytes1" - }, - { - name: "name", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "string", - internalType: "string" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "verifyingContract", - type: "address", - internalType: "address" - }, - { - name: "salt", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "finalise", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "finaliseWithSignature", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - }, - { - name: "orderOwnerSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "open", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "openFor", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "openForAndFinalise", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - }, - { - name: "destination", - type: "address", - internalType: "address" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "orderIdentifier", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "orderStatus", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum InputSettlerEscrow.OrderStatus" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "purchaseOrder", - inputs: [ - { - name: "orderPurchase", - type: "tuple", - internalType: "struct OrderPurchase", - components: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "destination", - type: "address", - internalType: "address" - }, - { - name: "callData", - type: "bytes", - internalType: "bytes" - }, - { - name: "discount", - type: "uint64", - internalType: "uint64" - }, - { - name: "timeToBuy", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "orderSolvedByIdentifier", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "purchaser", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "expiryTimestamp", - type: "uint256", - internalType: "uint256" - }, - { - name: "solverSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "purchasedOrders", - inputs: [ - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "lastOrderTimestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "purchaser", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "refund", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "EIP712DomainChanged", - inputs: [], - anonymous: false - }, - { - type: "event", - name: "Finalised", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "destination", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "Open", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "order", - type: "tuple", - indexed: false, - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - } - ], - anonymous: false - }, - { - type: "event", - name: "OrderPurchased", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "purchaser", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "Refunded", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "AlreadyPurchased", - inputs: [] - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "CodeSize0", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "Expired", - inputs: [] - }, - { - type: "error", - name: "FillDeadlineAfterExpiry", - inputs: [ - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "FillDeadlineAfterExpiry", - inputs: [ - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "GovernanceFeeChangeNotReady", - inputs: [] - }, - { - type: "error", - name: "GovernanceFeeTooHigh", - inputs: [] - }, - { - type: "error", - name: "HasDirtyBits", - inputs: [] - }, - { - type: "error", - name: "InvalidOrderStatus", - inputs: [] - }, - { - type: "error", - name: "InvalidPurchaser", - inputs: [] - }, - { - type: "error", - name: "InvalidShortString", - inputs: [] - }, - { - type: "error", - name: "InvalidSigner", - inputs: [] - }, - { - type: "error", - name: "InvalidTimestampLength", - inputs: [] - }, - { - type: "error", - name: "NoDestination", - inputs: [] - }, - { - type: "error", - name: "NotOrderOwner", - inputs: [] - }, - { - type: "error", - name: "OrderIdMismatch", - inputs: [ - { - name: "provided", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "computed", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "ReentrancyDetected", - inputs: [] - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "SignatureAndInputsNotEqual", - inputs: [] - }, - { - type: "error", - name: "SignatureNotSupported", - inputs: [ - { - name: "", - type: "bytes1", - internalType: "bytes1" - } - ] - }, - { - type: "error", - name: "StringTooLong", - inputs: [ - { - name: "str", - type: "string", - internalType: "string" - } - ] - }, - { - type: "error", - name: "TimestampNotPassed", - inputs: [] - }, - { - type: "error", - name: "TimestampPassed", - inputs: [] - }, - { - type: "error", - name: "UnexpectedCaller", - inputs: [ - { - name: "expectedCaller", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "WrongChain", - inputs: [ - { - name: "expected", - type: "uint256", - internalType: "uint256" - }, - { - name: "actual", - type: "uint256", - internalType: "uint256" - } - ] - } + { + type: "constructor", + inputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "eip712Domain", + inputs: [], + outputs: [ + { + name: "fields", + type: "bytes1", + internalType: "bytes1" + }, + { + name: "name", + type: "string", + internalType: "string" + }, + { + name: "version", + type: "string", + internalType: "string" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "verifyingContract", + type: "address", + internalType: "address" + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "extensions", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "finalise", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "finaliseWithSignature", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + }, + { + name: "orderOwnerSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "open", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "openFor", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "openForAndFinalise", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + }, + { + name: "destination", + type: "address", + internalType: "address" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "orderIdentifier", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "orderStatus", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum InputSettlerEscrow.OrderStatus" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "purchaseOrder", + inputs: [ + { + name: "orderPurchase", + type: "tuple", + internalType: "struct OrderPurchase", + components: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "destination", + type: "address", + internalType: "address" + }, + { + name: "callData", + type: "bytes", + internalType: "bytes" + }, + { + name: "discount", + type: "uint64", + internalType: "uint64" + }, + { + name: "timeToBuy", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "orderSolvedByIdentifier", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "purchaser", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "expiryTimestamp", + type: "uint256", + internalType: "uint256" + }, + { + name: "solverSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "purchasedOrders", + inputs: [ + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "lastOrderTimestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "purchaser", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "refund", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "event", + name: "EIP712DomainChanged", + inputs: [], + anonymous: false + }, + { + type: "event", + name: "Finalised", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "destination", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "Open", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "order", + type: "tuple", + indexed: false, + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + } + ], + anonymous: false + }, + { + type: "event", + name: "OrderPurchased", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "purchaser", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "Refunded", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "AlreadyPurchased", + inputs: [] + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "CodeSize0", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "Expired", + inputs: [] + }, + { + type: "error", + name: "FillDeadlineAfterExpiry", + inputs: [ + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "FillDeadlineAfterExpiry", + inputs: [ + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "GovernanceFeeChangeNotReady", + inputs: [] + }, + { + type: "error", + name: "GovernanceFeeTooHigh", + inputs: [] + }, + { + type: "error", + name: "HasDirtyBits", + inputs: [] + }, + { + type: "error", + name: "InvalidOrderStatus", + inputs: [] + }, + { + type: "error", + name: "InvalidPurchaser", + inputs: [] + }, + { + type: "error", + name: "InvalidShortString", + inputs: [] + }, + { + type: "error", + name: "InvalidSigner", + inputs: [] + }, + { + type: "error", + name: "InvalidTimestampLength", + inputs: [] + }, + { + type: "error", + name: "NoDestination", + inputs: [] + }, + { + type: "error", + name: "NotOrderOwner", + inputs: [] + }, + { + type: "error", + name: "OrderIdMismatch", + inputs: [ + { + name: "provided", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "computed", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "ReentrancyDetected", + inputs: [] + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "SignatureAndInputsNotEqual", + inputs: [] + }, + { + type: "error", + name: "SignatureNotSupported", + inputs: [ + { + name: "", + type: "bytes1", + internalType: "bytes1" + } + ] + }, + { + type: "error", + name: "StringTooLong", + inputs: [ + { + name: "str", + type: "string", + internalType: "string" + } + ] + }, + { + type: "error", + name: "TimestampNotPassed", + inputs: [] + }, + { + type: "error", + name: "TimestampPassed", + inputs: [] + }, + { + type: "error", + name: "UnexpectedCaller", + inputs: [ + { + name: "expectedCaller", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "WrongChain", + inputs: [ + { + name: "expected", + type: "uint256", + internalType: "uint256" + }, + { + name: "actual", + type: "uint256", + internalType: "uint256" + } + ] + } ] as const; diff --git a/src/lib/abi/multichain_compact.ts b/src/lib/abi/multichain_compact.ts index a4f7ef8..96cb155 100644 --- a/src/lib/abi/multichain_compact.ts +++ b/src/lib/abi/multichain_compact.ts @@ -1,624 +1,624 @@ export const MULTICHAIN_SETTLER_COMPACT_ABI = [ - { - type: "constructor", - inputs: [ - { - name: "compact", - type: "address", - internalType: "address" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "COMPACT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract TheCompact" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "DOMAIN_SEPARATOR", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { - name: "fields", - type: "bytes1", - internalType: "bytes1" - }, - { - name: "name", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "string", - internalType: "string" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "verifyingContract", - type: "address", - internalType: "address" - }, - { - name: "salt", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "finalise", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "finaliseWithSignature", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - }, - { - name: "orderOwnerSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "orderIdentifier", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "event", - name: "EIP712DomainChanged", - inputs: [], - anonymous: false - }, - { - type: "event", - name: "Finalised", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "destination", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "FillDeadlineAfterExpiry", - inputs: [ - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "FilledTooLate", - inputs: [ - { - name: "expected", - type: "uint32", - internalType: "uint32" - }, - { - name: "actual", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "InvalidShortString", - inputs: [] - }, - { - type: "error", - name: "InvalidSigner", - inputs: [] - }, - { - type: "error", - name: "InvalidTimestampLength", - inputs: [] - }, - { - type: "error", - name: "NoDestination", - inputs: [] - }, - { - type: "error", - name: "StringTooLong", - inputs: [ - { - name: "str", - type: "string", - internalType: "string" - } - ] - }, - { - type: "error", - name: "TimestampNotPassed", - inputs: [] - }, - { - type: "error", - name: "TimestampPassed", - inputs: [] - }, - { - type: "error", - name: "UnexpectedCaller", - inputs: [ - { - name: "expectedCaller", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "UserCannotBeSettler", - inputs: [] - }, - { - type: "error", - name: "WrongChain", - inputs: [ - { - name: "expected", - type: "uint256", - internalType: "uint256" - }, - { - name: "actual", - type: "uint256", - internalType: "uint256" - } - ] - } + { + type: "constructor", + inputs: [ + { + name: "compact", + type: "address", + internalType: "address" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "COMPACT", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract TheCompact" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "eip712Domain", + inputs: [], + outputs: [ + { + name: "fields", + type: "bytes1", + internalType: "bytes1" + }, + { + name: "name", + type: "string", + internalType: "string" + }, + { + name: "version", + type: "string", + internalType: "string" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "verifyingContract", + type: "address", + internalType: "address" + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "extensions", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "finalise", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "finaliseWithSignature", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + }, + { + name: "orderOwnerSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "orderIdentifier", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "event", + name: "EIP712DomainChanged", + inputs: [], + anonymous: false + }, + { + type: "event", + name: "Finalised", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "destination", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "FillDeadlineAfterExpiry", + inputs: [ + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "FilledTooLate", + inputs: [ + { + name: "expected", + type: "uint32", + internalType: "uint32" + }, + { + name: "actual", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "InvalidShortString", + inputs: [] + }, + { + type: "error", + name: "InvalidSigner", + inputs: [] + }, + { + type: "error", + name: "InvalidTimestampLength", + inputs: [] + }, + { + type: "error", + name: "NoDestination", + inputs: [] + }, + { + type: "error", + name: "StringTooLong", + inputs: [ + { + name: "str", + type: "string", + internalType: "string" + } + ] + }, + { + type: "error", + name: "TimestampNotPassed", + inputs: [] + }, + { + type: "error", + name: "TimestampPassed", + inputs: [] + }, + { + type: "error", + name: "UnexpectedCaller", + inputs: [ + { + name: "expectedCaller", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "UserCannotBeSettler", + inputs: [] + }, + { + type: "error", + name: "WrongChain", + inputs: [ + { + name: "expected", + type: "uint256", + internalType: "uint256" + }, + { + name: "actual", + type: "uint256", + internalType: "uint256" + } + ] + } ] as const; diff --git a/src/lib/abi/multichain_escrow.ts b/src/lib/abi/multichain_escrow.ts index 892b962..7ad2a6d 100644 --- a/src/lib/abi/multichain_escrow.ts +++ b/src/lib/abi/multichain_escrow.ts @@ -1,1051 +1,1051 @@ export const MULTICHAIN_SETTLER_ESCROW_ABI = [ - { - type: "constructor", - inputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "DOMAIN_SEPARATOR", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { - name: "fields", - type: "bytes1", - internalType: "bytes1" - }, - { - name: "name", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "string", - internalType: "string" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "verifyingContract", - type: "address", - internalType: "address" - }, - { - name: "salt", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "finalise", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "finaliseWithSignature", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - }, - { - name: "orderOwnerSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "open", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "openFor", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - }, - { - name: "sponsor", - type: "address", - internalType: "address" - }, - { - name: "signature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "orderIdentifier", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "orderStatus", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum InputSettlerMultichainEscrow.OrderStatus" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "refund", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct MultichainOrderComponent", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIdField", - type: "uint256", - internalType: "uint256" - }, - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "additionalChains", - type: "bytes32[]", - internalType: "bytes32[]" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "EIP712DomainChanged", - inputs: [], - anonymous: false - }, - { - type: "event", - name: "Finalised", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "destination", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "Open", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "order", - type: "bytes", - indexed: false, - internalType: "bytes" - } - ], - anonymous: false - }, - { - type: "event", - name: "Refunded", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "ChainIndexOutOfRange", - inputs: [ - { - name: "chainIndex", - type: "uint256", - internalType: "uint256" - }, - { - name: "numSegments", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "CodeSize0", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "FillDeadlineAfterExpiry", - inputs: [ - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "FilledTooLate", - inputs: [ - { - name: "expected", - type: "uint32", - internalType: "uint32" - }, - { - name: "actual", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "HasDirtyBits", - inputs: [] - }, - { - type: "error", - name: "InvalidOrderStatus", - inputs: [] - }, - { - type: "error", - name: "InvalidShortString", - inputs: [] - }, - { - type: "error", - name: "InvalidSigner", - inputs: [] - }, - { - type: "error", - name: "InvalidTimestampLength", - inputs: [] - }, - { - type: "error", - name: "NoDestination", - inputs: [] - }, - { - type: "error", - name: "OrderIdMismatch", - inputs: [ - { - name: "provided", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "computed", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "ReentrancyDetected", - inputs: [] - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "SignatureAndInputsNotEqual", - inputs: [] - }, - { - type: "error", - name: "SignatureNotSupported", - inputs: [ - { - name: "", - type: "bytes1", - internalType: "bytes1" - } - ] - }, - { - type: "error", - name: "StringTooLong", - inputs: [ - { - name: "str", - type: "string", - internalType: "string" - } - ] - }, - { - type: "error", - name: "TimestampNotPassed", - inputs: [] - }, - { - type: "error", - name: "TimestampPassed", - inputs: [] - }, - { - type: "error", - name: "UnexpectedCaller", - inputs: [ - { - name: "expectedCaller", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "WrongChain", - inputs: [ - { - name: "expected", - type: "uint256", - internalType: "uint256" - }, - { - name: "actual", - type: "uint256", - internalType: "uint256" - } - ] - } + { + type: "constructor", + inputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "eip712Domain", + inputs: [], + outputs: [ + { + name: "fields", + type: "bytes1", + internalType: "bytes1" + }, + { + name: "name", + type: "string", + internalType: "string" + }, + { + name: "version", + type: "string", + internalType: "string" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "verifyingContract", + type: "address", + internalType: "address" + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "extensions", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "finalise", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "finaliseWithSignature", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + }, + { + name: "orderOwnerSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "open", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "openFor", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + }, + { + name: "sponsor", + type: "address", + internalType: "address" + }, + { + name: "signature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "orderIdentifier", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "orderStatus", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum InputSettlerMultichainEscrow.OrderStatus" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "refund", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct MultichainOrderComponent", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIdField", + type: "uint256", + internalType: "uint256" + }, + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "additionalChains", + type: "bytes32[]", + internalType: "bytes32[]" + } + ] + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "event", + name: "EIP712DomainChanged", + inputs: [], + anonymous: false + }, + { + type: "event", + name: "Finalised", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "destination", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "Open", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "order", + type: "bytes", + indexed: false, + internalType: "bytes" + } + ], + anonymous: false + }, + { + type: "event", + name: "Refunded", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "ChainIndexOutOfRange", + inputs: [ + { + name: "chainIndex", + type: "uint256", + internalType: "uint256" + }, + { + name: "numSegments", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "CodeSize0", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "FillDeadlineAfterExpiry", + inputs: [ + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "FilledTooLate", + inputs: [ + { + name: "expected", + type: "uint32", + internalType: "uint32" + }, + { + name: "actual", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "HasDirtyBits", + inputs: [] + }, + { + type: "error", + name: "InvalidOrderStatus", + inputs: [] + }, + { + type: "error", + name: "InvalidShortString", + inputs: [] + }, + { + type: "error", + name: "InvalidSigner", + inputs: [] + }, + { + type: "error", + name: "InvalidTimestampLength", + inputs: [] + }, + { + type: "error", + name: "NoDestination", + inputs: [] + }, + { + type: "error", + name: "OrderIdMismatch", + inputs: [ + { + name: "provided", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "computed", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "ReentrancyDetected", + inputs: [] + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "SignatureAndInputsNotEqual", + inputs: [] + }, + { + type: "error", + name: "SignatureNotSupported", + inputs: [ + { + name: "", + type: "bytes1", + internalType: "bytes1" + } + ] + }, + { + type: "error", + name: "StringTooLong", + inputs: [ + { + name: "str", + type: "string", + internalType: "string" + } + ] + }, + { + type: "error", + name: "TimestampNotPassed", + inputs: [] + }, + { + type: "error", + name: "TimestampPassed", + inputs: [] + }, + { + type: "error", + name: "UnexpectedCaller", + inputs: [ + { + name: "expectedCaller", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "WrongChain", + inputs: [ + { + name: "expected", + type: "uint256", + internalType: "uint256" + }, + { + name: "actual", + type: "uint256", + internalType: "uint256" + } + ] + } ] as const; diff --git a/src/lib/abi/outputsettler.ts b/src/lib/abi/outputsettler.ts index ac4a130..d16760c 100644 --- a/src/lib/abi/outputsettler.ts +++ b/src/lib/abi/outputsettler.ts @@ -1,631 +1,631 @@ export const COIN_FILLER_ABI = [ - { - type: "function", - name: "efficientRequireProven", - inputs: [ - { - name: "proofSeries", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "fill", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "output", - type: "tuple", - internalType: "struct MandateOutput", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "fillDeadline", - type: "uint48", - internalType: "uint48" - }, - { - name: "fillerData", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "fillRecordHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "fillOrderOutputs", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "fillDeadline", - type: "uint48", - internalType: "uint48" - }, - { - name: "fillerData", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "getFillRecord", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "output", - type: "tuple", - internalType: "struct MandateOutput", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ], - outputs: [ - { - name: "payloadHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getFillRecord", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "outputHash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "payloadHash", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "hasAttested", - inputs: [ - { - name: "payloads", - type: "bytes[]", - internalType: "bytes[]" - } - ], - outputs: [ - { - name: "accumulator", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isProven", - inputs: [ - { - name: "remoteChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "remoteOracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "dataHash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "setAttestation", - inputs: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "output", - type: "tuple", - internalType: "struct MandateOutput", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "OutputFilled", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "timestamp", - type: "uint32", - indexed: false, - internalType: "uint32" - }, - { - name: "output", - type: "tuple", - indexed: false, - internalType: "struct MandateOutput", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - }, - { - name: "finalAmount", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "OutputProven", - inputs: [ - { - name: "chainid", - type: "uint256", - indexed: false, - internalType: "uint256" - }, - { - name: "remoteIdentifier", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "payloadHash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "AlreadyFilled", - inputs: [] - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "FailedCall", - inputs: [] - }, - { - type: "error", - name: "FillDeadline", - inputs: [] - }, - { - type: "error", - name: "HasDirtyBits", - inputs: [] - }, - { - type: "error", - name: "InsufficientBalance", - inputs: [ - { - name: "balance", - type: "uint256", - internalType: "uint256" - }, - { - name: "needed", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "InvalidAttestation", - inputs: [ - { - name: "storedFillRecordHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "givenFillRecordHash", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "NotDivisible", - inputs: [ - { - name: "value", - type: "uint256", - internalType: "uint256" - }, - { - name: "divisor", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "NotProven", - inputs: [] - }, - { - type: "error", - name: "PayloadTooSmall", - inputs: [] - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "WrongChain", - inputs: [ - { - name: "expected", - type: "uint256", - internalType: "uint256" - }, - { - name: "actual", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "WrongOutputOracle", - inputs: [ - { - name: "addressThis", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "expected", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "WrongOutputSettler", - inputs: [ - { - name: "addressThis", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "expected", - type: "bytes32", - internalType: "bytes32" - } - ] - } + { + type: "function", + name: "efficientRequireProven", + inputs: [ + { + name: "proofSeries", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "view" + }, + { + type: "function", + name: "fill", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "output", + type: "tuple", + internalType: "struct MandateOutput", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "fillDeadline", + type: "uint48", + internalType: "uint48" + }, + { + name: "fillerData", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "fillRecordHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "fillOrderOutputs", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "fillDeadline", + type: "uint48", + internalType: "uint48" + }, + { + name: "fillerData", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "getFillRecord", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "output", + type: "tuple", + internalType: "struct MandateOutput", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ], + outputs: [ + { + name: "payloadHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getFillRecord", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "outputHash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "payloadHash", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "hasAttested", + inputs: [ + { + name: "payloads", + type: "bytes[]", + internalType: "bytes[]" + } + ], + outputs: [ + { + name: "accumulator", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isProven", + inputs: [ + { + name: "remoteChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "remoteOracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "dataHash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "setAttestation", + inputs: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "output", + type: "tuple", + internalType: "struct MandateOutput", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "event", + name: "OutputFilled", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "timestamp", + type: "uint32", + indexed: false, + internalType: "uint32" + }, + { + name: "output", + type: "tuple", + indexed: false, + internalType: "struct MandateOutput", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + }, + { + name: "finalAmount", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "OutputProven", + inputs: [ + { + name: "chainid", + type: "uint256", + indexed: false, + internalType: "uint256" + }, + { + name: "remoteIdentifier", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "payloadHash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "AlreadyFilled", + inputs: [] + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "FailedCall", + inputs: [] + }, + { + type: "error", + name: "FillDeadline", + inputs: [] + }, + { + type: "error", + name: "HasDirtyBits", + inputs: [] + }, + { + type: "error", + name: "InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256" + }, + { + name: "needed", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "InvalidAttestation", + inputs: [ + { + name: "storedFillRecordHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "givenFillRecordHash", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "NotDivisible", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256" + }, + { + name: "divisor", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "NotProven", + inputs: [] + }, + { + type: "error", + name: "PayloadTooSmall", + inputs: [] + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "WrongChain", + inputs: [ + { + name: "expected", + type: "uint256", + internalType: "uint256" + }, + { + name: "actual", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "WrongOutputOracle", + inputs: [ + { + name: "addressThis", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "expected", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "WrongOutputSettler", + inputs: [ + { + name: "addressThis", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "expected", + type: "bytes32", + internalType: "bytes32" + } + ] + } ] as const; diff --git a/src/lib/abi/polymeroracle.ts b/src/lib/abi/polymeroracle.ts index 6f29738..056e211 100644 --- a/src/lib/abi/polymeroracle.ts +++ b/src/lib/abi/polymeroracle.ts @@ -1,153 +1,153 @@ export const POLYMER_ORACLE_ABI = [ - { - type: "constructor", - inputs: [ - { - name: "crossL2Prover", - type: "address", - internalType: "address" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "efficientRequireProven", - inputs: [ - { - name: "proofSeries", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "isProven", - inputs: [ - { - name: "remoteChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "remoteOracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "dataHash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "receiveMessage", - inputs: [ - { - name: "proofs", - type: "bytes[]", - internalType: "bytes[]" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "receiveMessage", - inputs: [ - { - name: "proof", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "OutputProven", - inputs: [ - { - name: "chainid", - type: "uint256", - indexed: false, - internalType: "uint256" - }, - { - name: "remoteIdentifier", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "payloadHash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "NotDivisible", - inputs: [ - { - name: "value", - type: "uint256", - internalType: "uint256" - }, - { - name: "divisor", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "NotProven", - inputs: [] - }, - { - type: "error", - name: "WrongEventSignature", - inputs: [] - } + { + type: "constructor", + inputs: [ + { + name: "crossL2Prover", + type: "address", + internalType: "address" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "efficientRequireProven", + inputs: [ + { + name: "proofSeries", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "view" + }, + { + type: "function", + name: "isProven", + inputs: [ + { + name: "remoteChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "remoteOracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "dataHash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "receiveMessage", + inputs: [ + { + name: "proofs", + type: "bytes[]", + internalType: "bytes[]" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "receiveMessage", + inputs: [ + { + name: "proof", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "event", + name: "OutputProven", + inputs: [ + { + name: "chainid", + type: "uint256", + indexed: false, + internalType: "uint256" + }, + { + name: "remoteIdentifier", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "payloadHash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "NotDivisible", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256" + }, + { + name: "divisor", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "NotProven", + inputs: [] + }, + { + type: "error", + name: "WrongEventSignature", + inputs: [] + } ] as const; diff --git a/src/lib/abi/settlercompact.ts b/src/lib/abi/settlercompact.ts index 0822b59..3c10c1d 100644 --- a/src/lib/abi/settlercompact.ts +++ b/src/lib/abi/settlercompact.ts @@ -1,838 +1,838 @@ export const SETTLER_COMPACT_ABI = [ - { - type: "constructor", - inputs: [ - { - name: "compact", - type: "address", - internalType: "address" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "COMPACT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract TheCompact" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "DOMAIN_SEPARATOR", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { - name: "fields", - type: "bytes1", - internalType: "bytes1" - }, - { - name: "name", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "string", - internalType: "string" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "verifyingContract", - type: "address", - internalType: "address" - }, - { - name: "salt", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "finalise", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "finaliseWithSignature", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "solveParams", - type: "tuple[]", - internalType: "struct InputSettlerBase.SolveParams[]", - components: [ - { - name: "timestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - name: "destination", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "call", - type: "bytes", - internalType: "bytes" - }, - { - name: "orderOwnerSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "orderIdentifier", - inputs: [ - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "purchaseOrder", - inputs: [ - { - name: "orderPurchase", - type: "tuple", - internalType: "struct OrderPurchase", - components: [ - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "destination", - type: "address", - internalType: "address" - }, - { - name: "callData", - type: "bytes", - internalType: "bytes" - }, - { - name: "discount", - type: "uint64", - internalType: "uint64" - }, - { - name: "timeToBuy", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - name: "order", - type: "tuple", - internalType: "struct StandardOrder", - components: [ - { - name: "user", - type: "address", - internalType: "address" - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256" - }, - { - name: "originChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - }, - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "inputOracle", - type: "address", - internalType: "address" - }, - { - name: "inputs", - type: "uint256[2][]", - internalType: "uint256[2][]" - }, - { - name: "outputs", - type: "tuple[]", - internalType: "struct MandateOutput[]", - components: [ - { - name: "oracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "settler", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "token", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "amount", - type: "uint256", - internalType: "uint256" - }, - { - name: "recipient", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "callbackData", - type: "bytes", - internalType: "bytes" - }, - { - name: "context", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "orderSolvedByIdentifier", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "purchaser", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "expiryTimestamp", - type: "uint256", - internalType: "uint256" - }, - { - name: "solverSignature", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "purchasedOrders", - inputs: [ - { - name: "solver", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "orderId", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "lastOrderTimestamp", - type: "uint32", - internalType: "uint32" - }, - { - name: "purchaser", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "event", - name: "EIP712DomainChanged", - inputs: [], - anonymous: false - }, - { - type: "event", - name: "Finalised", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "destination", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "OrderPurchased", - inputs: [ - { - name: "orderId", - type: "bytes32", - indexed: true, - internalType: "bytes32" - }, - { - name: "solver", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "purchaser", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "error", - name: "AlreadyPurchased", - inputs: [] - }, - { - type: "error", - name: "CallOutOfRange", - inputs: [] - }, - { - type: "error", - name: "ContextOutOfRange", - inputs: [] - }, - { - type: "error", - name: "Expired", - inputs: [] - }, - { - type: "error", - name: "FillDeadlineAfterExpiry", - inputs: [ - { - name: "fillDeadline", - type: "uint32", - internalType: "uint32" - }, - { - name: "expires", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "FilledTooLate", - inputs: [ - { - name: "expected", - type: "uint32", - internalType: "uint32" - }, - { - name: "actual", - type: "uint32", - internalType: "uint32" - } - ] - }, - { - type: "error", - name: "HasDirtyBits", - inputs: [] - }, - { - type: "error", - name: "InvalidPurchaser", - inputs: [] - }, - { - type: "error", - name: "InvalidShortString", - inputs: [] - }, - { - type: "error", - name: "InvalidSigner", - inputs: [] - }, - { - type: "error", - name: "InvalidTimestampLength", - inputs: [] - }, - { - type: "error", - name: "NoDestination", - inputs: [] - }, - { - type: "error", - name: "NotOrderOwner", - inputs: [] - }, - { - type: "error", - name: "OrderIdMismatch", - inputs: [ - { - name: "provided", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "computed", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "StringTooLong", - inputs: [ - { - name: "str", - type: "string", - internalType: "string" - } - ] - }, - { - type: "error", - name: "TimestampNotPassed", - inputs: [] - }, - { - type: "error", - name: "TimestampPassed", - inputs: [] - }, - { - type: "error", - name: "UserCannotBeSettler", - inputs: [] - }, - { - type: "error", - name: "WrongChain", - inputs: [ - { - name: "expected", - type: "uint256", - internalType: "uint256" - }, - { - name: "actual", - type: "uint256", - internalType: "uint256" - } - ] - } + { + type: "constructor", + inputs: [ + { + name: "compact", + type: "address", + internalType: "address" + } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "COMPACT", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract TheCompact" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "eip712Domain", + inputs: [], + outputs: [ + { + name: "fields", + type: "bytes1", + internalType: "bytes1" + }, + { + name: "name", + type: "string", + internalType: "string" + }, + { + name: "version", + type: "string", + internalType: "string" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "verifyingContract", + type: "address", + internalType: "address" + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "extensions", + type: "uint256[]", + internalType: "uint256[]" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "finalise", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "finaliseWithSignature", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "solveParams", + type: "tuple[]", + internalType: "struct InputSettlerBase.SolveParams[]", + components: [ + { + name: "timestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + name: "destination", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "call", + type: "bytes", + internalType: "bytes" + }, + { + name: "orderOwnerSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "orderIdentifier", + inputs: [ + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + } + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "purchaseOrder", + inputs: [ + { + name: "orderPurchase", + type: "tuple", + internalType: "struct OrderPurchase", + components: [ + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "destination", + type: "address", + internalType: "address" + }, + { + name: "callData", + type: "bytes", + internalType: "bytes" + }, + { + name: "discount", + type: "uint64", + internalType: "uint64" + }, + { + name: "timeToBuy", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + name: "order", + type: "tuple", + internalType: "struct StandardOrder", + components: [ + { + name: "user", + type: "address", + internalType: "address" + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256" + }, + { + name: "originChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + }, + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "inputOracle", + type: "address", + internalType: "address" + }, + { + name: "inputs", + type: "uint256[2][]", + internalType: "uint256[2][]" + }, + { + name: "outputs", + type: "tuple[]", + internalType: "struct MandateOutput[]", + components: [ + { + name: "oracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "settler", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "token", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "amount", + type: "uint256", + internalType: "uint256" + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "callbackData", + type: "bytes", + internalType: "bytes" + }, + { + name: "context", + type: "bytes", + internalType: "bytes" + } + ] + } + ] + }, + { + name: "orderSolvedByIdentifier", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "purchaser", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "expiryTimestamp", + type: "uint256", + internalType: "uint256" + }, + { + name: "solverSignature", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "purchasedOrders", + inputs: [ + { + name: "solver", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "orderId", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "lastOrderTimestamp", + type: "uint32", + internalType: "uint32" + }, + { + name: "purchaser", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "event", + name: "EIP712DomainChanged", + inputs: [], + anonymous: false + }, + { + type: "event", + name: "Finalised", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "destination", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "OrderPurchased", + inputs: [ + { + name: "orderId", + type: "bytes32", + indexed: true, + internalType: "bytes32" + }, + { + name: "solver", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "purchaser", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "error", + name: "AlreadyPurchased", + inputs: [] + }, + { + type: "error", + name: "CallOutOfRange", + inputs: [] + }, + { + type: "error", + name: "ContextOutOfRange", + inputs: [] + }, + { + type: "error", + name: "Expired", + inputs: [] + }, + { + type: "error", + name: "FillDeadlineAfterExpiry", + inputs: [ + { + name: "fillDeadline", + type: "uint32", + internalType: "uint32" + }, + { + name: "expires", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "FilledTooLate", + inputs: [ + { + name: "expected", + type: "uint32", + internalType: "uint32" + }, + { + name: "actual", + type: "uint32", + internalType: "uint32" + } + ] + }, + { + type: "error", + name: "HasDirtyBits", + inputs: [] + }, + { + type: "error", + name: "InvalidPurchaser", + inputs: [] + }, + { + type: "error", + name: "InvalidShortString", + inputs: [] + }, + { + type: "error", + name: "InvalidSigner", + inputs: [] + }, + { + type: "error", + name: "InvalidTimestampLength", + inputs: [] + }, + { + type: "error", + name: "NoDestination", + inputs: [] + }, + { + type: "error", + name: "NotOrderOwner", + inputs: [] + }, + { + type: "error", + name: "OrderIdMismatch", + inputs: [ + { + name: "provided", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "computed", + type: "bytes32", + internalType: "bytes32" + } + ] + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address" + } + ] + }, + { + type: "error", + name: "StringTooLong", + inputs: [ + { + name: "str", + type: "string", + internalType: "string" + } + ] + }, + { + type: "error", + name: "TimestampNotPassed", + inputs: [] + }, + { + type: "error", + name: "TimestampPassed", + inputs: [] + }, + { + type: "error", + name: "UserCannotBeSettler", + inputs: [] + }, + { + type: "error", + name: "WrongChain", + inputs: [ + { + name: "expected", + type: "uint256", + internalType: "uint256" + }, + { + name: "actual", + type: "uint256", + internalType: "uint256" + } + ] + } ] as const; diff --git a/src/lib/abi/wormholeoracle.ts b/src/lib/abi/wormholeoracle.ts index c85a185..1d0c40b 100644 --- a/src/lib/abi/wormholeoracle.ts +++ b/src/lib/abi/wormholeoracle.ts @@ -1,792 +1,792 @@ export const WROMHOLE_ORACLE_ABI = [ - { - type: "constructor", - inputs: [ - { - name: "_owner", - type: "address", - internalType: "address" - }, - { - name: "_wormhole", - type: "address", - internalType: "address" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "WORMHOLE", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract IWormhole" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "cancelOwnershipHandover", - inputs: [], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "chainId", - inputs: [], - outputs: [ - { - name: "", - type: "uint16", - internalType: "uint16" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "completeOwnershipHandover", - inputs: [ - { - name: "pendingOwner", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "efficientRequireProven", - inputs: [ - { - name: "proofSeries", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "evmChainId", - inputs: [], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getBlockChainIdToChainIdentifier", - inputs: [ - { - name: "chainId", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "messagingProtocolChainIdentifier", - type: "uint16", - internalType: "uint16" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getChainIdentifierToBlockChainId", - inputs: [ - { - name: "messagingProtocolChainIdentifier", - type: "uint16", - internalType: "uint16" - } - ], - outputs: [ - { - name: "chainId", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getCurrentGuardianSetIndex", - inputs: [], - outputs: [ - { - name: "", - type: "uint32", - internalType: "uint32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getGuardianSet", - inputs: [ - { - name: "index", - type: "uint32", - internalType: "uint32" - } - ], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct Structs.GuardianSet", - components: [ - { - name: "keys", - type: "address[]", - internalType: "address[]" - }, - { - name: "expirationTime", - type: "uint32", - internalType: "uint32" - } - ] - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getGuardianSetExpiry", - inputs: [], - outputs: [ - { - name: "", - type: "uint32", - internalType: "uint32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "governanceActionIsConsumed", - inputs: [ - { - name: "hash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "governanceChainId", - inputs: [], - outputs: [ - { - name: "", - type: "uint16", - internalType: "uint16" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "governanceContract", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isFork", - inputs: [], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isInitialized", - inputs: [ - { - name: "impl", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "isProven", - inputs: [ - { - name: "remoteChainId", - type: "uint256", - internalType: "uint256" - }, - { - name: "remoteOracle", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "dataHash", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "messageFee", - inputs: [], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextSequence", - inputs: [ - { - name: "emitter", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "result", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "ownershipHandoverExpiresAt", - inputs: [ - { - name: "pendingOwner", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "result", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "parseAndVerifyVM", - inputs: [ - { - name: "encodedVM", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "emitterChainId", - type: "uint16", - internalType: "uint16" - }, - { - name: "emitterAddress", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "payload", - type: "bytes", - internalType: "bytes" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "parseVM", - inputs: [ - { - name: "encodedVM", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "emitterChainId", - type: "uint16", - internalType: "uint16" - }, - { - name: "emitterAddress", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "guardianSetIndex", - type: "uint32", - internalType: "uint32" - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "bodyHash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "payload", - type: "bytes", - internalType: "bytes" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "quorum", - inputs: [ - { - name: "numGuardians", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [ - { - name: "numSignaturesRequiredForQuorum", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "receiveMessage", - inputs: [ - { - name: "rawMessage", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "requestOwnershipHandover", - inputs: [], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "setChainMap", - inputs: [ - { - name: "messagingProtocolChainIdentifier", - type: "uint16", - internalType: "uint16" - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "submit", - inputs: [ - { - name: "proofSource", - type: "address", - internalType: "address" - }, - { - name: "payloads", - type: "bytes[]", - internalType: "bytes[]" - } - ], - outputs: [ - { - name: "refund", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "payable" - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "verifySignatures", - inputs: [ - { - name: "hash", - type: "bytes32", - internalType: "bytes32" - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes" - }, - { - name: "guardianSet", - type: "tuple", - internalType: "struct Structs.GuardianSet", - components: [ - { - name: "keys", - type: "address[]", - internalType: "address[]" - }, - { - name: "expirationTime", - type: "uint32", - internalType: "uint32" - } - ] - } - ], - outputs: [], - stateMutability: "pure" - }, - { - type: "event", - name: "MapMessagingProtocolIdentifierToChainId", - inputs: [ - { - name: "messagingProtocolIdentifier", - type: "uint16", - indexed: false, - internalType: "uint16" - }, - { - name: "chainId", - type: "uint256", - indexed: false, - internalType: "uint256" - } - ], - anonymous: false - }, - { - type: "event", - name: "OutputProven", - inputs: [ - { - name: "chainid", - type: "uint256", - indexed: false, - internalType: "uint256" - }, - { - name: "remoteIdentifier", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "application", - type: "bytes32", - indexed: false, - internalType: "bytes32" - }, - { - name: "payloadHash", - type: "bytes32", - indexed: false, - internalType: "bytes32" - } - ], - anonymous: false - }, - { - type: "event", - name: "OwnershipHandoverCanceled", - inputs: [ - { - name: "pendingOwner", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "OwnershipHandoverRequested", - inputs: [ - { - name: "pendingOwner", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "oldOwner", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "error", - name: "AlreadyInitialized", - inputs: [] - }, - { - type: "error", - name: "AlreadySet", - inputs: [] - }, - { - type: "error", - name: "GuardianIndexOutOfBounds", - inputs: [] - }, - { - type: "error", - name: "GuardianSetExpired", - inputs: [] - }, - { - type: "error", - name: "InvalidGuardianSet", - inputs: [] - }, - { - type: "error", - name: "InvalidSignatory", - inputs: [] - }, - { - type: "error", - name: "NewOwnerIsZeroAddress", - inputs: [] - }, - { - type: "error", - name: "NoHandoverRequest", - inputs: [] - }, - { - type: "error", - name: "NoQuorum", - inputs: [] - }, - { - type: "error", - name: "NotAllPayloadsValid", - inputs: [] - }, - { - type: "error", - name: "NotDivisible", - inputs: [ - { - name: "value", - type: "uint256", - internalType: "uint256" - }, - { - name: "divisor", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "NotProven", - inputs: [] - }, - { - type: "error", - name: "SignatureIndicesNotAscending", - inputs: [] - }, - { - type: "error", - name: "TooLargePayload", - inputs: [ - { - name: "size", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "TooManyGuardians", - inputs: [] - }, - { - type: "error", - name: "TooManyPayloads", - inputs: [ - { - name: "size", - type: "uint256", - internalType: "uint256" - } - ] - }, - { - type: "error", - name: "Unauthorized", - inputs: [] - }, - { - type: "error", - name: "VMSignatureInvalid", - inputs: [] - }, - { - type: "error", - name: "VMVersionIncompatible", - inputs: [] - }, - { - type: "error", - name: "WormholeStateAddressZero", - inputs: [] - }, - { - type: "error", - name: "ZeroValue", - inputs: [] - } + { + type: "constructor", + inputs: [ + { + name: "_owner", + type: "address", + internalType: "address" + }, + { + name: "_wormhole", + type: "address", + internalType: "address" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "WORMHOLE", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IWormhole" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "cancelOwnershipHandover", + inputs: [], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "chainId", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "completeOwnershipHandover", + inputs: [ + { + name: "pendingOwner", + type: "address", + internalType: "address" + } + ], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "efficientRequireProven", + inputs: [ + { + name: "proofSeries", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "view" + }, + { + type: "function", + name: "evmChainId", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getBlockChainIdToChainIdentifier", + inputs: [ + { + name: "chainId", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "messagingProtocolChainIdentifier", + type: "uint16", + internalType: "uint16" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getChainIdentifierToBlockChainId", + inputs: [ + { + name: "messagingProtocolChainIdentifier", + type: "uint16", + internalType: "uint16" + } + ], + outputs: [ + { + name: "chainId", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getCurrentGuardianSetIndex", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getGuardianSet", + inputs: [ + { + name: "index", + type: "uint32", + internalType: "uint32" + } + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct Structs.GuardianSet", + components: [ + { + name: "keys", + type: "address[]", + internalType: "address[]" + }, + { + name: "expirationTime", + type: "uint32", + internalType: "uint32" + } + ] + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getGuardianSetExpiry", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "governanceActionIsConsumed", + inputs: [ + { + name: "hash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "governanceChainId", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "governanceContract", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isFork", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isInitialized", + inputs: [ + { + name: "impl", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "isProven", + inputs: [ + { + name: "remoteChainId", + type: "uint256", + internalType: "uint256" + }, + { + name: "remoteOracle", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "dataHash", + type: "bytes32", + internalType: "bytes32" + } + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "messageFee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "nextSequence", + inputs: [ + { + name: "emitter", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "result", + type: "address", + internalType: "address" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "ownershipHandoverExpiresAt", + inputs: [ + { + name: "pendingOwner", + type: "address", + internalType: "address" + } + ], + outputs: [ + { + name: "result", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "parseAndVerifyVM", + inputs: [ + { + name: "encodedVM", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "emitterChainId", + type: "uint16", + internalType: "uint16" + }, + { + name: "emitterAddress", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "payload", + type: "bytes", + internalType: "bytes" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "parseVM", + inputs: [ + { + name: "encodedVM", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [ + { + name: "emitterChainId", + type: "uint16", + internalType: "uint16" + }, + { + name: "emitterAddress", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "guardianSetIndex", + type: "uint32", + internalType: "uint32" + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "bodyHash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "payload", + type: "bytes", + internalType: "bytes" + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "quorum", + inputs: [ + { + name: "numGuardians", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [ + { + name: "numSignaturesRequiredForQuorum", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "pure" + }, + { + type: "function", + name: "receiveMessage", + inputs: [ + { + name: "rawMessage", + type: "bytes", + internalType: "bytes" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "requestOwnershipHandover", + inputs: [], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "setChainMap", + inputs: [ + { + name: "messagingProtocolChainIdentifier", + type: "uint16", + internalType: "uint16" + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256" + } + ], + outputs: [], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "submit", + inputs: [ + { + name: "proofSource", + type: "address", + internalType: "address" + }, + { + name: "payloads", + type: "bytes[]", + internalType: "bytes[]" + } + ], + outputs: [ + { + name: "refund", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "payable" + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address" + } + ], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "verifySignatures", + inputs: [ + { + name: "hash", + type: "bytes32", + internalType: "bytes32" + }, + { + name: "signatures", + type: "bytes", + internalType: "bytes" + }, + { + name: "guardianSet", + type: "tuple", + internalType: "struct Structs.GuardianSet", + components: [ + { + name: "keys", + type: "address[]", + internalType: "address[]" + }, + { + name: "expirationTime", + type: "uint32", + internalType: "uint32" + } + ] + } + ], + outputs: [], + stateMutability: "pure" + }, + { + type: "event", + name: "MapMessagingProtocolIdentifierToChainId", + inputs: [ + { + name: "messagingProtocolIdentifier", + type: "uint16", + indexed: false, + internalType: "uint16" + }, + { + name: "chainId", + type: "uint256", + indexed: false, + internalType: "uint256" + } + ], + anonymous: false + }, + { + type: "event", + name: "OutputProven", + inputs: [ + { + name: "chainid", + type: "uint256", + indexed: false, + internalType: "uint256" + }, + { + name: "remoteIdentifier", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "application", + type: "bytes32", + indexed: false, + internalType: "bytes32" + }, + { + name: "payloadHash", + type: "bytes32", + indexed: false, + internalType: "bytes32" + } + ], + anonymous: false + }, + { + type: "event", + name: "OwnershipHandoverCanceled", + inputs: [ + { + name: "pendingOwner", + type: "address", + indexed: true, + internalType: "address" + } + ], + anonymous: false + }, + { + type: "event", + name: "OwnershipHandoverRequested", + inputs: [ + { + name: "pendingOwner", + type: "address", + indexed: true, + internalType: "address" + } + ], + anonymous: false + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "oldOwner", + type: "address", + indexed: true, + internalType: "address" + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address" + } + ], + anonymous: false + }, + { + type: "error", + name: "AlreadyInitialized", + inputs: [] + }, + { + type: "error", + name: "AlreadySet", + inputs: [] + }, + { + type: "error", + name: "GuardianIndexOutOfBounds", + inputs: [] + }, + { + type: "error", + name: "GuardianSetExpired", + inputs: [] + }, + { + type: "error", + name: "InvalidGuardianSet", + inputs: [] + }, + { + type: "error", + name: "InvalidSignatory", + inputs: [] + }, + { + type: "error", + name: "NewOwnerIsZeroAddress", + inputs: [] + }, + { + type: "error", + name: "NoHandoverRequest", + inputs: [] + }, + { + type: "error", + name: "NoQuorum", + inputs: [] + }, + { + type: "error", + name: "NotAllPayloadsValid", + inputs: [] + }, + { + type: "error", + name: "NotDivisible", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256" + }, + { + name: "divisor", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "NotProven", + inputs: [] + }, + { + type: "error", + name: "SignatureIndicesNotAscending", + inputs: [] + }, + { + type: "error", + name: "TooLargePayload", + inputs: [ + { + name: "size", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "TooManyGuardians", + inputs: [] + }, + { + type: "error", + name: "TooManyPayloads", + inputs: [ + { + name: "size", + type: "uint256", + internalType: "uint256" + } + ] + }, + { + type: "error", + name: "Unauthorized", + inputs: [] + }, + { + type: "error", + name: "VMSignatureInvalid", + inputs: [] + }, + { + type: "error", + name: "VMVersionIncompatible", + inputs: [] + }, + { + type: "error", + name: "WormholeStateAddressZero", + inputs: [] + }, + { + type: "error", + name: "ZeroValue", + inputs: [] + } ] as const; diff --git a/src/lib/appTypes.ts b/src/lib/appTypes.ts new file mode 100644 index 0000000..0659d2f --- /dev/null +++ b/src/lib/appTypes.ts @@ -0,0 +1,17 @@ +import type { Token, Verifier } from "./config"; +import type { CreateIntentOptions } from "@lifi/intent"; + +export type AppTokenContext = { + token: Token; + amount: bigint; +}; + +export type AppCreateIntentOptions = Omit< + CreateIntentOptions, + "account" | "inputTokens" | "outputTokens" +> & { + inputTokens: AppTokenContext[]; + outputTokens: AppTokenContext[]; + verifier: Verifier; + account: () => `0x${string}`; +}; diff --git a/src/lib/components/AwaitButton.svelte b/src/lib/components/AwaitButton.svelte index 44f0b59..ac816f3 100644 --- a/src/lib/components/AwaitButton.svelte +++ b/src/lib/components/AwaitButton.svelte @@ -1,82 +1,82 @@ {#await buttonPromise} - + {:then} - + {:catch} - + {/await} diff --git a/src/lib/components/BalanceField.svelte b/src/lib/components/BalanceField.svelte index bde44f0..7e33d51 100644 --- a/src/lib/components/BalanceField.svelte +++ b/src/lib/components/BalanceField.svelte @@ -1,34 +1,34 @@ {#await value} - + {:then value} - + {:catch error} - + {/await} diff --git a/src/lib/components/GetQuote.svelte b/src/lib/components/GetQuote.svelte index 5d41296..fdcd9c9 100644 --- a/src/lib/components/GetQuote.svelte +++ b/src/lib/components/GetQuote.svelte @@ -1,156 +1,157 @@
- {#await quoteRequest} -
- Quote -
- {:then _} - - {#if quoteExpires !== 0} -
- - {:else} -
- - {/if} - {/await} + {#await quoteRequest} +
+ Quote +
+ {:then _} + + {#if quoteExpires !== 0} +
+ + {:else} +
+ + {/if} + {/await}
diff --git a/src/lib/components/InputTokenModal.svelte b/src/lib/components/InputTokenModal.svelte index 440120b..aa607cc 100644 --- a/src/lib/components/InputTokenModal.svelte +++ b/src/lib/components/InputTokenModal.svelte @@ -1,250 +1,247 @@
-
-
-
-

Select Input

-

Choose token amount distribution across chains.

-
- -
- -
-
- - - - - - - {#each uniqueInputTokens as token} - - {/each} - -
- -
- -
Chain
-
Amount / Balance
-
Use
-
-
- {#each tokenSet as tkn, rowIndex} - {@const iaddr = iaddrFor(tkn)} - -
{tkn.chain}
- {#await (store.intentType === "compact" ? store.compactBalances : store.balances)[tkn.chain][tkn.address]} - - {:then balance} - - {:catch _} - - {/await} -
- -
-
- {/each} -
-
- - -
-
+
+
+
+

Select Input

+

Choose token amount distribution across chains.

+
+ +
+ +
+
+ + + + + + + {#each uniqueInputTokens as token} + + {/each} + +
+ +
+ +
Chain
+
Amount / Balance
+
Use
+
+
+ {#each tokenSet as tkn, rowIndex} + {@const iaddr = iaddrFor(tkn)} +
+ +
+ {getChainName(tkn.chainId)} +
+ {#await (store.intentType === "compact" ? store.compactBalances : store.balances)[tkn.chainId][tkn.address]} + + {:then balance} + + {:catch _} + + {/await} +
+ +
+
+
+ {/each} +
+
+ + +
+
diff --git a/src/lib/components/IntentListDetailRow.svelte b/src/lib/components/IntentListDetailRow.svelte index 8763ada..24cda4f 100644 --- a/src/lib/components/IntentListDetailRow.svelte +++ b/src/lib/components/IntentListDetailRow.svelte @@ -1,74 +1,74 @@
-
-
- IN - {#each row.inputChips as chip (chip.key)} - {chip.text} - {/each} - {#if row.inputOverflow > 0} - +{row.inputOverflow} - {/if} - -
-
- OUT - {#each row.outputChips as chip (chip.key)} - {chip.text} - {/each} - {#if row.outputOverflow > 0} - +{row.outputOverflow} - {/if} -
-
-
- {rightBadge} - {rightText} -
+
+
+ IN + {#each row.inputChips as chip (chip.key)} + {chip.text} + {/each} + {#if row.inputOverflow > 0} + +{row.inputOverflow} + {/if} + +
+
+ OUT + {#each row.outputChips as chip (chip.key)} + {chip.text} + {/each} + {#if row.outputOverflow > 0} + +{row.outputOverflow} + {/if} +
+
+
+ {rightBadge} + {rightText} +
- {row.chainScopeBadge} - {#if row.inputSchemeBadge} - {row.inputSchemeBadge} - {/if} - {#each row.protocolBadges as badge (badge)} - {badge} - {/each} - Order {row.orderIdShort} - User {row.userShort} - {row.inputCount} inputs • {row.outputCount} outputs - - {row.validationPassed ? "Validation Pass" : `Invalid: ${row.validationReason}`} - + {row.chainScopeBadge} + {#if row.inputSchemeBadge} + {row.inputSchemeBadge} + {/if} + {#each row.protocolBadges as badge (badge)} + {badge} + {/each} + Order {row.orderIdShort} + User {row.userShort} + {row.inputCount} inputs • {row.outputCount} outputs + + {row.validationPassed ? "Validation Pass" : `Invalid: ${row.validationReason}`} +
diff --git a/src/lib/components/Introduction.svelte b/src/lib/components/Introduction.svelte index 0b082d4..623630a 100644 --- a/src/lib/components/Introduction.svelte +++ b/src/lib/components/Introduction.svelte @@ -1,85 +1,82 @@
-

- This web app showcases a chain-abstracted flow using the - Open Intents Framework. It currently supports a Resource Lock flow using - The Compact and an ERC 7683-compliant escrow flow. -

+

+ This webapp demonstrates chain abstraction using the + Open Intents Framework. It currently support a seamless resource lock flow using + The Compact and a traditional escrow flow, along with a work in progress multichain flow. +

-
+
-

Why Resource Locks?

-

- Resource Locks improve asset availability guarantees in cross-chain contexts and asynchronous - environments, offering several key advantages: -

+

Multichain

+

+ A multichain intent is an intent that collects inputs on multiple chains, providing the result + on one or more chains. In other words, a multichain intent is an any to any intent. + Multichain intents are currently work in progress and will break in the future. If you are using + this interface for testing, ensure the multichain flag is not shown. +

- -
-

- Learn more about - Resource Locks. -

+
-
+

Why Resource Locks?

+

+ Resource Locks improve asset availability guarantees in cross-chain contexts and asynchronous + environments, offering several key advantages: +

-

Why the Open Intents Framework?

-

- The Open Intents Framework (OIF) is an open coordination layer for standardizing and scaling - intent-based workflows across chains. The goal is to: -

+ - -
-

- Learn more about - Open Intents Framework. -

+

+ Learn more about + Resource Locks. +

-
+
-

Same Chain

-

- A same chain intent is an intent that only has inputs and outputs on the same chain. The oracle - is configured different to a cross-chain intent. SetAttestation has to be called on the output - settler to expose the filled output. Learm more about same chain intents or explore a demo of how to collect inputs before delivering outputs. -

+

Why the Open Intents Framework?

+

+ The Open Intents Framework (OIF) is an open coordination layer for standardizing and scaling + intent-based workflows across chains. The goal is to: +

-
+ +

+ Learn more about + Open Intents Framework. +

-

Multichain

-

- A multichain intent is an intent that collects inputs on multiple chains, providing the result - on one or more chains. In other words, a multichain intent is an any to any intent. - Multichain intents are currently a work in progress and will break in the future. If you are - using this interface for testing, ensure the multichain flag is not shown. -

+
-
+

Same Chain

+

+ A same chain intent is an intent that only has inputs and outputs on the same chain. The oracle + is configured different to a cross-chain intent. SetAttestation has to be called on the output + settler to expose the filled output. Learm more about same chain intents or explore a demo of how to collect inputs before delivering outputs. +

diff --git a/src/lib/components/OutputTokenModal.svelte b/src/lib/components/OutputTokenModal.svelte index 80f3102..43802ce 100644 --- a/src/lib/components/OutputTokenModal.svelte +++ b/src/lib/components/OutputTokenModal.svelte @@ -1,140 +1,138 @@
-
-
-
-

Select Output

-

Configure one or more destination token outputs.

-
- -
+
+
+
+

Select Output

+

Configure one or more destination token outputs.

+
+ +
-
-
- -
Chain
-
Amount
-
Token
-
-
- {#each outputs as output, rowIndex} - - - {#each Object.values(chainList(store.mainnet)) as chain} - - {/each} - - - - {#each getTokensForChain(output.chain) as token} - - {/each} - - - {/each} -
-
+
+
+ +
Chain
+
Amount
+
Token
+
+
+ {#each outputs as output, rowIndex} + + + {#each chainIdList(store.mainnet) as chainId} + + {/each} + + + + {#each getTokensForChain(output.chainId) as token} + + {/each} + + + {/each} +
+
-
- - - -
-
-
+
+ + + +
+
+
diff --git a/src/lib/components/ui/ChainActionRow.svelte b/src/lib/components/ui/ChainActionRow.svelte index 4350a30..b0f7ef9 100644 --- a/src/lib/components/ui/ChainActionRow.svelte +++ b/src/lib/components/ui/ChainActionRow.svelte @@ -1,40 +1,40 @@
-
- {chainLabel} -
-
-
- {@render action?.()} -
-
-
- {@render chips?.()} -
-
-
+
+ {chainLabel} +
+
+
+ {@render action?.()} +
+
+
+ {@render chips?.()} +
+
+
diff --git a/src/lib/components/ui/FieldRow.svelte b/src/lib/components/ui/FieldRow.svelte index 413d829..77000ee 100644 --- a/src/lib/components/ui/FieldRow.svelte +++ b/src/lib/components/ui/FieldRow.svelte @@ -1,33 +1,33 @@
- {@render children?.()} + {@render children?.()}
diff --git a/src/lib/components/ui/FlowProgressList.svelte b/src/lib/components/ui/FlowProgressList.svelte index 6d9f76a..e6f14ca 100644 --- a/src/lib/components/ui/FlowProgressList.svelte +++ b/src/lib/components/ui/FlowProgressList.svelte @@ -1,82 +1,108 @@ -
-
- Progress -
-
-
- {#each steps as step, i (step.id)} - - {#if i < steps.length - 1} -
-
-
-
- {/if} - {/each} -
-
+
+ +
+
+ {#each steps as step, i (step.id)} + + {#if i < steps.length - 1} +
+
+
+
+ {/if} + {/each} +
+
+ + diff --git a/src/lib/components/ui/FlowStepTracker.svelte b/src/lib/components/ui/FlowStepTracker.svelte index 31f7e79..434ed6b 100644 --- a/src/lib/components/ui/FlowStepTracker.svelte +++ b/src/lib/components/ui/FlowStepTracker.svelte @@ -1,230 +1,230 @@ diff --git a/src/lib/components/ui/FormControl.svelte b/src/lib/components/ui/FormControl.svelte index 1553054..bc4e34a 100644 --- a/src/lib/components/ui/FormControl.svelte +++ b/src/lib/components/ui/FormControl.svelte @@ -1,60 +1,60 @@ {#if as === "select"} - + {:else} - + {/if} diff --git a/src/lib/components/ui/InlineMetaField.svelte b/src/lib/components/ui/InlineMetaField.svelte index c1adac7..95e2eb4 100644 --- a/src/lib/components/ui/InlineMetaField.svelte +++ b/src/lib/components/ui/InlineMetaField.svelte @@ -1,27 +1,27 @@
- -
- {metaPrefix} - {metaText} -
+ +
+ {metaPrefix} + {metaText} +
diff --git a/src/lib/components/ui/ScreenFrame.svelte b/src/lib/components/ui/ScreenFrame.svelte index b9b30ed..b3ad6fb 100644 --- a/src/lib/components/ui/ScreenFrame.svelte +++ b/src/lib/components/ui/ScreenFrame.svelte @@ -1,29 +1,29 @@
- {#if title} -

{title}

- {/if} - {#if description} -

{description}

- {/if} -
- {@render children?.()} -
+ {#if title} +

{title}

+ {/if} + {#if description} +

{description}

+ {/if} +
+ {@render children?.()} +
diff --git a/src/lib/components/ui/SectionCard.svelte b/src/lib/components/ui/SectionCard.svelte index ed08b64..d03bffc 100644 --- a/src/lib/components/ui/SectionCard.svelte +++ b/src/lib/components/ui/SectionCard.svelte @@ -1,40 +1,40 @@
- {#if title || headerRight} -
- {#if title} -

{title}

- {/if} - {#if headerRight} -
- {@render headerRight()} -
- {/if} -
- {/if} -
- {@render children?.()} -
+ {#if title || headerRight} +
+ {#if title} +

{title}

+ {/if} + {#if headerRight} +
+ {@render headerRight()} +
+ {/if} +
+ {/if} +
+ {@render children?.()} +
diff --git a/src/lib/components/ui/SegmentedControl.svelte b/src/lib/components/ui/SegmentedControl.svelte index 959d745..2812812 100644 --- a/src/lib/components/ui/SegmentedControl.svelte +++ b/src/lib/components/ui/SegmentedControl.svelte @@ -1,45 +1,45 @@
- {#each options as option, i (option.value)} - - {/each} + {#each options as option, i (option.value)} + + {/each}
diff --git a/src/lib/components/ui/TokenAmountChip.svelte b/src/lib/components/ui/TokenAmountChip.svelte index bf953f2..efeafbc 100644 --- a/src/lib/components/ui/TokenAmountChip.svelte +++ b/src/lib/components/ui/TokenAmountChip.svelte @@ -1,34 +1,34 @@
- {amountText} - {symbol.toUpperCase()} + {amountText} + {symbol.toUpperCase()}
diff --git a/src/lib/config.ts b/src/lib/config.ts index 18b3e03..2d5e2c8 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -1,464 +1,555 @@ import { createPublicClient, createWalletClient, custom, defineChain, fallback, http } from "viem"; import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - mainnet as ethereum, - optimismSepolia, - sepolia, - polygon, - bsc, - katana, - megaeth + arbitrum, + arbitrumSepolia, + base, + baseSepolia, + mainnet as ethereum, + optimismSepolia, + sepolia, + polygon, + bsc, + katana, + megaeth, + optimism, + arcTestnet } from "viem/chains"; export const pharos = defineChain({ - id: 1672, - name: "Pharos", - nativeCurrency: { name: "PROS", symbol: "PROS", decimals: 18 }, - rpcUrls: { - default: { http: ["https://rpc.pharos.xyz"] } - } + id: 1672, + name: "Pharos", + nativeCurrency: { name: "PROS", symbol: "PROS", decimals: 18 }, + rpcUrls: { + default: { http: ["https://rpc.pharos.xyz"] } + } }); export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000" as const; export const BYTES32_ZERO = - "0x0000000000000000000000000000000000000000000000000000000000000000" as const; + "0x0000000000000000000000000000000000000000000000000000000000000000" as const; export const COMPACT = "0x00000000000000171ede64904551eeDF3C6C9788" as const; export const INPUT_SETTLER_COMPACT_LIFI = "0x0000000000cd5f7fDEc90a03a31F79E5Fbc6A9Cf" as const; export const INPUT_SETTLER_ESCROW_LIFI = "0x000025c3226C00B2Cdc200005a1600509f4e00C0" as const; export const MULTICHAIN_INPUT_SETTLER_ESCROW = - "0xb912b4c38ab54b94D45Ac001484dEBcbb519Bc2B" as const; + "0xb912b4c38ab54b94D45Ac001484dEBcbb519Bc2B" as const; export const MULTICHAIN_INPUT_SETTLER_COMPACT = - "0x1fccC0807F25A58eB531a0B5b4bf3dCE88808Ed7" as const; + "0x1fccC0807F25A58eB531a0B5b4bf3dCE88808Ed7" as const; export const ALWAYS_OK_ALLOCATOR = "281773970620737143753120258" as const; export const POLYMER_ALLOCATOR = "116450367070547927622991121" as const; // 0x02ecC89C25A5DCB1206053530c58E002a737BD11 signing by 0x934244C8cd6BeBDBd0696A659D77C9BDfE86Efe6 export const COIN_FILLER = "0x0000000000eC36B683C2E6AC89e9A75989C22a2e" as const; -export const WORMHOLE_ORACLE = { - ethereum: "0x0000000000000000000000000000000000000000", - arbitrum: "0x0000000000000000000000000000000000000000", - base: "0x0000000000000000000000000000000000000000" -} as const; -export const POLYMER_ORACLE = { - ethereum: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - arbitrum: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - base: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - megaeth: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - katana: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - polygon: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - bsc: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - pharos: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - // testnet - sepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", - baseSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", - arbitrumSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", - optimismSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00" -} as const; +export const WORMHOLE_ORACLE: Partial> = { + [ethereum.id]: "0x0000000000000000000000000000000000000000", + [arbitrum.id]: "0x0000000000000000000000000000000000000000", + [base.id]: "0x0000000000000000000000000000000000000000" +}; +export const POLYMER_ORACLE: Partial> = { + [ethereum.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [arbitrum.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [base.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [megaeth.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [katana.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [polygon.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [bsc.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + [pharos.id]: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + // testnet + [sepolia.id]: "0xe15b438C6267B0011aDa1e40fD8757Aa8Fe1E5a0", + [baseSepolia.id]: "0xe15b438C6267B0011aDa1e40fD8757Aa8Fe1E5a0", + [arbitrumSepolia.id]: "0xe15b438C6267B0011aDa1e40fD8757Aa8Fe1E5a0", + [optimismSepolia.id]: "0xe15b438C6267B0011aDa1e40fD8757Aa8Fe1E5a0", + [arcTestnet.id]: "0xe15b438C6267B0011aDa1e40fD8757Aa8Fe1E5a0" +}; export type availableAllocators = typeof ALWAYS_OK_ALLOCATOR | typeof POLYMER_ALLOCATOR; export type availableInputSettlers = - | typeof INPUT_SETTLER_COMPACT_LIFI - | typeof INPUT_SETTLER_ESCROW_LIFI; + | typeof INPUT_SETTLER_COMPACT_LIFI + | typeof INPUT_SETTLER_ESCROW_LIFI; export const chainMap = { - ethereum, - base, - arbitrum, - sepolia, - arbitrumSepolia, - optimismSepolia, - baseSepolia, - katana, - megaeth, - bsc, - polygon, - pharos + ethereum, + base, + arbitrum, + optimism, + sepolia, + arbitrumSepolia, + optimismSepolia, + baseSepolia, + katana, + megaeth, + bsc, + polygon, + pharos, + arcTestnet } as const; -export const chains = Object.keys(chainMap) as (keyof typeof chainMap)[]; -export type chain = (typeof chains)[number]; +type ChainName = keyof typeof chainMap; +export const chains = Object.keys(chainMap) as ChainName[]; export const chainList = (mainnet: boolean) => { - if (mainnet == true) { - return ["ethereum", "base", "arbitrum", "megaeth", "katana", "polygon", "bsc", "pharos"]; - } else return ["sepolia", "optimismSepolia", "baseSepolia", "arbitrumSepolia"]; + if (mainnet == true) { + return [ + "ethereum", + "base", + "arbitrum", + "megaeth", + "katana", + "polygon", + "bsc", + "pharos" + ] as ChainName[]; + } else + return [ + "sepolia", + "optimismSepolia", + "baseSepolia", + "arbitrumSepolia", + "arcTestnet" + ] as ChainName[]; }; -export type balanceQuery = Record>>; +export const chainIdList = (mainnet: boolean) => { + return chainList(mainnet).map((name) => chainMap[name].id); +}; + +const chainEntries = chains.map((name) => [chainMap[name].id, chainMap[name]] as const); +const chainNameEntries = chains.map((name) => [chainMap[name].id, name] as const); + +export type balanceQuery = Record>>; export type Token = { - address: `0x${string}`; - name: string; - chain: chain; - decimals: number; + address: `0x${string}`; + name: string; + chainId: number; + decimals: number; }; export const coinList = (mainnet: boolean) => { - if (mainnet == true) - return [ - { - address: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, - name: "usdc", - chain: "base", - decimals: 6 - }, - { - address: `0xaf88d065e77c8cC2239327C5EDb3A432268e5831`, - name: "usdc", - chain: "arbitrum", - decimals: 6 - }, - { - address: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`, - name: "usdc", - chain: "ethereum", - decimals: 6 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "base", - decimals: 18 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "arbitrum", - decimals: 18 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "ethereum", - decimals: 18 - }, - { - address: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`, - name: "weth", - chain: "ethereum", - decimals: 18 - }, - { - address: `0x4200000000000000000000000000000000000006`, - name: "weth", - chain: "base", - decimals: 18 - }, - { - address: `0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`, - name: "weth", - chain: "arbitrum", - decimals: 18 - }, - { - address: `0x4200000000000000000000000000000000000006`, - name: "weth", - chain: "megaeth", - decimals: 18 - }, - { - address: `0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7`, - name: "usdm", - chain: "megaeth", - decimals: 18 - }, - { - address: `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`, - name: "usdc-b", - chain: "bsc", - decimals: 18 - }, - { - address: `0x55d398326f99059ff775485246999027b3197955`, - name: "usdt-b", - chain: "bsc", - decimals: 18 - }, - { - address: `0x203a662b0bd271a6ed5a60edfbd04bfce608fd36`, - name: "vbUSDC", - chain: "katana", - decimals: 6 - }, - { - address: `0x7ceb23fd6bc0add59e62ac25578270cff1b9f619`, - name: "weth", - chain: "polygon", - decimals: 18 - }, - { - address: `0x3c499c542cef5e3811e1192ce70d8cc03d5c3359`, - name: "usdc", - chain: "polygon", - decimals: 6 - }, - { - address: `0x2791bca1f2de4661ed88a30c99a7a9449aa84174`, - name: "usdc.e", - chain: "polygon", - decimals: 6 - }, - { - address: `0xc879c018db60520f4355c26ed1a6d572cdac1815`, - name: "usdc", - chain: "pharos", - decimals: 6 - } - ] as const; - else - return [ - { - address: `0x5fd84259d66Cd46123540766Be93DFE6D43130D7`, - name: "usdc", - chain: "optimismSepolia", - decimals: 6 - }, - { - address: `0x036CbD53842c5426634e7929541eC2318f3dCF7e`, - name: "usdc", - chain: "baseSepolia", - decimals: 6 - }, - { - address: `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238`, - name: "usdc", - chain: "sepolia", - decimals: 6 - }, - { - address: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", - name: "usdc", - chain: "arbitrumSepolia", - decimals: 6 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "sepolia", - decimals: 18 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "baseSepolia", - decimals: 18 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "optimismSepolia", - decimals: 18 - }, - { - address: ADDRESS_ZERO, - name: "eth", - chain: "arbitrumSepolia", - decimals: 6 - }, - { - address: `0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14`, - name: "weth", - chain: "sepolia", - decimals: 18 - }, - { - address: `0x4200000000000000000000000000000000000006`, - name: "weth", - chain: "baseSepolia", - decimals: 18 - }, - { - address: `0x4200000000000000000000000000000000000006`, - name: "weth", - chain: "optimismSepolia", - decimals: 18 - }, - { - address: `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73`, - name: "weth", - chain: "arbitrumSepolia", - decimals: 18 - } - ] as const; + if (mainnet == true) + return [ + { + address: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, + name: "usdc", + chainId: base.id, + decimals: 6 + }, + { + address: `0xaf88d065e77c8cC2239327C5EDb3A432268e5831`, + name: "usdc", + chainId: arbitrum.id, + decimals: 6 + }, + { + address: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`, + name: "usdc", + chainId: ethereum.id, + decimals: 6 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: base.id, + decimals: 18 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: arbitrum.id, + decimals: 18 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: ethereum.id, + decimals: 18 + }, + { + address: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`, + name: "weth", + chainId: ethereum.id, + decimals: 18 + }, + { + address: `0x82106347dDbB23cE44Cf4cE4053Ef1adf8b9323B`, + name: "wmton", + chainId: ethereum.id, + decimals: 18 + }, + { + address: `0x4200000000000000000000000000000000000006`, + name: "weth", + chainId: base.id, + decimals: 18 + }, + { + address: `0x4200000000000000000000000000000000000006`, + name: "weth", + chainId: optimism.id, + decimals: 18 + }, + { + address: `0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`, + name: "weth", + chainId: arbitrum.id, + decimals: 18 + }, + { + address: `0x4200000000000000000000000000000000000006`, + name: "weth", + chainId: megaeth.id, + decimals: 18 + }, + { + address: `0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7`, + name: "usdm", + chainId: megaeth.id, + decimals: 18 + }, + { + address: `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`, + name: "usdc-b", + chainId: bsc.id, + decimals: 18 + }, + { + address: `0x55d398326f99059ff775485246999027b3197955`, + name: "usdt-b", + chainId: bsc.id, + decimals: 18 + }, + { + address: `0x203a662b0bd271a6ed5a60edfbd04bfce608fd36`, + name: "vbUSDC", + chainId: katana.id, + decimals: 6 + }, + { + address: `0x7ceb23fd6bc0add59e62ac25578270cff1b9f619`, + name: "weth", + chainId: polygon.id, + decimals: 18 + }, + { + address: `0x3c499c542cef5e3811e1192ce70d8cc03d5c3359`, + name: "usdc", + chainId: polygon.id, + decimals: 6 + }, + { + address: `0x2791bca1f2de4661ed88a30c99a7a9449aa84174`, + name: "usdc.e", + chainId: polygon.id, + decimals: 6 + } + ] as const; + else + return [ + { + address: `0x5fd84259d66Cd46123540766Be93DFE6D43130D7`, + name: "usdc", + chainId: optimismSepolia.id, + decimals: 6 + }, + { + address: `0x036CbD53842c5426634e7929541eC2318f3dCF7e`, + name: "usdc", + chainId: baseSepolia.id, + decimals: 6 + }, + { + address: `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238`, + name: "usdc", + chainId: sepolia.id, + decimals: 6 + }, + { + address: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + name: "usdc", + chainId: arbitrumSepolia.id, + decimals: 6 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: sepolia.id, + decimals: 18 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: baseSepolia.id, + decimals: 18 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: optimismSepolia.id, + decimals: 18 + }, + { + address: ADDRESS_ZERO, + name: "eth", + chainId: arbitrumSepolia.id, + decimals: 6 + }, + { + address: `0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14`, + name: "weth", + chainId: sepolia.id, + decimals: 18 + }, + { + address: `0x4200000000000000000000000000000000000006`, + name: "weth", + chainId: baseSepolia.id, + decimals: 18 + }, + { + address: `0x4200000000000000000000000000000000000006`, + name: "weth", + chainId: optimismSepolia.id, + decimals: 18 + }, + { + address: `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73`, + name: "weth", + chainId: arbitrumSepolia.id, + decimals: 18 + }, + { + address: `0x3600000000000000000000000000000000000000`, + name: "usdc", + chainId: arcTestnet.id, + decimals: 6 + } + ] as const; }; export function printToken(token: Token) { - return `${token.name.toUpperCase()}, ${token.chain}`; + return `${token.name.toUpperCase()}, ${getChainName(token.chainId)}`; } export function formatTokenAmount(amount: bigint, tokenDecimals: number, decimals = 4) { - const formattedAmount = Number(amount) / 10 ** tokenDecimals; - return formattedAmount.toFixed(decimals); + const formattedAmount = Number(amount) / 10 ** tokenDecimals; + return formattedAmount.toFixed(decimals); } export function getIndexOf(token: Token) { - for (let i = 0; i < coinList.length; ++i) { - const elem = coinList(!chainMap[token.chain].testnet)[i]; - if (token.chain === elem.chain && token.address === elem.address) return i; - } - return -1; + const coins = coinList(!isChainIdTestnet(token.chainId)); + for (let i = 0; i < coins.length; ++i) { + const elem = coins[i]; + if (token.chainId === elem.chainId && token.address === elem.address) return i; + } + return -1; } export type coin = ReturnType[number]["address"]; export const wormholeChainIds = { - sepolia: 10002, - arbitrumSepolia: 10003, - baseSepolia: 10004, - optimismSepolia: 10005 + sepolia: 10002, + arbitrumSepolia: 10003, + baseSepolia: 10004, + optimismSepolia: 10005 } as const; export const polymerChainIds = { - ethereum: ethereum.id, - base: base.id, - arbitrum: arbitrum.id, - sepolia: sepolia.id, - arbitrumSepolia: arbitrumSepolia.id, - baseSepolia: baseSepolia.id, - optimismSepolia: optimismSepolia.id, - megaeth: megaeth.id, - katana: katana.id, - bsc: bsc.id, - polygon: polygon.id, - pharos: pharos.id + ethereum: ethereum.id, + base: base.id, + arbitrum: arbitrum.id, + sepolia: sepolia.id, + arbitrumSepolia: arbitrumSepolia.id, + baseSepolia: baseSepolia.id, + optimismSepolia: optimismSepolia.id, + optimism: optimism.id, + megaeth: megaeth.id, + katana: katana.id, + bsc: bsc.id, + polygon: polygon.id, + pharos: pharos.id, + arcTestnet: arcTestnet.id } as const; export type Verifier = "wormhole" | "polymer"; export function getCoin( - args: - | { name: string; chain: chain; address?: undefined } - | { - address: `0x${string}`; - chain: chain; - name?: undefined; - } + args: + | { name: string; chainId: number | bigint | string; address?: undefined } + | { + address: `0x${string}`; + chainId: number | bigint | string; + name?: undefined; + } ) { - const { name = undefined, address = undefined, chain } = args; - // ensure the address is ERC20-sized. - const concatedAddress = - "0x" + address?.replace("0x", "")?.slice(address.length - 42, address.length); - for (const token of coinList(!chainMap[chain].testnet)) { - // check chain first. - if (token.chain === chain) { - if (name === undefined) { - if (concatedAddress?.toLowerCase() === token.address.toLowerCase()) return token; - } - if (name?.toLowerCase() === token.name.toLowerCase()) return token; - } - } - return { - name: name ?? "Unknown", - address: address ?? ADDRESS_ZERO, - chain, - decimals: 1 - }; - // throw new Error(`No coins found for chain: ${concatedAddress} ${chain}`); + const { name = undefined, address = undefined } = args; + const chainId = normalizeChainId(args.chainId); + // ensure the address is ERC20-sized. + const concatedAddress = + "0x" + address?.replace("0x", "")?.slice(address.length - 42, address.length); + for (const token of coinList(!isChainIdTestnet(chainId))) { + // check chain first. + if (token.chainId === chainId) { + if (name === undefined) { + if (concatedAddress?.toLowerCase() === token.address.toLowerCase()) return token; + } + if (name?.toLowerCase() === token.name.toLowerCase()) return token; + } + } + return { + name: name ?? "Unknown", + address: address ?? ADDRESS_ZERO, + chainId, + decimals: 1 + }; + // throw new Error(`No coins found for chain: ${concatedAddress} ${chain}`); +} + +function normalizeChainId(chainId: number | bigint | string) { + if (typeof chainId === "string") return Number(chainId); + if (typeof chainId === "bigint") return Number(chainId); + return chainId; +} + +export function isChainIdTestnet(chainId: number | bigint | string) { + const normalized = normalizeChainId(chainId); + const chain = chainById[normalized]; + if (!chain) throw new Error(`Chain is not known: ${normalized}`); + return chain.testnet; } export function getChainName(chainId: number | bigint | string) { - if (typeof chainId === "string") chainId = Number(chainId); - if (typeof chainId === "bigint") chainId = Number(chainId); - for (const key of chains) { - if (chainMap[key].id === chainId) { - return key; - } - } - throw new Error(`Chain is not known: ${chainId}`); + const normalized = normalizeChainId(chainId); + const name = chainNameById[normalized]; + if (!name) throw new Error(`Chain is not known: ${normalized}`); + return name; } export function formatTokenDecimals( - value: bigint | number, - coin: Token, - as: "number" | "string" = "string" + value: bigint | number, + coin: Token, + as: "number" | "string" = "string" ) { - const decimals = coin.decimals; - const result = Number(value) / 10 ** decimals; - return as === "string" ? result.toString() : result; + const decimals = coin.decimals; + const result = Number(value) / 10 ** decimals; + return as === "string" ? result.toString() : result; +} + +export function getOracle(verifier: Verifier, chainId: number | bigint | string) { + const normalized = normalizeChainId(chainId); + if (verifier === "polymer") return POLYMER_ORACLE[normalized]; + if (verifier === "wormhole") return WORMHOLE_ORACLE[normalized]; + return undefined; } -export function getOracle(verifier: Verifier, chain: chain) { - if (verifier === "polymer") return POLYMER_ORACLE[chain]; - // if (verifier === "wormhole") return (WORMHOLE_ORACLE[chain] ?? ADDRESS_ZERO); +export function getChain(chainId: number | bigint | string) { + const normalized = normalizeChainId(chainId); + const chain = chainById[normalized]; + if (!chain) throw new Error(`Could not find chain for chainId ${normalized}`); + return chain; } export function getClient(chainId: number | bigint | string) { - const chainName = getChainName(Number(chainId)); - if (!chainName) new Error("Could not find chain"); - return clients[chainName]; + const normalized = normalizeChainId(chainId); + const client = clientsById[normalized]; + if (!client) throw new Error(`Could not find client for chainId ${normalized}`); + return client; } export const clients = { - ethereum: createPublicClient({ - chain: ethereum, - transport: fallback([ - http("https://ethereum-rpc.publicnode.com"), - ...ethereum.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - arbitrum: createPublicClient({ - chain: arbitrum, - transport: fallback([ - http("https://arbitrum-rpc.publicnode.com"), - ...arbitrum.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - base: createPublicClient({ - chain: base, - transport: fallback([ - http("https://base-rpc.publicnode.com"), - ...base.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - bsc: createPublicClient({ - chain: bsc, - transport: fallback([...bsc.rpcUrls.default.http.map((v) => http(v))]) - }), - polygon: createPublicClient({ - chain: base, - transport: fallback([...polygon.rpcUrls.default.http.map((v) => http(v))]) - }), - megaeth: createPublicClient({ - chain: megaeth, - transport: fallback([...megaeth.rpcUrls.default.http.map((v) => http(v))]) - }), - katana: createPublicClient({ - chain: katana, - transport: fallback([...katana.rpcUrls.default.http.map((v) => http(v))]) - }), - pharos: createPublicClient({ - chain: pharos, - transport: fallback([...pharos.rpcUrls.default.http.map((v) => http(v))]) - }), - // Testnet - sepolia: createPublicClient({ - chain: sepolia, - transport: fallback([ - http("https://ethereum-sepolia-rpc.publicnode.com"), - ...sepolia.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - arbitrumSepolia: createPublicClient({ - chain: arbitrumSepolia, - transport: fallback([ - http("https://arbitrum-sepolia-rpc.publicnode.com"), - ...arbitrumSepolia.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - baseSepolia: createPublicClient({ - chain: baseSepolia, - transport: fallback([ - http("https://base-sepolia-rpc.publicnode.com"), - ...baseSepolia.rpcUrls.default.http.map((v) => http(v)) - ]) - }), - optimismSepolia: createPublicClient({ - chain: optimismSepolia, - transport: fallback([ - http("https://optimism-sepolia-rpc.publicnode.com"), - ...optimismSepolia.rpcUrls.default.http.map((v) => http(v)) - ]) - }) + ethereum: createPublicClient({ + chain: ethereum, + transport: fallback([ + http("https://ethereum-rpc.publicnode.com"), + ...ethereum.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + arbitrum: createPublicClient({ + chain: arbitrum, + transport: fallback([ + http("https://arbitrum-rpc.publicnode.com"), + ...arbitrum.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + base: createPublicClient({ + chain: base, + transport: fallback([ + http("https://base-rpc.publicnode.com"), + ...base.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + optimism: createPublicClient({ + chain: optimism, + transport: fallback([ + http("https://optimism-rpc.publicnode.com"), + ...optimism.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + bsc: createPublicClient({ + chain: bsc, + transport: fallback([ + http("https://bsc-rpc.publicnode.com"), + ...bsc.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + polygon: createPublicClient({ + chain: base, + transport: fallback([ + http("https://polygon-bor-rpc.publicnode.com"), + ...polygon.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + megaeth: createPublicClient({ + chain: megaeth, + transport: fallback([...megaeth.rpcUrls.default.http.map((v) => http(v))]) + }), + katana: createPublicClient({ + chain: katana, + transport: fallback([...katana.rpcUrls.default.http.map((v) => http(v))]) + }), + pharos: createPublicClient({ + chain: pharos, + transport: fallback([...pharos.rpcUrls.default.http.map((v) => http(v))]) + }), + // Testnet + sepolia: createPublicClient({ + chain: sepolia, + transport: fallback([ + http("https://ethereum-sepolia-rpc.publicnode.com"), + ...sepolia.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + arbitrumSepolia: createPublicClient({ + chain: arbitrumSepolia, + transport: fallback([ + http("https://arbitrum-sepolia-rpc.publicnode.com"), + ...arbitrumSepolia.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + baseSepolia: createPublicClient({ + chain: baseSepolia, + transport: fallback([ + http("https://base-sepolia-rpc.publicnode.com"), + ...baseSepolia.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + optimismSepolia: createPublicClient({ + chain: optimismSepolia, + transport: fallback([ + http("https://optimism-sepolia-rpc.publicnode.com"), + ...optimismSepolia.rpcUrls.default.http.map((v) => http(v)) + ]) + }), + arcTestnet: createPublicClient({ + chain: arcTestnet, + transport: fallback([...arcTestnet.rpcUrls.default.http.map((v) => http(v))]) + }) } as const; +export const chainById = Object.fromEntries(chainEntries) as Record< + number, + (typeof chainMap)[keyof typeof chainMap] +>; + +export const chainNameById = Object.fromEntries(chainNameEntries) as Record; + +export const clientsById = Object.fromEntries( + chains.map((name) => [chainMap[name].id, clients[name]]) +) as Record; + export type WC = ReturnType< - typeof createWalletClient, undefined, undefined, undefined> + typeof createWalletClient, undefined, undefined, undefined> >; diff --git a/src/lib/db.ts b/src/lib/db.ts index 4cbcba7..23116dc 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -9,35 +9,36 @@ export let db: ReturnType | undefined; let initDbPromise: Promise | undefined> | null = null; async function migrateDb(instance: ReturnType) { - // dialect and session will appear to not exist...but they do on the pglite drizzle instance - // @ts-ignore - await instance.dialect.migrate(migrations, instance.session, { - migrationsTable: "drizzle_migrations" - } satisfies Omit); + // dialect and session will appear to not exist...but they do on the pglite drizzle instance + // @ts-expect-error pglite drizzle exposes migrate internals not present in the public type + await instance.dialect.migrate(migrations, instance.session, { + migrationsTable: "drizzle_migrations" + } satisfies Omit); } export async function initDb() { - if (db) return db; - if (!browser) return undefined; - if (initDbPromise) return initDbPromise; + if (db) return db; + if (!browser) return undefined; + if (initDbPromise) return initDbPromise; - initDbPromise = (async () => { - // Open a PGLite database; this will persist to IndexedDB in the browser - const pglite = new PGlite("idb://orders"); + initDbPromise = (async () => { + // Open a PGLite database; this will persist to IndexedDB in the browser + const pglite = new PGlite("idb://orders"); - // Create a Drizzle instance over the opened SQLite-compatible database - db = drizzle(pglite); + // Create a Drizzle instance over the opened SQLite-compatible database + const instance = drizzle(pglite); - // Run migrations so tables are created on first load - await migrateDb(db); + // Run migrations so tables are created on first load + await migrateDb(instance); - return db; - })().catch((error) => { - initDbPromise = null; - throw error; - }); + db = instance; + return db; + })().catch((error) => { + initDbPromise = null; + throw error; + }); - return initDbPromise; + return initDbPromise; } export default initDb; diff --git a/src/lib/libraries/assetSelection.ts b/src/lib/libraries/assetSelection.ts index 810ea4b..0aad289 100644 --- a/src/lib/libraries/assetSelection.ts +++ b/src/lib/libraries/assetSelection.ts @@ -1,80 +1,80 @@ const bigIntSum = (...nums: bigint[]) => nums.reduce((a, b) => a + b, 0n); export class AssetSelection { - goal: bigint; - values: bigint[]; - weights?: bigint[]; - - sortedValues: bigint[]; - - static Sum(values: bigint[]) { - return bigIntSum(...values); - } - - static feasible(goal: bigint, values: bigint[]) { - if (bigIntSum(...values) < goal) - throw Error(`Values makes ${bigIntSum(...values)} cannot sum ${goal}`); - } - - static zip(arr: bigint[]): [bigint, number][] { - return arr.map((v, i) => [v, i]); - } - - static unzip(arr: [bigint, number][]): bigint[] { - arr.sort((a, b) => a[1] - b[1]); - return arr.map((v) => v[0]); - } - - static takeFromArray(goal: bigint, values: [bigint, T][]) { - let sum = 0n; - for (let i = 0; i < values.length; ++i) { - const value = values[i][0]; - const less = goal - sum; - const diff = less < value ? less : value; - sum += diff; - values[i][0] = diff; - } - } - - constructor(opts: { goal: bigint; values: bigint[]; weights?: bigint[] }) { - AssetSelection.feasible(opts.goal, opts.values); - this.goal = opts.goal; - this.values = opts.values; - this.weights = opts.weights; - - this.sortedValues = this.values; - } - - // --- Get sorted values as --- // - - asValues() { - return this.sortedValues; - } - - asIndices() { - const zipped = AssetSelection.zip(this.sortedValues); - return zipped.filter((v) => v[0] > 0); - } - - // --- Sorting Methods --- // - - largest() { - const values = AssetSelection.zip(this.values); - values.sort((a, b) => Number(b[0] - a[0])); - - AssetSelection.takeFromArray(this.goal, values); - - this.sortedValues = AssetSelection.unzip(values); - return this; - } - - smallest() { - const values = AssetSelection.zip(this.values); - values.sort((a, b) => Number(a[0] - b[0])); - - AssetSelection.takeFromArray(this.goal, values); - - this.sortedValues = AssetSelection.unzip(values); - return this; - } + goal: bigint; + values: bigint[]; + weights?: bigint[]; + + sortedValues: bigint[]; + + static Sum(values: bigint[]) { + return bigIntSum(...values); + } + + static feasible(goal: bigint, values: bigint[]) { + if (bigIntSum(...values) < goal) + throw Error(`Values makes ${bigIntSum(...values)} cannot sum ${goal}`); + } + + static zip(arr: bigint[]): [bigint, number][] { + return arr.map((v, i) => [v, i]); + } + + static unzip(arr: [bigint, number][]): bigint[] { + arr.sort((a, b) => a[1] - b[1]); + return arr.map((v) => v[0]); + } + + static takeFromArray(goal: bigint, values: [bigint, T][]) { + let sum = 0n; + for (let i = 0; i < values.length; ++i) { + const value = values[i][0]; + const less = goal - sum; + const diff = less < value ? less : value; + sum += diff; + values[i][0] = diff; + } + } + + constructor(opts: { goal: bigint; values: bigint[]; weights?: bigint[] }) { + AssetSelection.feasible(opts.goal, opts.values); + this.goal = opts.goal; + this.values = opts.values; + this.weights = opts.weights; + + this.sortedValues = this.values; + } + + // --- Get sorted values as --- // + + asValues() { + return this.sortedValues; + } + + asIndices() { + const zipped = AssetSelection.zip(this.sortedValues); + return zipped.filter((v) => v[0] > 0); + } + + // --- Sorting Methods --- // + + largest() { + const values = AssetSelection.zip(this.values); + values.sort((a, b) => Number(b[0] - a[0])); + + AssetSelection.takeFromArray(this.goal, values); + + this.sortedValues = AssetSelection.unzip(values); + return this; + } + + smallest() { + const values = AssetSelection.zip(this.values); + values.sort((a, b) => Number(a[0] - b[0])); + + AssetSelection.takeFromArray(this.goal, values); + + this.sortedValues = AssetSelection.unzip(values); + return this; + } } diff --git a/src/lib/libraries/compactLib.ts b/src/lib/libraries/compactLib.ts index be1786f..594f0d4 100644 --- a/src/lib/libraries/compactLib.ts +++ b/src/lib/libraries/compactLib.ts @@ -1,167 +1,157 @@ /// -- Compact -- /// import { maxInt32, maxUint256, toHex } from "viem"; -import { ResetPeriod, toId } from "$lib/utils/idLib"; -import { - ADDRESS_ZERO, - type chain, - chainMap, - clients, - COMPACT, - type Token, - type WC -} from "$lib/config"; +import { ResetPeriod, toId } from "@lifi/intent"; +import { ADDRESS_ZERO, getChain, getClient, COMPACT, type WC } from "$lib/config"; import { COMPACT_ABI } from "$lib/abi/compact"; -import { addressToBytes32 } from "$lib/utils/convert"; +import { addressToBytes32 } from "@lifi/intent"; import { ERC20_ABI } from "$lib/abi/erc20"; -import type { TokenContext } from "$lib/state.svelte"; +import type { AppTokenContext } from "$lib/appTypes"; export class CompactLib { - static compactDeposit( - walletClient: WC, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - inputToken: TokenContext; - account: () => `0x${string}`; - allocatorId: string; - } - ) { - return async () => { - const { preHook, postHook, inputToken, account, allocatorId } = opts; - const { token, amount } = inputToken; - const publicClients = clients; - if (preHook) await preHook(token.chain); - const lockTag: `0x${string}` = `0x${toHex( - toId(true, ResetPeriod.OneDay, allocatorId, ADDRESS_ZERO), - { - size: 32 - } - ) - .replace("0x", "") - .slice(0, 24)}`; - const recipient = ADDRESS_ZERO; // This means sender. + static compactDeposit( + walletClient: WC, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + inputToken: AppTokenContext; + account: () => `0x${string}`; + allocatorId: string; + } + ) { + return async () => { + const { preHook, postHook, inputToken, account, allocatorId } = opts; + const { token, amount } = inputToken; + if (preHook) await preHook(token.chainId); + const lockTag: `0x${string}` = `0x${toHex( + toId(true, ResetPeriod.OneDay, allocatorId, ADDRESS_ZERO), + { + size: 32 + } + ) + .replace("0x", "") + .slice(0, 24)}`; + const recipient = ADDRESS_ZERO; // This means sender. - let transactionHash: `0x${string}`; - if (token.address === ADDRESS_ZERO) { - transactionHash = await walletClient.writeContract({ - chain: chainMap[token.chain], - account: account(), - address: COMPACT, - abi: COMPACT_ABI, - functionName: "depositNative", - value: amount, - args: [lockTag, recipient] - }); - } else { - transactionHash = await walletClient.writeContract({ - chain: chainMap[token.chain], - account: account(), - address: COMPACT, - abi: COMPACT_ABI, - functionName: "depositERC20", - args: [token.address, lockTag, amount, recipient] - }); - } - await publicClients[token.chain].waitForTransactionReceipt({ - hash: await transactionHash - }); - if (postHook) await postHook(); - return transactionHash; - }; - } + let transactionHash: `0x${string}`; + if (token.address === ADDRESS_ZERO) { + transactionHash = await walletClient.writeContract({ + chain: getChain(token.chainId), + account: account(), + address: COMPACT, + abi: COMPACT_ABI, + functionName: "depositNative", + value: amount, + args: [lockTag, recipient] + }); + } else { + transactionHash = await walletClient.writeContract({ + chain: getChain(token.chainId), + account: account(), + address: COMPACT, + abi: COMPACT_ABI, + functionName: "depositERC20", + args: [token.address, lockTag, amount, recipient] + }); + } + await getClient(token.chainId).waitForTransactionReceipt({ + hash: await transactionHash + }); + if (postHook) await postHook(); + return transactionHash; + }; + } - static compactWithdraw( - walletClient: WC, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - inputToken: TokenContext; - account: () => `0x${string}`; - allocatorId: string; - } - ) { - return async () => { - const { preHook, postHook, inputToken, account, allocatorId } = opts; - const { token, amount } = inputToken; - const publicClients = clients; - const assetId = toId(true, ResetPeriod.OneDay, allocatorId, token.address); + static compactWithdraw( + walletClient: WC, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + inputToken: AppTokenContext; + account: () => `0x${string}`; + allocatorId: string; + } + ) { + return async () => { + const { preHook, postHook, inputToken, account, allocatorId } = opts; + const { token, amount } = inputToken; + const assetId = toId(true, ResetPeriod.OneDay, allocatorId, token.address); - const allocatedTransferStruct: { - allocatorData: `0x${string}`; - nonce: bigint; - expires: bigint; - id: bigint; - recipients: { - claimant: bigint; - amount: bigint; - }[]; - } = { - allocatorData: "0x", // TODO: Get from allocator - nonce: BigInt(Math.floor(Math.random() * 2 ** 32)), - expires: maxInt32, // TODO: - id: assetId, - recipients: [ - { - claimant: BigInt(addressToBytes32(account())), - amount: amount - } - ] - }; + const allocatedTransferStruct: { + allocatorData: `0x${string}`; + nonce: bigint; + expires: bigint; + id: bigint; + recipients: { + claimant: bigint; + amount: bigint; + }[]; + } = { + allocatorData: "0x", // TODO: Get from allocator + nonce: BigInt(Math.floor(Math.random() * 2 ** 32)), + expires: maxInt32, // TODO: + id: assetId, + recipients: [ + { + claimant: BigInt(addressToBytes32(account())), + amount: amount + } + ] + }; - if (preHook) await preHook(token.chain); - const transactionHash = walletClient.writeContract({ - chain: chainMap[token.chain], - account: account(), - address: COMPACT, - abi: COMPACT_ABI, - functionName: "allocatedTransfer", - args: [allocatedTransferStruct] - }); - await publicClients[token.chain].waitForTransactionReceipt({ - hash: await transactionHash - }); - if (postHook) await postHook(); - return transactionHash; - }; - } + if (preHook) await preHook(token.chainId); + const transactionHash = walletClient.writeContract({ + chain: getChain(token.chainId), + account: account(), + address: COMPACT, + abi: COMPACT_ABI, + functionName: "allocatedTransfer", + args: [allocatedTransferStruct] + }); + await getClient(token.chainId).waitForTransactionReceipt({ + hash: await transactionHash + }); + if (postHook) await postHook(); + return transactionHash; + }; + } - static compactApprove( - walletClient: WC, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - inputTokens: TokenContext[]; - account: () => `0x${string}`; - } - ) { - return async () => { - const { preHook, postHook, inputTokens, account } = opts; - for (let i = 0; i < inputTokens.length; ++i) { - const { token: inputToken, amount } = inputTokens[i]; - if (preHook) await preHook(inputToken.chain); - const publicClient = clients[inputToken.chain]; - // Check if we have sufficient allowance already. - const currentAllowance = await publicClient.readContract({ - address: inputToken.address, - abi: ERC20_ABI, - functionName: "allowance", - args: [account(), COMPACT] - }); - if (currentAllowance >= amount) continue; - const transactionHash = walletClient.writeContract({ - chain: chainMap[inputToken.chain], - account: account(), - address: inputToken.address, - abi: ERC20_ABI, - functionName: "approve", - args: [COMPACT, maxUint256] - }); + static compactApprove( + walletClient: WC, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + inputTokens: AppTokenContext[]; + account: () => `0x${string}`; + } + ) { + return async () => { + const { preHook, postHook, inputTokens, account } = opts; + for (let i = 0; i < inputTokens.length; ++i) { + const { token: inputToken, amount } = inputTokens[i]; + if (preHook) await preHook(inputToken.chainId); + const publicClient = getClient(inputToken.chainId); + // Check if we have sufficient allowance already. + const currentAllowance = await publicClient.readContract({ + address: inputToken.address, + abi: ERC20_ABI, + functionName: "allowance", + args: [account(), COMPACT] + }); + if (currentAllowance >= amount) continue; + const transactionHash = walletClient.writeContract({ + chain: getChain(inputToken.chainId), + account: account(), + address: inputToken.address, + abi: ERC20_ABI, + functionName: "approve", + args: [COMPACT, maxUint256] + }); - await publicClient.waitForTransactionReceipt({ - hash: await transactionHash - }); - } - if (postHook) await postHook(); - }; - } + await publicClient.waitForTransactionReceipt({ + hash: await transactionHash + }); + } + if (postHook) await postHook(); + }; + } } diff --git a/src/lib/libraries/coreDeps.ts b/src/lib/libraries/coreDeps.ts new file mode 100644 index 0000000..947449d --- /dev/null +++ b/src/lib/libraries/coreDeps.ts @@ -0,0 +1,54 @@ +import { + COIN_FILLER, + INPUT_SETTLER_COMPACT_LIFI, + MULTICHAIN_INPUT_SETTLER_COMPACT, + POLYMER_ORACLE, + WORMHOLE_ORACLE +} from "$lib/config"; +import type { IntentDeps, OrderContainerValidationDeps } from "@lifi/intent"; + +function isNonZeroAddress(value: string | undefined): value is `0x${string}` { + return !!value && value.toLowerCase() !== "0x0000000000000000000000000000000000000000"; +} + +export const intentDeps: IntentDeps = { + getOracle(verifier, chainId) { + const key = Number(chainId); + if (!Number.isFinite(key)) return undefined; + if (verifier === "polymer") return POLYMER_ORACLE[key]; + if (verifier === "wormhole") { + return WORMHOLE_ORACLE[key]; + } + return undefined; + } +}; + +export const orderValidationDeps: OrderContainerValidationDeps = { + inputSettlers: [INPUT_SETTLER_COMPACT_LIFI, MULTICHAIN_INPUT_SETTLER_COMPACT], + allowedInputOracles({ chainId, sameChainFill }) { + const key = Number(chainId); + if (!Number.isFinite(key)) return undefined; + const polymer = POLYMER_ORACLE[key]; + const wormhole = WORMHOLE_ORACLE[key]; + const allowed: `0x${string}`[] = []; + if (polymer) allowed.push(polymer); + if (isNonZeroAddress(wormhole)) allowed.push(wormhole); + if (allowed.length === 0) return undefined; + if (sameChainFill) allowed.push(COIN_FILLER); + return allowed; + }, + allowedOutputOracles(chainId) { + const key = Number(chainId); + if (!Number.isFinite(key)) return undefined; + const polymer = POLYMER_ORACLE[key]; + const wormhole = WORMHOLE_ORACLE[key]; + const allowed: `0x${string}`[] = []; + if (polymer) allowed.push(polymer); + if (isNonZeroAddress(wormhole)) allowed.push(wormhole); + if (allowed.length === 0) return undefined; + return allowed; + }, + allowedOutputSettlers() { + return [COIN_FILLER]; + } +}; diff --git a/src/lib/libraries/flowProgress.ts b/src/lib/libraries/flowProgress.ts index ae0c7cf..ccdfb29 100644 --- a/src/lib/libraries/flowProgress.ts +++ b/src/lib/libraries/flowProgress.ts @@ -1,23 +1,23 @@ import { - BYTES32_ZERO, - COMPACT, - INPUT_SETTLER_COMPACT_LIFI, - INPUT_SETTLER_ESCROW_LIFI, - MULTICHAIN_INPUT_SETTLER_COMPACT, - MULTICHAIN_INPUT_SETTLER_ESCROW, - getClient + BYTES32_ZERO, + COMPACT, + INPUT_SETTLER_COMPACT_LIFI, + INPUT_SETTLER_ESCROW_LIFI, + MULTICHAIN_INPUT_SETTLER_COMPACT, + MULTICHAIN_INPUT_SETTLER_ESCROW, + getClient } from "$lib/config"; import { COIN_FILLER_ABI } from "$lib/abi/outputsettler"; import { POLYMER_ORACLE_ABI } from "$lib/abi/polymeroracle"; import { SETTLER_ESCROW_ABI } from "$lib/abi/escrow"; import { COMPACT_ABI } from "$lib/abi/compact"; import { hashStruct, keccak256 } from "viem"; -import { compactTypes } from "$lib/utils/typedMessage"; -import { getOutputHash, encodeMandateOutput } from "$lib/utils/orderLib"; -import { addressToBytes32, bytes32ToAddress } from "$lib/utils/convert"; -import { orderToIntent } from "$lib/libraries/intent"; +import { compactTypes } from "@lifi/intent"; +import { getOutputHash, encodeMandateOutput } from "@lifi/intent"; +import { addressToBytes32, bytes32ToAddress } from "@lifi/intent"; +import { containerToIntent } from "$lib/utils/intent"; import { getOrFetchRpc } from "$lib/libraries/rpcCache"; -import type { MandateOutput, OrderContainer } from "../../types"; +import type { MandateOutput, OrderContainer } from "@lifi/intent"; import store from "$lib/state.svelte"; const PROGRESS_TTL_MS = 30_000; @@ -25,209 +25,209 @@ const OrderStatus_Claimed = 2; const OrderStatus_Refunded = 3; export type FlowCheckState = { - allFilled: boolean; - allValidated: boolean; - allFinalised: boolean; + allFilled: boolean; + allValidated: boolean; + allFinalised: boolean; }; export function getOutputStorageKey(output: MandateOutput) { - return hashStruct({ - data: output, - types: compactTypes, - primaryType: "MandateOutput" - }); + return hashStruct({ + data: output, + types: compactTypes, + primaryType: "MandateOutput" + }); } function isValidHash(hash: string | undefined): hash is `0x${string}` { - return !!hash && hash.startsWith("0x") && hash.length === 66; + return !!hash && hash.startsWith("0x") && hash.length === 66; } async function isOutputFilled(orderId: `0x${string}`, output: MandateOutput) { - const outputKey = getOutputStorageKey(output); - return getOrFetchRpc( - `progress:filled:${orderId}:${outputKey}`, - async () => { - const outputClient = getClient(output.chainId); - const outputHash = getOutputHash(output); - const result = await outputClient.readContract({ - address: bytes32ToAddress(output.settler), - abi: COIN_FILLER_ABI, - functionName: "getFillRecord", - args: [orderId, outputHash] - }); - return result !== BYTES32_ZERO; - }, - { ttlMs: PROGRESS_TTL_MS } - ); + const outputKey = getOutputStorageKey(output); + return getOrFetchRpc( + `progress:filled:${orderId}:${outputKey}`, + async () => { + const outputClient = getClient(output.chainId); + const outputHash = getOutputHash(output); + const result = await outputClient.readContract({ + address: bytes32ToAddress(output.settler), + abi: COIN_FILLER_ABI, + functionName: "getFillRecord", + args: [orderId, outputHash] + }); + return result !== BYTES32_ZERO; + }, + { ttlMs: PROGRESS_TTL_MS } + ); } async function isOutputValidatedOnChain( - orderId: `0x${string}`, - inputChain: bigint, - orderContainer: OrderContainer, - output: MandateOutput, - fillTransactionHash: `0x${string}` + orderId: `0x${string}`, + inputChain: bigint, + orderContainer: OrderContainer, + output: MandateOutput, + fillTransactionHash: `0x${string}` ) { - const outputKey = getOutputStorageKey(output); - const cachedReceipt = store.getTransactionReceipt(output.chainId, fillTransactionHash); - const receipt = ( - cachedReceipt - ? cachedReceipt - : await getOrFetchRpc( - `progress:receipt:${output.chainId.toString()}:${fillTransactionHash}`, - async () => { - const outputClient = getClient(output.chainId); - return outputClient.getTransactionReceipt({ - hash: fillTransactionHash - }); - }, - { ttlMs: PROGRESS_TTL_MS } - ) - ) as { - blockHash: `0x${string}`; - from: `0x${string}`; - }; - if (!cachedReceipt) { - store - .saveTransactionReceipt(output.chainId, fillTransactionHash, receipt) - .catch((error) => console.warn("saveTransactionReceipt error", error)); - } - - const block = await getOrFetchRpc( - `progress:block:${output.chainId.toString()}:${receipt.blockHash}`, - async () => { - const outputClient = getClient(output.chainId); - return outputClient.getBlock({ blockHash: receipt.blockHash }); - }, - { ttlMs: PROGRESS_TTL_MS } - ); - - const encodedOutput = encodeMandateOutput( - addressToBytes32(receipt.from), - orderId, - Number(block.timestamp), - output - ); - const outputHash = keccak256(encodedOutput); - - return getOrFetchRpc( - `progress:proven:${orderId}:${inputChain.toString()}:${outputKey}:${fillTransactionHash}`, - async () => { - const sourceChainClient = getClient(inputChain); - return sourceChainClient.readContract({ - address: orderContainer.order.inputOracle, - abi: POLYMER_ORACLE_ABI, - functionName: "isProven", - args: [output.chainId, output.oracle, output.settler, outputHash] - }); - }, - { ttlMs: PROGRESS_TTL_MS } - ); + const outputKey = getOutputStorageKey(output); + const cachedReceipt = store.getTransactionReceipt(output.chainId, fillTransactionHash); + const receipt = ( + cachedReceipt + ? cachedReceipt + : await getOrFetchRpc( + `progress:receipt:${output.chainId.toString()}:${fillTransactionHash}`, + async () => { + const outputClient = getClient(output.chainId); + return outputClient.getTransactionReceipt({ + hash: fillTransactionHash + }); + }, + { ttlMs: PROGRESS_TTL_MS } + ) + ) as { + blockHash: `0x${string}`; + from: `0x${string}`; + }; + if (!cachedReceipt) { + store + .saveTransactionReceipt(output.chainId, fillTransactionHash, receipt) + .catch((error) => console.warn("saveTransactionReceipt error", error)); + } + + const block = await getOrFetchRpc( + `progress:block:${output.chainId.toString()}:${receipt.blockHash}`, + async () => { + const outputClient = getClient(output.chainId); + return outputClient.getBlock({ blockHash: receipt.blockHash }); + }, + { ttlMs: PROGRESS_TTL_MS } + ); + + const encodedOutput = encodeMandateOutput({ + solver: addressToBytes32(receipt.from), + orderId, + timestamp: Number(block.timestamp), + output + }); + const outputHash = keccak256(encodedOutput); + + return getOrFetchRpc( + `progress:proven:${orderId}:${inputChain.toString()}:${outputKey}:${fillTransactionHash}`, + async () => { + const sourceChainClient = getClient(inputChain); + return sourceChainClient.readContract({ + address: orderContainer.order.inputOracle, + abi: POLYMER_ORACLE_ABI, + functionName: "isProven", + args: [output.chainId, output.oracle, output.settler, outputHash] + }); + }, + { ttlMs: PROGRESS_TTL_MS } + ); } async function isInputChainFinalised(chainId: bigint, container: OrderContainer) { - const { order, inputSettler } = container; - const inputChainClient = getClient(chainId); - const intent = orderToIntent(container); - const orderId = intent.orderId(); - - if ( - inputSettler === INPUT_SETTLER_ESCROW_LIFI || - inputSettler === MULTICHAIN_INPUT_SETTLER_ESCROW - ) { - return getOrFetchRpc( - `progress:finalised:escrow:${orderId}:${chainId.toString()}`, - async () => { - const orderStatus = await inputChainClient.readContract({ - address: inputSettler, - abi: SETTLER_ESCROW_ABI, - functionName: "orderStatus", - args: [orderId] - }); - return orderStatus === OrderStatus_Claimed || orderStatus === OrderStatus_Refunded; - }, - { ttlMs: PROGRESS_TTL_MS } - ); - } - - if ( - inputSettler === INPUT_SETTLER_COMPACT_LIFI || - inputSettler === MULTICHAIN_INPUT_SETTLER_COMPACT - ) { - const flattenedInputs = "originChainId" in order ? order.inputs : order.inputs[0]?.inputs; - if (!flattenedInputs || flattenedInputs.length === 0) return false; - - return getOrFetchRpc( - `progress:finalised:compact:${orderId}:${chainId.toString()}`, - async () => { - const [, allocator] = await inputChainClient.readContract({ - address: COMPACT, - abi: COMPACT_ABI, - functionName: "getLockDetails", - args: [flattenedInputs[0][0]] - }); - return inputChainClient.readContract({ - address: COMPACT, - abi: COMPACT_ABI, - functionName: "hasConsumedAllocatorNonce", - args: [order.nonce, allocator] - }); - }, - { ttlMs: PROGRESS_TTL_MS } - ); - } - - return false; + const { order, inputSettler } = container; + const inputChainClient = getClient(chainId); + const intent = containerToIntent(container); + const orderId = intent.orderId(); + + if ( + inputSettler === INPUT_SETTLER_ESCROW_LIFI || + inputSettler === MULTICHAIN_INPUT_SETTLER_ESCROW + ) { + return getOrFetchRpc( + `progress:finalised:escrow:${orderId}:${chainId.toString()}`, + async () => { + const orderStatus = await inputChainClient.readContract({ + address: inputSettler, + abi: SETTLER_ESCROW_ABI, + functionName: "orderStatus", + args: [orderId] + }); + return orderStatus === OrderStatus_Claimed || orderStatus === OrderStatus_Refunded; + }, + { ttlMs: PROGRESS_TTL_MS } + ); + } + + if ( + inputSettler === INPUT_SETTLER_COMPACT_LIFI || + inputSettler === MULTICHAIN_INPUT_SETTLER_COMPACT + ) { + const flattenedInputs = "originChainId" in order ? order.inputs : order.inputs[0]?.inputs; + if (!flattenedInputs || flattenedInputs.length === 0) return false; + + return getOrFetchRpc( + `progress:finalised:compact:${orderId}:${chainId.toString()}`, + async () => { + const [, allocator] = await inputChainClient.readContract({ + address: COMPACT, + abi: COMPACT_ABI, + functionName: "getLockDetails", + args: [flattenedInputs[0][0]] + }); + return inputChainClient.readContract({ + address: COMPACT, + abi: COMPACT_ABI, + functionName: "hasConsumedAllocatorNonce", + args: [order.nonce, allocator] + }); + }, + { ttlMs: PROGRESS_TTL_MS } + ); + } + + return false; } export async function getOrderProgressChecks( - orderContainer: OrderContainer, - fillTransactions: Record + orderContainer: OrderContainer, + fillTransactions: Record ): Promise { - try { - const intent = orderToIntent(orderContainer); - const orderId = intent.orderId(); - const inputChains = intent.inputChains(); - const outputs = orderContainer.order.outputs; - - const filledStates = await Promise.all( - outputs.map((output) => isOutputFilled(orderId, output)) - ); - const allFilled = outputs.length > 0 && filledStates.every(Boolean); - - let allValidated = false; - if (allFilled && inputChains.length > 0) { - const validatedPairs = await Promise.all( - inputChains.flatMap((inputChain) => - outputs.map(async (output) => { - const fillHash = fillTransactions[getOutputStorageKey(output)]; - if (!isValidHash(fillHash)) return false; - return isOutputValidatedOnChain(orderId, inputChain, orderContainer, output, fillHash); - }) - ) - ); - allValidated = validatedPairs.length > 0 && validatedPairs.every(Boolean); - } - - let allFinalised = false; - if (allValidated && inputChains.length > 0) { - const finalisedStates = await Promise.all( - inputChains.map((chainId) => isInputChainFinalised(chainId, orderContainer)) - ); - allFinalised = finalisedStates.every(Boolean); - } - - return { - allFilled, - allValidated, - allFinalised - }; - } catch (error) { - console.warn("progress checks failed", error); - return { - allFilled: false, - allValidated: false, - allFinalised: false - }; - } + try { + const intent = containerToIntent(orderContainer); + const orderId = intent.orderId(); + const inputChains = intent.inputChains(); + const outputs = orderContainer.order.outputs; + + const filledStates = await Promise.all( + outputs.map((output) => isOutputFilled(orderId, output)) + ); + const allFilled = outputs.length > 0 && filledStates.every(Boolean); + + let allValidated = false; + if (allFilled && inputChains.length > 0) { + const validatedPairs = await Promise.all( + inputChains.flatMap((inputChain) => + outputs.map(async (output) => { + const fillHash = fillTransactions[getOutputStorageKey(output)]; + if (!isValidHash(fillHash)) return false; + return isOutputValidatedOnChain(orderId, inputChain, orderContainer, output, fillHash); + }) + ) + ); + allValidated = validatedPairs.length > 0 && validatedPairs.every(Boolean); + } + + let allFinalised = false; + if (allValidated && inputChains.length > 0) { + const finalisedStates = await Promise.all( + inputChains.map((chainId) => isInputChainFinalised(chainId, orderContainer)) + ); + allFinalised = finalisedStates.every(Boolean); + } + + return { + allFilled, + allValidated, + allFinalised + }; + } catch (error) { + console.warn("progress checks failed", error); + return { + allFilled: false, + allValidated: false, + allFinalised: false + }; + } } diff --git a/src/lib/libraries/intent.ts b/src/lib/libraries/intent.ts deleted file mode 100644 index 7d630d2..0000000 --- a/src/lib/libraries/intent.ts +++ /dev/null @@ -1,924 +0,0 @@ -import { encodeAbiParameters, encodePacked, hashStruct, keccak256, parseAbiParameters } from "viem"; -import type { - BatchCompact, - CompactMandate, - Element, - MandateOutput, - MultichainCompact, - MultichainOrder, - MultichainOrderComponent, - NoSignature, - Signature, - StandardOrder -} from "../../types"; -import { COMPACT_ABI } from "../abi/compact"; -import { - chainMap, - clients, - COIN_FILLER, - COMPACT, - getChainName, - getOracle, - INPUT_SETTLER_COMPACT_LIFI, - INPUT_SETTLER_ESCROW_LIFI, - MULTICHAIN_INPUT_SETTLER_COMPACT, - MULTICHAIN_INPUT_SETTLER_ESCROW, - type chain, - type Verifier, - type WC -} from "../config"; -import { ResetPeriod, toId } from "../utils/idLib"; -import { compact_type_hash, compactTypes } from "../utils/typedMessage"; -import { addressToBytes32 } from "../utils/convert"; -import { SETTLER_ESCROW_ABI } from "../abi/escrow"; -import type { TokenContext } from "$lib/state.svelte"; -import { MULTICHAIN_SETTLER_ESCROW_ABI } from "$lib/abi/multichain_escrow"; -import { SETTLER_COMPACT_ABI } from "$lib/abi/settlercompact"; -import { toHex } from "$lib/utils/interopableAddresses"; -import { MULTICHAIN_SETTLER_COMPACT_ABI } from "$lib/abi/multichain_compact"; - -type Lock = { - lockTag: `0x${string}`; - token: `0x${string}`; - amount: bigint; -}; - -export type EscrowLock = { - type: "escrow"; -}; - -export type CompactLock = { - type: "compact"; - resetPeriod: ResetPeriod; - allocatorId: string; -}; - -export type CreateIntentOptionsEscrow = { - exclusiveFor: string; - inputTokens: TokenContext[]; - outputTokens: TokenContext[]; - verifier: Verifier; - account: () => `0x${string}`; - lock: EscrowLock; -}; - -export type CreateIntentOptionsCompact = { - exclusiveFor: string; - inputTokens: TokenContext[]; - outputTokens: TokenContext[]; - verifier: Verifier; - account: () => `0x${string}`; - lock: CompactLock; -}; - -export type CreateIntentOptions = CreateIntentOptionsEscrow | CreateIntentOptionsCompact; - -function findChain(chainId: bigint) { - for (const [name, data] of Object.entries(chainMap)) { - if (BigInt(data.id) === chainId) { - return chainMap[name as chain]; - } - } - return undefined; -} - -function selectAllBut(arr: T[], index: number): T[] { - return [...arr.slice(0, index), ...arr.slice(index + 1, arr.length)]; -} - -function encodeOutputs(outputs: MandateOutput[]) { - return encodeAbiParameters( - parseAbiParameters( - "(bytes32 oracle, bytes32 settler, uint256 chainId, bytes32 token, uint256 amount, bytes32 recipient, bytes callbackData, bytes context)[]" - ), - [outputs] - ); -} - -const ONE_MINUTE = 60; -const ONE_HOUR = 60 * ONE_MINUTE; -const ONE_DAY = 24 * ONE_HOUR; - -/** - * @notice Class representing a Li.Fi Intent. Contains intent abstractions and helpers. - */ -export class Intent { - private lock: EscrowLock | CompactLock; - - // User facing order options - private user: () => `0x${string}`; - private inputs: TokenContext[]; - private outputs: TokenContext[]; - private verifier: Verifier; - - private exclusiveFor?: `0x${string}`; - - private _nonce?: bigint; - - private expiry = ONE_DAY; - private fillDeadline = 2 * ONE_HOUR; - - constructor(opts: CreateIntentOptionsEscrow | CreateIntentOptionsCompact) { - this.lock = opts.lock; - - this.user = opts.account; - this.inputs = opts.inputTokens; - this.outputs = opts.outputTokens; - this.verifier = opts.verifier; - - this.exclusiveFor = this.normalizeExclusiveFor(opts.exclusiveFor); - } - - private normalizeExclusiveFor(exclusiveFor: string): `0x${string}` | undefined { - const trimmed = exclusiveFor.trim(); - if (trimmed.length === 0) return undefined; - const normalized = trimmed.toLowerCase(); - if (!/^0x[0-9a-f]{40}$/.test(normalized)) { - throw new Error(`ExclusiveFor not formatted correctly ${exclusiveFor}`); - } - return normalized as `0x${string}`; - } - - numInputChains() { - const tokenChains = this.inputs.map(({ token }) => token.chain); - return [...new Set(tokenChains)].length; - } - - isMultichain() { - return this.numInputChains() > 1; - } - - isSameChain() { - // Multichain intents cannot be same chain. Normal "Output oracle" will be used. - if (this.isMultichain()) return false; - - // Only 1 input chain is used. - const inputChain = this.inputs[0].token.chain; - const outputChains = this.outputs.map((o) => o.token.chain); - const numOutputChains = [...new Set(outputChains)].length; - if (numOutputChains > 1) return false; - // Only 1 output chain is used. - const outputChain = this.outputs[0].token.chain; - return inputChain === outputChain; - } - - nonce() { - if (this._nonce) return this._nonce; - this._nonce = BigInt(Math.floor(Math.random() * 2 ** 32)); - return this._nonce; - } - - inputSettler(multichain: boolean) { - if (this.lock.type === "compact" && multichain === false) return INPUT_SETTLER_COMPACT_LIFI; - if (this.lock.type === "compact" && multichain === true) - return MULTICHAIN_INPUT_SETTLER_COMPACT; - if (this.lock.type === "escrow" && multichain === false) return INPUT_SETTLER_ESCROW_LIFI; - if (this.lock.type === "escrow" && multichain === true) return MULTICHAIN_INPUT_SETTLER_ESCROW; - - throw new Error(`Not supported | multichain: ${multichain}, type: ${this.lock.type}`); - } - - encodeOutputs(currentTime: number) { - // Get the current epoch timestamp: - currentTime; - const ONE_MINUTE = 60; - - let context: `0x${string}` = "0x"; - if (this.exclusiveFor) { - const paddedExclusiveFor: `0x${string}` = `0x${this.exclusiveFor.replace("0x", "").padStart(64, "0")}`; - context = encodePacked( - ["bytes1", "bytes32", "uint32"], - ["0xe0", paddedExclusiveFor, currentTime + ONE_MINUTE] - ); - } - - const outputSettler = COIN_FILLER; - const sameChain = this.isSameChain(); - - return this.outputs.map(({ token, amount }) => { - const outputOracle = sameChain - ? addressToBytes32(outputSettler) - : addressToBytes32(getOracle(this.verifier, token.chain)!); - return { - oracle: outputOracle, - settler: addressToBytes32(outputSettler), - chainId: BigInt(chainMap[token.chain].id), - token: addressToBytes32(token.address), - amount: amount, - recipient: addressToBytes32(this.user()), - callbackData: "0x", - context - }; - }) as MandateOutput[]; - } - - singlechain() { - if (this.isMultichain()) - throw new Error(`Not supported as single chain with ${this.numInputChains()} chains`); - - const inputChain = this.inputs[0].token.chain; - - const inputs: [bigint, bigint][] = this.inputs.map(({ token, amount }) => [ - this.lock.type === "compact" - ? toId(true, this.lock.resetPeriod, this.lock.allocatorId, token.address) - : BigInt(token.address), - amount - ]); - - const currentTime = Math.floor(Date.now() / 1000); - - const inputOracle = this.isSameChain() ? COIN_FILLER : getOracle(this.verifier, inputChain)!; - - const order: StandardOrder = { - user: this.user(), - nonce: this.nonce(), - originChainId: BigInt(chainMap[inputChain].id), - fillDeadline: currentTime + this.fillDeadline, - expires: currentTime + this.expiry, - inputOracle: inputOracle, - inputs: inputs, - outputs: this.encodeOutputs(currentTime) - }; - - return new StandardOrderIntent(this.inputSettler(false), order); - } - - multichain() { - const currentTime = Math.floor(Date.now() / 1000); - - // TODO: Fix before release. The input oracle is not the same on every chain. - const inputOracle = getOracle(this.verifier, this.inputs[0].token.chain)!; - - // Get all unique chains and then get all inputs for each chain. - const inputs: { chainId: bigint; inputs: [bigint, bigint][] }[] = [ - ...new Set(this.inputs.map(({ token }) => token.chain)) - ].map((chain) => { - const chainInputs = this.inputs.filter(({ token }) => token.chain === chain); - - return { - chainId: BigInt(chainMap[chain].id), - inputs: chainInputs.map(({ token, amount }) => [ - this.lock.type === "compact" - ? toId(true, this.lock.resetPeriod, this.lock.allocatorId, token.address) - : BigInt(token.address), - amount - ]) - }; - }); - - const order: MultichainOrder = { - user: this.user(), - nonce: this.nonce(), - fillDeadline: currentTime + this.fillDeadline, - expires: currentTime + this.expiry, - inputOracle: inputOracle, - outputs: this.encodeOutputs(currentTime), - inputs: inputs - }; - - return new MultichainOrderIntent(this.inputSettler(true), order, this.lock); - } - - order() { - if (this.isMultichain()) return this.multichain(); - return this.singlechain(); - } -} - -/// @notice Helper function that allows you to provide an order and it will correctly generate the appropriate order. -export function orderToIntent(options: { - inputSettler: `0x${string}`; - order: StandardOrder; - lock?: { type: string }; -}): StandardOrderIntent; -export function orderToIntent(options: { - inputSettler: `0x${string}`; - order: MultichainOrder; - lock?: { type: string }; -}): MultichainOrderIntent; -export function orderToIntent(options: { - inputSettler: `0x${string}`; - order: StandardOrder | MultichainOrder; - lock?: { type: string }; -}): StandardOrderIntent | MultichainOrderIntent; -export function orderToIntent(options: { - inputSettler: `0x${string}`; - order: StandardOrder | MultichainOrder; - lock?: { type: string }; -}): StandardOrderIntent | MultichainOrderIntent { - const { inputSettler, order, lock } = options; - // Use presence of originChainId to discriminate StandardOrder vs MultichainOrder - if ("originChainId" in order) { - return new StandardOrderIntent(inputSettler, order as StandardOrder); - } - return new MultichainOrderIntent(inputSettler, order as MultichainOrder, lock); -} - -export class StandardOrderIntent { - inputSettler: `0x${string}`; - order: StandardOrder; - - constructor(inputSetter: `0x${string}`, order: StandardOrder) { - this.inputSettler = inputSetter; - this.order = order; - } - - // -- Order Representations -- // - - /** - * @notice Returns for logging - */ - asOrder(): StandardOrder { - return this.order; - } - - /** - * @notice Returns the order as a StandardOrder. - * @returns Order as StandardOrder - */ - asStandardOrder(): StandardOrder { - return this.order; - } - - /** - * @notice Returns the order as a BatchCompact. - * @returns Order as BatchCompact (signed object for Compact) - */ - asBatchCompact(): BatchCompact { - const { order } = this; - const mandate: CompactMandate = { - fillDeadline: order.fillDeadline, - inputOracle: order.inputOracle, - outputs: order.outputs - }; - const commitments = order.inputs.map(([tokenId, amount]) => { - const lockTag: `0x${string}` = `0x${toHex(tokenId, 32).slice(0, 12 * 2)}`; - const token: `0x${string}` = `0x${toHex(tokenId, 32).slice(12 * 2, 32 * 2)}`; - return { - lockTag, - token, - amount - }; - }); - return { - arbiter: INPUT_SETTLER_COMPACT_LIFI, - sponsor: order.user, - nonce: order.nonce, - expires: BigInt(order.expires), - commitments, - mandate - }; - } - - inputChains(): bigint[] { - return [this.order.originChainId]; - } - - orderId(): `0x${string}` { - return keccak256( - encodePacked( - [ - "uint256", - "address", - "address", - "uint256", - "uint32", - "uint32", - "address", - "bytes32", - "bytes" - ], - [ - this.order.originChainId, - this.inputSettler, - this.order.user, - this.order.nonce, - this.order.expires, - this.order.fillDeadline, - this.order.inputOracle, - keccak256(encodePacked(["uint256[2][]"], [this.order.inputs])), - encodeOutputs(this.order.outputs) - ] - ) - ); - } - - // -- Escrow Helpers -- // - - /** - * @notice Opens an intent using the escrow input settler by depositing into it. - * @param account Account that calls open. - * @param walletClient Wallet client for sending the call to. - * @returns transactionHash for the on-chain call. - */ - async openEscrow(account: `0x${string}`, walletClient: WC): Promise<[`0x${string}`]> { - const chain = findChain(this.order.originChainId); - walletClient.switchChain({ id: Number(this.order.originChainId) }); - if (!chain) - throw new Error("Chain not found for chainId " + this.order.originChainId.toString()); - return [ - await walletClient.writeContract({ - chain, - account, - address: INPUT_SETTLER_ESCROW_LIFI, - abi: SETTLER_ESCROW_ABI, - functionName: "open", - args: [this.order] - }) - ]; - } - - // -- Compact Helpers -- // - - compactClaimHash(): `0x${string}` { - const claimHash = hashStruct({ - data: this.asBatchCompact(), - types: compactTypes, - primaryType: "BatchCompact" - }); - return claimHash; - } - - signCompact(account: `0x${string}`, walletClient: WC): Promise<`0x${string}`> { - const chainId = this.order.originChainId; - return walletClient.signTypedData({ - account, - domain: { - name: "The Compact", - version: "1", - chainId, - verifyingContract: COMPACT - } as const, - types: compactTypes, - primaryType: "BatchCompact", - message: this.asBatchCompact() - }); - } - - depositAndRegisterCompact(account: `0x${string}`, walletClient: WC): Promise<`0x${string}`> { - const chain = findChain(this.order.originChainId); - if (!chain) - throw new Error("Chain not found for chainId " + this.order.originChainId.toString()); - return walletClient.writeContract({ - chain, - account, - address: COMPACT, - abi: COMPACT_ABI, - functionName: "batchDepositAndRegisterMultiple", - args: [this.order.inputs, [[this.compactClaimHash(), compact_type_hash]]] - }); - } - - async finalise(options: { - sourceChain: chain; - account: `0x${string}`; - walletClient: WC; - solveParams: { timestamp: number; solver: `0x${string}` }[]; - signatures: { - sponsorSignature: Signature | NoSignature; - allocatorSignature: Signature | NoSignature; - }; - }) { - const { sourceChain, account, walletClient, solveParams, signatures } = options; - const actionChain = chainMap[sourceChain]; - if (actionChain.id !== Number(this.order.originChainId)) - throw new Error( - `Origin chain id and action ID does not match: ${this.order.originChainId}, ${actionChain.id}` - ); - - if (this.inputSettler.toLowerCase() === INPUT_SETTLER_ESCROW_LIFI.toLowerCase()) { - return await walletClient.writeContract({ - chain: actionChain, - account: account, - address: this.inputSettler, - abi: SETTLER_ESCROW_ABI, - functionName: "finalise", - args: [this.order, solveParams, addressToBytes32(account), "0x"] - }); - } else if (this.inputSettler.toLowerCase() === INPUT_SETTLER_COMPACT_LIFI.toLowerCase()) { - // Check whether or not we have a signature. - const { sponsorSignature, allocatorSignature } = signatures; - console.log({ - sponsorSignature, - allocatorSignature - }); - const combinedSignatures = encodeAbiParameters(parseAbiParameters(["bytes", "bytes"]), [ - sponsorSignature.payload ?? "0x", - allocatorSignature.payload - ]); - return await walletClient.writeContract({ - chain: actionChain, - account: account, - address: this.inputSettler, - abi: SETTLER_COMPACT_ABI, - functionName: "finalise", - args: [this.order, combinedSignatures, solveParams, addressToBytes32(account), "0x"] - }); - } else { - throw new Error(`Could not detect settler type ${this.inputSettler}`); - } - } -} - -export class MultichainOrderIntent { - lock?: { type: string } | EscrowLock | CompactLock; - - // Notice that this has to be the same address on every chain. - inputSettler: `0x${string}`; - order: MultichainOrder; - - constructor(inputSetter: `0x${string}`, order: MultichainOrder, lock?: { type: string }) { - this.inputSettler = inputSetter; - this.order = order; - - const isCompact = - this.inputSettler === INPUT_SETTLER_COMPACT_LIFI || - this.inputSettler === MULTICHAIN_INPUT_SETTLER_COMPACT; - - this.lock = lock ?? { type: isCompact ? "compact" : "escrow" }; - } - - selfTest() { - this.asOrder(); - this.inputChains(); - this.asComponents(); - - this.orderId(); - } - - /** - * @notice Returns for logging - */ - asOrder(): MultichainOrder { - return this.order; - } - - inputChains(): bigint[] { - return [...new Set(this.order.inputs.map((i) => i.chainId))]; - } - - orderId(): `0x${string}` { - // We need a random order components. - const components = this.asComponents(); - const computedOrderIds = components.map((c) => - this.lock?.type === "escrow" - ? MultichainOrderIntent.escrowOrderId(this.inputSettler, c.orderComponent, c.chainId) - : MultichainOrderIntent.compactOrderid(this.inputSettler, c.orderComponent, c.chainId) - ); - - const orderId = computedOrderIds[0]; - computedOrderIds.map((v) => { - if (v !== orderId) throw new Error(`Order ids are not equal ${computedOrderIds}`); - }); - if (this.lock?.type === "compact") { - const multichainCompactHash = hashStruct({ - data: this.asMultichainBatchCompact(), - types: compactTypes, - primaryType: "MultichainCompact" - }); - if (multichainCompactHash !== orderId) - throw new Error( - `MultichainCompact does not match orderId, ${multichainCompactHash} ${orderId}` - ); - } - return orderId; - } - - async orderIdCheck() { - const components = this.asComponents(); - const computedOrderId = this.orderId(); - const onChainOrderIds = await Promise.all( - components.map(async (component) => { - const onChainId = await clients[getChainName(component.chainId)].readContract({ - address: this.inputSettler, - abi: MULTICHAIN_SETTLER_COMPACT_ABI, - functionName: "orderIdentifier", - args: [component.orderComponent] - }); - return onChainId; - }) - ); - console.log({ computedOrderId, onChainOrderIds }); - } - - static escrowOrderId( - inputSettler: `0x${string}`, - orderComponent: MultichainOrderComponent, - _: bigint - ) { - return keccak256( - encodePacked( - ["address", "address", "uint256", "uint32", "uint32", "address", "bytes32", "bytes"], - [ - inputSettler, - orderComponent.user, - orderComponent.nonce, - orderComponent.expires, - orderComponent.fillDeadline, - orderComponent.inputOracle, - MultichainOrderIntent.constructInputHash( - orderComponent.chainIdField, - orderComponent.chainIndex, - orderComponent.inputs, - orderComponent.additionalChains - ), - encodeOutputs(orderComponent.outputs) - ] - ) - ); - } - - static compactOrderid( - inputSettler: `0x${string}`, - orderComponent: MultichainOrderComponent, - chainId: bigint - ) { - const MULTICHAIN_COMPACT_TYPEHASH_WITH_WITNESS = keccak256( - encodePacked( - ["string"], - [ - "MultichainCompact(address sponsor,uint256 nonce,uint256 expires,Element[] elements)Element(address arbiter,uint256 chainId,Lock[] commitments,Mandate mandate)Lock(bytes12 lockTag,address token,uint256 amount)Mandate(uint32 fillDeadline,address inputOracle,MandateOutput[] outputs)MandateOutput(bytes32 oracle,bytes32 settler,uint256 chainId,bytes32 token,uint256 amount,bytes32 recipient,bytes callbackData,bytes context)" - ] - ) - ); - const { fillDeadline, inputOracle, outputs, inputs } = orderComponent; - const mandate: CompactMandate = { - fillDeadline, - inputOracle, - outputs - }; - const element: Element = { - arbiter: inputSettler, - chainId: chainId, - commitments: MultichainOrderIntent.inputsToLocks(inputs), - mandate - }; - - const elementHash = hashStruct({ - types: compactTypes, - primaryType: "Element", - data: element - }); - - const elementHashes = [ - ...orderComponent.additionalChains.slice(0, Number(orderComponent.chainIndex)), - elementHash, - ...orderComponent.additionalChains.slice(Number(orderComponent.chainIndex)) - ]; - - return keccak256( - encodeAbiParameters( - parseAbiParameters(["bytes32", "address", "uint256", "uint256", "bytes32"]), - [ - MULTICHAIN_COMPACT_TYPEHASH_WITH_WITNESS, - orderComponent.user, - orderComponent.nonce, - BigInt(orderComponent.expires), - keccak256(encodePacked(["bytes32[]"], [elementHashes])) - ] - ) - ); - } - - static hashInputs(chainId: bigint, inputs: [bigint, bigint][]) { - return keccak256(encodePacked(["uint256", "uint256[2][]"], [chainId, inputs])); - } - - static constructInputHash( - inputsChainId: bigint, - chainIndex: bigint, - inputs: [bigint, bigint][], - additionalChains: `0x${string}`[] - ) { - const inputHash = MultichainOrderIntent.hashInputs(inputsChainId, inputs); - const numSegments = additionalChains.length + 1; - if (numSegments <= chainIndex) - throw new Error(`ChainIndexOutOfRange(${chainIndex},${numSegments})`); - const claimStructure: `0x${string}`[] = []; - for (let i = 0; i < numSegments; ++i) { - const additionalChainsIndex = i > chainIndex ? i - 1 : i; - const inputHashElement = - chainIndex == BigInt(i) ? inputHash : additionalChains[additionalChainsIndex]; - claimStructure[i] = inputHashElement; - } - return keccak256(encodePacked(["bytes32[]"], [claimStructure])); - } - - static inputsToLocks(inputs: [bigint, bigint][]): Lock[] { - return inputs.map((input) => { - const bytes32 = toHex(input[0], 32); - return { - lockTag: `0x${bytes32.slice(0, 12 * 2)}`, - token: `0x${bytes32.slice(12 * 2, 32 * 2)}`, - amount: input[1] - }; - }); - } - - secondariesEcsrow(): { chainIdField: bigint; additionalChains: `0x${string}`[] }[] { - const inputsHash: `0x${string}`[] = this.order.inputs.map((input) => - keccak256(encodePacked(["uint256", "uint256[2][]"], [input.chainId, input.inputs])) - ); - return this.order.inputs.map((v, i) => { - return { - chainIdField: v.chainId, - additionalChains: selectAllBut(inputsHash, i) - }; - }); - } - - asCompactElements() { - const { fillDeadline, inputOracle, outputs, inputs } = this.order; - const mandate: CompactMandate = { - fillDeadline, - inputOracle, - outputs - }; - return inputs.map((inputs) => { - const element: Element = { - arbiter: this.inputSettler, - chainId: inputs.chainId, - commitments: MultichainOrderIntent.inputsToLocks(inputs.inputs), - mandate - }; - return element; - }); - } - - secondariesCompact(): { chainIdField: bigint; additionalChains: `0x${string}`[] }[] { - const { inputs } = this.order; - const elements = this.asCompactElements().map((element) => { - const hash = hashStruct({ - types: compactTypes, - primaryType: "Element", - data: element - }); - return hash; - }); - return inputs.map((_, i) => { - return { - chainIdField: inputs[0].chainId, - additionalChains: selectAllBut(elements, i) - }; - }); - } - - asComponents(): { chainId: bigint; orderComponent: MultichainOrderComponent }[] { - const { inputs, user, nonce, expires, fillDeadline, inputOracle, outputs } = this.order; - if (!this.lock) throw new Error(`No lock provided, cannot compute secondaries.`); - const secondaries = - this.lock.type == "escrow" ? this.secondariesEcsrow() : this.secondariesCompact(); - const components: { chainId: bigint; orderComponent: MultichainOrderComponent }[] = []; - for (let i = 0; i < inputs.length; ++i) { - const { chainIdField, additionalChains } = secondaries[i]; - - const orderComponent: MultichainOrderComponent = { - user: user, - nonce: nonce, - chainIdField: chainIdField, - chainIndex: BigInt(i), - expires: expires, - fillDeadline: fillDeadline, - inputOracle: inputOracle, - inputs: inputs[i].inputs, - outputs: outputs, - additionalChains: additionalChains - }; - components.push({ chainId: inputs[i].chainId, orderComponent }); - } - return components; - } - - // -- Compact Helpers -- // - - asMultichainBatchCompact(): MultichainCompact { - const { order } = this; - const mandate: CompactMandate = { - fillDeadline: order.fillDeadline, - inputOracle: order.inputOracle, - outputs: order.outputs - }; - const result = { - sponsor: order.user, - nonce: order.nonce, - expires: BigInt(order.expires), - elements: this.asCompactElements(), - mandate - }; - return result; - } - - compactClaimHash(): `0x${string}` { - const claimHash = hashStruct({ - data: this.asMultichainBatchCompact(), - types: compactTypes, - primaryType: "MultichainCompact" - }); - return claimHash; - } - - signCompact(account: `0x${string}`, walletClient: WC): Promise<`0x${string}`> { - this.selfTest(); - const chainId = this.order.inputs[0].chainId; - return walletClient.signTypedData({ - account, - domain: { - name: "The Compact", - version: "1", - chainId, - verifyingContract: COMPACT - } as const, - types: compactTypes, - primaryType: "MultichainCompact", - message: this.asMultichainBatchCompact() - }); - } - - // This code is depreciated and needs to be updated. - async openEscrow(account: `0x${string}`, walletClient: WC) { - this.selfTest(); - const components = this.asComponents(); - const results: `0x${string}`[] = []; - for (const { chainId, orderComponent } of components) { - const chain = findChain(chainId)!; - walletClient.switchChain({ id: chain.id }); - results.push( - await walletClient.writeContract({ - chain, - account, - address: this.inputSettler, - abi: MULTICHAIN_SETTLER_ESCROW_ABI, - functionName: "open", - args: [orderComponent] - }) - ); - console.log(results); - } - return results; - } - - async finalise(options: { - sourceChain: chain; - account: `0x${string}`; - walletClient: WC; - solveParams: { timestamp: number; solver: `0x${string}` }[]; - signatures: { - sponsorSignature: Signature | NoSignature; - allocatorSignature: Signature | NoSignature; - }; - }) { - this.asMultichainBatchCompact(); - const { sourceChain, account, walletClient, solveParams, signatures } = options; - const actionChain = chainMap[sourceChain]; - const inputChainIds = this.inputChains().map((v) => Number(v)); - if (!inputChainIds.includes(actionChain.id)) - throw new Error( - `Action chain must be one of input chains for finalise: ${inputChainIds}, action=${actionChain.id}` - ); - // Get all components for our chain. - const components = this.asComponents().filter((c) => Number(c.chainId) === actionChain.id); - if (components.length === 0) { - throw new Error( - `No multichain order component found for action chain ${actionChain.id} (${sourceChain}).` - ); - } - - for (const { orderComponent, chainId } of components) { - if (this.inputSettler.toLowerCase() === MULTICHAIN_INPUT_SETTLER_ESCROW.toLowerCase()) { - return await walletClient.writeContract({ - chain: actionChain, - account: account, - address: this.inputSettler, - abi: MULTICHAIN_SETTLER_ESCROW_ABI, - functionName: "finalise", - args: [orderComponent, solveParams, addressToBytes32(account), "0x"] - }); - } else if ( - this.inputSettler.toLowerCase() === MULTICHAIN_INPUT_SETTLER_COMPACT.toLowerCase() - ) { - const { sponsorSignature, allocatorSignature } = signatures; - console.log({ - orderComponent, - sponsorSignature, - allocatorSignature - }); - - const combinedSignatures = encodeAbiParameters(parseAbiParameters(["bytes", "bytes"]), [ - sponsorSignature.payload ?? "0x", - allocatorSignature.payload - ]); - return await walletClient.writeContract({ - chain: actionChain, - account: account, - address: this.inputSettler, - abi: MULTICHAIN_SETTLER_COMPACT_ABI, - functionName: "finalise", - args: [orderComponent, combinedSignatures, solveParams, addressToBytes32(account), "0x"] - }); - } else { - throw new Error(`Could not detect settler type ${this.inputSettler}`); - } - } - throw new Error(`Failed to finalise multichain order on chain ${sourceChain}.`); - } -} diff --git a/src/lib/libraries/intentExecution.ts b/src/lib/libraries/intentExecution.ts new file mode 100644 index 0000000..780ecb7 --- /dev/null +++ b/src/lib/libraries/intentExecution.ts @@ -0,0 +1,193 @@ +import { encodeAbiParameters, parseAbiParameters } from "viem"; +import { COMPACT_ABI } from "$lib/abi/compact"; +import { MULTICHAIN_SETTLER_COMPACT_ABI } from "$lib/abi/multichain_compact"; +import { MULTICHAIN_SETTLER_ESCROW_ABI } from "$lib/abi/multichain_escrow"; +import { SETTLER_ESCROW_ABI } from "$lib/abi/escrow"; +import { SETTLER_COMPACT_ABI } from "$lib/abi/settlercompact"; +import { + COMPACT, + INPUT_SETTLER_COMPACT_LIFI, + INPUT_SETTLER_ESCROW_LIFI, + MULTICHAIN_INPUT_SETTLER_COMPACT, + MULTICHAIN_INPUT_SETTLER_ESCROW, + getChain, + type WC +} from "$lib/config"; +import { compact_type_hash } from "@lifi/intent"; +import { addressToBytes32 } from "@lifi/intent"; +import { signMultichainCompact, signStandardCompact } from "@lifi/intent"; +import { MultichainOrderIntent, StandardEVMIntent } from "@lifi/intent"; +import type { NoSignature, Signature } from "@lifi/intent"; +import type { TypedDataSigner } from "@lifi/intent"; +import { switchWalletChain } from "$lib/utils/walletClientRuntime"; + +function combineSignatures(signatures: { + sponsorSignature: Signature | NoSignature; + allocatorSignature: Signature | NoSignature; +}) { + const { sponsorSignature, allocatorSignature } = signatures; + return encodeAbiParameters(parseAbiParameters(["bytes", "bytes"]), [ + sponsorSignature.payload ?? "0x", + allocatorSignature.payload + ]); +} + +export function signIntentCompact( + intent: StandardEVMIntent | MultichainOrderIntent, + account: `0x${string}`, + walletClient: WC +): Promise<`0x${string}`> { + const signer = walletClient as unknown as TypedDataSigner; + if (intent instanceof StandardEVMIntent) { + const order = intent.asOrder(); + return signStandardCompact(account, signer, order.originChainId, intent.asBatchCompact()); + } + const order = intent.asOrder(); + return signMultichainCompact( + account, + signer, + order.inputs[0].chainId, + intent.asMultichainBatchCompact() + ); +} + +export async function depositAndRegisterCompact( + intent: StandardEVMIntent, + account: `0x${string}`, + walletClient: WC +): Promise<`0x${string}`> { + const order = intent.asOrder(); + const chain = getChain(order.originChainId); + return walletClient.writeContract({ + chain, + account, + address: COMPACT, + abi: COMPACT_ABI, + functionName: "batchDepositAndRegisterMultiple", + args: [order.inputs, [[intent.compactClaimHash(), compact_type_hash]]] + }); +} + +export async function openEscrowIntent( + intent: StandardEVMIntent | MultichainOrderIntent, + account: `0x${string}`, + walletClient: WC +): Promise<`0x${string}`[]> { + if (intent instanceof StandardEVMIntent) { + const order = intent.asOrder(); + await switchWalletChain(walletClient, Number(order.originChainId)); + const chain = getChain(order.originChainId); + return [ + await walletClient.writeContract({ + chain, + account, + address: INPUT_SETTLER_ESCROW_LIFI, + abi: SETTLER_ESCROW_ABI, + functionName: "open", + args: [order] + }) + ]; + } + + const components = intent.asComponents(); + const results: `0x${string}`[] = []; + for (const { chainId, orderComponent } of components) { + const chain = getChain(chainId); + await switchWalletChain(walletClient, chain.id); + results.push( + await walletClient.writeContract({ + chain, + account, + address: intent.inputSettler, + abi: MULTICHAIN_SETTLER_ESCROW_ABI, + functionName: "open", + args: [orderComponent] + }) + ); + } + return results; +} + +export async function finaliseIntent(options: { + intent: StandardEVMIntent | MultichainOrderIntent; + sourceChainId: number | bigint; + account: `0x${string}`; + walletClient: WC; + solveParams: { timestamp: number; solver: `0x${string}` }[]; + signatures: { + sponsorSignature: Signature | NoSignature; + allocatorSignature: Signature | NoSignature; + }; +}) { + const { intent, sourceChainId, account, walletClient, solveParams, signatures } = options; + const actionChain = getChain(sourceChainId); + + if (intent instanceof StandardEVMIntent) { + const order = intent.asOrder(); + if (actionChain.id !== Number(order.originChainId)) { + throw new Error( + `Origin chain id and action ID does not match: ${order.originChainId}, ${actionChain.id}` + ); + } + if (intent.inputSettler.toLowerCase() === INPUT_SETTLER_ESCROW_LIFI.toLowerCase()) { + return walletClient.writeContract({ + chain: actionChain, + account, + address: intent.inputSettler, + abi: SETTLER_ESCROW_ABI, + functionName: "finalise", + args: [order, solveParams, addressToBytes32(account), "0x"] + }); + } + if (intent.inputSettler.toLowerCase() === INPUT_SETTLER_COMPACT_LIFI.toLowerCase()) { + const combinedSignatures = combineSignatures(signatures); + return walletClient.writeContract({ + chain: actionChain, + account, + address: intent.inputSettler, + abi: SETTLER_COMPACT_ABI, + functionName: "finalise", + args: [order, combinedSignatures, solveParams, addressToBytes32(account), "0x"] + }); + } + throw new Error(`Could not detect settler type ${intent.inputSettler}`); + } + + const inputChainIds = intent.inputChains().map((v) => Number(v)); + if (!inputChainIds.includes(actionChain.id)) { + throw new Error( + `Action chain must be one of input chains for finalise: ${inputChainIds}, action=${actionChain.id}` + ); + } + const components = intent.asComponents().filter((c) => Number(c.chainId) === actionChain.id); + if (components.length === 0) { + throw new Error(`No multichain order component found for action chain ${actionChain.id}.`); + } + + for (const { orderComponent } of components) { + if (intent.inputSettler.toLowerCase() === MULTICHAIN_INPUT_SETTLER_ESCROW.toLowerCase()) { + return walletClient.writeContract({ + chain: actionChain, + account, + address: intent.inputSettler, + abi: MULTICHAIN_SETTLER_ESCROW_ABI, + functionName: "finalise", + args: [orderComponent, solveParams, addressToBytes32(account), "0x"] + }); + } + if (intent.inputSettler.toLowerCase() === MULTICHAIN_INPUT_SETTLER_COMPACT.toLowerCase()) { + const combinedSignatures = combineSignatures(signatures); + return walletClient.writeContract({ + chain: actionChain, + account, + address: intent.inputSettler, + abi: MULTICHAIN_SETTLER_COMPACT_ABI, + functionName: "finalise", + args: [orderComponent, combinedSignatures, solveParams, addressToBytes32(account), "0x"] + }); + } + throw new Error(`Could not detect settler type ${intent.inputSettler}`); + } + + throw new Error(`Failed to finalise multichain order on chain ${actionChain.id}.`); +} diff --git a/src/lib/libraries/intentFactory.ts b/src/lib/libraries/intentFactory.ts index 04a4740..557381e 100644 --- a/src/lib/libraries/intentFactory.ts +++ b/src/lib/libraries/intentFactory.ts @@ -1,222 +1,334 @@ import { - type chain, - chainMap, - clients, - INPUT_SETTLER_COMPACT_LIFI, - INPUT_SETTLER_ESCROW_LIFI, - MULTICHAIN_INPUT_SETTLER_ESCROW, - type Token, - type WC + getChain, + getClient, + INPUT_SETTLER_COMPACT_LIFI, + INPUT_SETTLER_ESCROW_LIFI, + MULTICHAIN_INPUT_SETTLER_ESCROW, + type WC } from "$lib/config"; -import { maxUint256 } from "viem"; +import { encodePacked, maxUint256 } from "viem"; import type { - MultichainOrder, - NoSignature, - OrderContainer, - Signature, - StandardOrder -} from "../../types"; + CreateIntentOptions, + TokenContext, + MultichainOrder, + NoSignature, + OrderContainer, + Signature, + StandardOrder +} from "@lifi/intent"; +import { + Intent, + IntentApi, + StandardSolanaIntent, + SOLANA_MAINNET_CHAIN_ID, + SOLANA_TESTNET_CHAIN_ID, + SOLANA_DEVNET_CHAIN_ID +} from "@lifi/intent"; +import type { AppCreateIntentOptions, AppTokenContext } from "$lib/appTypes"; import { ERC20_ABI } from "$lib/abi/erc20"; -import { Intent } from "$lib/libraries/intent"; -import { OrderServer } from "$lib/libraries/orderServer"; -import type { CreateIntentOptions } from "$lib/libraries/intent"; -import { store, type TokenContext } from "$lib/state.svelte"; +import { store } from "$lib/state.svelte"; +import { depositAndRegisterCompact, openEscrowIntent, signIntentCompact } from "./intentExecution"; +import { intentDeps } from "./coreDeps"; + +const SOLANA_CHAIN_IDS = new Set([ + SOLANA_MAINNET_CHAIN_ID, + SOLANA_TESTNET_CHAIN_ID, + SOLANA_DEVNET_CHAIN_ID +]); + +const SAME_CHAIN_DURATION_SECONDS = 10 * 60; // 10 minutes +const SAME_CHAIN_EXCLUSIVITY_SECONDS = 12 * 3; // 36 seconds + +function applySameChainTimings(intent: Intent): void { + if (!intent.isSameChain()) return; + const mutable = intent as unknown as { expiry: number; fillDeadline: number }; + mutable.expiry = SAME_CHAIN_DURATION_SECONDS; + mutable.fillDeadline = SAME_CHAIN_DURATION_SECONDS; +} + +function applyExclusivityOverride( + orderIntent: ReturnType, + exclusiveFor: string | undefined, + isSameChain: boolean +): void { + if (!isSameChain || !exclusiveFor) return; + const order = orderIntent.asOrder() as StandardOrder; + const currentTime = Math.floor(Date.now() / 1000); + const paddedExclusiveFor = + `0x${exclusiveFor.replace("0x", "").padStart(64, "0")}` as `0x${string}`; + const newContext = encodePacked( + ["bytes1", "bytes32", "uint32"], + ["0xe0", paddedExclusiveFor, currentTime + SAME_CHAIN_EXCLUSIVITY_SECONDS] + ); + for (const output of order.outputs) { + if (output.context !== "0x") { + output.context = newContext; + } + } +} + +function toCoreTokenContext(input: AppTokenContext): TokenContext { + const chainId = BigInt(input.token.chainId); + return { + token: { + address: input.token.address, + name: input.token.name, + chainId, + decimals: input.token.decimals, + chainNamespace: SOLANA_CHAIN_IDS.has(chainId) ? "solana" : "eip155" + }, + amount: input.amount + }; +} + +function toCoreCreateIntentOptions(opts: AppCreateIntentOptions): CreateIntentOptions { + const account = opts.account(); + if (opts.lock.type === "compact") { + return { + exclusiveFor: opts.exclusiveFor, + inputTokens: opts.inputTokens.map(toCoreTokenContext), + outputTokens: opts.outputTokens.map(toCoreTokenContext), + verifier: opts.verifier, + account, + outputRecipient: opts.outputRecipient, + lock: { + type: "compact", + resetPeriod: opts.lock.resetPeriod, + allocatorId: opts.lock.allocatorId + } + }; + } + + return { + exclusiveFor: opts.exclusiveFor, + inputTokens: opts.inputTokens.map(toCoreTokenContext), + outputTokens: opts.outputTokens.map(toCoreTokenContext), + verifier: opts.verifier, + account, + outputRecipient: opts.outputRecipient, + lock: { + type: "escrow" + } + }; +} /** * @notice Factory class for creating and managing intents. Functions called by integrators. */ export class IntentFactory { - mainnet: boolean; - orderServer: OrderServer; - - walletClient: WC; - - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - - orders: OrderContainer[] = []; - - constructor(options: { - mainnet: boolean; - walletClient: WC; - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - ordersPointer?: OrderContainer[]; - }) { - const { mainnet, walletClient, preHook, postHook, ordersPointer } = options; - this.mainnet = mainnet; - this.orderServer = new OrderServer(mainnet); - this.walletClient = walletClient; - - this.preHook = preHook; - this.postHook = postHook; - - if (ordersPointer) this.orders = ordersPointer; - } - - private saveOrder(options: { - order: StandardOrder | MultichainOrder; - inputSettler: `0x${string}`; - sponsorSignature?: Signature | NoSignature; - allocatorSignature?: Signature | NoSignature; - }) { - const { order, inputSettler, sponsorSignature, allocatorSignature } = options; - - const orderContainer: OrderContainer = { - order, - inputSettler, - sponsorSignature: sponsorSignature ?? { - type: "None", - payload: "0x" - }, - allocatorSignature: allocatorSignature ?? { - type: "None", - payload: "0x" - } - }; - this.orders.push(orderContainer); - store.saveOrderToDb(orderContainer).catch((e) => console.warn("saveOrderToDb error", e)); - } - - compact(opts: CreateIntentOptions) { - return async () => { - const { account, inputTokens } = opts; - const inputChain = inputTokens[0].token.chain; - if (this.preHook) await this.preHook(inputChain); - const intent = new Intent(opts).order(); - - const sponsorSignature = await intent.signCompact(account(), this.walletClient); - - console.log({ - order: intent.asOrder(), - sponsorSignature - }); - - this.saveOrder({ - order: intent.asOrder(), - inputSettler: intent.inputSettler, - sponsorSignature: { - type: "ECDSA", - payload: sponsorSignature - } - }); - - const signedOrder = await this.orderServer.submitOrder({ - orderType: "CatalystCompactOrder", - order: intent.asOrder() as StandardOrder, - inputSettler: INPUT_SETTLER_COMPACT_LIFI, - sponsorSignature, - allocatorSignature: "0x" - }); - console.log("signedOrder", signedOrder); - - if (this.postHook) await this.postHook(); - }; - } - - compactDepositAndRegister(opts: CreateIntentOptions) { - return async () => { - const { inputTokens, account } = opts; - const publicClients = clients; - const intent = new Intent(opts).singlechain(); - - if (this.preHook) await this.preHook(inputTokens[0].token.chain); - - let transactionHash = await intent.depositAndRegisterCompact(account(), this.walletClient); - - const receipt = await publicClients[inputTokens[0].token.chain].waitForTransactionReceipt({ - hash: transactionHash - }); - - // If you use another allocator than polymer, there should be logic for potentially getting the allocator signature here. - // You may consider getting the allocator signature before you call depositAndRegisterCompact - - // Add the order to our local order list. - this.saveOrder({ - order: intent.asStandardOrder(), - inputSettler: INPUT_SETTLER_COMPACT_LIFI - }); - - // Submit the order to the order server. - const unsignedOrder = await this.orderServer.submitOrder({ - orderType: "CatalystCompactOrder", - order: intent.asStandardOrder(), - inputSettler: INPUT_SETTLER_COMPACT_LIFI, - compactRegistrationTxHash: transactionHash - }); - - console.log("unsignedOrder", unsignedOrder); - if (this.postHook) await this.postHook(); - }; - } - - openIntent(opts: CreateIntentOptions) { - return async () => { - const { inputTokens, account } = opts; - const intent = new Intent(opts).order(); - - const inputChain = inputTokens[0].token.chain; - if (this.preHook) await this.preHook(inputChain); - - // Execute the open. - const transactionHashes = await intent.openEscrow(account(), this.walletClient); - console.log({ tsh: transactionHashes }); - - // for (const hash of transactionHashes) { - // await clients[inputChain].waitForTransactionReceipt({ - // hash: await hash - // }); - // } - - if (this.postHook) await this.postHook(); - - this.saveOrder({ - order: intent.asOrder(), - inputSettler: store.inputSettler - }); - - return transactionHashes; - }; - } + mainnet: boolean; + intentApi: IntentApi; + + walletClient: WC; + + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + + orders: OrderContainer[] = []; + + constructor(options: { + mainnet: boolean; + useProductionApi?: boolean | null; + walletClient: WC; + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + ordersPointer?: OrderContainer[]; + }) { + const { mainnet, useProductionApi, walletClient, preHook, postHook, ordersPointer } = options; + this.mainnet = mainnet; + this.intentApi = new IntentApi(useProductionApi ?? mainnet); + this.walletClient = walletClient; + + this.preHook = preHook; + this.postHook = postHook; + + if (ordersPointer) this.orders = ordersPointer; + } + + private async saveOrder(options: { + order: StandardOrder | MultichainOrder; + inputSettler: `0x${string}`; + sponsorSignature?: Signature | NoSignature; + allocatorSignature?: Signature | NoSignature; + }) { + const { order, inputSettler, sponsorSignature, allocatorSignature } = options; + + const orderContainer: OrderContainer = { + order, + inputSettler, + sponsorSignature: sponsorSignature ?? { + type: "None", + payload: "0x" + }, + allocatorSignature: allocatorSignature ?? { + type: "None", + payload: "0x" + } + }; + this.orders.push(orderContainer); + await store.saveOrderToDb(orderContainer); + } + + compact(opts: AppCreateIntentOptions) { + return async () => { + const { account, inputTokens } = opts; + const inputChain = inputTokens[0].token.chainId; + if (this.preHook) await this.preHook(inputChain); + const intentInstance = new Intent(toCoreCreateIntentOptions(opts), intentDeps); + applySameChainTimings(intentInstance); + const sameChain = intentInstance.isSameChain(); + const intent = intentInstance.order(); + if (intent instanceof StandardSolanaIntent) + throw new Error("Compact signing is not supported for Solana intents."); + applyExclusivityOverride(intent, opts.exclusiveFor, sameChain); + + const sponsorSignature = await signIntentCompact(intent, account(), this.walletClient); + + console.log({ + order: intent.asOrder(), + sponsorSignature + }); + + await this.saveOrder({ + order: intent.asOrder(), + inputSettler: intent.inputSettler, + sponsorSignature: { + type: "ECDSA", + payload: sponsorSignature + } + }); + + const order = intent.asOrder(); + if (!("originChainId" in order)) { + throw new Error("CatalystCompactOrder submission currently supports standard orders."); + } + const signedOrder = await this.intentApi.submitOrder({ + orderType: "CatalystCompactOrder", + order, + inputSettler: INPUT_SETTLER_COMPACT_LIFI, + sponsorSignature, + allocatorSignature: "0x" + }); + console.log("signedOrder", signedOrder); + + if (this.postHook) await this.postHook(); + }; + } + + compactDepositAndRegister(opts: AppCreateIntentOptions) { + return async () => { + const { inputTokens, account } = opts; + const intentInstance2 = new Intent(toCoreCreateIntentOptions(opts), intentDeps); + applySameChainTimings(intentInstance2); + const sameChain2 = intentInstance2.isSameChain(); + const intent = intentInstance2.singlechain(); + if (intent instanceof StandardSolanaIntent) + throw new Error("Compact deposit and register is not supported for Solana intents."); + applyExclusivityOverride(intent, opts.exclusiveFor, sameChain2); + + if (this.preHook) await this.preHook(inputTokens[0].token.chainId); + + let transactionHash = await depositAndRegisterCompact(intent, account(), this.walletClient); + + const receipt = await getClient(inputTokens[0].token.chainId).waitForTransactionReceipt({ + hash: transactionHash + }); + + // If you use another allocator than polymer, there should be logic for potentially getting the allocator signature here. + // You may consider getting the allocator signature before you call depositAndRegisterCompact + + // Add the order to our local order list. + await this.saveOrder({ + order: intent.asOrder(), + inputSettler: INPUT_SETTLER_COMPACT_LIFI + }); + + // Submit the order to the intent-api. + const unsignedOrder = await this.intentApi.submitOrder({ + orderType: "CatalystCompactOrder", + order: intent.asOrder(), + inputSettler: INPUT_SETTLER_COMPACT_LIFI, + compactRegistrationTxHash: transactionHash + }); + + console.log("unsignedOrder", unsignedOrder); + if (this.postHook) await this.postHook(); + }; + } + + openIntent(opts: AppCreateIntentOptions) { + return async () => { + const { inputTokens, account } = opts; + const intentInstance3 = new Intent(toCoreCreateIntentOptions(opts), intentDeps); + applySameChainTimings(intentInstance3); + const sameChain3 = intentInstance3.isSameChain(); + const intent = intentInstance3.order(); + if (intent instanceof StandardSolanaIntent) + throw new Error("openEscrowIntent is not supported for Solana intents."); + applyExclusivityOverride(intent, opts.exclusiveFor, sameChain3); + + const inputChain = inputTokens[0].token.chainId; + if (this.preHook) await this.preHook(inputChain); + + // Execute the open. + const transactionHashes = await openEscrowIntent(intent, account(), this.walletClient); + console.log({ tsh: transactionHashes }); + + // for (const hash of transactionHashes) { + // await clients[inputChain].waitForTransactionReceipt({ + // hash: await hash + // }); + // } + + if (this.postHook) await this.postHook(); + + await this.saveOrder({ + order: intent.asOrder(), + inputSettler: store.inputSettler + }); + + return transactionHashes; + }; + } } export function escrowApprove( - walletClient: WC, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - inputTokens: TokenContext[]; - account: () => `0x${string}`; - } + walletClient: WC, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + inputTokens: AppTokenContext[]; + account: () => `0x${string}`; + } ) { - return async () => { - const settler = store.multichain ? MULTICHAIN_INPUT_SETTLER_ESCROW : INPUT_SETTLER_ESCROW_LIFI; - - const { preHook, postHook, inputTokens, account } = opts; - for (let i = 0; i < inputTokens.length; ++i) { - const { token, amount } = inputTokens[i]; - if (preHook) await preHook(token.chain); - const publicClient = clients[token.chain]; - const currentAllowance = await publicClient.readContract({ - address: token.address, - abi: ERC20_ABI, - functionName: "allowance", - args: [account(), settler] - }); - if (currentAllowance >= amount) continue; - const transactionHash = walletClient.writeContract({ - chain: chainMap[token.chain], - account: account(), - address: token.address, - abi: ERC20_ABI, - functionName: "approve", - args: [settler, maxUint256] - }); - - await publicClient.waitForTransactionReceipt({ - hash: await transactionHash - }); - } - if (postHook) await postHook(); - }; + return async () => { + const settler = store.multichain ? MULTICHAIN_INPUT_SETTLER_ESCROW : INPUT_SETTLER_ESCROW_LIFI; + + const { preHook, postHook, inputTokens, account } = opts; + for (let i = 0; i < inputTokens.length; ++i) { + const { token, amount } = inputTokens[i]; + if (preHook) await preHook(token.chainId); + const publicClient = getClient(token.chainId); + const currentAllowance = await publicClient.readContract({ + address: token.address, + abi: ERC20_ABI, + functionName: "allowance", + args: [account(), settler] + }); + if (currentAllowance >= amount) continue; + const transactionHash = walletClient.writeContract({ + chain: getChain(token.chainId), + account: account(), + address: token.address, + abi: ERC20_ABI, + functionName: "approve", + args: [settler, maxUint256] + }); + + await publicClient.waitForTransactionReceipt({ + hash: await transactionHash + }); + } + if (postHook) await postHook(); + }; } diff --git a/src/lib/libraries/intentList.ts b/src/lib/libraries/intentList.ts index 6ff1267..3630fc7 100644 --- a/src/lib/libraries/intentList.ts +++ b/src/lib/libraries/intentList.ts @@ -1,270 +1,277 @@ import { - formatTokenAmount, - getChainName, - getCoin, - type chain, - INPUT_SETTLER_ESCROW_LIFI, - INPUT_SETTLER_COMPACT_LIFI, - MULTICHAIN_INPUT_SETTLER_ESCROW, - MULTICHAIN_INPUT_SETTLER_COMPACT + formatTokenAmount, + getChainName, + getCoin, + INPUT_SETTLER_ESCROW_LIFI, + INPUT_SETTLER_COMPACT_LIFI, + MULTICHAIN_INPUT_SETTLER_ESCROW, + MULTICHAIN_INPUT_SETTLER_COMPACT } from "../config"; -import { orderToIntent } from "./intent"; -import { bytes32ToAddress, idToToken } from "../utils/convert"; -import type { OrderContainer, StandardOrder, MultichainOrder } from "../../types"; -import { validateOrderContainerWithReason } from "$lib/utils/orderLib"; +import { bytes32ToAddress, idToToken } from "@lifi/intent"; +import { containerToIntent } from "$lib/utils/intent"; +import type { OrderContainer, StandardOrder, MultichainOrder } from "@lifi/intent"; +import { validateOrderContainerWithReason } from "@lifi/intent"; +import { orderValidationDeps } from "./coreDeps"; export type Chip = { - key: string; - text: string; + key: string; + text: string; }; export type Status = "active" | "expiring" | "expired"; export type ChainScope = "singlechain" | "multichain" | "samechain"; export type BaseIntentRow = { - orderContainer: OrderContainer; - orderId: string; - orderIdShort: string; - userShort: string; - fillDeadline: number; - inputCount: number; - outputCount: number; - chainScope: ChainScope; - chainScopeBadge: string; - inputSchemeBadge?: string; - orderTypeBadge?: string; - exclusiveForAddress?: string; - exclusiveUntil?: number; - inputChips: Chip[]; - inputOverflow: number; - outputChips: Chip[]; - outputOverflow: number; - validationPassed: boolean; - validationReason: string; + orderContainer: OrderContainer; + orderId: string; + orderIdShort: string; + userShort: string; + fillDeadline: number; + inputCount: number; + outputCount: number; + chainScope: ChainScope; + chainScopeBadge: string; + inputSchemeBadge?: string; + orderTypeBadge?: string; + exclusiveForAddress?: string; + exclusiveUntil?: number; + inputChips: Chip[]; + inputOverflow: number; + outputChips: Chip[]; + outputOverflow: number; + validationPassed: boolean; + validationReason: string; }; export type TimedIntentRow = BaseIntentRow & { - status: Status; - secondsToDeadline: number; - protocolBadges: string[]; + status: Status; + secondsToDeadline: number; + protocolBadges: string[]; }; export const EXPIRING_THRESHOLD_SECONDS = 5 * 60; export const MAX_CHIPS_PER_SIDE = 2; function flattenInputs(inputs: { chainId: bigint; inputs: [bigint, bigint][] }[]) { - return inputs.flatMap((chainInput) => { - return chainInput.inputs.map((input) => ({ - chainId: chainInput.chainId, - input - })); - }); + return inputs.flatMap((chainInput) => { + return chainInput.inputs.map((input) => ({ + chainId: chainInput.chainId, + input + })); + }); } -function safeChainName(chainId: bigint): chain | undefined { - try { - return getChainName(chainId); - } catch { - return undefined; - } +function safeChainName(chainId: bigint): string | undefined { + try { + return getChainName(chainId); + } catch { + return undefined; + } } function shortAddress(value: string, start = 6, end = 4) { - if (value.length <= start + end) return value; - return `${value.slice(0, start)}...${value.slice(-end)}`; + if (value.length <= start + end) return value; + return `${value.slice(0, start)}...${value.slice(-end)}`; } function summarizeInput(chainId: bigint, tokenId: bigint, amount: bigint): string { - const chain = safeChainName(chainId); - const tokenAddress = idToToken(tokenId); - if (!chain) return `${shortAddress(tokenAddress)} on chain-${chainId.toString()}`; - const coin = getCoin({ address: tokenAddress, chain }); - const amountText = formatTokenAmount(amount, coin.decimals); - return `${amountText} ${coin.name.toUpperCase()} on ${chain}`; + const tokenAddress = idToToken(tokenId); + const chainName = safeChainName(chainId); + if (!chainName) { + return `${amount.toString()} ${shortAddress(tokenAddress)} on chain-${chainId.toString()}`; + } + const coin = getCoin({ address: tokenAddress, chainId }); + const amountText = formatTokenAmount(amount, coin.decimals); + return `${amountText} ${coin.name.toUpperCase()} on ${chainName}`; } function summarizeOutput(chainId: bigint, token: `0x${string}`, amount: bigint): string { - const chain = safeChainName(chainId); - if (!chain) return `${shortAddress(token)} on chain-${chainId.toString()}`; - const coin = getCoin({ address: token, chain }); - const amountText = formatTokenAmount(amount, coin.decimals); - return `${amountText} ${coin.name.toUpperCase()} on ${chain}`; + const chainName = safeChainName(chainId); + if (!chainName) { + return `${amount.toString()} ${shortAddress(token)} on chain-${chainId.toString()}`; + } + const coin = getCoin({ address: token, chainId }); + const amountText = formatTokenAmount(amount, coin.decimals); + return `${amountText} ${coin.name.toUpperCase()} on ${chainName}`; } function getInputs(order: StandardOrder | MultichainOrder) { - if ("originChainId" in order) { - return order.inputs.map((input, index) => ({ - key: `s-${index}-${input[0].toString()}`, - text: summarizeInput(order.originChainId, input[0], input[1]) - })); - } - - return flattenInputs(order.inputs).map((input, index) => ({ - key: `m-${index}-${input.input[0].toString()}`, - text: summarizeInput(input.chainId, input.input[0], input.input[1]) - })); + if ("originChainId" in order) { + return order.inputs.map((input, index) => ({ + key: `s-${index}-${input[0].toString()}`, + text: summarizeInput(order.originChainId, input[0], input[1]) + })); + } + + return flattenInputs(order.inputs).map((input, index) => ({ + key: `m-${index}-${input.input[0].toString()}`, + text: summarizeInput(input.chainId, input.input[0], input.input[1]) + })); } function getOutputs(order: StandardOrder | MultichainOrder) { - return order.outputs.map((output, index) => ({ - key: `o-${index}-${output.token}`, - text: summarizeOutput(output.chainId, output.token, output.amount) - })); + return order.outputs.map((output, index) => ({ + key: `o-${index}-${output.token}`, + text: summarizeOutput(output.chainId, output.token, output.amount) + })); } function getChainScope(order: StandardOrder | MultichainOrder): ChainScope { - if (!("originChainId" in order)) return "multichain"; - const isSameChain = order.outputs.every((output) => output.chainId === order.originChainId); - return isSameChain ? "samechain" : "singlechain"; + if (!("originChainId" in order)) return "multichain"; + const isSameChain = order.outputs.every((output) => output.chainId === order.originChainId); + return isSameChain ? "samechain" : "singlechain"; } function toChainScopeBadge(scope: ChainScope) { - if (scope === "samechain") return "SameChain"; - if (scope === "singlechain") return "SingleChain"; - return "MultiChain"; + if (scope === "samechain") return "SameChain"; + if (scope === "singlechain") return "SingleChain"; + return "MultiChain"; } function shortHexAddress(value: `0x${string}`) { - return `${value.slice(0, 6)}...${value.slice(-4)}`; + return `${value.slice(0, 6)}...${value.slice(-4)}`; } function normalizeAddress(value: string) { - return value.toLowerCase(); + return value.toLowerCase(); } function mapInputScheme(inputSettler: `0x${string}`): string | undefined { - const settler = normalizeAddress(inputSettler); - if (settler === normalizeAddress(INPUT_SETTLER_ESCROW_LIFI)) return "Escrow"; - if (settler === normalizeAddress(INPUT_SETTLER_COMPACT_LIFI)) return "Compact"; - if (settler === normalizeAddress(MULTICHAIN_INPUT_SETTLER_ESCROW)) return "MultichainEscrow"; - if (settler === normalizeAddress(MULTICHAIN_INPUT_SETTLER_COMPACT)) return "MultichainCompact"; - return undefined; + const settler = normalizeAddress(inputSettler); + if (settler === normalizeAddress(INPUT_SETTLER_ESCROW_LIFI)) return "Escrow"; + if (settler === normalizeAddress(INPUT_SETTLER_COMPACT_LIFI)) return "Compact"; + if (settler === normalizeAddress(MULTICHAIN_INPUT_SETTLER_ESCROW)) return "MultichainEscrow"; + if (settler === normalizeAddress(MULTICHAIN_INPUT_SETTLER_COMPACT)) return "MultichainCompact"; + return undefined; } function parseContextType(context: `0x${string}`) { - if (context === "0x" || context === "0x00") return "Limit"; - const typeByte = context.slice(2, 4).toLowerCase(); - if (typeByte === "00") return "Limit"; - if (typeByte === "01") return "Dutch"; - if (typeByte === "e0") return "Limit"; - if (typeByte === "e1") return "Dutch"; - return undefined; + if (context === "0x" || context === "0x00") return "Limit"; + const typeByte = context.slice(2, 4).toLowerCase(); + if (typeByte === "00") return "Limit"; + if (typeByte === "01") return "Dutch"; + if (typeByte === "e0") return "Limit"; + if (typeByte === "e1") return "Dutch"; + return undefined; } function decodeExclusiveFor(context: `0x${string}`): `0x${string}` | undefined { - if (context.length < 2 + 2 + 64) return undefined; - const exclusiveHex = context.slice(4, 68); - try { - return bytes32ToAddress(`0x${exclusiveHex}`); - } catch { - return undefined; - } + if (context.length < 2 + 2 + 64) return undefined; + const exclusiveHex = context.slice(4, 68); + try { + return bytes32ToAddress(`0x${exclusiveHex}`); + } catch { + return undefined; + } } type ContextDetails = { - orderTypeBadge?: string; - exclusiveForAddress?: string; - exclusiveUntil?: number; + orderTypeBadge?: string; + exclusiveForAddress?: string; + exclusiveUntil?: number; }; function getContextDetails(orderContainer: OrderContainer): ContextDetails { - const order = orderContainer.order; - const details: ContextDetails = {}; + const order = orderContainer.order; + const details: ContextDetails = {}; - const contexts = order.outputs.map((o) => o.context); - const firstContext = contexts[0]; - const allContextsMatch = contexts.every((c) => c === firstContext); - if (!firstContext || !allContextsMatch) return details; + const contexts = order.outputs.map((o) => o.context); + const firstContext = contexts[0]; + const allContextsMatch = contexts.every((c) => c === firstContext); + if (!firstContext || !allContextsMatch) return details; - details.orderTypeBadge = parseContextType(firstContext); + details.orderTypeBadge = parseContextType(firstContext); - const typeByte = firstContext.slice(2, 4).toLowerCase(); - const isExclusive = typeByte === "e0" || typeByte === "e1"; - if (!isExclusive) return details; + const typeByte = firstContext.slice(2, 4).toLowerCase(); + const isExclusive = typeByte === "e0" || typeByte === "e1"; + if (!isExclusive) return details; - const exclusiveFor = decodeExclusiveFor(firstContext); - if (exclusiveFor) details.exclusiveForAddress = shortHexAddress(exclusiveFor); + const exclusiveFor = decodeExclusiveFor(firstContext); + if (exclusiveFor) details.exclusiveForAddress = shortHexAddress(exclusiveFor); - // bytes1 + bytes32 + uint32 (big-endian) - if (firstContext.length >= 76) { - const untilHex = firstContext.slice(68, 76); - const until = Number.parseInt(untilHex, 16); - if (!Number.isNaN(until)) details.exclusiveUntil = until; - } + // bytes1 + bytes32 + uint32 (big-endian) + if (firstContext.length >= 76) { + const untilHex = firstContext.slice(68, 76); + const until = Number.parseInt(untilHex, 16); + if (!Number.isNaN(until)) details.exclusiveUntil = until; + } - return details; + return details; } export function buildBaseIntentRow(orderContainer: OrderContainer): BaseIntentRow { - const order = orderContainer.order; - const orderId = orderToIntent(orderContainer).orderId(); - const inputChipsRaw = getInputs(order); - const outputChipsRaw = getOutputs(order); - const chainScope = getChainScope(order); - const contextDetails = getContextDetails(orderContainer); - - const validation = validateOrderContainerWithReason(orderContainer); - - return { - orderContainer, - orderId, - orderIdShort: shortAddress(orderId, 10, 4), - userShort: shortAddress(order.user, 8, 4), - fillDeadline: order.fillDeadline, - inputCount: inputChipsRaw.length, - outputCount: outputChipsRaw.length, - chainScope, - chainScopeBadge: toChainScopeBadge(chainScope), - inputSchemeBadge: mapInputScheme(orderContainer.inputSettler), - orderTypeBadge: contextDetails.orderTypeBadge, - exclusiveForAddress: contextDetails.exclusiveForAddress, - exclusiveUntil: contextDetails.exclusiveUntil, - inputChips: inputChipsRaw.slice(0, MAX_CHIPS_PER_SIDE), - inputOverflow: Math.max(0, inputChipsRaw.length - MAX_CHIPS_PER_SIDE), - outputChips: outputChipsRaw.slice(0, MAX_CHIPS_PER_SIDE), - outputOverflow: Math.max(0, outputChipsRaw.length - MAX_CHIPS_PER_SIDE), - validationPassed: validation.passed, - validationReason: validation.reason - }; + const order = orderContainer.order; + const orderId = containerToIntent(orderContainer).orderId(); + const inputChipsRaw = getInputs(order); + const outputChipsRaw = getOutputs(order); + const chainScope = getChainScope(order); + const contextDetails = getContextDetails(orderContainer); + + const validation = validateOrderContainerWithReason({ + orderContainer, + deps: orderValidationDeps + }); + + return { + orderContainer, + orderId, + orderIdShort: shortAddress(orderId, 10, 4), + userShort: shortAddress(order.user, 8, 4), + fillDeadline: order.fillDeadline, + inputCount: inputChipsRaw.length, + outputCount: outputChipsRaw.length, + chainScope, + chainScopeBadge: toChainScopeBadge(chainScope), + inputSchemeBadge: mapInputScheme(orderContainer.inputSettler), + orderTypeBadge: contextDetails.orderTypeBadge, + exclusiveForAddress: contextDetails.exclusiveForAddress, + exclusiveUntil: contextDetails.exclusiveUntil, + inputChips: inputChipsRaw.slice(0, MAX_CHIPS_PER_SIDE), + inputOverflow: Math.max(0, inputChipsRaw.length - MAX_CHIPS_PER_SIDE), + outputChips: outputChipsRaw.slice(0, MAX_CHIPS_PER_SIDE), + outputOverflow: Math.max(0, outputChipsRaw.length - MAX_CHIPS_PER_SIDE), + validationPassed: validation.passed, + validationReason: validation.reason + }; } export function withTiming(baseRow: BaseIntentRow, nowSeconds: number): TimedIntentRow { - const secondsToDeadline = baseRow.fillDeadline - nowSeconds; - const status: Status = - secondsToDeadline <= 0 - ? "expired" - : secondsToDeadline <= EXPIRING_THRESHOLD_SECONDS - ? "expiring" - : "active"; - - const protocolBadges: string[] = []; - if (baseRow.orderTypeBadge) protocolBadges.push(baseRow.orderTypeBadge); - if (baseRow.exclusiveForAddress) - protocolBadges.push(`Exclusive for ${baseRow.exclusiveForAddress}`); - if (baseRow.exclusiveUntil !== undefined) { - const secondsRemaining = baseRow.exclusiveUntil - nowSeconds; - if (secondsRemaining > 0) { - protocolBadges.push(`Exclusive until ${formatRemaining(secondsRemaining)}`); - } - } - - return { ...baseRow, status, secondsToDeadline, protocolBadges }; + const secondsToDeadline = baseRow.fillDeadline - nowSeconds; + const status: Status = + secondsToDeadline <= 0 + ? "expired" + : secondsToDeadline <= EXPIRING_THRESHOLD_SECONDS + ? "expiring" + : "active"; + + const protocolBadges: string[] = []; + if (baseRow.orderTypeBadge) protocolBadges.push(baseRow.orderTypeBadge); + if (baseRow.exclusiveForAddress) + protocolBadges.push(`Exclusive for ${baseRow.exclusiveForAddress}`); + if (baseRow.exclusiveUntil !== undefined) { + const secondsRemaining = baseRow.exclusiveUntil - nowSeconds; + if (secondsRemaining > 0) { + protocolBadges.push(`Exclusive until ${formatRemaining(secondsRemaining)}`); + } + } + + return { ...baseRow, status, secondsToDeadline, protocolBadges }; } export function formatRelativeDeadline(secondsToDeadline: number) { - const abs = Math.abs(secondsToDeadline); - if (abs < 60) return secondsToDeadline >= 0 ? `in ${abs}s` : `${abs}s ago`; - const minutes = Math.floor(abs / 60); - if (minutes < 60) return secondsToDeadline >= 0 ? `in ${minutes}m` : `${minutes}m ago`; - const hours = Math.floor(minutes / 60); - return secondsToDeadline >= 0 ? `in ${hours}h` : `${hours}h ago`; + const abs = Math.abs(secondsToDeadline); + if (abs < 60) return secondsToDeadline >= 0 ? `in ${abs}s` : `${abs}s ago`; + const minutes = Math.floor(abs / 60); + if (minutes < 60) return secondsToDeadline >= 0 ? `in ${minutes}m` : `${minutes}m ago`; + const hours = Math.floor(minutes / 60); + return secondsToDeadline >= 0 ? `in ${hours}h` : `${hours}h ago`; } export function formatRemaining(secondsToDeadline: number) { - const clamped = Math.max(0, secondsToDeadline); - if (clamped < 60) return `${clamped}s`; - const minutes = Math.floor(clamped / 60); - if (minutes < 60) return `${minutes}m`; - const hours = Math.floor(minutes / 60); - return `${hours}h`; + const clamped = Math.max(0, secondsToDeadline); + if (clamped < 60) return `${clamped}s`; + const minutes = Math.floor(clamped / 60); + if (minutes < 60) return `${minutes}m`; + const hours = Math.floor(minutes / 60); + return `${hours}h`; } diff --git a/src/lib/libraries/orderServer.ts b/src/lib/libraries/orderServer.ts deleted file mode 100644 index 213a506..0000000 --- a/src/lib/libraries/orderServer.ts +++ /dev/null @@ -1,570 +0,0 @@ -import axios from "axios"; -import type { - MultichainOrder, - NoSignature, - OrderContainer, - Quote, - Signature, - StandardOrder -} from "../../types"; -import { type chain, chainMap } from "$lib/config"; -import { getInteropableAddress } from "../utils/interopableAddresses"; - -type OrderStatus = "Signed" | "Delivered" | "Settled"; - -type SubmitOrderDto = { - orderType: "CatalystCompactOrder"; - order: StandardOrder; - inputSettler: `0x${string}`; - sponsorSignature?: `0x${string}`; - allocatorSignature?: `0x${string}`; - compactRegistrationTxHash?: `0x${string}`; -}; - -type orderPush = (orderArr: { - order: StandardOrder; - inputSettler: `0x${string}`; - sponsorSignature?: `0x${string}`; - allocatorSignature?: `0x${string}`; -}) => void; - -type GetOrderResponse = { - data: { - order: StandardOrder; - quote: Quote; - sponsorSignature: `0x${string}` | null; - allocatorSignature?: `0x${string}` | null; - inputSettler: `0x${string}`; - meta: { - submitTime: number; - orderStatus: OrderStatus; - destinationAddress: `0x${string}`; - orderIdentifier: string; - onChainOrderId: `0x${string}`; - signedAt: string; - expiredAt: string | null; - }; - }[]; - meta: { - limit: number; - offset: number; - total: number; - }; -}; - -type GetQuoteOptions = { - user: `0x${string}`; - userChain: chain; - inputs: { - sender: `0x${string}`; - asset: `0x${string}`; - chain: chain; - amount: bigint; - }[]; - outputs: { - receiver: `0x${string}`; - asset: `0x${string}`; - chain: chain; - amount: bigint; - }[]; - minValidUntil?: number; - exclusiveFor?: `0x${string}`[]; -}; - -type GetQuoteResponse = { - quotes: { - order: null; - eta: null; - validUntil: null; - quoteId: null; - metadata: { - exclusiveFor: `0x${string}` | `0x${string}`[]; - }; - preview: { - inputs: { - user: `0x${string}`; - asset: `0x${string}`; - amount: string; - }[]; - outputs: { - receiver: `0x${string}`; - asset: `0x${string}`; - amount: string; - }[]; - }; - provider: null; - partialFill: false; - failureHandling: "refund-automatic"; - }[]; -}; - -function normalizeHexAddress(value: T): T { - return value.toLowerCase() as T; -} - -type OrderEnvelope = { - order: unknown; - inputSettler: unknown; - sponsorSignature?: unknown; - allocatorSignature?: unknown; -}; - -function toHexString(value: unknown, field: string): `0x${string}` { - if (typeof value !== "string" || !value.startsWith("0x")) { - throw new Error(`Order payload invalid: ${field}`); - } - return value as `0x${string}`; -} - -function toBigIntValue(value: unknown, field: string): bigint { - if (typeof value === "bigint") return value; - if (typeof value === "number" && Number.isFinite(value)) return BigInt(value); - if (typeof value === "string" && value.length > 0) return BigInt(value); - throw new Error(`Order payload invalid: ${field}`); -} - -function toNumberValue(value: unknown, field: string): number { - if (typeof value === "number" && Number.isFinite(value)) return value; - if (typeof value === "bigint") return Number(value); - if (typeof value === "string" && value.length > 0) return Number(value); - throw new Error(`Order payload invalid: ${field}`); -} - -function normalizeSignature(value: unknown): Signature | NoSignature { - if (!value) return { type: "None", payload: "0x" }; - return { - type: "ECDSA", - payload: toHexString(value, "signature") - }; -} - -function normalizeOutputs(value: unknown) { - if (!Array.isArray(value)) throw new Error("Order payload invalid: outputs"); - return value.map((output, index) => { - if (!output || typeof output !== "object") { - throw new Error(`Order payload invalid: outputs[${index}]`); - } - const o = output as Record; - return { - oracle: toHexString(o.oracle, `outputs[${index}].oracle`), - settler: toHexString(o.settler, `outputs[${index}].settler`), - chainId: toBigIntValue(o.chainId, `outputs[${index}].chainId`), - token: toHexString(o.token, `outputs[${index}].token`), - amount: toBigIntValue(o.amount, `outputs[${index}].amount`), - recipient: toHexString(o.recipient, `outputs[${index}].recipient`), - callbackData: toHexString(o.callbackData ?? "0x", `outputs[${index}].callbackData`), - context: toHexString(o.context ?? "0x", `outputs[${index}].context`) - }; - }); -} - -function normalizeStandardOrder(order: Record): StandardOrder { - if (!Array.isArray(order.inputs)) throw new Error("Order payload invalid: inputs"); - return { - user: toHexString(order.user, "order.user"), - nonce: toBigIntValue(order.nonce, "order.nonce"), - originChainId: toBigIntValue(order.originChainId, "order.originChainId"), - expires: toNumberValue(order.expires, "order.expires"), - fillDeadline: toNumberValue(order.fillDeadline, "order.fillDeadline"), - inputOracle: toHexString(order.inputOracle, "order.inputOracle"), - inputs: order.inputs.map((input, index) => { - if (!Array.isArray(input) || input.length !== 2) { - throw new Error(`Order payload invalid: inputs[${index}]`); - } - return [ - toBigIntValue(input[0], `inputs[${index}][0]`), - toBigIntValue(input[1], `inputs[${index}][1]`) - ]; - }), - outputs: normalizeOutputs(order.outputs) - }; -} - -function normalizeMultichainOrder(order: Record): MultichainOrder { - if (!Array.isArray(order.inputs)) throw new Error("Order payload invalid: inputs"); - return { - user: toHexString(order.user, "order.user"), - nonce: toBigIntValue(order.nonce, "order.nonce"), - expires: toNumberValue(order.expires, "order.expires"), - fillDeadline: toNumberValue(order.fillDeadline, "order.fillDeadline"), - inputOracle: toHexString(order.inputOracle, "order.inputOracle"), - outputs: normalizeOutputs(order.outputs), - inputs: order.inputs.map((input, index) => { - if (!input || typeof input !== "object") { - throw new Error(`Order payload invalid: inputs[${index}]`); - } - const i = input as Record; - if (!Array.isArray(i.inputs)) { - throw new Error(`Order payload invalid: inputs[${index}].inputs`); - } - return { - chainId: toBigIntValue(i.chainId, `inputs[${index}].chainId`), - inputs: i.inputs.map((tuple, tupleIndex) => { - if (!Array.isArray(tuple) || tuple.length !== 2) { - throw new Error(`Order payload invalid: inputs[${index}].inputs[${tupleIndex}]`); - } - return [ - toBigIntValue(tuple[0], `inputs[${index}].inputs[${tupleIndex}][0]`), - toBigIntValue(tuple[1], `inputs[${index}].inputs[${tupleIndex}][1]`) - ]; - }) - }; - }) - }; -} - -function extractOrderEnvelope(payload: unknown): OrderEnvelope { - const root = - payload && typeof payload === "object" && "data" in payload - ? (payload as Record).data - : payload; - const candidateRaw = Array.isArray(root) ? root[0] : root; - if (!candidateRaw || typeof candidateRaw !== "object") { - throw new Error("Order payload invalid: data"); - } - const candidate = candidateRaw as Record; - const c = - candidate.intent && typeof candidate.intent === "object" - ? (candidate.intent as Record) - : candidate; - if (!("order" in c) || !("inputSettler" in c)) { - throw new Error("Order payload invalid: missing order fields"); - } - return c as OrderEnvelope; -} - -export function parseOrderStatusPayload(payload: unknown): OrderContainer { - const envelope = extractOrderEnvelope(payload); - const rawOrder = envelope.order as Record; - if (!rawOrder || typeof rawOrder !== "object") { - throw new Error("Order payload invalid: order"); - } - const order = - "originChainId" in rawOrder - ? normalizeStandardOrder(rawOrder) - : normalizeMultichainOrder(rawOrder); - - return { - inputSettler: toHexString(envelope.inputSettler, "inputSettler"), - order, - sponsorSignature: normalizeSignature(envelope.sponsorSignature), - allocatorSignature: normalizeSignature(envelope.allocatorSignature) - }; -} - -export class OrderServer { - baseUrl: string; - websocketUrl: string; - - api; - - constructor(mainnet: boolean) { - this.baseUrl = OrderServer.getOrderServerUrl(mainnet); - this.websocketUrl = OrderServer.getOrderServerWssUrl(mainnet); - - this.api = axios.create({ - baseURL: this.baseUrl, - timeout: 15000 - }); - } - - private static sleep(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); - } - - private static isNetworkError(error: unknown): boolean { - if (!axios.isAxiosError(error)) return false; - return error.code === "ERR_NETWORK" || error.code === "ECONNABORTED"; - } - - private async waitForOnline(maxWaitMs = 15000) { - if (typeof window === "undefined" || typeof navigator === "undefined") return; - if (navigator.onLine) return; - await Promise.race([ - new Promise((resolve) => { - const onOnline = () => { - window.removeEventListener("online", onOnline); - resolve(); - }; - window.addEventListener("online", onOnline, { once: true }); - }), - OrderServer.sleep(maxWaitMs) - ]); - } - - private async postWithRetry( - path: string, - body: unknown, - opts: { retries?: number; baseDelayMs?: number } = {} - ): Promise { - const retries = opts.retries ?? 2; - const baseDelayMs = opts.baseDelayMs ?? 500; - let attempt = 0; - while (true) { - try { - const response = await this.api.post(path, body); - return response.data as T; - } catch (error) { - if (!OrderServer.isNetworkError(error) || attempt >= retries) throw error; - await this.waitForOnline(); - await OrderServer.sleep(baseDelayMs * 2 ** attempt); - attempt += 1; - } - } - } - - static getOrderServerUrl(mainnet: boolean) { - return mainnet ? "https://order.li.fi" : "https://order-dev.li.fi"; - } - - static getOrderServerWssUrl(mainnet: boolean) { - return mainnet ? "wss://order.li.fi" : "wss://order-dev.li.fi"; - } - - /** - * @notice Submits an order to the order server - * @param request The order submission request - * @returns The response data from the order server - */ - async submitOrder(request: SubmitOrderDto) { - try { - return await this.postWithRetry("/orders/submit", request, { retries: 2, baseDelayMs: 600 }); - } catch (error) { - console.error("Error submitting order:", error); - throw error; - } - } - - /** - * @notice Gets latest orders from the order server - * @param options Optional parameters to filter orders - * @returns The response data containing the orders - */ - async getOrders(options?: { user?: `0x${string}`; status?: OrderStatus }) { - try { - const response = await this.api.get("/orders", { - params: { limit: 50, offset: 0, ...options } - }); - return response.data as GetOrderResponse; - } catch (error) { - console.error("Error getting orders:", error); - throw error; - } - } - - /** - * @notice Gets an order by on-chain order id. - * @param orderId On-chain order id (0x-prefixed hash) - */ - async getOrderByOnChainOrderId(orderId: `0x${string}`): Promise { - try { - const response = await this.api.get("/orders/status/", { - params: { onChainOrderId: orderId } - }); - return parseOrderStatusPayload(response.data); - } catch (error) { - if (axios.isAxiosError(error) && error.response?.status === 404) { - throw new Error("Order not found"); - } - if (error instanceof Error && error.message.startsWith("Order payload invalid")) { - throw error; - } - console.error("Error getting order by id:", error); - throw new Error("Failed to fetch order"); - } - } - - /** - * @notice Fetch an intent quote for a set of inputs and outputs. - * @param options The intent specifications - * @returns The response data containing the quotes - */ - async getQuotes(options: GetQuoteOptions): Promise { - const { user, userChain, inputs, outputs, minValidUntil, exclusiveFor } = options; - - const lockType: undefined | { kind: "the-compact" } = undefined; - - const rq: { - user: string; - intent: { - intentType: "oif-swap"; - inputs: { - user: string; - asset: string; - amount: string; - lock: { kind: "the-compact" } | undefined; - }[]; - outputs: { - receiver: string; - asset: string; - amount: string; - }[]; - swapType: "exact-input"; - minValidUntil: number | undefined; - metadata?: { - exclusiveFor: `0x${string}`[]; - }; - }; - supportedTypes: ["oif-escrow-v0"]; - } = { - user: getInteropableAddress(user, chainMap[userChain].id), - intent: { - intentType: "oif-swap", - inputs: inputs.map((input) => { - return { - user: getInteropableAddress(input.sender, chainMap[userChain].id), - asset: getInteropableAddress(input.asset, chainMap[userChain].id), - amount: input.amount.toString(), - lock: lockType - }; - }), - outputs: outputs.map((output) => { - return { - receiver: getInteropableAddress(output.receiver, chainMap[output.chain].id), - asset: getInteropableAddress(output.asset, chainMap[output.chain].id), - amount: output.amount.toString() - }; - }), - swapType: "exact-input", - minValidUntil - }, - supportedTypes: ["oif-escrow-v0"] - }; - if (exclusiveFor && exclusiveFor.length > 0) { - rq.intent.metadata = { exclusiveFor: exclusiveFor.map(normalizeHexAddress) }; - } - - try { - return await this.postWithRetry("/quote/request", rq, { - retries: 3, - baseDelayMs: 700 - }); - } catch (error) { - console.error("Error fetching quote:", error); - throw error; - } - } - - connectOrderServerSocket(newOrderFunction: orderPush) { - let shouldReconnect = true; - let backoffMs = 1000; - const MAX_BACKOFF = 30000; - let socket: WebSocket; - let reconnectTimer: ReturnType | undefined; - - const connect = () => { - if (!shouldReconnect) return; - socket = new WebSocket(this.websocketUrl); - - socket.onmessage = function (event) { - const message = JSON.parse(event.data); - - switch (message.event) { - case "user:vm-order-submit": - const incomingOrder = message.data as SubmitOrderDto; - newOrderFunction(incomingOrder); - break; - case "ping": - socket.send( - JSON.stringify({ - event: "pong" - }) - ); - break; - default: - break; - } - }; - - socket.addEventListener("open", () => { - console.log("Connected to Catalyst order server"); - backoffMs = 1000; // Reset backoff on successful connection - }); - - socket.addEventListener("close", () => { - console.log("Disconnected from Catalyst order server"); - if (shouldReconnect) { - console.log(`Reconnecting in ${backoffMs}ms...`); - if (reconnectTimer) clearTimeout(reconnectTimer); - reconnectTimer = setTimeout(() => { - reconnectTimer = undefined; - connect(); - }, backoffMs); - backoffMs = Math.min(backoffMs * 2, MAX_BACKOFF); - } - }); - - socket.addEventListener("error", (event) => { - console.error("WebSocket error:", event); - }); - }; - - connect(); - - return { - get socket() { - return socket; - }, - disconnect: () => { - shouldReconnect = false; - if (reconnectTimer) { - clearTimeout(reconnectTimer); - reconnectTimer = undefined; - } - socket.close(); - } - }; - } - - // -- Translations -- // - - /** - * @notice Fetches all intents from the LI.FI order server and then transmutes them into OrderContainers. - */ - async getAndParseOrders(): Promise { - const response = await this.getOrders(); - const parsedOrders = response.data; - if (parsedOrders) { - if (Array.isArray(parsedOrders)) { - // For each order, if a field is string ending in n, convert it to bigint. - return parsedOrders.map((instance) => { - instance.order.nonce = BigInt(instance.order.nonce); - instance.order.originChainId = BigInt(instance.order.originChainId); - if (instance.order.inputs) { - instance.order.inputs = instance.order.inputs.map((input) => { - return [BigInt(input[0]), BigInt(input[1])]; - }); - } - if (instance.order.outputs) { - instance.order.outputs = instance.order.outputs.map((output) => { - return { - ...output, - chainId: BigInt(output.chainId), - amount: BigInt(output.amount) - }; - }); - } - const allocatorSignature = instance.allocatorSignature - ? ({ - type: "ECDSA", - payload: instance.allocatorSignature - } as Signature) - : ({ - type: "None", - payload: "0x" - } as NoSignature); - const sponsorSignature = instance.sponsorSignature - ? ({ - type: "ECDSA", - payload: instance.sponsorSignature - } as Signature) - : ({ - type: "None", - payload: "0x" - } as NoSignature); - return { ...instance, allocatorSignature, sponsorSignature }; - }); - } - } - } -} diff --git a/src/lib/libraries/rpcCache.ts b/src/lib/libraries/rpcCache.ts index 2790e8b..1167031 100644 --- a/src/lib/libraries/rpcCache.ts +++ b/src/lib/libraries/rpcCache.ts @@ -1,71 +1,71 @@ type CacheEntry = { - value: T; - expiresAt: number; + value: T; + expiresAt: number; }; const cache = new Map>(); const inflight = new Map>(); const stats = { - hits: 0, - misses: 0, - inflightJoins: 0 + hits: 0, + misses: 0, + inflightJoins: 0 }; export function getRpcCacheStats() { - return { ...stats }; + return { ...stats }; } export function clearRpcCache() { - cache.clear(); - inflight.clear(); + cache.clear(); + inflight.clear(); } export function invalidateRpcKey(key: string) { - cache.delete(key); - inflight.delete(key); + cache.delete(key); + inflight.delete(key); } export function invalidateRpcPrefix(prefix: string) { - for (const key of cache.keys()) { - if (key.startsWith(prefix)) cache.delete(key); - } - for (const key of inflight.keys()) { - if (key.startsWith(prefix)) inflight.delete(key); - } + for (const key of cache.keys()) { + if (key.startsWith(prefix)) cache.delete(key); + } + for (const key of inflight.keys()) { + if (key.startsWith(prefix)) inflight.delete(key); + } } export async function getOrFetchRpc( - key: string, - fetcher: () => Promise, - opts: { ttlMs: number; force?: boolean } + key: string, + fetcher: () => Promise, + opts: { ttlMs: number; force?: boolean } ): Promise { - const { ttlMs, force = false } = opts; - const now = Date.now(); + const { ttlMs, force = false } = opts; + const now = Date.now(); - if (!force) { - const cached = cache.get(key) as CacheEntry | undefined; - if (cached && cached.expiresAt > now) { - stats.hits += 1; - return cached.value; - } - const pending = inflight.get(key) as Promise | undefined; - if (pending) { - stats.inflightJoins += 1; - return pending; - } - } + if (!force) { + const cached = cache.get(key) as CacheEntry | undefined; + if (cached && cached.expiresAt > now) { + stats.hits += 1; + return cached.value; + } + const pending = inflight.get(key) as Promise | undefined; + if (pending) { + stats.inflightJoins += 1; + return pending; + } + } - stats.misses += 1; - const request = fetcher() - .then((value) => { - cache.set(key, { value, expiresAt: Date.now() + ttlMs }); - return value; - }) - .finally(() => { - inflight.delete(key); - }); + stats.misses += 1; + const request = fetcher() + .then((value) => { + cache.set(key, { value, expiresAt: Date.now() + ttlMs }); + return value; + }) + .finally(() => { + inflight.delete(key); + }); - inflight.set(key, request); - return request; + inflight.set(key, request); + return request; } diff --git a/src/lib/libraries/solver.ts b/src/lib/libraries/solver.ts index c3e775a..42817dc 100644 --- a/src/lib/libraries/solver.ts +++ b/src/lib/libraries/solver.ts @@ -1,401 +1,389 @@ -import { - BYTES32_ZERO, - type chain, - chainMap, - clients, - COIN_FILLER, - getChainName, - getOracle, - type WC -} from "$lib/config"; +import { BYTES32_ZERO, COIN_FILLER, getChain, getClient, getOracle, type WC } from "$lib/config"; import { hashStruct, maxUint256, parseEventLogs } from "viem"; -import type { MandateOutput, OrderContainer } from "../../types"; -import { addressToBytes32, bytes32ToAddress } from "$lib/utils/convert"; +import type { MandateOutput, OrderContainer } from "@lifi/intent"; +import { addressToBytes32, bytes32ToAddress, StandardSolanaIntent } from "@lifi/intent"; import axios from "axios"; import { POLYMER_ORACLE_ABI } from "$lib/abi/polymeroracle"; import { COIN_FILLER_ABI } from "$lib/abi/outputsettler"; import { ERC20_ABI } from "$lib/abi/erc20"; -import { orderToIntent } from "./intent"; -import { compactTypes } from "$lib/utils/typedMessage"; +import { containerToIntent } from "$lib/utils/intent"; +import { compactTypes } from "@lifi/intent"; import store from "$lib/state.svelte"; +import { finaliseIntent } from "./intentExecution"; /** * @notice Class for solving intents. Functions called by solvers. */ export class Solver { - private static validationInflight = new Map>(); - private static polymerRequestIndexByLog = new Map(); + private static validationInflight = new Map>(); + private static polymerRequestIndexByLog = new Map(); - private static sleep(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); - } + private static sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } - private static async persistReceipt( - chainId: number | bigint, - txHash: `0x${string}`, - receipt: unknown - ) { - try { - await store.saveTransactionReceipt(chainId, txHash, receipt); - } catch (error) { - console.warn("saveTransactionReceipt error", { chainId: Number(chainId), txHash, error }); - } - } + private static async persistReceipt( + chainId: number | bigint, + txHash: `0x${string}`, + receipt: unknown + ) { + try { + await store.saveTransactionReceipt(chainId, txHash, receipt); + } catch (error) { + console.warn("saveTransactionReceipt error", { chainId: Number(chainId), txHash, error }); + } + } - private static async getReceiptCachedOrRpc(chainId: number | bigint, txHash: `0x${string}`) { - const cached = store.getTransactionReceipt(chainId, txHash); - if ( - cached && - typeof cached === "object" && - Array.isArray((cached as { logs?: unknown[] }).logs) && - (cached as { logs?: unknown[] }).logs!.length > 0 - ) - return cached as any; - const chainName = getChainName(chainId); - const receipt = await clients[chainName].getTransactionReceipt({ hash: txHash }); - await Solver.persistReceipt(chainId, txHash, receipt); - return receipt; - } + private static async getReceiptCachedOrRpc(chainId: number | bigint, txHash: `0x${string}`) { + const cached = store.getTransactionReceipt(chainId, txHash); + if ( + cached && + typeof cached === "object" && + Array.isArray((cached as { logs?: unknown[] }).logs) && + (cached as { logs?: unknown[] }).logs!.length > 0 + ) + return cached; + const receipt = await getClient(chainId).getTransactionReceipt({ hash: txHash }); + await Solver.persistReceipt(chainId, txHash, receipt); + return receipt; + } - static fill( - walletClient: WC, - args: { - orderContainer: OrderContainer; - outputs: MandateOutput[]; - }, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - account: () => `0x${string}`; - } - ) { - return async () => { - const { preHook, postHook, account } = opts; - const { - orderContainer: { order, inputSettler }, - outputs - } = args; - const publicClients = clients; - const orderId = orderToIntent({ order, inputSettler }).orderId(); + static fill( + walletClient: WC, + args: { + orderContainer: OrderContainer; + outputs: MandateOutput[]; + }, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + account: () => `0x${string}`; + } + ) { + return async () => { + const { preHook, postHook, account } = opts; + const { + orderContainer: { order, inputSettler }, + outputs + } = args; + const orderId = containerToIntent(args.orderContainer).orderId(); - const outputChain = getChainName(outputs[0].chainId); - // Always attempt chain switch before fill, including native-token fills. - if (preHook) await preHook(outputChain); - const connectedChainId = await walletClient.getChainId(); - const expectedChainId = chainMap[outputChain].id; - if (connectedChainId !== expectedChainId) { - throw new Error( - `Wallet is on chain ${connectedChainId}, expected ${expectedChainId} (${outputChain})` - ); - } + const outputChainId = Number(outputs[0].chainId); + const outputChain = getChain(outputChainId); + // Always attempt chain switch before fill, including native-token fills. + if (preHook) await preHook(outputChain.id); + const connectedChainId = await walletClient.getChainId(); + const expectedChainId = outputChain.id; + if (connectedChainId !== expectedChainId) { + throw new Error(`Wallet is on chain ${connectedChainId}, expected ${expectedChainId}`); + } - let value = 0n; - for (const output of outputs) { - if (output.token === BYTES32_ZERO) { - value += output.amount; - continue; - } - if (output.chainId != outputs[0].chainId) { - throw new Error("Filling outputs on multiple chains with single fill call not supported"); - } - if (output.settler != outputs[0].settler) { - throw new Error("Different settlers on outputs, not supported"); - } + let value = 0n; + for (const output of outputs) { + if (output.token === BYTES32_ZERO) { + value += output.amount; + continue; + } + if (output.chainId != outputs[0].chainId) { + throw new Error("Filling outputs on multiple chains with single fill call not supported"); + } + if (output.settler != outputs[0].settler) { + throw new Error("Different settlers on outputs, not supported"); + } - // Check allowance & set allowance if needed - const assetAddress = bytes32ToAddress(output.token); - const allowance = await publicClients[outputChain].readContract({ - address: assetAddress, - abi: ERC20_ABI, - functionName: "allowance", - args: [account(), bytes32ToAddress(output.settler)] - }); - if (BigInt(allowance) < output.amount) { - const approveTransaction = await walletClient.writeContract({ - chain: chainMap[outputChain], - account: account(), - address: assetAddress, - abi: ERC20_ABI, - functionName: "approve", - args: [bytes32ToAddress(output.settler), maxUint256] - }); - const approveReceipt = await clients[outputChain].waitForTransactionReceipt({ - hash: approveTransaction - }); - await Solver.persistReceipt(outputs[0].chainId, approveTransaction, approveReceipt); - } - } + // Check allowance & set allowance if needed + const assetAddress = bytes32ToAddress(output.token); + const allowance = await getClient(outputChain.id).readContract({ + address: assetAddress, + abi: ERC20_ABI, + functionName: "allowance", + args: [account(), bytes32ToAddress(output.settler)] + }); + if (BigInt(allowance) < output.amount) { + const approveTransaction = await walletClient.writeContract({ + chain: outputChain, + account: account(), + address: assetAddress, + abi: ERC20_ABI, + functionName: "approve", + args: [bytes32ToAddress(output.settler), maxUint256] + }); + const approveReceipt = await getClient(outputChain.id).waitForTransactionReceipt({ + hash: approveTransaction + }); + await Solver.persistReceipt(outputs[0].chainId, approveTransaction, approveReceipt); + } + } - const transactionHash = await walletClient.writeContract({ - chain: chainMap[outputChain], - account: account(), - address: bytes32ToAddress(outputs[0].settler), - value, - abi: COIN_FILLER_ABI, - functionName: "fillOrderOutputs", - args: [orderId, outputs, order.fillDeadline, addressToBytes32(account())] - }); - const fillReceipt = await clients[outputChain].waitForTransactionReceipt({ - hash: transactionHash - }); - await Solver.persistReceipt(outputs[0].chainId, transactionHash, fillReceipt); - // orderInputs.validate[index] = transactionHash; - if (postHook) await postHook(); - return transactionHash; - }; - } + const transactionHash = await walletClient.writeContract({ + chain: outputChain, + account: account(), + address: bytes32ToAddress(outputs[0].settler), + value, + abi: COIN_FILLER_ABI, + functionName: "fillOrderOutputs", + args: [orderId, outputs, order.fillDeadline, addressToBytes32(account())] + }); + const fillReceipt = await getClient(outputChain.id).waitForTransactionReceipt({ + hash: transactionHash + }); + await Solver.persistReceipt(outputs[0].chainId, transactionHash, fillReceipt); + // orderInputs.validate[index] = transactionHash; + if (postHook) await postHook(); + return transactionHash; + }; + } - static validate( - walletClient: WC, - args: { - output: MandateOutput; - orderContainer: OrderContainer; - fillTransactionHash: string; - sourceChain: chain; - mainnet: boolean; - }, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - account: () => `0x${string}`; - } - ) { - return async () => { - const { preHook, postHook, account } = opts; - const { - output, - orderContainer: { order }, - fillTransactionHash, - sourceChain, - mainnet - } = args; - const expectedOutputHash = hashStruct({ - types: compactTypes, - primaryType: "MandateOutput", - data: output - }); - const validationKey = `${sourceChain}:${fillTransactionHash}:${expectedOutputHash}`; - const existingValidation = Solver.validationInflight.get(validationKey); - if (existingValidation) return existingValidation; + static validate( + walletClient: WC, + args: { + output: MandateOutput; + orderContainer: OrderContainer; + fillTransactionHash: string; + sourceChainId: number | bigint; + mainnet: boolean; + }, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + account: () => `0x${string}`; + } + ) { + return async () => { + const { preHook, postHook, account } = opts; + const { + output, + orderContainer: { order }, + fillTransactionHash, + sourceChainId, + mainnet + } = args; + const expectedOutputHash = hashStruct({ + types: compactTypes, + primaryType: "MandateOutput", + data: output + }); + const validationKey = `${Number(sourceChainId)}:${fillTransactionHash}:${expectedOutputHash}`; + const existingValidation = Solver.validationInflight.get(validationKey); + if (existingValidation) return existingValidation; - const validationPromise = (async () => { - const outputChain = getChainName(output.chainId); - if ( - !fillTransactionHash || - !fillTransactionHash.startsWith("0x") || - fillTransactionHash.length !== 66 - ) { - throw new Error(`Invalid fill transaction hash: ${fillTransactionHash}`); - } + const validationPromise = (async () => { + if ( + !fillTransactionHash || + !fillTransactionHash.startsWith("0x") || + fillTransactionHash.length !== 66 + ) { + throw new Error(`Invalid fill transaction hash: ${fillTransactionHash}`); + } - // Get the output filled event. - const transactionReceipt = await Solver.getReceiptCachedOrRpc( - output.chainId, - fillTransactionHash as `0x${string}` - ); + // Get the output filled event. + const transactionReceipt = await Solver.getReceiptCachedOrRpc( + output.chainId, + fillTransactionHash as `0x${string}` + ); - const logs = parseEventLogs({ - abi: COIN_FILLER_ABI, - eventName: "OutputFilled", - logs: transactionReceipt.logs - }); - // We need to search through each log until we find one matching our output. - let logIndex = -1; - for (const log of logs) { - const logOutput = log.args.output; - // TODO: Optimise by comparing the dicts. - const logOutputHash = hashStruct({ - types: compactTypes, - primaryType: "MandateOutput", - data: logOutput - }); - if (logOutputHash === expectedOutputHash) { - logIndex = log.logIndex; - break; - } - } - if (logIndex === -1) throw Error(`Could not find matching log`); + const logs = parseEventLogs({ + abi: COIN_FILLER_ABI, + eventName: "OutputFilled", + logs: transactionReceipt.logs + }); + // We need to search through each log until we find one matching our output. + let logIndex = -1; + for (const log of logs) { + const logOutput = log.args.output; + // TODO: Optimise by comparing the dicts. + const logOutputHash = hashStruct({ + types: compactTypes, + primaryType: "MandateOutput", + data: logOutput + }); + if (logOutputHash === expectedOutputHash) { + logIndex = log.logIndex; + break; + } + } + if (logIndex === -1) throw Error(`Could not find matching log`); - if (order.inputOracle === getOracle("polymer", sourceChain)) { - let proof: string | undefined; - const polymerKey = `${Number(output.chainId)}:${Number(transactionReceipt.blockNumber)}:${Number(logIndex)}`; - let polymerIndex: number | undefined = Solver.polymerRequestIndexByLog.get(polymerKey); - for (const waitMs of [1000, 2000, 4000, 8000]) { - const response = await axios.post( - `/polymer`, - { - srcChainId: Number(output.chainId), - srcBlockNumber: Number(transactionReceipt.blockNumber), - globalLogIndex: Number(logIndex), - polymerIndex, - mainnet: mainnet - }, - { timeout: 15_000 } - ); - const dat = response.data as { - proof: undefined | string; - polymerIndex: number; - }; - polymerIndex = dat.polymerIndex; - if (polymerIndex !== undefined) { - Solver.polymerRequestIndexByLog.set(polymerKey, polymerIndex); - } - if (dat.proof) { - proof = dat.proof; - break; - } - await Solver.sleep(waitMs); - } - if (proof) { - if (preHook) await preHook(sourceChain); + if (order.inputOracle === getOracle("polymer", sourceChainId)) { + let proof: string | undefined; + const polymerKey = `${Number(output.chainId)}:${Number(transactionReceipt.blockNumber)}:${Number(logIndex)}`; + let polymerIndex: number | undefined = Solver.polymerRequestIndexByLog.get(polymerKey); + for (const waitMs of [1000, 2000, 4000, 8000]) { + const response = await axios.post( + `/polymer`, + { + srcChainId: Number(output.chainId), + srcBlockNumber: Number(transactionReceipt.blockNumber), + globalLogIndex: Number(logIndex), + polymerIndex, + mainnet: mainnet + }, + { timeout: 15_000 } + ); + const dat = response.data as { + proof: undefined | string; + polymerIndex: number; + }; + polymerIndex = dat.polymerIndex; + if (polymerIndex !== undefined) { + Solver.polymerRequestIndexByLog.set(polymerKey, polymerIndex); + } + if (dat.proof) { + proof = dat.proof; + break; + } + await Solver.sleep(waitMs); + } + if (proof) { + if (preHook) await preHook(Number(sourceChainId)); - const transactionHash = await walletClient.writeContract({ - chain: chainMap[sourceChain], - account: account(), - address: order.inputOracle, - abi: POLYMER_ORACLE_ABI, - functionName: "receiveMessage", - args: [`0x${proof.replace("0x", "")}`] - }); + const transactionHash = await walletClient.writeContract({ + chain: getChain(sourceChainId), + account: account(), + address: order.inputOracle, + abi: POLYMER_ORACLE_ABI, + functionName: "receiveMessage", + args: [`0x${proof.replace("0x", "")}`] + }); - const result = await clients[sourceChain].waitForTransactionReceipt({ - hash: transactionHash, - timeout: 120_000, - pollingInterval: 2_000 - }); - await Solver.persistReceipt(chainMap[sourceChain].id, transactionHash, result); - if (postHook) await postHook(); - return result; - } - throw new Error( - `Polymer proof unavailable for output on ${outputChain}. Try again after the fill attestation is indexed.` - ); - } else if (order.inputOracle === COIN_FILLER) { - const log = logs.find((log) => log.logIndex === logIndex)!; - if (preHook) await preHook(sourceChain); - const transactionHash = await walletClient.writeContract({ - chain: chainMap[sourceChain], - account: account(), - address: order.inputOracle, - abi: COIN_FILLER_ABI, - functionName: "setAttestation", - args: [log.args.orderId, log.args.solver, log.args.timestamp, log.args.output] - }); + const result = await getClient(sourceChainId).waitForTransactionReceipt({ + hash: transactionHash, + timeout: 120_000, + pollingInterval: 2_000 + }); + await Solver.persistReceipt(sourceChainId, transactionHash, result); + if (postHook) await postHook(); + return result; + } + throw new Error( + `Polymer proof unavailable for output on ${output.chainId.toString()}. Try again after the fill attestation is indexed.` + ); + } else if (order.inputOracle === COIN_FILLER) { + const log = logs.find((log) => log.logIndex === logIndex); + if (!log) throw new Error(`Log with index ${logIndex} not found`); + if (preHook) await preHook(Number(sourceChainId)); + const transactionHash = await walletClient.writeContract({ + chain: getChain(sourceChainId), + account: account(), + address: order.inputOracle, + abi: COIN_FILLER_ABI, + functionName: "setAttestation", + args: [log.args.orderId, log.args.solver, log.args.timestamp, log.args.output] + }); - const result = await clients[sourceChain].waitForTransactionReceipt({ - hash: transactionHash, - timeout: 120_000, - pollingInterval: 2_000 - }); - await Solver.persistReceipt(chainMap[sourceChain].id, transactionHash, result); - if (postHook) await postHook(); - return result; - } - throw new Error( - `Unsupported input oracle ${order.inputOracle} for source chain ${sourceChain}.` - ); - })(); + const result = await getClient(sourceChainId).waitForTransactionReceipt({ + hash: transactionHash, + timeout: 120_000, + pollingInterval: 2_000 + }); + await Solver.persistReceipt(sourceChainId, transactionHash, result); + if (postHook) await postHook(); + return result; + } + throw new Error( + `Unsupported input oracle ${order.inputOracle} for source chain ${Number(sourceChainId)}.` + ); + })(); - Solver.validationInflight.set(validationKey, validationPromise); - try { - return await validationPromise; - } finally { - Solver.validationInflight.delete(validationKey); - } - }; - } + Solver.validationInflight.set(validationKey, validationPromise); + try { + return await validationPromise; + } finally { + Solver.validationInflight.delete(validationKey); + } + }; + } - static claim( - walletClient: WC, - args: { - orderContainer: OrderContainer; - fillTransactionHashes: string[]; - sourceChain: chain; - }, - opts: { - preHook?: (chain: chain) => Promise; - postHook?: () => Promise; - account: () => `0x${string}`; - } - ) { - return async () => { - const { preHook, postHook, account } = opts; - const { orderContainer, fillTransactionHashes, sourceChain } = args; - const { order, inputSettler } = orderContainer; - const intent = orderToIntent({ - inputSettler, - order - }); - if (fillTransactionHashes.length !== order.outputs.length) { - throw new Error( - `Fill transaction hash count (${fillTransactionHashes.length}) does not match output count (${order.outputs.length}).` - ); - } - for (let i = 0; i < fillTransactionHashes.length; i++) { - const hash = fillTransactionHashes[i]; - if (!hash || !hash.startsWith("0x") || hash.length !== 66) { - throw new Error(`Invalid fill tx hash at index ${i}: ${hash}`); - } - } - const transactionReceipts = await Promise.all( - fillTransactionHashes.map((fth, i) => - Solver.getReceiptCachedOrRpc(order.outputs[i].chainId, fth as `0x${string}`) - ) - ); - const blocks = await Promise.all( - transactionReceipts.map((r, i) => { - const outputChain = getChainName(order.outputs[i].chainId); - return clients[outputChain].getBlock({ - blockHash: r.blockHash - }); - }) - ); - const fillTimestamps = blocks.map((b) => b.timestamp); + static claim( + walletClient: WC, + args: { + orderContainer: OrderContainer; + fillTransactionHashes: string[]; + sourceChainId: number | bigint; + }, + opts: { + preHook?: (chainId: number) => Promise; + postHook?: () => Promise; + account: () => `0x${string}`; + } + ) { + return async () => { + const { preHook, postHook, account } = opts; + const { orderContainer, fillTransactionHashes, sourceChainId } = args; + const { order, inputSettler } = orderContainer; + const intent = containerToIntent(orderContainer); + if (intent instanceof StandardSolanaIntent) + throw new Error("Finalise is not supported for Solana input intents."); + if (fillTransactionHashes.length !== order.outputs.length) { + throw new Error( + `Fill transaction hash count (${fillTransactionHashes.length}) does not match output count (${order.outputs.length}).` + ); + } + for (let i = 0; i < fillTransactionHashes.length; i++) { + const hash = fillTransactionHashes[i]; + if (!hash || !hash.startsWith("0x") || hash.length !== 66) { + throw new Error(`Invalid fill tx hash at index ${i}: ${hash}`); + } + } + const transactionReceipts = await Promise.all( + fillTransactionHashes.map((fth, i) => + Solver.getReceiptCachedOrRpc(order.outputs[i].chainId, fth as `0x${string}`) + ) + ); + const blocks = await Promise.all( + transactionReceipts.map((r, i) => { + return getClient(order.outputs[i].chainId).getBlock({ + blockHash: r.blockHash + }); + }) + ); + const fillTimestamps = blocks.map((b) => b.timestamp); - if (preHook) await preHook(sourceChain); - const expectedChainId = chainMap[sourceChain].id; - const connectedChainId = await walletClient.getChainId(); - if (connectedChainId !== expectedChainId) { - throw new Error( - `Wallet is on chain ${connectedChainId}, expected ${expectedChainId} (${sourceChain}) before finalise` - ); - } + if (preHook) await preHook(Number(sourceChainId)); + const expectedChainId = Number(sourceChainId); + const connectedChainId = await walletClient.getChainId(); + if (connectedChainId !== expectedChainId) { + throw new Error( + `Wallet is on chain ${connectedChainId}, expected ${expectedChainId} before finalise` + ); + } - const solveParams = fillTimestamps.map((fillTimestamp) => { - return { - timestamp: Number(fillTimestamp), - solver: addressToBytes32(account()) - }; - }); + const solveParams = fillTimestamps.map((fillTimestamp) => { + return { + timestamp: Number(fillTimestamp), + solver: addressToBytes32(account()) + }; + }); - const transactionHash = await intent.finalise({ - sourceChain, - account: account(), - walletClient, - solveParams, - signatures: orderContainer - }); - if (!transactionHash) { - throw new Error( - `Finalise did not return a transaction hash for source chain ${sourceChain}.` - ); - } - let result; - try { - result = await clients[sourceChain].waitForTransactionReceipt({ - hash: transactionHash, - timeout: 120_000, - pollingInterval: 2_000 - }); - } catch (error) { - throw new Error( - `Timed out waiting for finalise tx receipt on ${sourceChain} for hash ${transactionHash}.`, - { cause: error as Error } - ); - } - await Solver.persistReceipt(chainMap[sourceChain].id, transactionHash, result); - if (postHook) await postHook(); - return result; - }; - } + const transactionHash = await finaliseIntent({ + intent, + sourceChainId, + account: account(), + walletClient, + solveParams, + signatures: orderContainer + }); + if (!transactionHash) { + throw new Error( + `Finalise did not return a transaction hash for source chain ${Number(sourceChainId)}.` + ); + } + let result; + try { + result = await getClient(sourceChainId).waitForTransactionReceipt({ + hash: transactionHash, + timeout: 120_000, + pollingInterval: 2_000 + }); + } catch (error) { + throw new Error( + `Timed out waiting for finalise tx receipt on ${Number(sourceChainId)} for hash ${transactionHash}.`, + { cause: error as Error } + ); + } + await Solver.persistReceipt(sourceChainId, transactionHash, result); + if (postHook) await postHook(); + return result; + }; + } } diff --git a/src/lib/libraries/token.ts b/src/lib/libraries/token.ts index 182f461..d000190 100644 --- a/src/lib/libraries/token.ts +++ b/src/lib/libraries/token.ts @@ -2,62 +2,62 @@ import { maxUint256 } from "viem"; import { COMPACT_ABI } from "../abi/compact"; import { ERC20_ABI } from "../abi/erc20"; import { ADDRESS_ZERO, clients, COMPACT } from "../config"; -import { ResetPeriod, toId } from "../utils/idLib"; +import { ResetPeriod, toId } from "@lifi/intent"; export async function getBalance( - user: `0x${string}` | undefined, - asset: `0x${string}`, - client: (typeof clients)[keyof typeof clients] + user: `0x${string}` | undefined, + asset: `0x${string}`, + client: (typeof clients)[keyof typeof clients] ) { - if (!user) return 0n; - if (asset === ADDRESS_ZERO) { - return client.getBalance({ - address: user, - blockTag: "latest" - }); - } else { - return client.readContract({ - address: asset, - abi: ERC20_ABI, - functionName: "balanceOf", - args: [user] - }); - } + if (!user) return 0n; + if (asset === ADDRESS_ZERO) { + return client.getBalance({ + address: user, + blockTag: "latest" + }); + } else { + return client.readContract({ + address: asset, + abi: ERC20_ABI, + functionName: "balanceOf", + args: [user] + }); + } } export function getAllowance(contract: `0x${string}`) { - return async ( - user: `0x${string}` | undefined, - asset: `0x${string}`, - client: (typeof clients)[keyof typeof clients] - ) => { - if (!user) return 0n; - if (asset == ADDRESS_ZERO) return maxUint256; - return client.readContract({ - address: asset, - abi: ERC20_ABI, - functionName: "allowance", - args: [user, contract] - }); - }; + return async ( + user: `0x${string}` | undefined, + asset: `0x${string}`, + client: (typeof clients)[keyof typeof clients] + ) => { + if (!user) return 0n; + if (asset == ADDRESS_ZERO) return maxUint256; + return client.readContract({ + address: asset, + abi: ERC20_ABI, + functionName: "allowance", + args: [user, contract] + }); + }; } export async function getCompactBalance( - user: `0x${string}` | undefined, - asset: `0x${string}`, - client: (typeof clients)[keyof typeof clients], - allocatorId: string + user: `0x${string}` | undefined, + asset: `0x${string}`, + client: (typeof clients)[keyof typeof clients], + allocatorId: string ) { - if (!user) return 0n; - const assetId = toId(true, ResetPeriod.OneDay, allocatorId, asset); - try { - return await client.readContract({ - address: COMPACT, - abi: COMPACT_ABI, - functionName: "balanceOf", - args: [user, assetId] - }); - } catch { - return 0n; - } + if (!user) return 0n; + const assetId = toId(true, ResetPeriod.OneDay, allocatorId, asset); + try { + return await client.readContract({ + address: COMPACT, + abi: COMPACT_ABI, + functionName: "balanceOf", + args: [user, assetId] + }); + } catch { + return 0n; + } } diff --git a/src/lib/migrations.json b/src/lib/migrations.json index bbd71d7..3699d71 100644 --- a/src/lib/migrations.json +++ b/src/lib/migrations.json @@ -1,40 +1,18 @@ [ - { - "sql": [ - "CREATE TABLE \"intents\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"order_id\" text NOT NULL,\n\t\"intent_type\" text NOT NULL,\n\t\"data\" text NOT NULL,\n\t\"created_at\" integer NOT NULL\n);\n" - ], - "bps": true, - "folderMillis": 1770712231202, - "hash": "3ec46f3cc562c5204f9e841d2ea2086d8994c80253445074b646b07900b30a9f" - }, - { - "sql": [ - "CREATE TABLE \"fill_transactions\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"output_hash\" text NOT NULL,\n\t\"tx_hash\" text NOT NULL,\n\tCONSTRAINT \"fill_transactions_output_hash_unique\" UNIQUE(\"output_hash\")\n);\n" - ], - "bps": true, - "folderMillis": 1770803119280, - "hash": "f963c9a03076fc9754b51c2850ad42f5edfdf19fb018a0616db37d935907b165" - }, - { - "sql": ["ALTER TABLE \"intents\" ALTER COLUMN \"created_at\" TYPE bigint;\n"], - "bps": true, - "folderMillis": 1770809000000, - "hash": "45484cce461ab6b6ac735465757bebec7d5bf488ed58c4288ebf1fd75d1881f5" - }, - { - "sql": [ - "CREATE UNIQUE INDEX IF NOT EXISTS \"intents_order_id_unique\" ON \"intents\" (\"order_id\");\n" - ], - "bps": true, - "folderMillis": 1770810000000, - "hash": "387946018137748e3a5dd66fca8a1da71ddabc4191a835a3254fad26c6b6d412" - }, - { - "sql": [ - "CREATE TABLE \"transaction_receipts\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"chain_id\" bigint NOT NULL,\n\t\"tx_hash\" text NOT NULL,\n\t\"receipt\" text NOT NULL,\n\t\"created_at\" bigint NOT NULL\n);\n" - ], - "bps": true, - "folderMillis": 1771060000000, - "hash": "8f048c5d64c44d6c89c970f44a52e1fdbaf3de8f4052145cfd90f50822ab95f1" - } + { + "sql": [ + "DROP TABLE IF EXISTS \"transaction_receipts\";\n", + "\nDROP TABLE IF EXISTS \"tokens\";\n", + "\nDROP TABLE IF EXISTS \"intents\";\n", + "\nDROP TABLE IF EXISTS \"fill_transactions\";\n", + "\nCREATE TABLE \"fill_transactions\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"output_hash\" text NOT NULL,\n\t\"tx_hash\" text NOT NULL,\n\tCONSTRAINT \"fill_transactions_output_hash_unique\" UNIQUE(\"output_hash\")\n);\n", + "\nCREATE TABLE \"intents\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"order_id\" text NOT NULL,\n\t\"intent_type\" text NOT NULL,\n\t\"data\" text NOT NULL,\n\t\"created_at\" bigint NOT NULL,\n\tCONSTRAINT \"intents_order_id_unique\" UNIQUE(\"order_id\")\n);\n", + "\nCREATE TABLE \"tokens\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"address\" text NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"chain_id\" bigint NOT NULL,\n\t\"decimals\" bigint NOT NULL,\n\t\"is_manual\" boolean DEFAULT false NOT NULL,\n\t\"is_testnet\" boolean DEFAULT false NOT NULL\n);\n", + "\nCREATE TABLE \"transaction_receipts\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"chain_id\" bigint NOT NULL,\n\t\"tx_hash\" text NOT NULL,\n\t\"receipt\" text NOT NULL,\n\t\"created_at\" bigint NOT NULL\n);\n", + "\nCREATE UNIQUE INDEX \"tokens_address_chain_idx\" ON \"tokens\" USING btree (\"address\",\"chain_id\");\n" + ], + "bps": true, + "folderMillis": 1773159031946, + "hash": "b9ecf75ed8487a7746169ad49ce1564428a73e69f49e85cd702aaabbb03d72f6" + } ] diff --git a/src/lib/schema.ts b/src/lib/schema.ts index fee5b44..a6fa802 100644 --- a/src/lib/schema.ts +++ b/src/lib/schema.ts @@ -1,25 +1,39 @@ -import { pgTable, text, integer, bigint } from "drizzle-orm/pg-core"; +import { pgTable, text, bigint, boolean, uniqueIndex } from "drizzle-orm/pg-core"; export const intents = pgTable("intents", { - id: text("id").primaryKey(), - orderId: text("order_id").notNull().unique(), - intentType: text("intent_type").notNull(), - data: text("data").notNull(), - createdAt: bigint("created_at", { mode: "number" }).notNull() + id: text("id").primaryKey(), + orderId: text("order_id").notNull().unique(), + intentType: text("intent_type").notNull(), + data: text("data").notNull(), + createdAt: bigint("created_at", { mode: "number" }).notNull() }); export const fillTransactions = pgTable("fill_transactions", { - id: text("id").primaryKey(), - outputHash: text("output_hash").notNull().unique(), - txHash: text("tx_hash").notNull() + id: text("id").primaryKey(), + outputHash: text("output_hash").notNull().unique(), + txHash: text("tx_hash").notNull() }); export const transactionReceipts = pgTable("transaction_receipts", { - id: text("id").primaryKey(), - chainId: bigint("chain_id", { mode: "number" }).notNull(), - txHash: text("tx_hash").notNull(), - receipt: text("receipt").notNull(), - createdAt: bigint("created_at", { mode: "number" }).notNull() + id: text("id").primaryKey(), + chainId: bigint("chain_id", { mode: "number" }).notNull(), + txHash: text("tx_hash").notNull(), + receipt: text("receipt").notNull(), + createdAt: bigint("created_at", { mode: "number" }).notNull() }); -export const schema = { intents, fillTransactions, transactionReceipts }; +export const tokens = pgTable( + "tokens", + { + id: text("id").primaryKey(), + address: text("address").notNull(), + name: text("name").notNull(), + chainId: bigint("chain_id", { mode: "number" }).notNull(), + decimals: bigint("decimals", { mode: "number" }).notNull(), + isManual: boolean("is_manual").notNull().default(false), + isTestnet: boolean("is_testnet").notNull().default(false) + }, + (table) => [uniqueIndex("tokens_address_chain_idx").on(table.address, table.chainId)] +); + +export const schema = { intents, fillTransactions, transactionReceipts, tokens }; diff --git a/src/lib/screens/ConnectWallet.svelte b/src/lib/screens/ConnectWallet.svelte index 1279c99..7461fea 100644 --- a/src/lib/screens/ConnectWallet.svelte +++ b/src/lib/screens/ConnectWallet.svelte @@ -1,26 +1,49 @@ - +
+ {#each connectors as connector (connector.id)} + + {/each} + + {#if !walletConnectProjectId} +

+ WalletConnect is disabled (missing `PUBLIC_WALLET_CONNECT_PROJECT_ID`). +

+ {/if} + {#if errorMessage} +

{errorMessage}

+ {/if} +
diff --git a/src/lib/screens/FillIntent.svelte b/src/lib/screens/FillIntent.svelte index 44484bc..11907e9 100644 --- a/src/lib/screens/FillIntent.svelte +++ b/src/lib/screens/FillIntent.svelte @@ -1,219 +1,271 @@ -
- {#each sortOutputsByChain(orderContainer) as chainIdAndOutputs} - - - {#snippet action()} - {@const chainStatuses = chainIdAndOutputs[1].map( - (output) => fillStatuses[outputKey(output)] - )} - {#if chainStatuses.some((status) => status === undefined)} - - {:else} - v == BYTES32_ZERO) ? "default" : "muted"} - buttonFunction={chainStatuses.every((v) => v == BYTES32_ZERO) - ? fillWrapper( - chainIdAndOutputs[1], - Solver.fill( - store.walletClient, - { - orderContainer, - outputs: chainIdAndOutputs[1] - }, - { - preHook, - postHook: postHookScroll, - account - } - ) - ) - : async () => {}} - > - {#snippet name()} - Fill - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {/if} - {/snippet} - {#snippet chips()} - {#each chainIdAndOutputs[1] as output} - {@const filled = fillStatuses[outputKey(output)]} - - {/each} - {/snippet} - - - - {/each} -
+
+ +
+ {#each orderContainer.order.outputs as output} + {@const key = outputKey(output)} + {@const currentHash = store.fillTransactions[key]} +
+ + { + const value = (event.currentTarget as HTMLInputElement).value; + manualFillTxInputs[key] = value; + manualFillTxSaved[key] = false; + manualFillTxErrors[key] = ""; + }} + /> + + {#if manualFillTxErrors[key]} +
{manualFillTxErrors[key]}
+ {:else if manualFillTxSaved[key]} +
Saved
+ {/if} +
+ {/each} +
+
+ {#each sortOutputsByChain(orderContainer) as chainIdAndOutputs} + + + {#snippet action()} + {@const chainStatuses = chainIdAndOutputs[1].map( + (output) => fillStatuses[outputKey(output)] + )} + {#if chainStatuses.some((status) => status === undefined)} + + {:else} + v == BYTES32_ZERO) ? "default" : "muted"} + buttonFunction={chainStatuses.every((v) => v == BYTES32_ZERO) + ? fillWrapper( + chainIdAndOutputs[1], + Solver.fill( + store.walletClient, + { + orderContainer, + outputs: chainIdAndOutputs[1] + }, + { + preHook, + postHook: postHookScroll, + account + } + ) + ) + : async () => {}} + > + {#snippet name()} + Fill + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {/if} + {/snippet} + {#snippet chips()} + {#each chainIdAndOutputs[1] as output} + {@const filled = fillStatuses[outputKey(output)]} + + {/each} + {/snippet} + + + {/each} +
diff --git a/src/lib/screens/Finalise.svelte b/src/lib/screens/Finalise.svelte index 1a0f522..87a5f5d 100644 --- a/src/lib/screens/Finalise.svelte +++ b/src/lib/screens/Finalise.svelte @@ -1,280 +1,284 @@ -
- {#if allFinalised} - - {/if} - {#if allFinalised} -
-
All inputs finalised
-
Intent fully solved.
-
- {/if} - {#each inputChains as inputChain} - - - {#snippet action()} - {@const isClaimedStatus = claimedByChain[inputChain.toString()]} - {#if isClaimedStatus === undefined} - - {:else if isClaimedStatus} - - {:else} - - store.fillTransactions[ - hashStruct({ - data: output, - types: compactTypes, - primaryType: "MandateOutput" - }) - ] as string - ) - }, - { - account, - preHook, - postHook: postHookRefreshValidate - } - )} - > - {#snippet name()} - Claim - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {/if} - {/snippet} - {#snippet chips()} - {#if "originChainId" in orderContainer.order} - {#each orderContainer.order.inputs as input} - - {/each} - {:else} - {#each orderContainer.order.inputs.find((v) => v.chainId === inputChain)?.inputs ?? [] as input} - - {/each} - {/if} - {/snippet} - - - {/each} -
+
+ {#if allFinalised} + + {/if} + {#if allFinalised} +
+
All inputs finalised
+
Intent fully solved.
+
+ {/if} + {#each inputChains as inputChain} + + + {#snippet action()} + {@const isClaimedStatus = claimedByChain[inputChain.toString()]} + {#if isClaimedStatus === undefined} + + {:else if isClaimedStatus} + + {:else} + {@const fillTransactionHashes = fillTransactionHashesFor(orderContainer)} + {@const canClaim = fillTransactionHashes.every((hash) => isValidFillTxHash(hash))} + {#if !canClaim} + + {:else} + + {#snippet name()} + Claim + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {/if} + {/if} + {/snippet} + {#snippet chips()} + {#each getInputsForChain(orderContainer, inputChain) as input} + + {/each} + {/snippet} + + + {/each} +
diff --git a/src/lib/screens/IntentDescription.svelte b/src/lib/screens/IntentDescription.svelte index 0c463f5..106fb04 100644 --- a/src/lib/screens/IntentDescription.svelte +++ b/src/lib/screens/IntentDescription.svelte @@ -1,33 +1,33 @@
-

Intent Description

-

- To fill an intent, you may need to execute up to 4 transactions. This intent requires 3. -

-
-
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
+

Intent Description

+

+ To fill an intent, you may need to execute up to 4 transactions. This intent requires 3. +

+
+
    +
  1. + +
  2. +
  3. + +
  4. +
  5. + +
  6. +
  7. + +
  8. +
diff --git a/src/lib/screens/IntentList.svelte b/src/lib/screens/IntentList.svelte index 4b292ab..f216c90 100644 --- a/src/lib/screens/IntentList.svelte +++ b/src/lib/screens/IntentList.svelte @@ -1,225 +1,225 @@ -
- { - if (event.key === "Enter") handleImport(); - }} - /> - -
- {#if importMessage} -
- {importMessage} -
- {/if} - -
- {#each activeRows as row (row.orderId)} -
- - -
- {/each} -
-
- -
- {#each expiredRows as row (row.orderId)} -
- - {#if expandedExpiredOrderId === row.orderId} - - {/if} -
- {/each} -
-
+
+ { + if (event.key === "Enter") handleImport(); + }} + /> + +
+ {#if importMessage} +
+ {importMessage} +
+ {/if} + +
+ {#each activeRows as row (row.orderId)} +
+ + +
+ {/each} +
+
+ +
+ {#each expiredRows as row (row.orderId)} +
+ + {#if expandedExpiredOrderId === row.orderId} + + {/if} +
+ {/each} +
+
diff --git a/src/lib/screens/IssueIntent.svelte b/src/lib/screens/IssueIntent.svelte index 1eee3da..d038bb1 100644 --- a/src/lib/screens/IssueIntent.svelte +++ b/src/lib/screens/IssueIntent.svelte @@ -1,351 +1,409 @@ - {#if inputTokenSelectorActive} - - {/if} - {#if outputTokenSelectorActive} - - {/if} + {#if inputTokenSelectorActive} + + {/if} + {#if outputTokenSelectorActive} + + {/if} -
- - {#snippet headerRight()} -
- -
- {/snippet} -
-
-

You Pay

- {#each abstractInputs as input, i (input.name)} - - {/each} - {#if numInputChains > 1} -
Multichain
- {/if} - {#if sameChain} -
Same chain
- {/if} -
-
-
-
In
-
exchange
-
for
-
-
-
-

You Receive

- {#each store.outputTokens as outputToken, i (`${outputToken.token.chain}-${outputToken.token.address}-${i}`)} - - {/each} -
-
-
+
+ + {#snippet headerRight()} +
+ +
+ {/snippet} +
+
+

You Pay

+ {#each abstractInputs as input, i (input.name)} + + {/each} + {#if numInputChains > 1} +
Multichain
+ {/if} + {#if sameChain} +
Same chain
+ {/if} +
+
+
+
In
+
exchange
+
for
+
+
+
+

You Receive

+ {#each store.outputTokens as outputToken, i (`${outputToken.token.chainId}-${outputToken.token.address}-${i}`)} + + {/each} +
+
+
- -
-
- Verifier - {#if sameChain} - - - - {:else} - - - - - {/if} -
-
- Exclusive - - -
-
-
+ +
+
+ Recipient + 0 && !resolveRecipient(store.recipient) + ? "error" + : "default"} + bind:value={store.recipient} + /> +
+
+ Verifier + {#if sameChain} + + + + {:else} + + + + + {/if} +
+
+ Exclusive + + +
+
+
-
- {#if !allowanceCheck} - - {#snippet name()} - Set allowance - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {:else} -
- {#if !balanceCheckWallet} - - {:else if store.intentType === "escrow"} - - {#snippet name()} - Execute Open - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {/if} - {#if store.intentType === "compact" && store.allocatorId !== POLYMER_ALLOCATOR} - {#if !balanceCheckCompact} - - {:else} - - {#snippet name()} - Sign Order - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {/if} - {/if} -
- {/if} -
- {#if numInputChains > 1 && store.intentType !== "compact"} -

- You'll need to open the order on {numInputChains} chains. Be prepared and do not interrupt the - process. -

- {/if} -
+
+ {#if !allowanceCheck} + + {#snippet name()} + Set allowance + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {:else} +
+ {#if !balanceCheckWallet} + + {:else if store.intentType === "escrow"} + + {#snippet name()} + Execute Open + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {/if} + {#if store.intentType === "compact" && store.allocatorId !== POLYMER_ALLOCATOR} + {#if !balanceCheckCompact} + + {:else} + + {#snippet name()} + Sign Order + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {/if} + {/if} +
+ {/if} +
+ {#if numInputChains > 1 && store.intentType !== "compact"} +

+ You'll need to open the order on {numInputChains} chains. Be prepared and do not interrupt the + process. +

+ {/if} +
diff --git a/src/lib/screens/ManageDeposit.svelte b/src/lib/screens/ManageDeposit.svelte index 283a72c..d639ab4 100644 --- a/src/lib/screens/ManageDeposit.svelte +++ b/src/lib/screens/ManageDeposit.svelte @@ -1,190 +1,292 @@ -
- -
-

Network

- (store.mainnet = v === "mainnet")} - /> -
-
- -
-

Input Type

- (store.intentType = v as "compact" | "escrow")} - /> -
-
- {#if store.intentType === "compact"} - -
-
-

Allocator

- (store.allocatorId = v as typeof store.allocatorId)} - /> -
-
- - - - - - of - {#if (manageAssetAction === "withdraw" ? store.compactBalances : store.balances)[token.chain]} - - {/if} - - {#each coinList(store.mainnet) as tkn, i} - - {/each} - -
-
- {#if manageAssetAction === "withdraw"} - - {#snippet name()} - Withdraw - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {:else if allowance < inputAmount} - - {#snippet name()} - Set allowance - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {:else} - - {#snippet name()} - Execute deposit - {/snippet} - {#snippet awaiting()} - Waiting for transaction... - {/snippet} - - {/if} -
-
-
- {:else} - -

- The Escrow Input Settler does not have any asset management. Skip to the next step to - select which assets to use. In the future, this place will be updated to show your pending - intents. -

-
- {/if} -
+
+ +
+
+

Network

+ (store.mainnet = v === "mainnet")} + /> +
+
+

Intent API

+ (store.useProductionApi = v === "auto" ? null : v === "production")} + /> +
+
+
+ +
+

Input Type

+ (store.intentType = v as "compact" | "escrow")} + /> +
+
+ {#if store.intentType === "compact"} + +
+
+

Allocator

+ (store.allocatorId = v as typeof store.allocatorId)} + /> +
+
+ + + + + + of + {#if (manageAssetAction === "withdraw" ? store.compactBalances : store.balances)[token.chainId]} + + {/if} + + {#each store.availableTokens as tkn, i} + + {/each} + +
+
+ {#if manageAssetAction === "withdraw"} + + {#snippet name()} + Withdraw + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {:else if allowance < inputAmount} + + {#snippet name()} + Set allowance + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {:else} + + {#snippet name()} + Execute deposit + {/snippet} + {#snippet awaiting()} + Waiting for transaction... + {/snippet} + + {/if} +
+
+
+ {/if} + +
+
+

Add Token

+ + + {#each chainList(store.mainnet) as chainName} + + {/each} + + {#if addTokenError} +

{addTokenError}

+ {/if} + { + addTokenError = ""; + if (!/^0x[0-9a-fA-F]{40}$/.test(newTokenAddress)) { + addTokenError = "Invalid address"; + return; + } + try { + const client = getClient(newTokenChainId); + const addr = newTokenAddress as `0x${string}`; + const decimals = await client.readContract({ + address: addr, + abi: erc20Abi, + functionName: "decimals" + }); + const symbol = await client.readContract({ + address: addr, + abi: erc20Abi, + functionName: "symbol" + }); + await store.addCustomToken({ + address: addr, + name: symbol.toLowerCase(), + chainId: newTokenChainId, + decimals: Number(decimals) + }); + newTokenAddress = ""; + } catch (e) { + addTokenError = e instanceof Error ? e.message : "Failed to fetch token"; + } + }} + > + {#snippet name()} + Add + {/snippet} + {#snippet awaiting()} + Fetching... + {/snippet} + +
+
+ {#each store.availableTokens as tkn} + {@const tokenKey = `${tkn.chainId}:${tkn.address.toLowerCase()}`} + {@const isManual = store.manualTokenKeys.has(tokenKey)} +
+ {tkn.name.toUpperCase()} + {printToken(tkn)} + {tkn.address.slice(0, 8)}… + {#if isManual} + + {/if} +
+ {/each} +
+
+
+
diff --git a/src/lib/screens/ReceiveMessage.svelte b/src/lib/screens/ReceiveMessage.svelte index 211dfc5..3d2d430 100644 --- a/src/lib/screens/ReceiveMessage.svelte +++ b/src/lib/screens/ReceiveMessage.svelte @@ -1,242 +1,227 @@ -
- {#each orderToIntent(orderContainer).inputChains() as inputChain} - - - {#snippet action()} -
Validate outputs
- {/snippet} - {#snippet chips()} - {#each orderContainer.order.outputs as output} - {@const status = validationStatuses[validationKey(inputChain, output)]} - {#if status === undefined} - - {:else} - {} - : Solver.validate( - store.walletClient, - { - output, - orderContainer, - fillTransactionHash: - store.fillTransactions[ - hashStruct({ - data: output, - types: compactTypes, - primaryType: "MandateOutput" - }) - ], - sourceChain: getChainName(inputChain), - mainnet: store.mainnet - }, - { - preHook, - postHook: postHookRefreshValidate, - account - } - )} - > - {#snippet name()} - {formatTokenAmount( - output.amount, - getCoin({ address: output.token, chain: getChainName(output.chainId) }) - .decimals - )} -   - {getCoin({ - address: output.token, - chain: getChainName(output.chainId) - }).name.toUpperCase()} - {/snippet} - {#snippet awaiting()} - Validating... - {/snippet} - - {/if} - {/each} - {/snippet} -
-
- {/each} -
+
+ {#each containerToIntent(orderContainer).inputChains() as inputChain} + + + {#snippet action()} +
Validate outputs
+ {/snippet} + {#snippet chips()} + {#each orderContainer.order.outputs as output} + {@const status = validationStatuses[validationKey(inputChain, output)]} + {#if status === undefined} + + {:else} + {} + : Solver.validate( + store.walletClient, + { + output, + orderContainer, + fillTransactionHash: store.fillTransactions[outputKey(output)], + sourceChainId: Number(inputChain), + mainnet: store.mainnet + }, + { + preHook, + postHook: postHookRefreshValidate, + account + } + )} + > + {#snippet name()} + {formatTokenAmount( + output.amount, + getCoin({ address: output.token, chainId: output.chainId }).decimals + )} +   + {getCoin({ + address: output.token, + chainId: output.chainId + }).name.toUpperCase()} + {/snippet} + {#snippet awaiting()} + Validating... + {/snippet} + + {/if} + {/each} + {/snippet} +
+
+ {/each} +
diff --git a/src/lib/state.svelte.ts b/src/lib/state.svelte.ts index 59b0ded..ff64a49 100644 --- a/src/lib/state.svelte.ts +++ b/src/lib/state.svelte.ts @@ -1,416 +1,577 @@ -import type { WalletState } from "@web3-onboard/core"; -import type { OrderContainer } from "../types"; +import type { OrderContainer } from "@lifi/intent"; +import type { GetTransactionReceiptReturnType } from "viem"; +import type { AppTokenContext } from "./appTypes"; + +type OrderContainerWithMeta = OrderContainer & { id?: string; intentType?: string }; import { - ALWAYS_OK_ALLOCATOR, - chainMap, - clients, - coinList, - COMPACT, - INPUT_SETTLER_COMPACT_LIFI, - INPUT_SETTLER_ESCROW_LIFI, - MULTICHAIN_INPUT_SETTLER_COMPACT, - MULTICHAIN_INPUT_SETTLER_ESCROW, - type availableAllocators, - type chain, - type Token, - type Verifier + ALWAYS_OK_ALLOCATOR, + clientsById, + coinList, + COMPACT, + INPUT_SETTLER_COMPACT_LIFI, + INPUT_SETTLER_ESCROW_LIFI, + MULTICHAIN_INPUT_SETTLER_COMPACT, + MULTICHAIN_INPUT_SETTLER_ESCROW, + isChainIdTestnet, + type availableAllocators, + type Token, + type Verifier, + type WC } from "./config"; import { getAllowance, getBalance, getCompactBalance } from "./libraries/token"; -import onboard from "./utils/web3-onboard"; -import { createWalletClient, custom } from "viem"; import { browser } from "$app/environment"; import { initDb, db } from "./db"; import { - intents, - fillTransactions as fillTransactionsTable, - transactionReceipts as transactionReceiptsTable + intents, + fillTransactions as fillTransactionsTable, + transactionReceipts as transactionReceiptsTable, + tokens as tokensTable } from "./schema"; -import { and, eq } from "drizzle-orm"; -import { orderToIntent } from "./libraries/intent"; +import { and, eq, ne, notInArray } from "drizzle-orm"; +import { containerToIntent } from "./utils/intent"; import { getOrFetchRpc, invalidateRpcPrefix } from "./libraries/rpcCache"; - -export type TokenContext = { - token: Token; - amount: bigint; -}; +import { + getCurrentConnection, + getCurrentWalletClient, + reconnectWallet, + type WalletConnection, + watchWalletConnection +} from "./utils/wagmi"; +import { switchWalletChain } from "./utils/walletClientRuntime"; + +function generateUUID(): string { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { + const r = (Math.random() * 16) | 0; + const v = c === "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); +} class Store { - mainnet = $state(true); - orders = $state([]); - - async loadOrdersFromDb() { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - const rows = await db!.select().from(intents); - this.orders = rows.map((r: any) => JSON.parse(r.data) as OrderContainer); - } - - async saveOrderToDb(order: OrderContainer) { - if (!browser) return; - if (!db) await initDb(); - const orderId = orderToIntent(order).orderId(); - const now = Math.floor(Date.now() / 1000); - const id = - (order as any).id ?? (typeof crypto !== "undefined" ? crypto.randomUUID() : String(now)); - const intentType = (order as any).intentType ?? "escrow"; - const data = JSON.stringify(order); - if (db) { - try { - try { - await db - .insert(intents) - .values({ - id, - orderId, - intentType, - data, - createdAt: now - }) - .onConflictDoUpdate({ - target: intents.orderId, - set: { intentType, data } - }); - } catch (_error) { - const existing = await db.select().from(intents).where(eq(intents.orderId, orderId)); - if (existing.length > 0) { - await db.update(intents).set({ intentType, data }).where(eq(intents.orderId, orderId)); - } else { - await db.insert(intents).values({ - id, - orderId, - intentType, - data, - createdAt: now - }); - } - } - } catch (error) { - console.warn("saveOrderToDb db write failed", { orderId, error }); - } - } - const idx = this.orders.findIndex((o) => orderToIntent(o).orderId() === orderId); - if (idx >= 0) this.orders[idx] = order; - else this.orders.push(order); - } - - async deleteOrderFromDb(orderId: string) { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - await db!.delete(intents).where(eq(intents.orderId, orderId)); - await this.loadOrdersFromDb(); - } - - async loadFillTransactionsFromDb() { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - const rows = await db!.select().from(fillTransactionsTable); - const loaded: { [outputId: string]: `0x${string}` } = {}; - for (const row of rows) loaded[row.outputHash] = row.txHash as `0x${string}`; - this.fillTransactions = loaded; - } - - async saveFillTransaction(outputHash: string, txHash: `0x${string}`) { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - const existing = await db! - .select() - .from(fillTransactionsTable) - .where(eq(fillTransactionsTable.outputHash, outputHash)); - if (existing.length > 0) { - await db! - .update(fillTransactionsTable) - .set({ txHash }) - .where(eq(fillTransactionsTable.outputHash, outputHash)); - } else { - await db!.insert(fillTransactionsTable).values({ - id: typeof crypto !== "undefined" ? crypto.randomUUID() : String(Date.now()), - outputHash, - txHash - }); - } - } - - async loadTransactionReceiptsFromDb() { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - const rows = await db!.select().from(transactionReceiptsTable); - const loaded: Record = {}; - for (const row of rows) { - loaded[`${row.chainId}:${row.txHash}`] = row.receipt; - } - this.transactionReceipts = loaded; - } - - async saveTransactionReceipt(chainId: number | bigint, txHash: `0x${string}`, receipt: unknown) { - if (!browser) return; - if (!db) await initDb(); - if (!db) return; - const chainIdNumber = Number(chainId); - const serializedReceipt = JSON.stringify(receipt, (_key, value) => - typeof value === "bigint" ? value.toString() : value - ); - const existing = await db! - .select() - .from(transactionReceiptsTable) - .where( - and( - eq(transactionReceiptsTable.chainId, chainIdNumber), - eq(transactionReceiptsTable.txHash, txHash) - ) - ); - if (existing.length > 0) { - await db! - .update(transactionReceiptsTable) - .set({ receipt: serializedReceipt }) - .where( - and( - eq(transactionReceiptsTable.chainId, chainIdNumber), - eq(transactionReceiptsTable.txHash, txHash) - ) - ); - } else { - await db!.insert(transactionReceiptsTable).values({ - id: typeof crypto !== "undefined" ? crypto.randomUUID() : String(Date.now()), - chainId: chainIdNumber, - txHash, - receipt: serializedReceipt, - createdAt: Math.floor(Date.now() / 1000) - }); - } - this.transactionReceipts[`${chainIdNumber}:${txHash}`] = serializedReceipt; - } - - getTransactionReceipt(chainId: number | bigint, txHash: `0x${string}`) { - const serialized = this.transactionReceipts[`${Number(chainId)}:${txHash}`]; - if (!serialized) return undefined; - try { - return JSON.parse(serialized) as unknown; - } catch (error) { - console.warn("parse cached transaction receipt failed", { - chainId: Number(chainId), - txHash, - error - }); - return undefined; - } - } - - wallets = onboard.state.select("wallets"); - activeWallet = $state<{ wallet?: WalletState }>({}); - connectedAccount = $derived(this.activeWallet.wallet?.accounts?.[0]); - walletClient = $derived( - this.activeWallet?.wallet?.provider - ? createWalletClient({ transport: custom(this.activeWallet.wallet.provider) }) - : undefined - )!; - - inputTokens = $state([]); - outputTokens = $state([]); - fillTransactions = $state<{ [outputId: string]: `0x${string}` }>({}); - transactionReceipts = $state>({}); - - refreshEpoch = $state(0); - rpcRefreshMs = 45_000; - _rpcRefreshHandle?: ReturnType; - - balances = $derived.by(() => { - this.refreshEpoch; - const account = this.connectedAccount?.address; - return this.mapOverCoinsCached({ - bucket: "balance", - ttlMs: 30_000, - isMainnet: this.mainnet, - scopeKey: account ?? "none", - fetcher: (asset, client) => getBalance(account, asset, client) - }); - }); - - allowances = $derived.by(() => { - this.refreshEpoch; - const account = this.connectedAccount?.address; - const spender = - this.inputSettler === INPUT_SETTLER_COMPACT_LIFI || - this.inputSettler === MULTICHAIN_INPUT_SETTLER_COMPACT - ? COMPACT - : this.inputSettler; - return this.mapOverCoinsCached({ - bucket: "allowance", - ttlMs: 60_000, - isMainnet: this.mainnet, - scopeKey: `${account ?? "none"}:${spender}`, - fetcher: (asset, client) => getAllowance(spender)(account, asset, client) - }); - }); - - compactBalances = $derived.by(() => { - this.refreshEpoch; - const account = this.connectedAccount?.address; - const allocatorId = this.allocatorId; - return this.mapOverCoinsCached({ - bucket: "compact", - ttlMs: 60_000, - isMainnet: this.mainnet, - scopeKey: `${account ?? "none"}:${allocatorId}`, - fetcher: (asset, client) => getCompactBalance(account, asset, client, allocatorId) - }); - }); - - multichain = $derived([...new Set(this.inputTokens.map((i) => i.token.chain))].length > 1); - - inputSettler = $derived.by(() => { - if (this.intentType === "escrow" && !this.multichain) return INPUT_SETTLER_ESCROW_LIFI; - if (this.intentType === "escrow" && this.multichain) return MULTICHAIN_INPUT_SETTLER_ESCROW; - if (this.intentType === "compact" && !this.multichain) return INPUT_SETTLER_COMPACT_LIFI; - if (this.intentType === "compact" && this.multichain) return MULTICHAIN_INPUT_SETTLER_COMPACT; - return INPUT_SETTLER_ESCROW_LIFI; - }); - intentType = $state<"escrow" | "compact">("escrow"); - allocatorId = $state(ALWAYS_OK_ALLOCATOR); - verifier = $state("polymer"); - exclusiveFor: string = $state(""); - useExclusiveForQuoteRequest = $state(false); - - invalidateWalletReadCache(scope: "all" | "balance" | "allowance" | "compact" = "all") { - if (scope === "all" || scope === "balance") invalidateRpcPrefix("balance:"); - if (scope === "all" || scope === "allowance") invalidateRpcPrefix("allowance:"); - if (scope === "all" || scope === "compact") invalidateRpcPrefix("compact:"); - } - - refreshWalletReads(opts?: { - force?: boolean; - scope?: "all" | "balance" | "allowance" | "compact"; - }) { - const force = opts?.force ?? false; - const scope = opts?.scope ?? "all"; - if (force) this.invalidateWalletReadCache(scope); - this.refreshEpoch += 1; - } - - refreshTokenBalance(token: Token, force = true) { - if (force) { - invalidateRpcPrefix( - `balance:${this.mainnet ? "mainnet" : "testnet"}:${token.chain}:${token.address}:` - ); - } - this.refreshEpoch += 1; - } - - refreshTokenAllowance(token: Token, force = true) { - if (force) { - invalidateRpcPrefix( - `allowance:${this.mainnet ? "mainnet" : "testnet"}:${token.chain}:${token.address}:` - ); - } - this.refreshEpoch += 1; - } - - refreshCompactBalance(token: Token, force = true) { - if (force) { - invalidateRpcPrefix( - `compact:${this.mainnet ? "mainnet" : "testnet"}:${token.chain}:${token.address}:` - ); - } - this.refreshEpoch += 1; - } - - forceUpdate = () => { - this.refreshWalletReads({ force: true, scope: "all" }); - }; - - syncIntervalMs = 5000; - _syncHandle?: ReturnType; - - startSync(intervalMs?: number) { - this.stopSync(); - this._syncHandle = setInterval(() => { - this.loadOrdersFromDb().catch((e) => console.warn("sync error", e)); - }, intervalMs ?? this.syncIntervalMs); - } - - stopSync() { - if (this._syncHandle) { - clearInterval(this._syncHandle); - this._syncHandle = undefined; - } - } - - startRpcRefreshLoop(intervalMs?: number) { - if (!browser) return; - this.stopRpcRefreshLoop(); - this._rpcRefreshHandle = setInterval(() => { - this.refreshWalletReads(); - }, intervalMs ?? this.rpcRefreshMs); - } - - stopRpcRefreshLoop() { - if (this._rpcRefreshHandle) { - clearInterval(this._rpcRefreshHandle); - this._rpcRefreshHandle = undefined; - } - } - - async setWalletToCorrectChain(chain: chain) { - try { - return await this.walletClient?.switchChain({ id: chainMap[chain].id }); - } catch (error) { - console.warn( - `Wallet does not support switchChain or failed to switch chain: ${chainMap[chain].id}`, - error - ); - return undefined; - } - } - - mapOverCoinsCached(opts: { - bucket: "balance" | "allowance" | "compact"; - ttlMs: number; - isMainnet: boolean; - scopeKey: string; - fetcher: (asset: `0x${string}`, client: (typeof clients)[keyof typeof clients]) => Promise; - }) { - const { bucket, ttlMs, isMainnet, scopeKey, fetcher } = opts; - const resolved: Record>> = {} as any; - for (const token of coinList(isMainnet)) { - if (!resolved[token.chain as chain]) resolved[token.chain] = {}; - const key = `${bucket}:${isMainnet ? "mainnet" : "testnet"}:${token.chain}:${token.address}:${scopeKey}`; - resolved[token.chain][token.address] = getOrFetchRpc( - key, - () => fetcher(token.address, clients[token.chain]), - { ttlMs } - ); - } - return resolved; - } - - dbReady: Promise | undefined; - - constructor() { - this.inputTokens = [{ token: coinList(this.mainnet)[0], amount: 1000000n }]; - this.outputTokens = [{ token: coinList(this.mainnet)[1], amount: 1000000n }]; - - this.wallets.subscribe((v) => { - this.activeWallet.wallet = v?.[0]; - }); - - this.startRpcRefreshLoop(); - - this.dbReady = browser - ? Promise.all([ - this.loadOrdersFromDb().catch((e) => console.warn("loadOrdersFromDb error", e)), - this.loadFillTransactionsFromDb().catch((e) => - console.warn("loadFillTransactionsFromDb error", e) - ), - this.loadTransactionReceiptsFromDb().catch((e) => - console.warn("loadTransactionReceiptsFromDb error", e) - ) - ]).then(() => {}) - : Promise.resolve(); - } + mainnet = $state(true); + useProductionApi = $state(null); + orders = $state([]); + + async loadOrdersFromDb() { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const rows = await db!.select().from(intents); + this.orders = rows.map((r) => JSON.parse(r.data) as OrderContainer); + } + + async saveOrderToDb(order: OrderContainerWithMeta) { + if (!browser) return; + if (!db) await initDb(); + const orderId = containerToIntent(order).orderId(); + const now = Math.floor(Date.now() / 1000); + const id = order.id ?? generateUUID(); + const intentType = order.intentType ?? "escrow"; + const data = JSON.stringify(order); + if (db) { + try { + try { + await db + .insert(intents) + .values({ + id, + orderId, + intentType, + data, + createdAt: now + }) + .onConflictDoUpdate({ + target: intents.orderId, + set: { intentType, data } + }); + } catch (_error) { + const existing = await db.select().from(intents).where(eq(intents.orderId, orderId)); + if (existing.length > 0) { + await db.update(intents).set({ intentType, data }).where(eq(intents.orderId, orderId)); + } else { + await db.insert(intents).values({ + id, + orderId, + intentType, + data, + createdAt: now + }); + } + } + } catch (error) { + console.warn("saveOrderToDb db write failed", { orderId, error }); + } + } + const idx = this.orders.findIndex((o) => containerToIntent(o).orderId() === orderId); + if (idx >= 0) this.orders[idx] = order; + else this.orders.push(order); + } + + async deleteOrderFromDb(orderId: string) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + await db!.delete(intents).where(eq(intents.orderId, orderId)); + await this.loadOrdersFromDb(); + } + + async loadFillTransactionsFromDb() { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const rows = await db!.select().from(fillTransactionsTable); + const loaded: { [outputId: string]: `0x${string}` } = {}; + for (const row of rows) loaded[row.outputHash] = row.txHash as `0x${string}`; + this.fillTransactions = loaded; + } + + async saveFillTransaction(outputHash: string, txHash: `0x${string}`) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const existing = await db! + .select() + .from(fillTransactionsTable) + .where(eq(fillTransactionsTable.outputHash, outputHash)); + if (existing.length > 0) { + await db! + .update(fillTransactionsTable) + .set({ txHash }) + .where(eq(fillTransactionsTable.outputHash, outputHash)); + } else { + await db!.insert(fillTransactionsTable).values({ + id: generateUUID(), + outputHash, + txHash + }); + } + } + + async loadTransactionReceiptsFromDb() { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const rows = await db!.select().from(transactionReceiptsTable); + const loaded: Record = {}; + for (const row of rows) { + loaded[`${row.chainId}:${row.txHash}`] = row.receipt; + } + this.transactionReceipts = loaded; + } + + async saveTransactionReceipt(chainId: number | bigint, txHash: `0x${string}`, receipt: unknown) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const chainIdNumber = Number(chainId); + const serializedReceipt = JSON.stringify(receipt, (_key, value) => + typeof value === "bigint" ? value.toString() : value + ); + const existing = await db! + .select() + .from(transactionReceiptsTable) + .where( + and( + eq(transactionReceiptsTable.chainId, chainIdNumber), + eq(transactionReceiptsTable.txHash, txHash) + ) + ); + if (existing.length > 0) { + await db! + .update(transactionReceiptsTable) + .set({ receipt: serializedReceipt }) + .where( + and( + eq(transactionReceiptsTable.chainId, chainIdNumber), + eq(transactionReceiptsTable.txHash, txHash) + ) + ); + } else { + await db!.insert(transactionReceiptsTable).values({ + id: typeof crypto !== "undefined" ? crypto.randomUUID() : String(Date.now()), + chainId: chainIdNumber, + txHash, + receipt: serializedReceipt, + createdAt: Math.floor(Date.now() / 1000) + }); + } + this.transactionReceipts[`${chainIdNumber}:${txHash}`] = serializedReceipt; + } + + getTransactionReceipt(chainId: number | bigint, txHash: `0x${string}`) { + const serialized = this.transactionReceipts[`${Number(chainId)}:${txHash}`]; + if (!serialized) return undefined; + try { + return JSON.parse(serialized) as GetTransactionReceiptReturnType; + } catch (error) { + console.warn("parse cached transaction receipt failed", { + chainId: Number(chainId), + txHash, + error + }); + return undefined; + } + } + + walletConnection = $state(getCurrentConnection()); + connectedAccount = $derived( + this.walletConnection.status === "connected" + ? { address: this.walletConnection.address } + : undefined + ); + walletClient = $state(undefined as unknown as WC); + _unwatchWalletConnection?: () => void; + + availableTokens = $state([...(coinList(true) as readonly Token[])]); + manualTokenKeys = $state>(new Set()); + inputTokens = $state([]); + outputTokens = $state([]); + fillTransactions = $state<{ [outputId: string]: `0x${string}` }>({}); + transactionReceipts = $state>({}); + + refreshEpoch = $state(0); + rpcRefreshMs = 45_000; + _rpcRefreshHandle?: ReturnType; + + balances = $derived.by(() => { + this.refreshEpoch; + const account = this.connectedAccount?.address; + return this.mapOverCoinsCached({ + bucket: "balance", + ttlMs: 30_000, + isMainnet: this.mainnet, + scopeKey: account ?? "none", + fetcher: (asset, client) => getBalance(account, asset, client) + }); + }); + + allowances = $derived.by(() => { + this.refreshEpoch; + const account = this.connectedAccount?.address; + const spender = + this.inputSettler === INPUT_SETTLER_COMPACT_LIFI || + this.inputSettler === MULTICHAIN_INPUT_SETTLER_COMPACT + ? COMPACT + : this.inputSettler; + return this.mapOverCoinsCached({ + bucket: "allowance", + ttlMs: 60_000, + isMainnet: this.mainnet, + scopeKey: `${account ?? "none"}:${spender}`, + fetcher: (asset, client) => getAllowance(spender)(account, asset, client) + }); + }); + + compactBalances = $derived.by(() => { + this.refreshEpoch; + const account = this.connectedAccount?.address; + const allocatorId = this.allocatorId; + return this.mapOverCoinsCached({ + bucket: "compact", + ttlMs: 60_000, + isMainnet: this.mainnet, + scopeKey: `${account ?? "none"}:${allocatorId}`, + fetcher: (asset, client) => getCompactBalance(account, asset, client, allocatorId) + }); + }); + + multichain = $derived([...new Set(this.inputTokens.map((i) => i.token.chainId))].length > 1); + + inputSettler = $derived.by(() => { + if (this.intentType === "escrow" && !this.multichain) return INPUT_SETTLER_ESCROW_LIFI; + if (this.intentType === "escrow" && this.multichain) return MULTICHAIN_INPUT_SETTLER_ESCROW; + if (this.intentType === "compact" && !this.multichain) return INPUT_SETTLER_COMPACT_LIFI; + if (this.intentType === "compact" && this.multichain) return MULTICHAIN_INPUT_SETTLER_COMPACT; + return INPUT_SETTLER_ESCROW_LIFI; + }); + intentType = $state<"escrow" | "compact">("escrow"); + allocatorId = $state(ALWAYS_OK_ALLOCATOR); + verifier = $state("polymer"); + exclusiveFor: string = $state(""); + recipient: string = $state(""); + useExclusiveForQuoteRequest = $state(false); + + invalidateWalletReadCache(scope: "all" | "balance" | "allowance" | "compact" = "all") { + if (scope === "all" || scope === "balance") invalidateRpcPrefix("balance:"); + if (scope === "all" || scope === "allowance") invalidateRpcPrefix("allowance:"); + if (scope === "all" || scope === "compact") invalidateRpcPrefix("compact:"); + } + + refreshWalletReads(opts?: { + force?: boolean; + scope?: "all" | "balance" | "allowance" | "compact"; + }) { + const force = opts?.force ?? false; + const scope = opts?.scope ?? "all"; + if (force) this.invalidateWalletReadCache(scope); + this.refreshEpoch += 1; + } + + refreshTokenBalance(token: Token, force = true) { + if (force) { + invalidateRpcPrefix( + `balance:${this.mainnet ? "mainnet" : "testnet"}:${token.chainId}:${token.address}:` + ); + } + this.refreshEpoch += 1; + } + + refreshTokenAllowance(token: Token, force = true) { + if (force) { + invalidateRpcPrefix( + `allowance:${this.mainnet ? "mainnet" : "testnet"}:${token.chainId}:${token.address}:` + ); + } + this.refreshEpoch += 1; + } + + refreshCompactBalance(token: Token, force = true) { + if (force) { + invalidateRpcPrefix( + `compact:${this.mainnet ? "mainnet" : "testnet"}:${token.chainId}:${token.address}:` + ); + } + this.refreshEpoch += 1; + } + + forceUpdate = () => { + this.refreshWalletReads({ force: true, scope: "all" }); + }; + + syncIntervalMs = 5000; + _syncHandle?: ReturnType; + + startSync(intervalMs?: number) { + this.stopSync(); + this._syncHandle = setInterval(() => { + this.loadOrdersFromDb().catch((e) => console.warn("sync error", e)); + }, intervalMs ?? this.syncIntervalMs); + } + + stopSync() { + if (this._syncHandle) { + clearInterval(this._syncHandle); + this._syncHandle = undefined; + } + } + + startRpcRefreshLoop(intervalMs?: number) { + if (!browser) return; + this.stopRpcRefreshLoop(); + this._rpcRefreshHandle = setInterval(() => { + this.refreshWalletReads(); + }, intervalMs ?? this.rpcRefreshMs); + } + + stopRpcRefreshLoop() { + if (this._rpcRefreshHandle) { + clearInterval(this._rpcRefreshHandle); + this._rpcRefreshHandle = undefined; + } + } + + private async loadTokensFromDb(mainnet: boolean) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const rows = await db!.select().from(tokensTable).where(eq(tokensTable.isTestnet, !mainnet)); + this.availableTokens = rows.map((r) => ({ + address: r.address as `0x${string}`, + name: r.name, + chainId: r.chainId, + decimals: r.decimals + })); + this.manualTokenKeys = new Set( + rows.filter((r) => r.isManual).map((r) => `${r.chainId}:${r.address.toLowerCase()}`) + ); + } + + async syncConfiguredTokens() { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + + const mainnetTokens = [...(coinList(true) as readonly Token[])]; + const testnetTokens = [...(coinList(false) as readonly Token[])]; + const allConfigured = [ + ...mainnetTokens.map((t) => ({ ...t, isTestnet: false })), + ...testnetTokens.map((t) => ({ ...t, isTestnet: true })) + ]; + + // Upsert all configured tokens + for (const t of allConfigured) { + const id = `${t.chainId}:${t.address.toLowerCase()}`; + try { + await db! + .insert(tokensTable) + .values({ + id, + address: t.address, + name: t.name, + chainId: t.chainId, + decimals: t.decimals, + isManual: false, + isTestnet: t.isTestnet + }) + .onConflictDoUpdate({ + target: tokensTable.id, + set: { name: t.name, decimals: t.decimals, isTestnet: t.isTestnet, isManual: false } + }); + } catch (_e) { + // ignore individual upsert errors + } + } + + // Delete stale non-manual tokens not in current configured lists + const configuredIds = allConfigured.map((t) => `${t.chainId}:${t.address.toLowerCase()}`); + try { + await db! + .delete(tokensTable) + .where(and(eq(tokensTable.isManual, false), notInArray(tokensTable.id, configuredIds))); + } catch (_e) { + // ignore + } + + await this.loadTokensFromDb(this.mainnet); + } + + async addCustomToken(token: Token) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + const isTestnet = isChainIdTestnet(token.chainId); + const id = `${token.chainId}:${token.address.toLowerCase()}`; + try { + await db! + .insert(tokensTable) + .values({ + id, + address: token.address, + name: token.name, + chainId: token.chainId, + decimals: token.decimals, + isManual: true, + isTestnet + }) + .onConflictDoUpdate({ + target: tokensTable.id, + set: { name: token.name, decimals: token.decimals, isManual: true } + }); + } catch (_e) { + // fallback update + await db! + .update(tokensTable) + .set({ name: token.name, decimals: token.decimals, isManual: true }) + .where(eq(tokensTable.id, id)); + } + await this.loadTokensFromDb(this.mainnet); + } + + async removeCustomToken(address: string, chainId: number) { + if (!browser) return; + if (!db) await initDb(); + if (!db) return; + await db! + .delete(tokensTable) + .where( + and( + eq(tokensTable.address, address), + eq(tokensTable.chainId, chainId), + eq(tokensTable.isManual, true) + ) + ); + await this.loadTokensFromDb(this.mainnet); + } + + async syncTokensForNetwork(mainnet: boolean) { + await this.loadTokensFromDb(mainnet); + } + + async syncWalletClient() { + if (this.walletConnection.status !== "connected") { + this.walletClient = undefined as unknown as WC; + return; + } + try { + this.walletClient = (await getCurrentWalletClient()) as unknown as WC; + } catch (error) { + console.warn("getCurrentWalletClient failed", error); + this.walletClient = undefined as unknown as WC; + } + } + + async setWalletToCorrectChain(chainId: number | bigint) { + try { + return await switchWalletChain(this.walletClient, Number(chainId)); + } catch (error) { + console.warn( + `Wallet does not support switchChain or failed to switch chain: ${Number(chainId)}`, + error + ); + return undefined; + } + } + + mapOverCoinsCached(opts: { + bucket: "balance" | "allowance" | "compact"; + ttlMs: number; + isMainnet: boolean; + scopeKey: string; + fetcher: ( + asset: `0x${string}`, + client: (typeof clientsById)[keyof typeof clientsById] + ) => Promise; + }) { + const { bucket, ttlMs, isMainnet, scopeKey, fetcher } = opts; + const resolved: Record>> = {}; + for (const token of this.availableTokens) { + if (!resolved[token.chainId]) resolved[token.chainId] = {}; + const key = `${bucket}:${isMainnet ? "mainnet" : "testnet"}:${token.chainId}:${token.address}:${scopeKey}`; + resolved[token.chainId][token.address] = getOrFetchRpc( + key, + () => fetcher(token.address, clientsById[token.chainId]), + { ttlMs } + ); + } + return resolved; + } + + dbReady: Promise | undefined; + + constructor() { + this.availableTokens = [...(coinList(this.mainnet) as readonly Token[])]; + this.inputTokens = [{ token: this.availableTokens[0], amount: 1000000n }]; + this.outputTokens = [{ token: this.availableTokens[1], amount: 1000000n }]; + + if (browser) { + reconnectWallet() + .catch((error) => console.warn("reconnectWallet failed", error)) + .finally(() => { + this.walletConnection = getCurrentConnection(); + this.syncWalletClient().catch((error) => console.warn("syncWalletClient failed", error)); + }); + + this._unwatchWalletConnection = watchWalletConnection((connection) => { + this.walletConnection = connection; + this.syncWalletClient().catch((error) => console.warn("syncWalletClient failed", error)); + }); + } + + this.startRpcRefreshLoop(); + + this.dbReady = browser + ? Promise.all([ + this.loadOrdersFromDb().catch((e) => console.warn("loadOrdersFromDb error", e)), + this.loadFillTransactionsFromDb().catch((e) => + console.warn("loadFillTransactionsFromDb error", e) + ), + this.loadTransactionReceiptsFromDb().catch((e) => + console.warn("loadTransactionReceiptsFromDb error", e) + ), + this.syncConfiguredTokens().catch((e) => console.warn("syncConfiguredTokens error", e)) + ]).then(() => {}) + : Promise.resolve(); + } } export const store = new Store(); diff --git a/src/lib/utils/convert.ts b/src/lib/utils/convert.ts deleted file mode 100644 index ee97ecc..0000000 --- a/src/lib/utils/convert.ts +++ /dev/null @@ -1,53 +0,0 @@ -// --- Type conversion helpers --- // - -import { checksumAddress } from "viem"; - -export function toBigIntWithDecimals(value: number, decimals: number): bigint { - // Convert number to string in full precision - const [intPart, decPart = ""] = value.toString().split("."); - - // Take up to `decimals` digits of the decimal part - const truncatedDec = decPart.slice(0, decimals); - - // Pad the decimal part to ensure we have exactly `decimals` digits - const paddedDec = truncatedDec.padEnd(decimals, "0"); - - // Remove leading zeros from intPart just in case - const normalizedInt = intPart.replace(/^(-?)0+(?=\d)/, "$1"); - // Combine parts - const combined = (normalizedInt + paddedDec).replace(".", ""); - - return BigInt(combined); -} - -export function addressToBytes32(address: `0x${string}`): `0x${string}` { - if (address.length !== 42 && address.length !== 40) { - throw new Error(`Invalid address length: ${address.length}`); - } - return `0x${address.replace("0x", "").padStart(64, "0")}`; -} - -export function bytes32ToAddress(bytes: `0x${string}`): `0x${string}` { - if (bytes.length != 66 && bytes.length != 64) { - throw new Error(`Invalid bytes length: ${bytes.length}`); - } - return `0x${bytes.replace("0x", "").slice(24, 64)}`; -} - -export function idToToken(id: `0x${string}` | bigint): `0x${string}` { - if (typeof id === "string" && id.indexOf("0x") != 0) { - id = BigInt(id); - } - if (typeof id === "bigint") { - // Convert bigint to hex string and pad it to 64 characters. - id = `0x${id.toString(16).padStart(64, "0")}`; - } - // Remove the first 12 bytes (24 hex characters) and keep the last 20 bytes (40 hex characters). - return checksumAddress(bytes32ToAddress(id)); -} - -export function trunc(value: `0x${string}`, length: number = 6): `0x${string}...${string}` { - return `0x${value.replace("0x", "").slice(0, length)}...${value - .replace("0x", "") - .slice(-length)}`; -} diff --git a/src/lib/utils/idLib.ts b/src/lib/utils/idLib.ts deleted file mode 100644 index 3f1010e..0000000 --- a/src/lib/utils/idLib.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { getAddress, hexToBigInt } from "viem"; - -// source: https://github.com/Uniswap/CompactX/blob/main/src/utils/lockId.ts#L17 - -export enum ResetPeriod { - OneSecond = 0, - FifteenSeconds, - OneMinute, - TenMinutes, - OneHourAndFiveMinutes, - OneDay, - SevenDaysAndOneHour, - ThirtyDays -} - -/** - * Converts lock parameters to a unique ID. - * The ID consists of: - * - Bit 255: scope (0 for multichain, 1 for single chain) - * - Bits 252-254: reset period - * - Bits 160-251: allocator ID (92 bits) - * - Bits 0-159: token address (20 bytes = 160 bits) - * - * @param inputChains Whether the lock is multichain (maps to scope) - * @param resetPeriod Reset period (0-7) - * @param allocatorId Allocator ID as string - * @param token Token address as hex string - * @returns The derived resource lock ID as a BigInt - */ -export function toId( - inputChains: boolean, - resetPeriod: number, - allocatorId: string, - token: string -): bigint { - // Validate inputs - if (resetPeriod < 0 || resetPeriod > 7) { - throw new Error("Reset period must be between 0 and 7"); - } - // Validate token is a valid address and normalize it - const normalizedToken = getAddress(token); - - // Convert inputChains to scope (inverse relationship) - const scope = inputChains ? 0n : 1n; - - // Convert allocatorId from decimal string to BigInt - const allocatorBigInt = BigInt(allocatorId); - if (allocatorBigInt > (1n << 92n) - 1n) { - throw new Error("AllocatorId must fit in 92 bits"); - } - - // Convert token address to BigInt using viem - const tokenBigInt = hexToBigInt(normalizedToken); - - // Perform bitwise operations - const scopeBits = scope << 255n; - const resetPeriodBits = BigInt(resetPeriod) << 252n; - const allocatorBits = allocatorBigInt << 160n; - - // Combine all bits using bitwise OR - const id = scopeBits | resetPeriodBits | allocatorBits | tokenBigInt; - - return id; -} diff --git a/src/lib/utils/intent.ts b/src/lib/utils/intent.ts new file mode 100644 index 0000000..8d2f266 --- /dev/null +++ b/src/lib/utils/intent.ts @@ -0,0 +1,29 @@ +import { + orderToIntent, + SOLANA_MAINNET_CHAIN_ID, + SOLANA_TESTNET_CHAIN_ID, + SOLANA_DEVNET_CHAIN_ID, + StandardEVMIntent, + StandardSolanaIntent, + MultichainOrderIntent +} from "@lifi/intent"; +import type { OrderContainer } from "@lifi/intent"; + +const SOLANA_CHAIN_IDS = new Set([ + SOLANA_MAINNET_CHAIN_ID, + SOLANA_TESTNET_CHAIN_ID, + SOLANA_DEVNET_CHAIN_ID +]); + +export function containerToIntent( + container: OrderContainer +): StandardEVMIntent | StandardSolanaIntent | MultichainOrderIntent { + const { inputSettler, order } = container; + if (!("originChainId" in order)) { + return orderToIntent({ namespace: "eip155", inputSettler, order }); + } + if (SOLANA_CHAIN_IDS.has(order.originChainId)) { + return orderToIntent({ namespace: "solana", inputSettler, order }); + } + return orderToIntent({ namespace: "eip155", inputSettler, order }); +} diff --git a/src/lib/utils/interopableAddresses.ts b/src/lib/utils/interopableAddresses.ts deleted file mode 100644 index 0ff6e4b..0000000 --- a/src/lib/utils/interopableAddresses.ts +++ /dev/null @@ -1,36 +0,0 @@ -function padEven(s: string, minimal = 2, pad: string = "0") { - return s.padStart(((Math.max(s.length + 1, minimal) / 2) | 0) * 2, pad); -} - -export function toHex( - num: number | bigint, - bytes: number = 1, - prefix?: T -): `${T}${string}` { - const p = (prefix ?? "") as T; - return `${p}${padEven(num.toString(16), bytes * 2)}` as `${T}${string}`; -} - -type Version = "0001"; -type ChainType = "0000"; -type ChainReferenceLength = string; -type ChainReference = string; -type Address = string; - -export type InteropableAddress = - `0x${Version}${ChainType}${ChainReferenceLength}${ChainReference}${Address}`; - -export const getInteropableAddress = ( - address: `0x${string}`, - chainId: number | bigint -): InteropableAddress => { - const version = "0001"; - const chainType = "0000"; - - const chainReference = padEven(chainId.toString(16)); - const chainReferenceLength = toHex(chainReference.length / 2); - - return `0x${version}${chainType}${chainReferenceLength}${chainReference}${toHex( - address.replace("0x", "").length / 2 - )}${address.replace("0x", "")}`; -}; diff --git a/src/lib/utils/orderLib.ts b/src/lib/utils/orderLib.ts deleted file mode 100644 index 21b387d..0000000 --- a/src/lib/utils/orderLib.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { encodeAbiParameters, encodePacked, keccak256, parseAbiParameters } from "viem"; -import type { MandateOutput, MultichainOrder, OrderContainer, StandardOrder } from "../../types"; -import { - BYTES32_ZERO, - type chain, - chainMap, - COIN_FILLER, - INPUT_SETTLER_COMPACT_LIFI, - MULTICHAIN_INPUT_SETTLER_COMPACT, - POLYMER_ORACLE, - WORMHOLE_ORACLE -} from "../config"; -import { addressToBytes32 } from "./convert"; - -export type ValidationResult = { - passed: boolean; - reason: string; -}; - -export const VALIDATION_PASS_REASON = "Validation pass" as const; - -export const VALIDATION_ERRORS = { - FILL_DEADLINE_AFTER_EXPIRES: "fillDeadline > expires", - UNKNOWN_ORIGIN_CHAIN: "input chain", - INPUT_ORACLE_NOT_ALLOWED: "inputOracle", - NO_INPUTS: "inputs", - INVALID_INPUT_TUPLE: "inputs", - INPUT_AMOUNT_NON_POSITIVE: "input amount", - NO_OUTPUTS: "outputs", - UNKNOWN_OUTPUT_CHAIN: "output chain", - OUTPUT_AMOUNT_NON_POSITIVE: "output amount", - OUTPUT_ORACLE_ZERO: "output oracle", - OUTPUT_ORACLE_NOT_ALLOWED: "output oracle", - OUTPUT_SETTLER_ZERO: "output settler", - OUTPUT_SETTLER_NOT_ALLOWED: "output settler", - OUTPUT_TOKEN_ZERO: "output token", - OUTPUT_RECIPIENT_ZERO: "output recipient" -} as const; - -export function getOutputHash(output: MandateOutput) { - return keccak256( - encodePacked( - [ - "bytes32", - "bytes32", - "uint256", - "bytes32", - "uint256", - "bytes32", - "uint16", - "bytes", - "uint16", - "bytes" - ], - [ - output.oracle, - output.settler, - output.chainId, - output.token, - output.amount, - output.recipient, - output.callbackData.replace("0x", "").length / 2, - output.callbackData, - output.context.replace("0x", "").length / 2, - output.context - ] - ) - ); -} - -export function encodeMandateOutput( - solver: `0x${string}`, - orderId: `0x${string}`, - timestamp: number, - output: MandateOutput -) { - return encodePacked( - [ - "bytes32", - "bytes32", - "uint32", - "bytes32", - "uint256", - "bytes32", - "uint16", - "bytes", - "uint16", - "bytes" - ], - [ - solver, - orderId, - timestamp, - output.token, - output.amount, - output.recipient, - output.callbackData.replace("0x", "").length / 2, - output.callbackData, - output.context.replace("0x", "").length / 2, - output.context - ] - ); -} - -function findChainById(chainId: bigint): chain | undefined { - const numericChainId = Number(chainId); - if (!Number.isInteger(numericChainId) || numericChainId <= 0) return undefined; - return Object.entries(chainMap).find(([, value]) => value.id === numericChainId)?.[0] as - | chain - | undefined; -} - -function normalize(value: string) { - return value.toLowerCase(); -} - -function isZeroBytes32(value: string) { - return normalize(value) === normalize(BYTES32_ZERO); -} - -function getAllowedInputOracles(inputChain: chain, sameChainFill: boolean): string[] { - const allowed: string[] = []; - const polymer = POLYMER_ORACLE[inputChain as keyof typeof POLYMER_ORACLE]; - if (polymer) allowed.push(polymer); - const wormhole = WORMHOLE_ORACLE[inputChain as keyof typeof WORMHOLE_ORACLE]; - if (wormhole && normalize(wormhole) !== "0x0000000000000000000000000000000000000000") { - allowed.push(wormhole); - } - if (sameChainFill) allowed.push(COIN_FILLER); - return allowed.map(normalize); -} - -function getAllowedOutputOracles(outputChain: chain): string[] { - const allowed: string[] = [addressToBytes32(COIN_FILLER)]; - const polymer = POLYMER_ORACLE[outputChain as keyof typeof POLYMER_ORACLE]; - if (polymer) allowed.push(addressToBytes32(polymer)); - const wormhole = WORMHOLE_ORACLE[outputChain as keyof typeof WORMHOLE_ORACLE]; - if (wormhole && normalize(wormhole) !== "0x0000000000000000000000000000000000000000") { - allowed.push(addressToBytes32(wormhole)); - } - return allowed.map(normalize); -} - -function getAllowedOutputSettlers(): string[] { - return [addressToBytes32(COIN_FILLER)].map(normalize); -} - -function pass(): ValidationResult { - return { passed: true, reason: VALIDATION_PASS_REASON }; -} - -function fail(reason: string): ValidationResult { - return { passed: false, reason }; -} - -/// https://docs.li.fi/lifi-intents/for-solvers/orderflow#order-validation -export function validateOrderWithReason(order: StandardOrder): ValidationResult { - // 1-2. temporal consistency only - if (order.fillDeadline > order.expires) - return fail(VALIDATION_ERRORS.FILL_DEADLINE_AFTER_EXPIRES); - - // 3. validation layer - const inputChain = findChainById(order.originChainId); - if (!inputChain) return fail(VALIDATION_ERRORS.UNKNOWN_ORIGIN_CHAIN); - const sameChainFill = order.outputs.every((output) => output.chainId === order.originChainId); - const allowedInputOracles = getAllowedInputOracles(inputChain, sameChainFill); - if (!allowedInputOracles.includes(normalize(order.inputOracle))) { - return fail(VALIDATION_ERRORS.INPUT_ORACLE_NOT_ALLOWED); - } - - // 4. inputs - if (!Array.isArray(order.inputs) || order.inputs.length === 0) - return fail(VALIDATION_ERRORS.NO_INPUTS); - for (const input of order.inputs) { - if (!Array.isArray(input) || input.length !== 2) - return fail(VALIDATION_ERRORS.INVALID_INPUT_TUPLE); - const [, amount] = input; - if (amount <= 0n) return fail(VALIDATION_ERRORS.INPUT_AMOUNT_NON_POSITIVE); - } - - // 5. lock ID semantics are not validated yet. - // TODO: validate lock IDs for escrow/compact compatibility and token mapping. - // 6. reset period semantics are not validated yet. - // TODO: decode and validate reset period constraints from lock IDs. - // 7. allocator ID policy is not validated yet. - // TODO: enforce allocator policy rules for active environments. - // 8. claim/signature verification is not validated here. - // TODO: validate sponsor/allocator signatures when required. - - // 9. outputs - if (!Array.isArray(order.outputs) || order.outputs.length === 0) - return fail(VALIDATION_ERRORS.NO_OUTPUTS); - for (const output of order.outputs) { - const outputChain = findChainById(output.chainId); - if (!outputChain) return fail(VALIDATION_ERRORS.UNKNOWN_OUTPUT_CHAIN); - if (output.amount < 0n) return fail(VALIDATION_ERRORS.OUTPUT_AMOUNT_NON_POSITIVE); - if (isZeroBytes32(output.oracle)) return fail(VALIDATION_ERRORS.OUTPUT_ORACLE_ZERO); - const allowedOutputOracles = getAllowedOutputOracles(outputChain); - if (!allowedOutputOracles.includes(normalize(output.oracle))) { - return fail(VALIDATION_ERRORS.OUTPUT_ORACLE_NOT_ALLOWED); - } - if (isZeroBytes32(output.settler)) return fail(VALIDATION_ERRORS.OUTPUT_SETTLER_ZERO); - const allowedOutputSettlers = getAllowedOutputSettlers(); - if (!allowedOutputSettlers.includes(normalize(output.settler))) { - return fail(VALIDATION_ERRORS.OUTPUT_SETTLER_NOT_ALLOWED); - } - if (isZeroBytes32(output.token)) return fail(VALIDATION_ERRORS.OUTPUT_TOKEN_ZERO); - if (isZeroBytes32(output.recipient)) return fail(VALIDATION_ERRORS.OUTPUT_RECIPIENT_ZERO); - } - - // 11. allocatorData is not validated yet. - // TODO: parse and validate allocatorData. - // 12. nonce freshness/replay checks require chain state. - // TODO: validate nonce freshness against chain state. - return pass(); -} - -export function validateOrder(order: StandardOrder): boolean { - return validateOrderWithReason(order).passed; -} - -export function validateOrderContainerWithReason(orderContainer: OrderContainer): ValidationResult { - const compactSettlers = [INPUT_SETTLER_COMPACT_LIFI, MULTICHAIN_INPUT_SETTLER_COMPACT].map( - normalize - ); - if (compactSettlers.includes(normalize(orderContainer.inputSettler))) { - // TODO: implement compact validation from LI.FI orderflow docs. - return pass(); - } - - if ("originChainId" in orderContainer.order) return validateOrderWithReason(orderContainer.order); - - return pass(); -} - -export function validateOrderContainer(orderContainer: OrderContainer): boolean { - return validateOrderContainerWithReason(orderContainer).passed; -} diff --git a/src/lib/utils/typedMessage.ts b/src/lib/utils/typedMessage.ts deleted file mode 100644 index d1f1ea0..0000000 --- a/src/lib/utils/typedMessage.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { keccak256, toHex } from "viem"; - -const BatchCompact = [ - { name: "arbiter", type: "address" }, - { name: "sponsor", type: "address" }, - { name: "nonce", type: "uint256" }, - { name: "expires", type: "uint256" }, - { name: "commitments", type: "Lock[]" }, - { name: "mandate", type: "Mandate" } -] as const; - -const MultichainCompact = [ - { name: "sponsor", type: "address" }, - { name: "nonce", type: "uint256" }, - { name: "expires", type: "uint256" }, - { name: "elements", type: "Element[]" } -] as const; - -const Lock = [ - { name: "lockTag", type: "bytes12" }, - { name: "token", type: "address" }, - { name: "amount", type: "uint256" } -] as const; - -const Element = [ - { name: "arbiter", type: "address" }, - { name: "chainId", type: "uint256" }, - { name: "commitments", type: "Lock[]" }, - { name: "mandate", type: "Mandate" } -] as const; - -const Mandate = [ - { name: "fillDeadline", type: "uint32" }, - { name: "inputOracle", type: "address" }, - { name: "outputs", type: "MandateOutput[]" } -] as const; - -export const MandateOutput = [ - { name: "oracle", type: "bytes32" }, - { name: "settler", type: "bytes32" }, - { name: "chainId", type: "uint256" }, - { name: "token", type: "bytes32" }, - { name: "amount", type: "uint256" }, - { name: "recipient", type: "bytes32" }, - { name: "callbackData", type: "bytes" }, - { name: "context", type: "bytes" } -] as const; - -// The named list of all type definitions -export const compactTypes = { - BatchCompact, - Lock, - Mandate, - MandateOutput, - Element, - MultichainCompact -} as const; - -const compact_type = - "BatchCompact(address arbiter,address sponsor,uint256 nonce,uint256 expires,Lock[] commitments,Mandate mandate)Lock(bytes12 lockTag,address token,uint256 amount)Mandate(uint32 fillDeadline,address inputOracle,MandateOutput[] outputs)MandateOutput(bytes32 oracle,bytes32 settler,uint256 chainId,bytes32 token,uint256 amount,bytes32 recipient,bytes callbackData,bytes context)" as const; -export const compact_type_hash = keccak256(toHex(compact_type)); -const compact_type_hash_contract = - "0x5f094e58b077a941d99d3449bd1be66fd3bc9d23ab9e4c06a8713cabc3e3b634"; -if (compact_type_hash != compact_type_hash_contract) { - throw Error( - `Computed typehash ${compact_type_hash} does not match expected ${compact_type_hash_contract}` - ); -} - -const multichain_compact_type = - "MultichainCompact(address sponsor,uint256 nonce,uint256 expires,Element[] elements)Element(address arbiter,uint256 chainId,Lock[] commitments,Mandate mandate)Lock(bytes12 lockTag,address token,uint256 amount)Mandate(uint32 fillDeadline,address inputOracle,MandateOutput[] outputs)MandateOutput(bytes32 oracle,bytes32 settler,uint256 chainId,bytes32 token,uint256 amount,bytes32 recipient,bytes callbackData,bytes context)" as const; -export const multichain_compact_type_hash = keccak256(toHex(multichain_compact_type)); -const multichain_compact_type_hash_contract = - "0x6bc0624272798c7a3ff97563d8a009ea96cffd8ea74a971b2946ca790fc50319"; -if (multichain_compact_type_hash != multichain_compact_type_hash_contract) { - throw Error( - `Computed multichain typehash ${multichain_compact_type_hash} does not match expected ${multichain_compact_type_hash_contract}` - ); -} diff --git a/src/lib/utils/wagmi.ts b/src/lib/utils/wagmi.ts new file mode 100644 index 0000000..0b665cc --- /dev/null +++ b/src/lib/utils/wagmi.ts @@ -0,0 +1,103 @@ +import { browser } from "$app/environment"; +import { env } from "$env/dynamic/public"; +import { + connect, + createConfig, + disconnect, + getConnection, + getConnectors, + http, + reconnect, + watchConnection +} from "@wagmi/core"; +import { injected, metaMask, walletConnect } from "@wagmi/connectors"; +import { createWalletClient, custom, type Chain, type EIP1193Provider } from "viem"; +import { chainMap } from "../config"; + +const APP_METADATA = { + name: "Open Intents Framework Demo", + description: "A demo website showcasing using the Open Intents Framework. Built by LIFI.", + url: "https://lintent.org", + icons: ["https://lintent.org/favicon.ico"] +}; + +export const walletConnectProjectId = env.PUBLIC_WALLET_CONNECT_PROJECT_ID?.trim(); + +export function resolveConnectorIds(projectId?: string) { + return ["injected", ...(projectId ? ["walletConnect"] : []), "metaMask"]; +} + +const wagmiChains = Object.values(chainMap) as Chain[]; + +const connectors = [ + injected(), + ...(walletConnectProjectId + ? [ + walletConnect({ + projectId: walletConnectProjectId, + showQrModal: true, + metadata: APP_METADATA + }) + ] + : []), + metaMask({ dappMetadata: APP_METADATA }) +]; + +const transports = Object.fromEntries(wagmiChains.map((chain) => [chain.id, http()])); + +export const wagmiConfig = createConfig({ + ssr: true, + chains: wagmiChains as [Chain, ...Chain[]], + connectors, + transports: transports as Record> +}); + +export type WalletConnection = ReturnType; + +export function listWalletConnectors() { + return getConnectors(wagmiConfig).map((connector) => ({ + id: connector.id, + name: connector.name + })); +} + +export async function connectWith(connectorId: string) { + const connector = getConnectors(wagmiConfig).find((candidate) => candidate.id === connectorId); + if (!connector) throw new Error(`Connector not found: ${connectorId}`); + return connect(wagmiConfig, { connector }); +} + +export async function reconnectWallet() { + return reconnect(wagmiConfig); +} + +export async function disconnectWallet() { + const connection = getConnection(wagmiConfig); + if (connection.status !== "connected") return; + return disconnect(wagmiConfig, { connector: connection.connector }); +} + +export function getCurrentConnection() { + return getConnection(wagmiConfig); +} + +export async function getCurrentProvider() { + const connection = getConnection(wagmiConfig); + if (connection.status !== "connected") return undefined; + return (await connection.connector.getProvider()) as EIP1193Provider; +} + +export async function getCurrentWalletClient() { + const provider = await getCurrentProvider(); + if (!provider) return undefined; + return createWalletClient({ transport: custom(provider) }); +} + +export function watchWalletConnection(onChange: (connection: WalletConnection) => void) { + if (!browser) return () => {}; + return watchConnection(wagmiConfig, { + onChange(connection) { + onChange(connection); + } + }); +} diff --git a/src/lib/utils/walletClient.ts b/src/lib/utils/walletClient.ts new file mode 100644 index 0000000..34ed3ea --- /dev/null +++ b/src/lib/utils/walletClient.ts @@ -0,0 +1,69 @@ +import type { EIP1193Provider } from "viem"; +import { toHex } from "viem"; +import type { WC } from "$lib/config"; + +export type SwitchableWalletClient = WC & { + switchChain?: (args: { id: number }) => Promise; +}; + +export type SwitchWalletChainOptions = { + provider?: EIP1193Provider; +}; + +export type SwitchWalletChain = ( + walletClient: WC | undefined, + chainId: number, + options?: SwitchWalletChainOptions +) => Promise; + +export type SwitchWalletChainDeps = { + getCurrentProvider: () => Promise; +}; + +async function resolveWalletProvider( + walletClient: WC | undefined, + deps: SwitchWalletChainDeps, + provider?: EIP1193Provider +): Promise { + if (provider?.request) return provider; + + const walletClientWithTransport = walletClient as + | (WC & { transport?: { value?: EIP1193Provider } }) + | undefined; + const transportProvider = walletClientWithTransport?.transport?.value; + if (transportProvider?.request) return transportProvider; + + try { + return await deps.getCurrentProvider(); + } catch { + return undefined; + } +} + +export function createSwitchWalletChain(deps: SwitchWalletChainDeps): SwitchWalletChain { + return async ( + walletClient: WC | undefined, + chainId: number, + options?: SwitchWalletChainOptions + ) => { + if (!walletClient) return; + + const switchableClient = walletClient as SwitchableWalletClient; + if (typeof switchableClient.switchChain === "function") { + await switchableClient.switchChain({ id: chainId }); + return; + } + + const provider = await resolveWalletProvider(walletClient, deps, options?.provider); + if (!provider?.request) { + throw new Error( + `Wallet client does not support switchChain and no provider is available for chain ${chainId}.` + ); + } + + await provider.request({ + method: "wallet_switchEthereumChain", + params: [{ chainId: toHex(chainId) }] + }); + }; +} diff --git a/src/lib/utils/walletClientRuntime.ts b/src/lib/utils/walletClientRuntime.ts new file mode 100644 index 0000000..4bc4b05 --- /dev/null +++ b/src/lib/utils/walletClientRuntime.ts @@ -0,0 +1,4 @@ +import { createSwitchWalletChain } from "./walletClient"; +import { getCurrentProvider } from "./wagmi"; + +export const switchWalletChain = createSwitchWalletChain({ getCurrentProvider }); diff --git a/src/lib/utils/web3-onboard.ts b/src/lib/utils/web3-onboard.ts deleted file mode 100644 index 5ca6309..0000000 --- a/src/lib/utils/web3-onboard.ts +++ /dev/null @@ -1,63 +0,0 @@ -import Onboard from "@web3-onboard/core"; -import type { OnboardAPI } from "@web3-onboard/core"; -import injectedWalletsModule from "@web3-onboard/injected-wallets"; -import zealWalletModule from "@web3-onboard/zeal"; -import coinbaseWalletModule from "@web3-onboard/coinbase"; -import walletConnectModule from "@web3-onboard/walletconnect"; -import { env } from "$env/dynamic/public"; -import { chainMap } from "../config"; - -const injected = injectedWalletsModule(); -const zealWalletSdk = zealWalletModule(); -const coinbaseWalletSdk = coinbaseWalletModule(); -const walletConnectProjectId = env.PUBLIC_WALLET_CONNECT_PROJECT_ID; -const walletConnect = walletConnectProjectId - ? walletConnectModule({ - projectId: walletConnectProjectId, - dappUrl: "lintent.org" - }) - : undefined; - -const wallets = [ - injected, - zealWalletSdk, - coinbaseWalletSdk, - ...(walletConnect ? [walletConnect] : []) -]; - -const getChains = () => { - return Object.values(chainMap).map((v) => { - return { - id: v.id, - token: v.nativeCurrency.symbol, - label: v.name, - rpcUrl: v.rpcUrls.default.http[0] - }; - }); -}; - -const appMetadata = { - name: "Open Intents Framework Demo", - icon: "", - logo: "", - description: "A demo website showcasing using the Open Intents Framework. Built by LIFI.", - recommendedInjectedWallets: [ - { name: "Coinbase", url: "https://wallet.coinbase.com/" }, - { name: "MetaMask", url: "https://metamask.io" } - ] -}; -let onboard: OnboardAPI | undefined; - -if (!onboard) { - onboard = Onboard({ - // wagmi, - wallets, - chains: getChains(), - appMetadata, - connect: { - autoConnectLastWallet: true - } - }); -} - -export default onboard as OnboardAPI; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2458f08..801be90 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,7 +1,7 @@ {@render children()} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 73cade7..455ead1 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,260 +1,257 @@
-

- Intents with Open Intents Framework -

-
- -
-
- - -
- - - Preview by LI.FI - +

+ Resource lock intents using OIF +

+
+ +
+
+ + +
+ + + Preview by LI.FI + - {#if !(!store.connectedAccount || !store.walletClient)} - - - - - {/if} -
- {#if !store.connectedAccount || !store.walletClient} - - {:else} - - - - {#if selectedOrder !== undefined} - - - - - {/if} - {/if} -
-
-
- { - if (step.targetIndex === undefined) return; - goToScreen(step.targetIndex); - }} - /> -
-
- - + {#if !(!store.connectedAccount || !store.walletClient)} + + + + + {/if} +
+ {#if !store.connectedAccount || !store.walletClient} + + {:else} + + + + {#if selectedOrder !== undefined} + + + + + {/if} + {/if} +
+
+
+ { + if (step.targetIndex === undefined) return; + goToScreen(step.targetIndex); + }} + /> +
+
+ +
diff --git a/src/routes/allocator/+server.ts b/src/routes/allocator/+server.ts index 91c3966..f3d7e3c 100644 --- a/src/routes/allocator/+server.ts +++ b/src/routes/allocator/+server.ts @@ -1,83 +1,106 @@ import { json } from "@sveltejs/kit"; import axios from "axios"; import type { RequestHandler } from "./$types"; -import { type StandardOrder } from "../../types"; +import { type StandardOrder } from "@lifi/intent"; import { - PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, - PRIVATE_POLYMER_TESTNET_ZONE_API_KEY + PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, + PRIVATE_POLYMER_TESTNET_ZONE_API_KEY } from "$env/static/private"; function getPolymerKey(mainnet: boolean) { - return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; + return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; +} + +function isHexString(value: unknown): value is `0x${string}` { + return typeof value === "string" && /^0x[0-9a-fA-F]+$/.test(value); +} + +function isPositiveInteger(value: unknown): value is number { + return typeof value === "number" && Number.isInteger(value) && value > 0; } export const POST: RequestHandler = async ({ request }) => { - const { - order, - claimHash, - blockNumber, - chainId, - mainnet - }: { - order: StandardOrder; - claimHash: `0x${string}`; - blockNumber: number; - chainId: number; - mainnet?: boolean; - } = await request.json(); - console.log({ order, claimHash, blockNumber, chainId }); + let body: unknown; + try { + body = await request.json(); + } catch { + return json({ error: "Invalid JSON body" }, { status: 400 }); + } + + const { order, claimHash, blockNumber, chainId, mainnet } = body as { + order: StandardOrder; + claimHash: `0x${string}`; + blockNumber: number; + chainId: number; + mainnet?: boolean; + }; - const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); + if (!order || typeof order !== "object") { + return json({ error: "Missing or invalid 'order'" }, { status: 400 }); + } + if (!isHexString(claimHash)) { + return json({ error: "Missing or invalid 'claimHash'" }, { status: 400 }); + } + if (!isPositiveInteger(blockNumber)) { + return json({ error: "Missing or invalid 'blockNumber'" }, { status: 400 }); + } + if (!isPositiveInteger(chainId)) { + return json({ error: "Missing or invalid 'chainId'" }, { status: 400 }); + } - const requestAllocation = await axios.post( - "https://allocator.devnet.polymer.zone/", - { - jsonrpc: "2.0", - id: 1, - method: "allocator_attestCommit", - params: [ - { - chainId, - blockNumber, - claimHash, - order - } - ] - }, - { - headers: { - Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, - "Content-Type": "application/json", - Accept: "application/json" - } - } - ); + try { + const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); - const dat: { - jsonrpc: "2.0"; - id: 1; - result: { - chainId: number; - blockNumber: number; - logIndex: number; - order: StandardOrder; - commitSignature: `0x${string}`; - allocatorSignature: `0x${string}`; - allocatorAddress: `0x${string}`; - claimHash: `0x${string}`; - sponsor: `0x${string}`; - tokenBalances: { - tokenId: `0x${string}`; - balance: `0x${string}`; - }[]; - }; - } = requestAllocation.data; + const requestAllocation = await axios.post( + "https://allocator.devnet.polymer.zone/", + { + jsonrpc: "2.0", + id: 1, + method: "allocator_attestCommit", + params: [ + { + chainId, + blockNumber, + claimHash, + order + } + ] + }, + { + headers: { + Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, + "Content-Type": "application/json", + Accept: "application/json" + } + } + ); - console.log(dat); + const dat: { + jsonrpc: "2.0"; + id: 1; + result: { + chainId: number; + blockNumber: number; + logIndex: number; + order: StandardOrder; + commitSignature: `0x${string}`; + allocatorSignature: `0x${string}`; + allocatorAddress: `0x${string}`; + claimHash: `0x${string}`; + sponsor: `0x${string}`; + tokenBalances: { + tokenId: `0x${string}`; + balance: `0x${string}`; + }[]; + }; + } = requestAllocation.data; - // create a JSON Response using a header we received - return json({ - allocatorSignature: dat.result.allocatorSignature, - allocatorAddress: dat.result.allocatorAddress - }); + return json({ + allocatorSignature: dat.result.allocatorSignature, + allocatorAddress: dat.result.allocatorAddress + }); + } catch (error) { + console.error("allocator_attestCommit failed", { chainId }); + return json({ error: "Allocator request failed" }, { status: 502 }); + } }; diff --git a/src/routes/health/+server.ts b/src/routes/health/+server.ts index 94f864c..cfd89c7 100644 --- a/src/routes/health/+server.ts +++ b/src/routes/health/+server.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "./$types"; export const GET: RequestHandler = async ({}) => { - return new Response(JSON.stringify({ status: "ok", timestamp: Date.now() })); + return new Response(JSON.stringify({ status: "ok", timestamp: Date.now() })); }; diff --git a/src/routes/polymer/+server.ts b/src/routes/polymer/+server.ts index c19da15..b525184 100644 --- a/src/routes/polymer/+server.ts +++ b/src/routes/polymer/+server.ts @@ -2,109 +2,139 @@ import { json } from "@sveltejs/kit"; import axios from "axios"; import type { RequestHandler } from "./$types"; import { - PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, - PRIVATE_POLYMER_TESTNET_ZONE_API_KEY + PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, + PRIVATE_POLYMER_TESTNET_ZONE_API_KEY } from "$env/static/private"; import { toByteArray } from "base64-js"; function getPolymerUrl(mainnet: boolean) { - return mainnet - ? ("https://api.polymer.zone/v1/" as const) - : ("https://api.testnet.polymer.zone/v1/" as const); + return mainnet + ? ("https://api.polymer.zone/v1/" as const) + : ("https://api.testnet.polymer.zone/v1/" as const); } function getPolymerKey(mainnet: boolean) { - return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; + return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; +} + +function isPositiveInteger(value: unknown): value is number { + return typeof value === "number" && Number.isInteger(value) && value > 0; } export const POST: RequestHandler = async ({ request }) => { - const { srcChainId, srcBlockNumber, globalLogIndex, polymerIndex, mainnet } = - await request.json(); - console.log({ srcChainId, srcBlockNumber, globalLogIndex, polymerIndex, mainnet }); + let body: unknown; + try { + body = await request.json(); + } catch { + return json({ error: "Invalid JSON body" }, { status: 400 }); + } + + const { srcChainId, srcBlockNumber, globalLogIndex, polymerIndex, mainnet } = body as { + srcChainId: number; + srcBlockNumber: number; + globalLogIndex: number; + polymerIndex?: number; + mainnet?: boolean; + }; + + if (!isPositiveInteger(srcChainId)) { + return json({ error: "Missing or invalid 'srcChainId'" }, { status: 400 }); + } + if (!isPositiveInteger(srcBlockNumber)) { + return json({ error: "Missing or invalid 'srcBlockNumber'" }, { status: 400 }); + } + if ( + typeof globalLogIndex !== "number" || + !Number.isInteger(globalLogIndex) || + globalLogIndex < 0 + ) { + return json({ error: "Missing or invalid 'globalLogIndex'" }, { status: 400 }); + } + + try { + const POLYMER_URL = getPolymerUrl(mainnet ?? true); + const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); - const POLYMER_URL = getPolymerUrl(mainnet ?? true); - const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); + let polymerRequestIndex = polymerIndex; + if (!polymerRequestIndex) { + const requestProof = await axios.post( + POLYMER_URL, + { + jsonrpc: "2.0", + id: 1, + method: "polymer_requestProof", + params: [ + { + srcChainId, + srcBlockNumber, + globalLogIndex + } + ] + }, + { + headers: { + Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, + "Content-Type": "application/json", + Accept: "application/json" + } + } + ); + polymerRequestIndex = requestProof.data.result; + } + const requestProofData = await axios.post( + POLYMER_URL, + { + jsonrpc: "2.0", + id: 1, + method: "polymer_queryProof", + params: [polymerRequestIndex] + }, + { + headers: { + Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, + "Content-Type": "application/json", + Accept: "application/json" + } + } + ); + const dat: { + jsonrpc: "2.0"; + id: 1; + result: { + jobID: number; + createdAt: number; + updatedAt: number; + } & ( + | { + status: "error"; + failureReason: string; + } + | { + status: "complete"; + proof: "string"; + } + | { + status: "initialized"; + } + ); + } = requestProofData.data; - let polymerRequestIndex = polymerIndex; - if (!polymerRequestIndex) { - const requestProof = await axios.post( - POLYMER_URL, - { - jsonrpc: "2.0", - id: 1, - method: "polymer_requestProof", - params: [ - { - srcChainId, - srcBlockNumber, - globalLogIndex - } - ] - }, - { - headers: { - Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, - "Content-Type": "application/json", - Accept: "application/json" - } - } - ); - polymerRequestIndex = requestProof.data.result; - console.log({ requestProof: requestProof.data }); - } - const requestProofData = await axios.post( - POLYMER_URL, - { - jsonrpc: "2.0", - id: 1, - method: "polymer_queryProof", - params: [polymerRequestIndex] - }, - { - headers: { - Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, - "Content-Type": "application/json", - Accept: "application/json" - } - } - ); - const dat: { - jsonrpc: "2.0"; - id: 1; - result: { - jobID: number; - createdAt: number; - updatedAt: number; - } & ( - | { - status: "error"; - failureReason: string; - } - | { - status: "complete"; - proof: "string"; - } - | { - status: "initialized"; - } - ); - } = requestProofData.data; + let proof: string | undefined; + if (dat.result.status === "complete") { + proof = dat.result.proof; + const proofBytes = toByteArray(proof); + proof = Array.from(proofBytes) + .map((byte) => byte.toString(16).padStart(2, "0")) + .join(""); + } - let proof: string | undefined; - // decode proof from base64 to hex - if (dat.result.status === "complete") { - proof = dat.result.proof; - const proofBytes = toByteArray(proof); - proof = Array.from(proofBytes) - .map((byte) => byte.toString(16).padStart(2, "0")) - .join(""); - } else { - console.log(dat); - } - // create a JSON Response - return json({ - proof, - polymerIndex: polymerRequestIndex, - status: dat.result.status - }); + return json({ + proof, + polymerIndex: polymerRequestIndex, + status: dat.result.status + }); + } catch (error) { + console.error("polymer proof request failed", { srcChainId }); + return json({ error: "Polymer proof request failed" }, { status: 502 }); + } }; diff --git a/src/routes/polymer/health/+server.ts b/src/routes/polymer/health/+server.ts index d62f822..4318d13 100644 --- a/src/routes/polymer/health/+server.ts +++ b/src/routes/polymer/health/+server.ts @@ -2,64 +2,90 @@ import { json } from "@sveltejs/kit"; import axios from "axios"; import type { RequestHandler } from "./$types"; import { - PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, - PRIVATE_POLYMER_TESTNET_ZONE_API_KEY + PRIVATE_POLYMER_MAINNET_ZONE_API_KEY, + PRIVATE_POLYMER_TESTNET_ZONE_API_KEY } from "$env/static/private"; function getPolymerUrl(mainnet: boolean) { - return mainnet - ? ("https://api.polymer.zone/v1/" as const) - : ("https://api.testnet.polymer.zone/v1/" as const); + return mainnet + ? ("https://api.polymer.zone/v1/" as const) + : ("https://api.testnet.polymer.zone/v1/" as const); } function getPolymerKey(mainnet: boolean) { - return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; + return mainnet ? PRIVATE_POLYMER_MAINNET_ZONE_API_KEY : PRIVATE_POLYMER_TESTNET_ZONE_API_KEY; } +const MAX_CHAIN_IDS = 20; + export const POST: RequestHandler = async ({ request }) => { - const { chainIds, mainnet }: { chainIds?: number[]; mainnet?: boolean } = await request.json(); + let body: unknown; + try { + body = await request.json(); + } catch { + return json({ error: "Invalid JSON body" }, { status: 400 }); + } + + const { chainIds, mainnet } = body as { chainIds?: number[]; mainnet?: boolean }; + + if (chainIds !== undefined) { + if (!Array.isArray(chainIds) || chainIds.length > MAX_CHAIN_IDS) { + return json( + { error: `'chainIds' must be an array with at most ${MAX_CHAIN_IDS} elements` }, + { status: 400 } + ); + } + if (!chainIds.every((id) => typeof id === "number" && Number.isInteger(id) && id > 0)) { + return json({ error: "'chainIds' must contain only positive integers" }, { status: 400 }); + } + } - const POLYMER_URL = getPolymerUrl(mainnet ?? true); - const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); + try { + const POLYMER_URL = getPolymerUrl(mainnet ?? true); + const PRIVATE_POLYMER_ZONE_API_KEY = getPolymerKey(mainnet ?? true); - const requestProofData = await axios.post( - POLYMER_URL, - { - jsonrpc: "2.0", - id: 1, - method: "info_health", - params: [{ chain_ids: chainIds ?? [] }] - }, - { - headers: { - Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, - "Content-Type": "application/json", - Accept: "application/json" - } - } - ); + const requestProofData = await axios.post( + POLYMER_URL, + { + jsonrpc: "2.0", + id: 1, + method: "info_health", + params: [{ chain_ids: chainIds ?? [] }] + }, + { + headers: { + Authorization: `Bearer ${PRIVATE_POLYMER_ZONE_API_KEY}`, + "Content-Type": "application/json", + Accept: "application/json" + } + } + ); - const dat: - | ({ - jsonrpc: "2.0"; - id: 1; - } & { - result: { - status: { - [chainId: string]: "healthy" | "unhealthy"; - }; - }; - }) - | { error: { code: -32000; message: `unsupported chain ID(s): [${string}]` } } = - requestProofData.data; + const dat: + | ({ + jsonrpc: "2.0"; + id: 1; + } & { + result: { + status: { + [chainId: string]: "healthy" | "unhealthy"; + }; + }; + }) + | { error: { code: -32000; message: `unsupported chain ID(s): [${string}]` } } = + requestProofData.data; - const failed = "error" in dat; - const status = !failed ? dat.result.status : []; - const error = failed ? dat.error : {}; + const failed = "error" in dat; + const status = !failed ? dat.result.status : []; + const error = failed ? dat.error : {}; - return json({ - failed, - status, - error - }); + return json({ + failed, + status, + error + }); + } catch (error) { + console.error("polymer health check failed"); + return json({ error: "Polymer health check failed" }, { status: 502 }); + } }; diff --git a/src/types/index.ts b/src/types/index.ts deleted file mode 100644 index bf774de..0000000 --- a/src/types/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -export type Quote = { - fromAsset: string; - toAsset: string; - fromPrice: string; - toPrice: string; - intermediary: string; - discount?: string; -}; - -export type MandateOutput = { - oracle: `0x${string}`; - settler: `0x${string}`; - chainId: bigint; - token: `0x${string}`; - amount: bigint; - recipient: `0x${string}`; - callbackData: `0x${string}`; - context: `0x${string}`; -}; - -export type CompactMandate = { - fillDeadline: number; - inputOracle: `0x${string}`; - outputs: MandateOutput[]; -}; - -export type Lock = { - lockTag: `0x${string}`; - token: `0x${string}`; - amount: bigint; -}; - -export type BatchCompact = { - arbiter: `0x${string}`; // The account tasked with verifying and submitting the claim. - sponsor: `0x${string}`; // The account to source the tokens from. - nonce: bigint; // A parameter to enforce replay protection, scoped to allocator. - expires: bigint; // The time at which the claim expires. - commitments: Lock[]; // The allocated token IDs and amounts. - mandate: CompactMandate; -}; - -export type Element = { - arbiter: `0x${string}`; - chainId: bigint; - commitments: Lock[]; - mandate: CompactMandate; -}; -export type MultichainCompact = { - sponsor: `0x${string}`; // The account tasked with verifying and submitting the claim. - nonce: bigint; // A parameter to enforce replay protection, scoped to allocator. - expires: bigint; // The time at which the claim expires. - elements: Element[]; - mandate: CompactMandate; -}; - -export type StandardOrder = { - user: `0x${string}`; - nonce: bigint; - originChainId: bigint; - expires: number; - fillDeadline: number; - inputOracle: `0x${string}`; - inputs: [bigint, bigint][]; - outputs: MandateOutput[]; -}; - -export type MultichainOrderComponent = { - user: `0x${string}`; - nonce: bigint; - chainIdField: bigint; - chainIndex: bigint; - expires: number; - fillDeadline: number; - inputOracle: `0x${string}`; - inputs: [bigint, bigint][]; - outputs: MandateOutput[]; - additionalChains: `0x${string}`[]; -}; - -export type MultichainOrder = { - user: `0x${string}`; - nonce: bigint; - expires: number; - fillDeadline: number; - inputOracle: `0x${string}`; - outputs: MandateOutput[]; - inputs: { chainId: bigint; inputs: [bigint, bigint][] }[]; -}; - -export type NoSignature = { - type: "None"; - payload: "0x"; -}; - -export type Signature = { - type: "ECDSA" | "ERC-1271"; - payload: `0x${string}`; -}; - -export type OrderContainer = { - inputSettler: `0x${string}`; - order: StandardOrder | MultichainOrder; - sponsorSignature: Signature | NoSignature; - allocatorSignature: Signature | NoSignature; -}; diff --git a/svelte.config.js b/svelte.config.js index 9343c0b..a2cfc22 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -3,16 +3,16 @@ import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; /** @type {import('@sveltejs/kit').Config} */ const config = { - // Consult https://svelte.dev/docs/kit/integrations - // for more information about preprocessors - preprocess: vitePreprocess(), + // Consult https://svelte.dev/docs/kit/integrations + // for more information about preprocessors + preprocess: vitePreprocess(), - kit: { - // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. - // If your environment is not supported, or you settled on a specific environment, switch out the adapter. - // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter() - } + kit: { + // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://svelte.dev/docs/kit/adapters for more information about adapters. + adapter: adapter() + } }; export default config; diff --git a/tests/db.test.ts b/tests/db.test.ts index 4e452e0..7801b80 100644 --- a/tests/db.test.ts +++ b/tests/db.test.ts @@ -5,50 +5,50 @@ import migrations from "../src/lib/migrations.json"; import { intents } from "../src/lib/schema"; async function createTestDb() { - const pglite = new PGlite({ fs: new MemoryFS("testdb") }); - const db = drizzle(pglite); + const pglite = new PGlite({ fs: new MemoryFS("testdb") }); + const db = drizzle(pglite); - // dialect and session will appear to not exist...but they do on the pglite drizzle instance - // @ts-ignore - await db.dialect.migrate(migrations, db.session, { - migrationsTable: "drizzle_migrations" - }); + // dialect and session will appear to not exist...but they do on the pglite drizzle instance + // @ts-ignore + await db.dialect.migrate(migrations, db.session, { + migrationsTable: "drizzle_migrations" + }); - return { db, pglite }; + return { db, pglite }; } describe("pglite migrations", () => { - it("applies migrations and supports upserts", async () => { - const { db, pglite } = await createTestDb(); - try { - const now = Date.now(); - await db.insert(intents).values({ - id: "1", - orderId: "order-1", - intentType: "escrow", - data: "{}", - createdAt: now - }); + it("applies migrations and supports upserts", async () => { + const { db, pglite } = await createTestDb(); + try { + const now = Date.now(); + await db.insert(intents).values({ + id: "1", + orderId: "order-1", + intentType: "escrow", + data: "{}", + createdAt: now + }); - await db - .insert(intents) - .values({ - id: "2", - orderId: "order-1", - intentType: "escrow", - data: '{"v":2}', - createdAt: now - }) - .onConflictDoUpdate({ - target: intents.orderId, - set: { data: '{"v":2}' } - }); + await db + .insert(intents) + .values({ + id: "2", + orderId: "order-1", + intentType: "escrow", + data: '{"v":2}', + createdAt: now + }) + .onConflictDoUpdate({ + target: intents.orderId, + set: { data: '{"v":2}' } + }); - const rows = await db.select().from(intents); - expect(rows).toHaveLength(1); - expect(rows[0].data).toBe('{"v":2}'); - } finally { - await pglite.close(); - } - }); + const rows = await db.select().from(intents); + expect(rows).toHaveLength(1); + expect(rows[0].data).toBe('{"v":2}'); + } finally { + await pglite.close(); + } + }); }); diff --git a/tests/e2e/escrow-standard-blackbox.spec.ts b/tests/e2e/escrow-standard-blackbox.spec.ts new file mode 100644 index 0000000..80cbc04 --- /dev/null +++ b/tests/e2e/escrow-standard-blackbox.spec.ts @@ -0,0 +1,296 @@ +import { expect, test, type Page } from "@playwright/test"; +import { + connectInjectedWallet, + e2eWalletAddress, + hasE2EPrivateKey, + installInjectedWalletProvider +} from "./helpers/bootstrap"; + +const REQUIRED_INPUT_USDC_HUMAN = "0.0001"; +const REQUIRED_INPUT_USDC_RAW = "100"; +const TEST_TIMEOUT_MS = 2 * 60_000; +const UI_TIMEOUT_MS = 30_000; +const TX_TIMEOUT_MS = 45_000; +const PROVE_ATTEMPT_TIMEOUT_MS = 20_000; +const ORDER_STATUS_CLAIMED = 2; +type FlowStepName = "Asset" | "Issue" | "Fetch" | "Fill" | "Prove" | "Claim"; +type FlowStepStatus = "Now" | "Done" | "Next" | "Locked"; +type FlowState = Record; + +test.skip(!hasE2EPrivateKey, "Skipping private-key E2E tests: E2E_PRIVATE_KEY is not defined."); + +test.setTimeout(TEST_TIMEOUT_MS); + +async function expectRightRailState(page: Page, state: FlowState) { + const entries = Object.entries(state) as Array<[FlowStepName, FlowStepStatus]>; + for (const [step, status] of entries) { + await expect(page.getByRole("button", { name: `${step} (${status})` })).toBeVisible({ + timeout: UI_TIMEOUT_MS + }); + } +} + +async function lockVerticalScrollAtTop(page: Page) { + await page.addInitScript(() => { + const enforceTop = () => { + if (window.scrollY > 0) window.scrollTo(0, 0); + }; + window.addEventListener("scroll", enforceTop, { passive: true }); + window.addEventListener("load", enforceTop); + }); +} + +test("black-box escrow flow shows expected UI state transitions", async ({ page }) => { + const issuerAddress = e2eWalletAddress(); + let sawRequiredInputAmount = false; + const getReceiptCount = async () => + await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + return Object.keys(store.transactionReceipts).length; + }); + + await lockVerticalScrollAtTop(page); + + await page.route("**/quote/request", async (route) => { + const body = route.request().postDataJSON() as + | { + intent?: { + inputs?: Array<{ amount?: string }>; + }; + } + | undefined; + const totalInputRaw = (body?.intent?.inputs ?? []).reduce((sum, input) => { + try { + return sum + BigInt(input.amount ?? "0"); + } catch { + return sum; + } + }, 0n); + if (totalInputRaw.toString() === REQUIRED_INPUT_USDC_RAW) { + sawRequiredInputAmount = true; + } + + await route.fulfill({ + status: 200, + contentType: "application/json", + body: JSON.stringify({ + quotes: [ + { + order: null, + eta: null, + validUntil: Date.now() + 60_000, + quoteId: null, + metadata: { exclusiveFor: issuerAddress }, + preview: { + inputs: [], + outputs: [ + { + receiver: "0x0000000000000000000000000000000000000000", + asset: "0x0000000000000000000000000000000000000000", + amount: REQUIRED_INPUT_USDC_RAW + } + ] + }, + provider: null, + partialFill: false, + failureHandling: "refund-automatic" + } + ] + }) + }); + }); + + await installInjectedWalletProvider(page); + await page.goto("/"); + await connectInjectedWallet(page); + + await expect(page.getByRole("heading", { name: "Assets Management" })).toBeVisible(); + await expectRightRailState(page, { + Asset: "Now", + Issue: "Next", + Fetch: "Next", + Fill: "Locked", + Prove: "Locked", + Claim: "Locked" + }); + + await page.getByTestId("network-mainnet").click(); + await page.getByTestId("intent-type-escrow").click(); + + await page.getByRole("button", { name: "→" }).first().click(); + await expect(page.getByRole("heading", { name: "Intent Issuance" })).toBeVisible(); + await expectRightRailState(page, { + Asset: "Done", + Issue: "Now", + Fetch: "Next", + Fill: "Locked", + Prove: "Locked", + Claim: "Locked" + }); + + await page.getByTestId("open-input-modal-0").click(); + const inputModal = page.getByTestId("input-token-modal"); + await expect(inputModal).toBeVisible({ timeout: UI_TIMEOUT_MS }); + await inputModal.locator("select#tokenSelector").selectOption("usdc"); + + const baseRow = inputModal.getByTestId("input-token-row-base"); + await baseRow.locator('input[type="checkbox"]').check(); + await baseRow.locator('input[type="number"]').fill(REQUIRED_INPUT_USDC_HUMAN); + await page.getByTestId("input-token-modal-save").click(); + await expect(inputModal).toBeHidden({ timeout: UI_TIMEOUT_MS }); + + const exclusiveInput = page.getByPlaceholder("0x... (optional)"); + await exclusiveInput.fill(issuerAddress); + await page.getByLabel("Lock Exclusive").check(); + await expect(exclusiveInput).toHaveValue(issuerAddress); + + await page.getByTestId("quote-button").click(); + await expect(page.getByTestId("quote-button")).toBeVisible(); + await expect.poll(() => sawRequiredInputAmount).toBe(true); + + if ( + await page + .getByRole("button", { name: "Set allowance" }) + .isVisible() + .catch(() => false) + ) { + await page.getByRole("button", { name: "Set allowance" }).click(); + } + + const executeOpenButton = page.getByRole("button", { name: "Execute Open" }); + await expect(executeOpenButton).toBeVisible({ timeout: TX_TIMEOUT_MS }); + await executeOpenButton.click(); + + await expect(page.getByRole("heading", { name: "Select Intent To Solve" })).toBeVisible({ + timeout: TX_TIMEOUT_MS + }); + await expectRightRailState(page, { + Asset: "Done", + Issue: "Done", + Fetch: "Now", + Fill: "Locked", + Prove: "Locked", + Claim: "Locked" + }); + + const activeIntentRow = page.getByRole("button", { name: /SingleChain/i }).first(); + await expect(activeIntentRow).toBeVisible({ timeout: UI_TIMEOUT_MS }); + await expect(page.getByRole("button", { name: /IN 0\.0001 USDC on base/i }).first()).toBeVisible({ + timeout: UI_TIMEOUT_MS + }); + await activeIntentRow.click(); + const currentOrder = await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + const { buildBaseIntentRow } = await import("/src/lib/libraries/intentList.ts"); + const latest = store.orders.at(-1); + if (!latest) return null; + const baseRow = buildBaseIntentRow(latest); + + const order = latest.order as + | { originChainId?: bigint } + | { inputs?: Array<{ chainId: bigint }> }; + const inputChainId = + "originChainId" in order && typeof order.originChainId === "bigint" + ? order.originChainId.toString() + : (order.inputs?.[0]?.chainId?.toString() ?? ""); + + return { + orderId: baseRow.orderId, + inputSettler: latest.inputSettler, + inputChainId + }; + }); + expect(currentOrder).not.toBeNull(); + + await expect(page.getByRole("heading", { name: "Fill Intent" })).toBeVisible({ + timeout: UI_TIMEOUT_MS + }); + await expectRightRailState(page, { + Asset: "Done", + Issue: "Done", + Fetch: "Done", + Fill: "Now", + Prove: "Locked", + Claim: "Locked" + }); + + const fillButton = page.getByRole("button", { name: /^Fill$/ }).first(); + await expect(fillButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + await fillButton.click(); + + await expect(page.getByRole("heading", { name: "Submit Proof of Fill" })).toBeVisible({ + timeout: TX_TIMEOUT_MS + }); + await expectRightRailState(page, { + Asset: "Done", + Issue: "Done", + Fetch: "Done", + Fill: "Done", + Prove: "Now", + Claim: "Locked" + }); + + const proveButton = page.getByRole("button", { name: /^\d+(\.\d+)?\s+USDC$/ }).first(); + let reachedFinalise = false; + for (let attempt = 0; attempt < 4; attempt++) { + await expect(proveButton).toBeVisible({ timeout: UI_TIMEOUT_MS }); + await expect(proveButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + await proveButton.click(); + try { + await expect(page.getByRole("heading", { name: "Finalise Intent" })).toBeVisible({ + timeout: PROVE_ATTEMPT_TIMEOUT_MS + }); + reachedFinalise = true; + break; + } catch { + await page.waitForTimeout(3_000); + } + } + expect(reachedFinalise).toBe(true); + + await expectRightRailState(page, { + Asset: "Done", + Issue: "Done", + Fetch: "Done", + Fill: "Done", + Prove: "Done", + Claim: "Now" + }); + + const claimButton = page.getByRole("button", { name: "Claim" }).first(); + await expect(claimButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + const receiptsBeforeClaim = await getReceiptCount(); + await claimButton.click(); + + await expect + .poll(async () => await getReceiptCount(), { timeout: TX_TIMEOUT_MS }) + .toBeGreaterThan(receiptsBeforeClaim); + + await expect + .poll( + async () => + await page.evaluate(async (orderMeta) => { + const { getClient } = await import("/src/lib/config.ts"); + const { SETTLER_ESCROW_ABI } = await import("/src/lib/abi/escrow.ts"); + if (!orderMeta) return -1; + const status = await getClient(orderMeta.inputChainId).readContract({ + address: orderMeta.inputSettler as `0x${string}`, + abi: SETTLER_ESCROW_ABI, + functionName: "orderStatus", + args: [orderMeta.orderId as `0x${string}`] + }); + return Number(status); + }, currentOrder), + { timeout: TX_TIMEOUT_MS } + ) + .toBe(ORDER_STATUS_CLAIMED); + + await expectRightRailState(page, { + Asset: "Done", + Issue: "Done", + Fetch: "Done", + Fill: "Done", + Prove: "Done", + Claim: "Now" + }); +}); diff --git a/tests/e2e/escrow-standard-live.spec.ts b/tests/e2e/escrow-standard-live.spec.ts new file mode 100644 index 0000000..cf444a2 --- /dev/null +++ b/tests/e2e/escrow-standard-live.spec.ts @@ -0,0 +1,280 @@ +import { expect, test, type Page } from "@playwright/test"; +import { + connectInjectedWallet, + e2eWalletAddress, + hasE2EPrivateKey, + installInjectedWalletProvider +} from "./helpers/bootstrap"; + +const REQUIRED_INPUT_USDC_RAW = "100"; +const TEST_TIMEOUT_MS = 2 * 60_000; +const UI_TIMEOUT_MS = 30_000; +const TX_TIMEOUT_MS = 45_000; +const ORDER_STATUS_CLAIMED = 2; +const PROVE_ATTEMPT_TIMEOUT_MS = 20_000; + +test.skip(!hasE2EPrivateKey, "Skipping private-key E2E tests: E2E_PRIVATE_KEY is not defined."); + +test.setTimeout(TEST_TIMEOUT_MS); + +async function resolveIssuanceActionState(page: Page): Promise<"execute-open" | "low-balance"> { + const executeOpenButton = page.getByRole("button", { name: "Execute Open" }); + const lowBalanceButton = page.getByRole("button", { name: "Low Balance" }); + const started = Date.now(); + + while (Date.now() - started < TX_TIMEOUT_MS) { + if (await lowBalanceButton.isVisible().catch(() => false)) return "low-balance"; + if (await executeOpenButton.isVisible().catch(() => false)) return "execute-open"; + await page.waitForTimeout(200); + } + + throw new Error("Timed out waiting for issuance action state (Execute Open or Low Balance)."); +} + +test("executes full standard escrow flow from base to arbitrum with raw input 100", async ({ + page +}) => { + const issuerAddress = e2eWalletAddress(); + let sawExpectedQuotePayload = false; + let sawExclusiveForIssuer = false; + const getReceiptCount = async () => + await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + return Object.keys(store.transactionReceipts).length; + }); + + await page.route("**/quote/request", async (route) => { + const body = route.request().postDataJSON() as + | { + intent?: { + metadata?: { exclusiveFor?: string[] | string }; + inputs?: Array<{ amount?: string }>; + outputs?: Array<{ amount?: string }>; + }; + } + | undefined; + + const firstInputAmount = body?.intent?.inputs?.[0]?.amount; + const firstOutputAmount = body?.intent?.outputs?.[0]?.amount; + if (firstInputAmount === REQUIRED_INPUT_USDC_RAW && firstOutputAmount === "0") { + sawExpectedQuotePayload = true; + } + const exclusiveForRaw = body?.intent?.metadata?.exclusiveFor; + const exclusiveFor = + Array.isArray(exclusiveForRaw) && exclusiveForRaw.length > 0 + ? exclusiveForRaw[0] + : (exclusiveForRaw ?? ""); + if (exclusiveFor.toLowerCase() === issuerAddress.toLowerCase()) { + sawExclusiveForIssuer = true; + } + + await route.fulfill({ + status: 200, + contentType: "application/json", + body: JSON.stringify({ + quotes: [ + { + order: null, + eta: null, + validUntil: Date.now() + 60_000, + quoteId: null, + metadata: { exclusiveFor: issuerAddress }, + preview: { + inputs: [], + outputs: [ + { + receiver: "0x0000000000000000000000000000000000000000", + asset: "0x0000000000000000000000000000000000000000", + amount: REQUIRED_INPUT_USDC_RAW + } + ] + }, + provider: null, + partialFill: false, + failureHandling: "refund-automatic" + } + ] + }) + }); + }); + + await installInjectedWalletProvider(page); + await page.goto("/"); + await connectInjectedWallet(page); + + await expect(page.getByRole("heading", { name: "Assets Management" })).toBeVisible(); + await page.getByTestId("network-mainnet").click(); + await page.getByTestId("intent-type-escrow").click(); + + // Keep the flow deterministic by fixing tiny standard-order assets directly in state. + await page.evaluate( + async ({ amount, issuer }) => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + const { coinList, chainMap } = await import("/src/lib/config"); + const coins = coinList(true); + const baseUsdc = coins.find( + (token) => token.chainId === chainMap.base.id && token.name === "usdc" + ); + const arbitrumUsdc = coins.find( + (token) => token.chainId === chainMap.arbitrum.id && token.name === "usdc" + ); + if (!baseUsdc || !arbitrumUsdc) { + throw new Error("Could not resolve base/arbitrum USDC from coin list."); + } + + store.mainnet = true; + store.intentType = "escrow"; + store.orders = []; + store.inputTokens = [{ token: baseUsdc, amount: BigInt(amount) }]; + store.outputTokens = [{ token: arbitrumUsdc, amount: BigInt(amount) }]; + store.exclusiveFor = issuer; + store.useExclusiveForQuoteRequest = true; + }, + { amount: REQUIRED_INPUT_USDC_RAW, issuer: issuerAddress } + ); + + await page.getByRole("button", { name: "→" }).first().click(); + await expect(page.getByRole("heading", { name: "Intent Issuance" })).toBeVisible(); + + await page.getByTestId("quote-button").click(); + await expect.poll(() => sawExpectedQuotePayload).toBe(true); + await expect.poll(() => sawExclusiveForIssuer).toBe(true); + + if ( + await page + .getByRole("button", { name: "Set allowance" }) + .isVisible() + .catch(() => false) + ) { + await page.getByRole("button", { name: "Set allowance" }).click(); + } + + const actionState = await resolveIssuanceActionState(page); + if (actionState === "low-balance") { + test.skip(true, "Skipping live flow: wallet has insufficient Base USDC for Execute Open."); + } + + await page.getByRole("button", { name: "Execute Open" }).click(); + await expect(page.getByRole("heading", { name: "Select Intent To Solve" })).toBeVisible({ + timeout: TX_TIMEOUT_MS + }); + + const activeIntentRow = page.getByRole("button", { name: /SingleChain/i }).first(); + await expect(activeIntentRow).toBeVisible({ timeout: TX_TIMEOUT_MS }); + await activeIntentRow.click(); + + const currentOrder = await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + const { buildBaseIntentRow } = await import("/src/lib/libraries/intentList.ts"); + const latest = store.orders.at(-1); + if (!latest) return null; + const baseRow = buildBaseIntentRow(latest); + + const order = latest.order as + | { originChainId?: bigint } + | { inputs?: Array<{ chainId: bigint }> }; + const inputChainId = + "originChainId" in order && typeof order.originChainId === "bigint" + ? order.originChainId.toString() + : (order.inputs?.[0]?.chainId?.toString() ?? ""); + + return { + orderId: baseRow.orderId, + inputSettler: latest.inputSettler, + inputChainId + }; + }); + expect(currentOrder).not.toBeNull(); + const observedInputRaw = await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + const latest = store.orders.at(-1) as + | { order?: { inputs?: Array<[bigint, bigint]> } } + | undefined; + const inputs = latest?.order?.inputs; + if (!inputs || inputs.length === 0) return null; + const sum = inputs.reduce((acc, input) => acc + input[1], 0n); + return sum.toString(); + }); + // Exact raw input is asserted at quote request time; here we assert the selected order still has input. + expect(observedInputRaw).not.toBeNull(); + expect(BigInt(observedInputRaw as string)).toBeGreaterThan(0n); + + await expect(page.getByRole("heading", { name: "Fill Intent" })).toBeVisible({ + timeout: UI_TIMEOUT_MS + }); + await expect(page.getByText(/^arbitrum$/i).last()).toBeVisible(); + + const fillButton = page.getByRole("button", { name: /^Fill$/ }).first(); + await expect(fillButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + const receiptsBeforeFill = await getReceiptCount(); + await fillButton.click(); + + await expect + .poll(async () => await getReceiptCount(), { timeout: TX_TIMEOUT_MS }) + .toBeGreaterThan(receiptsBeforeFill); + + await expect(page.getByRole("heading", { name: "Submit Proof of Fill" })).toBeVisible({ + timeout: TX_TIMEOUT_MS + }); + + const proveButton = page.getByRole("button", { name: /^\d+(\.\d+)?\s+USDC$/ }).first(); + let validated = false; + for (let attempt = 0; attempt < 4; attempt++) { + await expect(proveButton).toBeVisible({ timeout: UI_TIMEOUT_MS }); + await expect(proveButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + await proveButton.click(); + try { + await expect + .poll( + async () => + await page.evaluate(async () => { + const { default: store } = await import("/src/lib/state.svelte.ts"); + const { getOrderProgressChecks } = await import("/src/lib/libraries/flowProgress.ts"); + const latest = store.orders.at(-1); + if (!latest) return false; + const checks = await getOrderProgressChecks(latest, store.fillTransactions); + return checks.allValidated; + }), + { timeout: PROVE_ATTEMPT_TIMEOUT_MS, intervals: [1_000, 2_000, 4_000] } + ) + .toBe(true); + validated = true; + break; + } catch { + await page.waitForTimeout(3_000); + } + } + expect(validated).toBe(true); + + await expect(page.getByRole("heading", { name: "Finalise Intent" })).toBeVisible({ + timeout: TX_TIMEOUT_MS + }); + + const claimButton = page.getByRole("button", { name: "Claim" }).first(); + await expect(claimButton).toBeEnabled({ timeout: UI_TIMEOUT_MS }); + const receiptsBeforeClaim = await getReceiptCount(); + await claimButton.click(); + + await expect + .poll(async () => await getReceiptCount(), { timeout: TX_TIMEOUT_MS }) + .toBeGreaterThan(receiptsBeforeClaim); + + await expect + .poll( + async () => + await page.evaluate(async (orderMeta) => { + const { getClient } = await import("/src/lib/config.ts"); + const { SETTLER_ESCROW_ABI } = await import("/src/lib/abi/escrow.ts"); + if (!orderMeta) return -1; + const status = await getClient(orderMeta.inputChainId).readContract({ + address: orderMeta.inputSettler as `0x${string}`, + abi: SETTLER_ESCROW_ABI, + functionName: "orderStatus", + args: [orderMeta.orderId as `0x${string}`] + }); + return Number(status); + }, currentOrder), + { timeout: TX_TIMEOUT_MS } + ) + .toBe(ORDER_STATUS_CLAIMED); +}); diff --git a/tests/e2e/helpers/bootstrap.ts b/tests/e2e/helpers/bootstrap.ts index 798e97c..21456d2 100644 --- a/tests/e2e/helpers/bootstrap.ts +++ b/tests/e2e/helpers/bootstrap.ts @@ -1,13 +1,261 @@ import type { Page } from "@playwright/test"; +import process from "node:process"; +import { config as loadDotenv } from "dotenv"; +import type { Hex } from "viem"; +import { createPublicClient, createWalletClient, http, toHex } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; +import { arbitrum, base } from "viem/chains"; + +type ProviderPayload = { + method: string; + params?: unknown[]; +}; + +function ensureEnvLoaded() { + const envFilePath = process.env.E2E_ENV_FILE?.trim() || ".env"; + loadDotenv({ path: envFilePath, quiet: true }); +} + +ensureEnvLoaded(); + +function getE2EEnv(name: string) { + return process.env[name]?.trim(); +} + +export const hasE2EPrivateKey = Boolean(getE2EEnv("E2E_PRIVATE_KEY")); + +const BASE_CHAIN_ID = base.id; +const ARBITRUM_CHAIN_ID = arbitrum.id; +const BASE_USDC = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" as const; +const ERC20_BALANCE_OF_ABI = [ + { + type: "function", + name: "balanceOf", + stateMutability: "view", + inputs: [{ name: "owner", type: "address" }], + outputs: [{ name: "", type: "uint256" }] + } +] as const; +const baseRpcUrl = getE2EEnv("E2E_BASE_RPC_URL") || "https://base-rpc.publicnode.com"; +const arbitrumRpcUrl = getE2EEnv("E2E_ARBITRUM_RPC_URL") || "https://arbitrum-rpc.publicnode.com"; + +let accountCache: ReturnType | undefined; +let walletClientByChainCache: Record> | undefined; +let basePublicClientCache: ReturnType | undefined; + +function rpcUrlForChain(chainId: number): string { + if (chainId === BASE_CHAIN_ID) return baseRpcUrl; + if (chainId === ARBITRUM_CHAIN_ID) return arbitrumRpcUrl; + throw new Error(`Unsupported chain for E2E wallet provider: ${chainId}`); +} + +function getWalletContext() { + const configuredPrivateKey = getE2EEnv("E2E_PRIVATE_KEY") as Hex | undefined; + if (!configuredPrivateKey) { + throw new Error("E2E_PRIVATE_KEY is required for E2E wallet injection."); + } + + const account = (accountCache ??= privateKeyToAccount(configuredPrivateKey)); + const walletClientByChain = + walletClientByChainCache ?? + (walletClientByChainCache = { + [BASE_CHAIN_ID]: createWalletClient({ + account, + chain: base, + transport: http(baseRpcUrl) + }), + [ARBITRUM_CHAIN_ID]: createWalletClient({ + account, + chain: arbitrum, + transport: http(arbitrumRpcUrl) + }) + }); + return { account, walletClientByChain }; +} + +function activeWalletClient() { + const { walletClientByChain } = getWalletContext(); + const walletClient = walletClientByChain[currentChainId]; + if (!walletClient) { + throw new Error(`No wallet client configured for active chain ${currentChainId}.`); + } + return walletClient; +} + +let currentChainId = Number(process.env.E2E_CHAIN_ID ?? BASE_CHAIN_ID); +if (!Number.isFinite(currentChainId)) { + currentChainId = BASE_CHAIN_ID; +} + +async function rpcRequest(method: string, params: unknown[] = []) { + const response = await fetch(rpcUrlForChain(currentChainId), { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ + jsonrpc: "2.0", + id: Date.now(), + method, + params + }) + }); + const payload = (await response.json()) as { result?: unknown; error?: { message?: string } }; + if (payload.error) { + throw new Error(payload.error.message ?? `RPC error for method ${method}`); + } + return payload.result; +} + +function asBigInt(value: unknown): bigint | undefined { + if (typeof value !== "string" || value.length === 0) return undefined; + return BigInt(value); +} + +async function handleProviderRequest(payload: ProviderPayload) { + const { account } = getWalletContext(); + const { method, params = [] } = payload; + + if (method === "eth_chainId") return toHex(currentChainId); + if (method === "eth_accounts" || method === "eth_requestAccounts") return [account.address]; + if (method === "wallet_switchEthereumChain") { + const nextChainHex = (params[0] as { chainId?: string } | undefined)?.chainId; + if (!nextChainHex) throw new Error("wallet_switchEthereumChain missing chainId"); + currentChainId = Number(BigInt(nextChainHex)); + return null; + } + + if (method === "eth_sendTransaction") { + const walletClient = activeWalletClient(); + const tx = (params[0] as Record | undefined) ?? {}; + return await walletClient.sendTransaction({ + account, + to: tx.to as Hex | undefined, + data: tx.data as Hex | undefined, + value: asBigInt(tx.value), + gas: asBigInt(tx.gas), + maxFeePerGas: asBigInt(tx.maxFeePerGas), + maxPriorityFeePerGas: asBigInt(tx.maxPriorityFeePerGas) + }); + } + + if (method === "eth_signTypedData_v4" || method === "eth_signTypedData") { + const rawTypedData = params[1]; + const typedData = + typeof rawTypedData === "string" + ? (JSON.parse(rawTypedData) as Record) + : ((rawTypedData ?? {}) as Record); + const types = { ...(typedData.types as Record) }; + delete (types as Record).EIP712Domain; + return account.signTypedData({ + domain: (typedData.domain as Record) ?? {}, + types: types as Record, + primaryType: typedData.primaryType as string, + message: (typedData.message as Record) ?? {} + } as never); + } + + if (method === "personal_sign") { + const message = params[0]; + if (typeof message === "string" && message.startsWith("0x")) { + return account.signMessage({ message: { raw: message as Hex } }); + } + return account.signMessage({ message: String(message ?? "") }); + } + + return rpcRequest(method, params); +} + +export async function installInjectedWalletProvider(page: Page) { + getWalletContext(); + + await page.exposeFunction("__lintentE2EProviderRequest", (payload: ProviderPayload) => { + return handleProviderRequest(payload); + }); + + await page.addInitScript(() => { + type E2EWindow = Window & + typeof globalThis & { + __lintentE2EProviderRequest: (payload: { + method: string; + params?: unknown[]; + }) => Promise; + __LINTENT_E2E_PROVIDER__?: unknown; + ethereum?: unknown; + }; + const e2eWindow = window as E2EWindow; + + const listeners = new Map void>>(); + const emit = (event: string, value: unknown) => { + const set = listeners.get(event); + if (!set) return; + for (const listener of set) listener(value); + }; + + const provider = { + isMetaMask: false, + request: async ({ method, params }: { method: string; params?: unknown[] }) => { + const result = await e2eWindow.__lintentE2EProviderRequest({ + method, + params: params ?? [] + }); + + if (method === "eth_requestAccounts") emit("accountsChanged", result); + if (method === "wallet_switchEthereumChain") { + const nextChain = (params?.[0] as { chainId?: string } | undefined)?.chainId; + if (nextChain) emit("chainChanged", nextChain); + } + + return result; + }, + enable: async () => { + return await provider.request({ method: "eth_requestAccounts", params: [] }); + }, + on: (event: string, callback: (value: unknown) => void) => { + const set = listeners.get(event) ?? new Set<(value: unknown) => void>(); + set.add(callback); + listeners.set(event, set); + }, + removeListener: (event: string, callback: (value: unknown) => void) => { + listeners.get(event)?.delete(callback); + }, + off: (event: string, callback: (value: unknown) => void) => { + listeners.get(event)?.delete(callback); + } + }; + + e2eWindow.__LINTENT_E2E_PROVIDER__ = provider; + e2eWindow.ethereum = provider; + }); +} + +export async function connectInjectedWallet(page: Page) { + await page.getByRole("button", { name: "Connect Injected" }).click(); +} + +export function e2eWalletAddress() { + const { account } = getWalletContext(); + return account.address; +} + +export async function hasBaseUsdcBalance(minimumRawAmount: bigint) { + const { account } = getWalletContext(); + const basePublicClient = + basePublicClientCache ?? + (basePublicClientCache = createPublicClient({ + chain: base, + transport: http(baseRpcUrl) + })); + + const balance = await basePublicClient.readContract({ + address: BASE_USDC, + abi: ERC20_BALANCE_OF_ABI, + functionName: "balanceOf", + args: [account.address] + }); + return balance >= minimumRawAmount; +} export async function bootstrapConnectedWallet(page: Page) { - await page.evaluate(async () => { - const { default: store } = await import("/src/lib/state.svelte.ts"); - (store as any).activeWallet.wallet = { - accounts: [{ address: "0x1111111111111111111111111111111111111111" }], - provider: { - request: async () => null - } - }; - }); + await installInjectedWalletProvider(page); + await page.goto("/"); + await connectInjectedWallet(page); } diff --git a/tests/e2e/issuance.spec.ts b/tests/e2e/issuance.spec.ts deleted file mode 100644 index 2afc8b7..0000000 --- a/tests/e2e/issuance.spec.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { expect, test } from "@playwright/test"; -import { mockQuoteResponse } from "../fixtures/mockQuote"; -import { bootstrapConnectedWallet } from "./helpers/bootstrap"; - -test.beforeEach(async ({ page }) => { - await page.route("**/quote/request", async (route) => { - await route.fulfill({ - status: 200, - contentType: "application/json", - body: JSON.stringify(mockQuoteResponse) - }); - }); - await page.route("**/orders/status/*", async (route) => { - const now = Math.floor(Date.now() / 1000); - await route.fulfill({ - status: 200, - contentType: "application/json", - body: JSON.stringify({ - data: { - order: { - user: "0x1111111111111111111111111111111111111111", - nonce: "123", - originChainId: "8453", - expires: now + 3600, - fillDeadline: now + 1800, - inputOracle: "0x0000000000000000000000000000000000000001", - inputs: [["1", "1000000"]], - outputs: [ - { - oracle: "0x0000000000000000000000000000000000000000000000000000000000000001", - settler: "0x0000000000000000000000000000000000000000000000000000000000000001", - chainId: "42161", - token: "0x0000000000000000000000000000000000000000000000000000000000000001", - amount: "1000000", - recipient: "0x0000000000000000000000000000000000000000000000000000000000000001", - callbackData: "0x", - context: "0x" - } - ] - }, - inputSettler: "0x000025c3226C00B2Cdc200005a1600509f4e00C0", - sponsorSignature: null, - allocatorSignature: null - } - }) - }); - }); - - await page.goto("/"); - await bootstrapConnectedWallet(page); -}); - -test("asset management controls remain interactive", async ({ page }) => { - await expect(page.getByRole("heading", { name: "Assets Management" })).toBeVisible(); - - await page.getByTestId("network-mainnet").click(); - await page.getByTestId("network-testnet").click(); - await page.getByTestId("intent-type-compact").click(); - await page.getByTestId("intent-type-escrow").click(); - await page.getByTestId("intent-type-compact").click(); - - await expect(page.getByTestId("allocator-116450367070547927622991121")).toBeVisible(); - await page.getByTestId("allocator-116450367070547927622991121").click(); -}); - -test("input/output modals open and save in issuance screen", async ({ page }) => { - await page.getByRole("button", { name: "→" }).click(); - await expect(page.getByRole("heading", { name: "Intent Issuance" })).toBeVisible(); - - await page.getByTestId("open-input-modal-0").click(); - await expect(page.getByTestId("input-token-modal")).toBeVisible(); - await page.getByTestId("input-token-modal-save").click(); - await expect(page.getByTestId("input-token-modal")).toBeHidden(); - - await page.getByTestId("open-output-modal-0").click(); - await expect(page.getByTestId("output-token-modal")).toBeVisible(); - await page.getByTestId("output-token-add").click(); - await page.getByTestId("output-token-modal-save").click(); - await expect(page.getByTestId("output-token-modal")).toBeHidden(); - - await page.getByTestId("quote-button").click(); - await expect(page.getByTestId("quote-button")).toBeVisible(); -}); - -test("imports order by order id into intent list", async ({ page }) => { - await page.getByRole("button", { name: "→" }).click(); - await page.getByRole("button", { name: "→" }).click(); - await expect(page.getByRole("heading", { name: "Select Intent To Solve" })).toBeVisible(); - - await page - .getByTestId("intent-import-order-id") - .fill("0x1111111111111111111111111111111111111111111111111111111111111111"); - await page.getByTestId("intent-import-order-submit").click(); - - await expect(page.getByTestId("intent-import-order-id")).toHaveValue(""); -}); diff --git a/tests/fixtures/mockQuote.ts b/tests/fixtures/mockQuote.ts index 458da7a..9852a66 100644 --- a/tests/fixtures/mockQuote.ts +++ b/tests/fixtures/mockQuote.ts @@ -1,24 +1,24 @@ export const mockQuoteResponse = { - quotes: [ - { - order: null, - eta: null, - validUntil: Date.now() + 30_000, - quoteId: null, - metadata: { exclusiveFor: "0x0000000000000000000000000000000000000000" }, - preview: { - inputs: [], - outputs: [ - { - receiver: "0x0000000000000000000000000000000000000000", - asset: "0x0000000000000000000000000000000000000000", - amount: "1000000" - } - ] - }, - provider: null, - partialFill: false, - failureHandling: "refund-automatic" - } - ] + quotes: [ + { + order: null, + eta: null, + validUntil: Date.now() + 30_000, + quoteId: null, + metadata: { exclusiveFor: "0x0000000000000000000000000000000000000000" }, + preview: { + inputs: [], + outputs: [ + { + receiver: "0x0000000000000000000000000000000000000000", + asset: "0x0000000000000000000000000000000000000000", + amount: "1000000" + } + ] + }, + provider: null, + partialFill: false, + failureHandling: "refund-automatic" + } + ] }; diff --git a/tests/fixtures/orderFixtures.ts b/tests/fixtures/orderFixtures.ts new file mode 100644 index 0000000..ab3a7b5 --- /dev/null +++ b/tests/fixtures/orderFixtures.ts @@ -0,0 +1,61 @@ +import type { MandateOutput, MultichainOrder, StandardOrder } from "@lifi/intent"; +import { COIN_FILLER, addressToBytes32 } from "@lifi/intent"; + +export const CHAIN_ID_ETHEREUM = 1n; +export const CHAIN_ID_ARBITRUM = 42161n; +export const CHAIN_ID_BASE = 8453n; + +export const TEST_POLYMER_ORACLE: `0x${string}` = "0x0000003E06000007A224AeE90052fA6bb46d43C9"; + +export const TEST_USER: `0x${string}` = "0x1111111111111111111111111111111111111111"; +export const TEST_NOW_SECONDS = 1_700_000_000; + +export const b32 = (nibble: string): `0x${string}` => `0x${nibble.repeat(64)}`; + +export function makeMandateOutput( + chainId = CHAIN_ID_ARBITRUM, + amount = 1n, + overrides: Partial = {} +): MandateOutput { + return { + oracle: addressToBytes32(COIN_FILLER), + settler: addressToBytes32(COIN_FILLER), + chainId, + token: b32("3"), + amount, + recipient: b32("4"), + callbackData: "0x", + context: "0x", + ...overrides + }; +} + +export function makeStandardOrder(overrides: Partial = {}): StandardOrder { + return { + user: TEST_USER, + nonce: 1n, + originChainId: CHAIN_ID_ETHEREUM, + expires: TEST_NOW_SECONDS + 1000, + fillDeadline: TEST_NOW_SECONDS + 900, + inputOracle: TEST_POLYMER_ORACLE, + inputs: [[1n, 1n]], + outputs: [makeMandateOutput(CHAIN_ID_ARBITRUM)], + ...overrides + }; +} + +export function makeMultichainOrder(overrides: Partial = {}): MultichainOrder { + return { + user: TEST_USER, + nonce: 2n, + expires: TEST_NOW_SECONDS + 1000, + fillDeadline: TEST_NOW_SECONDS + 900, + inputOracle: TEST_POLYMER_ORACLE, + outputs: [makeMandateOutput(CHAIN_ID_BASE, 2n)], + inputs: [ + { chainId: CHAIN_ID_ETHEREUM, inputs: [[1n, 1n]] }, + { chainId: CHAIN_ID_ARBITRUM, inputs: [[2n, 2n]] } + ], + ...overrides + }; +} diff --git a/tests/unit/assetSelection.test.ts b/tests/unit/assetSelection.test.ts index 0fee6c5..0371b8e 100644 --- a/tests/unit/assetSelection.test.ts +++ b/tests/unit/assetSelection.test.ts @@ -2,25 +2,25 @@ import { describe, expect, it } from "bun:test"; import { AssetSelection } from "../../src/lib/libraries/assetSelection"; describe("AssetSelection", () => { - it("picks largest-first values to satisfy goal", () => { - const selector = new AssetSelection({ - goal: 7n, - values: [4n, 4n, 3n] - }).largest(); + it("picks largest-first values to satisfy goal", () => { + const selector = new AssetSelection({ + goal: 7n, + values: [4n, 4n, 3n] + }).largest(); - expect(selector.asValues()).toEqual([4n, 3n, 0n]); - }); + expect(selector.asValues()).toEqual([4n, 3n, 0n]); + }); - it("picks smallest-first values to satisfy goal", () => { - const selector = new AssetSelection({ - goal: 7n, - values: [4n, 4n, 3n] - }).smallest(); + it("picks smallest-first values to satisfy goal", () => { + const selector = new AssetSelection({ + goal: 7n, + values: [4n, 4n, 3n] + }).smallest(); - expect(selector.asValues()).toEqual([4n, 0n, 3n]); - }); + expect(selector.asValues()).toEqual([4n, 0n, 3n]); + }); - it("throws when goal is infeasible", () => { - expect(() => new AssetSelection({ goal: 10n, values: [2n, 3n] })).toThrow(); - }); + it("throws when goal is infeasible", () => { + expect(() => new AssetSelection({ goal: 10n, values: [2n, 3n] })).toThrow(); + }); }); diff --git a/tests/unit/intentList.test.ts b/tests/unit/intentList.test.ts index b2a231a..9c42300 100644 --- a/tests/unit/intentList.test.ts +++ b/tests/unit/intentList.test.ts @@ -1,71 +1,107 @@ import { describe, expect, it } from "bun:test"; import { - EXPIRING_THRESHOLD_SECONDS, - formatRelativeDeadline, - formatRemaining, - withTiming, - type BaseIntentRow + buildBaseIntentRow, + EXPIRING_THRESHOLD_SECONDS, + formatRelativeDeadline, + formatRemaining, + withTiming, + type BaseIntentRow } from "../../src/lib/libraries/intentList"; const baseRow: BaseIntentRow = { - orderContainer: { - inputSettler: "0x000025c3226C00B2Cdc200005a1600509f4e00C0", - order: { - user: "0x1111111111111111111111111111111111111111", - nonce: 1n, - originChainId: 8453n, - expires: Math.floor(Date.now() / 1000) + 3600, - fillDeadline: Math.floor(Date.now() / 1000) + 3600, - inputOracle: "0x0000003E06000007A224AeE90052fA6bb46d43C9", - inputs: [[1n, 1n]], - outputs: [ - { - oracle: "0x0000000000000000000000000000000000000000000000000000000000000001", - settler: "0x0000000000000000000000000000000000000000000000000000000000000002", - chainId: 42161n, - token: "0x0000000000000000000000000000000000000000000000000000000000000003", - amount: 1n, - recipient: "0x0000000000000000000000000000000000000004", - callbackData: "0x", - context: "0x00" - } - ] - }, - sponsorSignature: { type: "None", payload: "0x" }, - allocatorSignature: { type: "None", payload: "0x" } - }, - orderId: "0xabc", - orderIdShort: "0xabc", - userShort: "0x1111...1111", - fillDeadline: Math.floor(Date.now() / 1000) + 3600, - inputCount: 1, - outputCount: 1, - chainScope: "singlechain", - chainScopeBadge: "SingleChain", - inputChips: [], - inputOverflow: 0, - outputChips: [], - outputOverflow: 0, - validationPassed: true, - validationReason: "Validation pass" + orderContainer: { + inputSettler: "0x000025c3226C00B2Cdc200005a1600509f4e00C0", + order: { + user: "0x1111111111111111111111111111111111111111", + nonce: 1n, + originChainId: 8453n, + expires: Math.floor(Date.now() / 1000) + 3600, + fillDeadline: Math.floor(Date.now() / 1000) + 3600, + inputOracle: "0x0000003E06000007A224AeE90052fA6bb46d43C9", + inputs: [[1n, 1n]], + outputs: [ + { + oracle: "0x0000000000000000000000000000000000000000000000000000000000000001", + settler: "0x0000000000000000000000000000000000000000000000000000000000000002", + chainId: 42161n, + token: "0x0000000000000000000000000000000000000000000000000000000000000003", + amount: 1n, + recipient: "0x0000000000000000000000000000000000000004", + callbackData: "0x", + context: "0x00" + } + ] + }, + sponsorSignature: { type: "None", payload: "0x" }, + allocatorSignature: { type: "None", payload: "0x" } + }, + orderId: "0xabc", + orderIdShort: "0xabc", + userShort: "0x1111...1111", + fillDeadline: Math.floor(Date.now() / 1000) + 3600, + inputCount: 1, + outputCount: 1, + chainScope: "singlechain", + chainScopeBadge: "SingleChain", + inputChips: [], + inputOverflow: 0, + outputChips: [], + outputOverflow: 0, + validationPassed: true, + validationReason: "Validation pass" }; describe("intentList timing and formatting", () => { - it("marks expired rows", () => { - const row = withTiming(baseRow, baseRow.fillDeadline + 1); - expect(row.status).toBe("expired"); - }); + it("marks expired rows", () => { + const row = withTiming(baseRow, baseRow.fillDeadline + 1); + expect(row.status).toBe("expired"); + }); - it("marks expiring rows", () => { - const now = baseRow.fillDeadline - EXPIRING_THRESHOLD_SECONDS + 1; - const row = withTiming(baseRow, now); - expect(row.status).toBe("expiring"); - }); + it("marks expiring rows", () => { + const now = baseRow.fillDeadline - EXPIRING_THRESHOLD_SECONDS + 1; + const row = withTiming(baseRow, now); + expect(row.status).toBe("expiring"); + }); - it("formats remaining/relative deadline values", () => { - expect(formatRemaining(59)).toBe("59s"); - expect(formatRemaining(180)).toBe("3m"); - expect(formatRelativeDeadline(30)).toBe("in 30s"); - expect(formatRelativeDeadline(-30)).toBe("30s ago"); - }); + it("formats remaining/relative deadline values", () => { + expect(formatRemaining(59)).toBe("59s"); + expect(formatRemaining(180)).toBe("3m"); + expect(formatRelativeDeadline(30)).toBe("in 30s"); + expect(formatRelativeDeadline(-30)).toBe("30s ago"); + }); + + it("builds rows for unknown chains without throwing", () => { + const unknownChainId = 999999999n; + const row = buildBaseIntentRow({ + inputSettler: "0x000025c3226C00B2Cdc200005a1600509f4e00C0", + order: { + user: "0x1111111111111111111111111111111111111111", + nonce: 1n, + originChainId: unknownChainId, + expires: Math.floor(Date.now() / 1000) + 3600, + fillDeadline: Math.floor(Date.now() / 1000) + 3600, + inputOracle: "0x0000000000eC36B683C2E6AC89e9A75989C22a2e", + inputs: [[1n, 1n]], + outputs: [ + { + oracle: "0x0000000000000000000000000000000000000000000000000000000000000001", + settler: "0x0000000000000000000000000000000000000000000000000000000000000002", + chainId: unknownChainId, + token: "0x0000000000000000000000000000000000000000000000000000000000000003", + amount: 1n, + recipient: "0x0000000000000000000000000000000000000000000000000000000000000004", + callbackData: "0x", + context: "0x00" + } + ] + }, + sponsorSignature: { type: "None", payload: "0x" }, + allocatorSignature: { type: "None", payload: "0x" } + }); + + expect(row.inputChips[0].text).toContain("chain-999999999"); + expect(row.outputChips[0].text).toContain("chain-999999999"); + expect(row.inputChips[0].text).toContain("..."); + expect(row.outputChips[0].text).toContain("..."); + }); }); diff --git a/tests/unit/orderLib.test.ts b/tests/unit/orderLib.test.ts deleted file mode 100644 index bcbb65d..0000000 --- a/tests/unit/orderLib.test.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { describe, expect, it } from "bun:test"; -import { - COIN_FILLER, - INPUT_SETTLER_COMPACT_LIFI, - POLYMER_ORACLE, - chainMap -} from "../../src/lib/config"; -import { - getOutputHash, - validateOrder, - validateOrderContainer, - validateOrderWithReason, - VALIDATION_ERRORS -} from "../../src/lib/utils/orderLib"; -import { addressToBytes32 } from "../../src/lib/utils/convert"; -import type { MandateOutput, OrderContainer, StandardOrder } from "../../src/types"; - -const b32 = (byte: string) => `0x${byte.repeat(64)}` as `0x${string}`; - -const output: MandateOutput = { - oracle: addressToBytes32(COIN_FILLER), - settler: addressToBytes32(COIN_FILLER), - chainId: BigInt(chainMap.arbitrum.id), - token: b32("3"), - amount: 1n, - recipient: b32("4"), - callbackData: "0x", - context: "0x00" -}; - -function makeOrder(overrides: Partial = {}): StandardOrder { - return { - user: "0x1111111111111111111111111111111111111111", - nonce: 1n, - originChainId: BigInt(chainMap.ethereum.id), - expires: Math.floor(Date.now() / 1000) + 1000, - fillDeadline: Math.floor(Date.now() / 1000) + 1000, - inputOracle: POLYMER_ORACLE.ethereum, - inputs: [[1n, 1n]], - outputs: [output], - ...overrides - }; -} - -describe("orderLib", () => { - it("produces stable output hashes", () => { - const h1 = getOutputHash(output); - const h2 = getOutputHash(output); - expect(h1).toBe(h2); - }); - - it("changes hash when output amount changes", () => { - const h1 = getOutputHash(output); - const h2 = getOutputHash({ ...output, amount: output.amount + 1n }); - expect(h1).not.toBe(h2); - }); - - it("rejects orders where fillDeadline is later than expires", () => { - const invalidTiming = makeOrder({ - expires: Math.floor(Date.now() / 1000) + 1000, - fillDeadline: Math.floor(Date.now() / 1000) + 1001 - }); - const result = validateOrderWithReason(invalidTiming); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.FILL_DEADLINE_AFTER_EXPIRES); - }); - - it("accepts orders with multiple outputs", () => { - const multiOutput = makeOrder({ outputs: [output, { ...output, amount: 2n }] }); - expect(validateOrder(multiOutput)).toBe(true); - }); - - it("rejects orders with unknown source oracle", () => { - const invalidOracle = makeOrder({ - inputOracle: "0x0000000000000000000000000000000000000001" - }); - const result = validateOrderWithReason(invalidOracle); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.INPUT_ORACLE_NOT_ALLOWED); - }); - - it("accepts same-chain intents with COIN_FILLER as inputOracle", () => { - const sameChainCoinFiller = makeOrder({ - inputOracle: COIN_FILLER, - outputs: [{ ...output, chainId: BigInt(chainMap.ethereum.id) }] - }); - expect(validateOrder(sameChainCoinFiller)).toBe(true); - }); - - it("rejects orders with empty inputs", () => { - const emptyInputs = makeOrder({ inputs: [] }); - const result = validateOrderWithReason(emptyInputs); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.NO_INPUTS); - }); - - it("accepts orders with zero output amount", () => { - const zeroOutputAmount = makeOrder({ - outputs: [{ ...output, amount: 0n }] - }); - expect(validateOrder(zeroOutputAmount)).toBe(true); - }); - - it("rejects orders with negative output amount", () => { - const negativeOutputAmount = makeOrder({ - outputs: [{ ...output, amount: -1n }] - }); - const result = validateOrderWithReason(negativeOutputAmount); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.OUTPUT_AMOUNT_NON_POSITIVE); - }); - - it("rejects orders with unknown output chain", () => { - const badOutputChain = makeOrder({ - outputs: [{ ...output, chainId: 999999999n }] - }); - const result = validateOrderWithReason(badOutputChain); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.UNKNOWN_OUTPUT_CHAIN); - }); - - it("rejects orders with non-whitelisted output oracle", () => { - const badOutputOracle = makeOrder({ - outputs: [{ ...output, oracle: b32("a") }] - }); - const result = validateOrderWithReason(badOutputOracle); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.OUTPUT_ORACLE_NOT_ALLOWED); - }); - - it("rejects orders with non-whitelisted output settler", () => { - const badOutputSettler = makeOrder({ - outputs: [{ ...output, settler: b32("b") }] - }); - const result = validateOrderWithReason(badOutputSettler); - expect(result.passed).toBe(false); - expect(result.reason).toBe(VALIDATION_ERRORS.OUTPUT_SETTLER_NOT_ALLOWED); - }); - - it("treats compact intents as valid in container validator (TODO path)", () => { - const compactContainer: OrderContainer = { - inputSettler: INPUT_SETTLER_COMPACT_LIFI, - order: makeOrder({ - inputOracle: "0x0000000000000000000000000000000000000001" - }), - sponsorSignature: { type: "None", payload: "0x" }, - allocatorSignature: { type: "None", payload: "0x" } - }; - expect(validateOrderContainer(compactContainer)).toBe(true); - }); -}); diff --git a/tests/unit/orderServer.test.ts b/tests/unit/orderServer.test.ts deleted file mode 100644 index 738080a..0000000 --- a/tests/unit/orderServer.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { describe, expect, it } from "bun:test"; -import { parseOrderStatusPayload } from "../../src/lib/libraries/orderServer"; - -const BYTES32_ONE = "0x0000000000000000000000000000000000000000000000000000000000000001" as const; - -describe("parseOrderStatusPayload", () => { - it("parses a status payload into an OrderContainer", () => { - const payload = { - data: { - order: { - user: "0x1111111111111111111111111111111111111111", - nonce: "123", - originChainId: "8453", - expires: Math.floor(Date.now() / 1000) + 3600, - fillDeadline: Math.floor(Date.now() / 1000) + 1800, - inputOracle: "0x0000000000000000000000000000000000000001", - inputs: [["1", "1000000"]], - outputs: [ - { - oracle: BYTES32_ONE, - settler: BYTES32_ONE, - chainId: "42161", - token: BYTES32_ONE, - amount: "1000000", - recipient: BYTES32_ONE, - callbackData: "0x", - context: "0x" - } - ] - }, - inputSettler: "0x000025c3226C00B2Cdc200005a1600509f4e00C0", - sponsorSignature: null, - allocatorSignature: "0x1234" - } - }; - - const parsed = parseOrderStatusPayload(payload); - - expect(parsed.inputSettler).toBe("0x000025c3226C00B2Cdc200005a1600509f4e00C0"); - expect(parsed.order.nonce).toBe(123n); - expect("originChainId" in parsed.order && parsed.order.originChainId).toBe(8453n); - expect(parsed.sponsorSignature).toEqual({ type: "None", payload: "0x" }); - expect(parsed.allocatorSignature).toEqual({ type: "ECDSA", payload: "0x1234" }); - }); - - it("throws for invalid payload", () => { - expect(() => parseOrderStatusPayload({ data: {} })).toThrow(); - }); -}); diff --git a/tests/unit/orderValidationDeps.test.ts b/tests/unit/orderValidationDeps.test.ts new file mode 100644 index 0000000..6eaf3cc --- /dev/null +++ b/tests/unit/orderValidationDeps.test.ts @@ -0,0 +1,51 @@ +import { describe, expect, it } from "bun:test"; +import { + COIN_FILLER, + VALIDATION_ERRORS, + addressToBytes32, + validateOrderWithReason +} from "@lifi/intent"; +import { makeMandateOutput, makeStandardOrder } from "../fixtures/orderFixtures"; +import { orderValidationDeps } from "../../src/lib/libraries/coreDeps"; + +describe("orderValidationDeps unknown-chain handling", () => { + it("rejects unsupported origin chains even when same-chain fill uses COIN_FILLER", () => { + const unknownChainId = 999999999n; + const result = validateOrderWithReason({ + order: makeStandardOrder({ + originChainId: unknownChainId, + inputOracle: COIN_FILLER, + outputs: [ + makeMandateOutput(unknownChainId, 1n, { + oracle: addressToBytes32(COIN_FILLER), + settler: addressToBytes32(COIN_FILLER), + context: "0x00" + }) + ] + }), + deps: orderValidationDeps + }); + + expect(result.passed).toBe(false); + expect(result.reason).toBe(VALIDATION_ERRORS.UNKNOWN_ORIGIN_CHAIN); + }); + + it("rejects unsupported output chains instead of treating them as COIN_FILLER-only", () => { + const unknownChainId = 999999999n; + const result = validateOrderWithReason({ + order: makeStandardOrder({ + outputs: [ + makeMandateOutput(unknownChainId, 1n, { + oracle: addressToBytes32(COIN_FILLER), + settler: addressToBytes32(COIN_FILLER), + context: "0x00" + }) + ] + }), + deps: orderValidationDeps + }); + + expect(result.passed).toBe(false); + expect(result.reason).toBe(VALIDATION_ERRORS.UNKNOWN_OUTPUT_CHAIN); + }); +}); diff --git a/tests/unit/recipientField.test.ts b/tests/unit/recipientField.test.ts new file mode 100644 index 0000000..73d3edd --- /dev/null +++ b/tests/unit/recipientField.test.ts @@ -0,0 +1,54 @@ +import { describe, expect, it } from "bun:test"; +import { isAddress } from "viem"; + +// Mirrors the resolveRecipient helper in IssueIntent.svelte +const resolveRecipient = (value: string): `0x${string}` | undefined => + isAddress(value, { strict: false }) ? (value as `0x${string}`) : undefined; + +describe("resolveRecipient", () => { + it("returns the address for a valid checksummed EVM address", () => { + const addr = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + expect(resolveRecipient(addr)).toBe(addr); + }); + + it("returns the address for a valid lowercase EVM address (strict: false)", () => { + const addr = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"; + expect(resolveRecipient(addr)).toBe(addr); + }); + + it("returns undefined for an empty string", () => { + expect(resolveRecipient("")).toBeUndefined(); + }); + + it("returns undefined for a partial address", () => { + expect(resolveRecipient("0x1234")).toBeUndefined(); + }); + + it("returns undefined for arbitrary non-address text", () => { + expect(resolveRecipient("alice.eth")).toBeUndefined(); + }); + + it("returns undefined for a hex string that is too long", () => { + expect(resolveRecipient("0x" + "a".repeat(42))).toBeUndefined(); + }); +}); + +describe("outputRecipient in AppCreateIntentOptions", () => { + it("is undefined when recipient field is empty", () => { + const recipient = ""; + const outputRecipient = resolveRecipient(recipient); + expect(outputRecipient).toBeUndefined(); + }); + + it("is set when a valid address is provided", () => { + const recipient = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + const outputRecipient = resolveRecipient(recipient); + expect(outputRecipient).toBe(recipient); + }); + + it("is undefined for an invalid address, so wallet default is used", () => { + const recipient = "not-an-address"; + const outputRecipient = resolveRecipient(recipient); + expect(outputRecipient).toBeUndefined(); + }); +}); diff --git a/tests/unit/walletClientSwitch.test.ts b/tests/unit/walletClientSwitch.test.ts new file mode 100644 index 0000000..c853a04 --- /dev/null +++ b/tests/unit/walletClientSwitch.test.ts @@ -0,0 +1,57 @@ +import { describe, expect, it, mock } from "bun:test"; +import type { EIP1193Provider } from "viem"; +import { createSwitchWalletChain } from "../../src/lib/utils/walletClient"; + +describe("switchWalletChain", () => { + it("uses walletClient.switchChain when available", async () => { + const getCurrentProvider = mock(async () => undefined); + const switchWalletChain = createSwitchWalletChain({ getCurrentProvider }); + const switchChain = mock(async () => undefined); + const walletClient = { switchChain } as unknown as Parameters[0]; + await switchWalletChain(walletClient, 8453); + expect(switchChain).toHaveBeenCalledWith({ id: 8453 }); + expect(getCurrentProvider).not.toHaveBeenCalled(); + }); + + it("falls back to provider wallet_switchEthereumChain", async () => { + const getCurrentProvider = mock(async () => undefined); + const switchWalletChain = createSwitchWalletChain({ getCurrentProvider }); + const request = mock(async () => null); + const walletClient = {} as unknown as Parameters[0]; + const provider = { request } as unknown as NonNullable< + Parameters[2] + >["provider"]; + await switchWalletChain(walletClient, 8453, { provider }); + expect(request).toHaveBeenCalledWith({ + method: "wallet_switchEthereumChain", + params: [{ chainId: "0x2105" }] + }); + expect(getCurrentProvider).not.toHaveBeenCalled(); + }); + + it("falls back to injected getCurrentProvider when no provider is passed", async () => { + const request = mock(async () => null); + const provider = { request } as unknown as EIP1193Provider; + const getCurrentProvider = mock(async () => provider); + const switchWalletChain = createSwitchWalletChain({ getCurrentProvider }); + const walletClient = {} as unknown as Parameters[0]; + + await switchWalletChain(walletClient, 8453); + + expect(getCurrentProvider).toHaveBeenCalledTimes(1); + expect(request).toHaveBeenCalledWith({ + method: "wallet_switchEthereumChain", + params: [{ chainId: "0x2105" }] + }); + }); + + it("throws when no provider can be resolved", async () => { + const getCurrentProvider = mock(async () => undefined); + const switchWalletChain = createSwitchWalletChain({ getCurrentProvider }); + const walletClient = {} as unknown as Parameters[0]; + + await expect(switchWalletChain(walletClient, 8453)).rejects.toThrow( + "Wallet client does not support switchChain and no provider is available for chain 8453." + ); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index f7ccfe4..8e0bd6d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,22 +1,22 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "module": "ESNext", - "moduleResolution": "bundler", - "target": "ESNext" - }, - "exclude": ["tests/e2e", "playwright.config.ts"] - // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias - // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "ESNext", + "moduleResolution": "bundler", + "target": "ESNext" + }, + "exclude": ["tests/e2e", "playwright.config.ts"] + // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias + // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/vite.config.ts b/vite.config.ts index 83ecf56..f12ffff 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,8 +3,8 @@ import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vite"; export default defineConfig({ - plugins: [tailwindcss(), sveltekit()], - optimizeDeps: { - exclude: ["@electric-sql/pglite"] - } + plugins: [tailwindcss(), sveltekit()], + optimizeDeps: { + exclude: ["@electric-sql/pglite"] + } }); diff --git a/wrangler.toml b/wrangler.toml index 73bbe8e..d00003a 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,6 +1,6 @@ name = "lintent-worker" main = ".svelte-kit/cloudflare/_worker.js" -compatibility_date = "2024-03-06" +compatibility_date = "2026-03-06" compatibility_flags = ["nodejs_compat"] # account_id is NOT set here — passed via CLOUDFLARE_ACCOUNT_ID in CI