From 1d89445a0bfc4b281ed5e231e35b89f3cdfa2830 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Sat, 22 Feb 2025 18:13:29 +0100 Subject: [PATCH 1/8] silent connection --- packages/starkweb/src/connectors/argent.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/starkweb/src/connectors/argent.ts b/packages/starkweb/src/connectors/argent.ts index ee4a65b..38879b0 100644 --- a/packages/starkweb/src/connectors/argent.ts +++ b/packages/starkweb/src/connectors/argent.ts @@ -230,13 +230,16 @@ export function argentX() { config.emitter.emit('change', { chainId }) }, async onConnect(connectInfo) { - const accounts = await this.getAccounts() + const provider = await this.getProvider() + const accounts = await provider.request({ + type: 'wallet_requestAccounts', + params: {silent_mode: true} + }) as string[] if (accounts.length === 0) return const chainId = connectInfo.chainId as Hex - config.emitter.emit('accountsChanged', { accounts, chainId }) + config.emitter.emit('accountsChanged', { accounts: accounts.map((x) => getStarknetAddress(x)), chainId }) - const provider = await this.getProvider() if (provider) { provider.on('accountsChanged', this.onAccountsChanged.bind(this) as any) provider.on('networkChanged', this.onChainChanged as any) From 8177399addab05673af115795de3c58c617fcc05 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Tue, 25 Feb 2025 19:24:43 +0100 Subject: [PATCH 2/8] action: getSpecVersion --- app/exp001/actions.ts | 15 + app/starkweb-client/README.md | 53 ++ app/starkweb-client/package.json | 22 + app/starkweb-client/src/example.ts | 48 + app/starkweb-client/src/index.ts | 18 + app/starkweb-client/tsconfig.json | 16 + app/starkweb-client/tsup.config.ts | 11 + .../src/actions/public/getSpecVersion.ts | 8 +- .../src/clients/createPublicClient.ts | 2 +- pnpm-lock.yaml | 890 +++++++++++++++++- 10 files changed, 1046 insertions(+), 37 deletions(-) create mode 100644 app/exp001/actions.ts create mode 100644 app/starkweb-client/README.md create mode 100644 app/starkweb-client/package.json create mode 100644 app/starkweb-client/src/example.ts create mode 100644 app/starkweb-client/src/index.ts create mode 100644 app/starkweb-client/tsconfig.json create mode 100644 app/starkweb-client/tsup.config.ts diff --git a/app/exp001/actions.ts b/app/exp001/actions.ts new file mode 100644 index 0000000..3e3663b --- /dev/null +++ b/app/exp001/actions.ts @@ -0,0 +1,15 @@ +import { + sepolia, +} from '../../packages/starkweb/dist/esm/chains/definitions/sepolia'; +import { + createPublicClient, +} from '../../packages/starkweb/dist/esm/clients/createPublicClient'; +import { http } from '../../packages/starkweb/dist/esm/clients/transports/http'; + +export const client = createPublicClient({ + transport: http('https://starknet-sepolia.infura.io/v3/db72641028ee47f5b18bcbb791a3f829'), + chain: sepolia, + }) + +const specVersion = await client.getSpecVersion() +console.log(specVersion) \ No newline at end of file diff --git a/app/starkweb-client/README.md b/app/starkweb-client/README.md new file mode 100644 index 0000000..70918d8 --- /dev/null +++ b/app/starkweb-client/README.md @@ -0,0 +1,53 @@ +# StarkWeb Client + +A client library for interacting with Starknet using the StarkWeb package. + +## Installation + +```bash +pnpm add starkweb-client +``` + +## Usage + +```typescript +import { Client } from 'starkweb-client'; + +// Create a new client with default settings (mainnet) +const client = new Client(); + +// Create a client with custom configuration +const customClient = new Client({ + providerUrl: 'https://your-starknet-provider.com', + chainId: 'sepolia', // 'mainnet' or 'sepolia' + options: { + // Additional options + } +}); + +// Get the starkweb configuration +const config = client.getConfig(); + +// Get client configuration +const clientConfig = client.getClientConfig(); + +// Connect to a different provider +client.connect('https://another-provider.com', 'sepolia'); +``` + +## Development + +```bash +# Install dependencies +pnpm install + +# Build the package +pnpm build + +# Run tests +pnpm test +``` + +## License + +MIT \ No newline at end of file diff --git a/app/starkweb-client/package.json b/app/starkweb-client/package.json new file mode 100644 index 0000000..abc4aa7 --- /dev/null +++ b/app/starkweb-client/package.json @@ -0,0 +1,22 @@ +{ + "name": "starkweb-client", + "version": "0.0.1", + "private": true, + "type": "module", + "scripts": { + "dev": "npx tsx src/index.ts", + "lint": "biome check .", + "fix": "biome check --apply .", + "build": "tsup", + "test": "vitest run" + }, + "dependencies": { + "starkweb": "workspace:*" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "tsup": "^8.0.2", + "typescript": "^5.6.3", + "vitest": "^1.4.0" + } +} \ No newline at end of file diff --git a/app/starkweb-client/src/example.ts b/app/starkweb-client/src/example.ts new file mode 100644 index 0000000..7a82cbd --- /dev/null +++ b/app/starkweb-client/src/example.ts @@ -0,0 +1,48 @@ +/** + * Example usage of the StarkWeb Client + */ +import { Client } from './index'; + +// Create a client with default settings (mainnet) +const client = new Client(); +console.log('Default client config:', client.getClientConfig()); + +// Create a client with custom configuration for Sepolia testnet +const testnetClient = new Client({ + providerUrl: 'https://sepolia.starknet.io', + chainId: 'sepolia', + options: { + // You can add custom options here + } +}); +console.log('Testnet client config:', testnetClient.getClientConfig()); + +// Get the starkweb configuration (can be used with StarkwebProvider) +const config = client.getConfig(); +console.log('Starkweb config is available:', !!config); + +// Connect to a different provider +client.connect('https://alpha-mainnet.starknet.io', 'mainnet'); +console.log('After reconnect client config:', client.getClientConfig()); + +/** + * Example integration with StarkwebProvider (React) + * + * ```tsx + * import { StarkwebProvider } from 'starkweb/react'; + * import { Client } from 'starkweb-client'; + * + * const client = new Client({ + * providerUrl: 'https://alpha-mainnet.starknet.io', + * chainId: 'mainnet', + * }); + * + * const App = () => { + * return ( + * + * + * + * ); + * }; + * ``` + */ \ No newline at end of file diff --git a/app/starkweb-client/src/index.ts b/app/starkweb-client/src/index.ts new file mode 100644 index 0000000..ad79e7f --- /dev/null +++ b/app/starkweb-client/src/index.ts @@ -0,0 +1,18 @@ +/** + * StarkWeb Client - A client for interacting with Starknet + */ + +// Import from the starkweb workspace package +import { http, type Transport } from 'starkweb'; +import { mainnet, sepolia } from 'starkweb/chains'; +import { createPublicClient } from 'starkweb'; + + +const publicClient = createPublicClient({ + chain: sepolia, + transport: http(), +}); + +const specVersion = await publicClient.getSpecVersion(); + +console.log(specVersion); \ No newline at end of file diff --git a/app/starkweb-client/tsconfig.json b/app/starkweb-client/tsconfig.json new file mode 100644 index 0000000..6225166 --- /dev/null +++ b/app/starkweb-client/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "outDir": "dist", + "declaration": true, + "resolveJsonModule": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"] +} \ No newline at end of file diff --git a/app/starkweb-client/tsup.config.ts b/app/starkweb-client/tsup.config.ts new file mode 100644 index 0000000..6a69fa2 --- /dev/null +++ b/app/starkweb-client/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm', 'cjs'], + dts: true, + clean: true, + sourcemap: true, + treeshake: true, + external: ['starkweb', 'starkweb/chains', 'starkweb/core', 'starkweb/react'], +}); \ No newline at end of file diff --git a/packages/starkweb/src/actions/public/getSpecVersion.ts b/packages/starkweb/src/actions/public/getSpecVersion.ts index 034b362..07da2e4 100644 --- a/packages/starkweb/src/actions/public/getSpecVersion.ts +++ b/packages/starkweb/src/actions/public/getSpecVersion.ts @@ -12,16 +12,16 @@ export type GetSpecVersionErrorType = RequestErrorType | ErrorType /** * Returns the current spec version. * - * - Docs: https://starkweb.xyz/docs/actions/public/getChainId - * - JSON-RPC Methods: [`starknet_specVersion`](https://docs.starknet.io/reference/rpc-api/#starknet_specversion) + * - Docs: https://starkweb.xyz/docs/actions/public/getSpecVersion + * - JSON-RPC Methods: [`starknet_specVersion`](https://docs.starknet.io/documentation/rpc/starknet_api/#starknet_specversion) * * @param client - Client to use - * @returns The current spec version. {@link GetSpecVersionReturnType} + * @returns The current spec version as a hex string. {@link GetSpecVersionReturnType} * * @example * import { createPublicClient, http } from 'starkweb' * import { mainnet } from 'starkweb/chains' - * import { getSpecVersion } from 'starkweb/public' + * import { getSpecVersion } from 'starkweb/actions' * * const client = createPublicClient({ * chain: mainnet, diff --git a/packages/starkweb/src/clients/createPublicClient.ts b/packages/starkweb/src/clients/createPublicClient.ts index 542d038..084b1ea 100644 --- a/packages/starkweb/src/clients/createPublicClient.ts +++ b/packages/starkweb/src/clients/createPublicClient.ts @@ -86,5 +86,5 @@ export function createPublicClient< name, type: 'publicClient', }) - return client.extend(publicActions) as any + return client.extend(publicActions) as PublicClient, rpcSchema> } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5be31dd..fd65d25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,13 +56,13 @@ importers: version: 18.3.1(react@18.3.1) starkweb: specifier: 0.0.21 - version: 0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) + version: 0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) starkwebkit: specifier: latest - version: 0.0.3(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(starkweb@0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)) + version: 0.0.3(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(starkweb@0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)) starkwebkit-next-siwe: specifier: latest - version: 0.0.2(connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)))(koa@2.15.3)(next@12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starkweb@0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)) + version: 0.0.2(connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)))(koa@2.15.3)(next@12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starkweb@0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)) tailwindcss: specifier: ^3.3.2 version: 3.4.15 @@ -206,6 +206,25 @@ importers: specifier: latest version: 1.0.0-alpha.62(@types/node@22.9.0)(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(acorn@8.14.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(typescript@5.7.3) + app/starkweb-client: + dependencies: + starkweb: + specifier: workspace:* + version: link:../../packages/starkweb + devDependencies: + '@biomejs/biome': + specifier: ^1.9.4 + version: 1.9.4 + tsup: + specifier: ^8.0.2 + version: 8.3.6(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.3)(yaml@2.6.1) + typescript: + specifier: ^5.6.3 + version: 5.7.3 + vitest: + specifier: ^1.4.0 + version: 1.6.1(@types/node@22.9.0) + packages/create-starkweb: dependencies: cac: @@ -634,6 +653,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.18.20': resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -646,6 +671,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.18.20': resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} @@ -658,6 +689,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.18.20': resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -670,6 +707,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.18.20': resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -682,6 +725,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.18.20': resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -694,6 +743,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -706,6 +761,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -718,6 +779,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.18.20': resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -730,6 +797,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.18.20': resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -742,6 +815,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.18.20': resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -754,6 +833,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.18.20': resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -766,6 +851,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.18.20': resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -778,6 +869,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.18.20': resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -790,6 +887,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.18.20': resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -802,6 +905,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.18.20': resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -814,6 +923,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.18.20': resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -826,6 +941,18 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.18.20': resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -838,6 +965,18 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -850,6 +989,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.18.20': resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -862,6 +1007,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.18.20': resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -874,6 +1025,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.18.20': resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} @@ -886,6 +1043,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.18.20': resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -898,6 +1061,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1137,6 +1306,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -2263,6 +2436,9 @@ packages: '@shikijs/vscode-textmate@9.3.0': resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} @@ -2641,6 +2817,21 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 + '@vitest/expect@1.6.1': + resolution: {integrity: sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==} + + '@vitest/runner@1.6.1': + resolution: {integrity: sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==} + + '@vitest/snapshot@1.6.1': + resolution: {integrity: sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==} + + '@vitest/spy@1.6.1': + resolution: {integrity: sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==} + + '@vitest/utils@1.6.1': + resolution: {integrity: sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==} + '@wagmi/connectors@5.7.7': resolution: {integrity: sha512-hveKxuR35ZQQyteLo7aiN/TBVECYKVbLNTYGGgqzTNHJ8vVoblTP9PwPrRPGOPi5ji8raYSFWShxNK7QpGL+Kg==} peerDependencies: @@ -2789,6 +2980,10 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} @@ -2827,6 +3022,10 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} @@ -2895,6 +3094,9 @@ packages: resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} engines: {node: '>=12.0.0'} + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -3032,6 +3234,12 @@ packages: bun-types@1.2.2: resolution: {integrity: sha512-RCbMH5elr9gjgDGDhkTTugA21XtJAy/9jkKe/G3WR2q17VPGhcquf9Sir6uay9iW+7P/BV0CAHA1XlHXMAVKHg==} + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -3081,6 +3289,10 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + engines: {node: '>=4'} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -3112,10 +3324,17 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + chroma-js@2.6.0: resolution: {integrity: sha512-BLHvCB9s8Z1EV4ethr6xnkl/P2YRFOGqfgvuMG/MyCbZPrTA+NeiByY6XvgF0zP4/2deU2CXnWyMa3zu1LqQ3A==} @@ -3211,6 +3430,10 @@ packages: viem: 2.x wagmi: 2.x + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} + engines: {node: ^14.18.0 || >=16.10.0} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -3367,6 +3590,10 @@ packages: babel-plugin-macros: optional: true + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + deep-equal@1.0.1: resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} @@ -3444,6 +3671,10 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dijkstrajs@1.0.3: resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} @@ -3591,6 +3822,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -3881,6 +4117,10 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + expand-tilde@2.0.2: resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} engines: {node: '>=0.10.0'} @@ -3932,6 +4172,14 @@ packages: fault@2.0.1: resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4057,6 +4305,9 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -4077,6 +4328,10 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} @@ -4290,6 +4545,10 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -4484,6 +4743,10 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -4584,6 +4847,10 @@ packages: jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + js-sdsl@4.4.2: resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} @@ -4596,6 +4863,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -4707,6 +4977,14 @@ packages: lit@2.8.0: resolution: {integrity: sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==} + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + local-pkg@0.5.1: + resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} + engines: {node: '>=14'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -4725,6 +5003,9 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} @@ -4752,6 +5033,9 @@ packages: lossless-json@4.0.2: resolution: {integrity: sha512-+z0EaLi2UcWi8MZRxA5iTb6m4Ys4E80uftGY+yG5KNFJb5EceQXOhdW/pWJZ8m97s26u7yZZAYMcKWNztSZssA==} + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -4769,6 +5053,9 @@ packages: resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} engines: {node: '>=12'} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} @@ -4993,6 +5280,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -5182,6 +5473,10 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} @@ -5248,6 +5543,10 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + oniguruma-to-es@0.4.1: resolution: {integrity: sha512-rNcEohFz095QKGRovP/yqPIKc+nP+Sjs4YTHMv33nMePGKrq/r2eu9Yh4646M5XluGJsUnmwoXuiXE69KDs+fQ==} @@ -5345,6 +5644,10 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -5363,6 +5666,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pbkdf2@3.1.2: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} engines: {node: '>=0.12'} @@ -5454,6 +5760,24 @@ packages: ts-node: optional: true + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + postcss-nested@6.2.0: resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} engines: {node: '>=12.0'} @@ -5491,6 +5815,10 @@ packages: engines: {node: '>=10.13.0'} hasBin: true + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -5593,6 +5921,9 @@ packages: react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + react-refresh@0.14.2: resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} engines: {node: '>=0.10.0'} @@ -5686,6 +6017,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + real-require@0.1.0: resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} engines: {node: '>= 12.13.0'} @@ -5946,6 +6281,9 @@ packages: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5989,6 +6327,10 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} @@ -6009,6 +6351,9 @@ packages: stable-hash@0.0.4: resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + starkweb@0.0.15: resolution: {integrity: sha512-glP/w18Cft2VclxCUPPI+ymMxfDAm82AEqqUBk45WwmUz8SZYB6HSn2otmgv3E8Ds65fzLNIxeum9vBlgKrtLQ==} hasBin: true @@ -6059,6 +6404,9 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + stdin-discarder@0.1.0: resolution: {integrity: sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6137,10 +6485,17 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-literal@2.1.1: + resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} + style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} @@ -6247,6 +6602,24 @@ packages: thread-stream@0.15.2: resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} + engines: {node: '>=12.0.0'} + + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -6265,6 +6638,13 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -6293,6 +6673,25 @@ packages: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} engines: {node: '>=0.6.x'} + tsup@8.3.6: + resolution: {integrity: sha512-XkVtlDV/58S9Ye0JxUUTcrQk4S+EqlOHKzg6Roa62rdjL1nGWNUstG0xgI4vanHdfIpjP448J8vlN0oK6XOJ5g==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + tsutils@3.21.0: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -6345,6 +6744,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -6614,6 +7017,11 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + vite-node@1.6.1: + resolution: {integrity: sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite@5.4.11: resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} engines: {node: ^18.0.0 || >=20.0.0} @@ -6645,6 +7053,31 @@ packages: terser: optional: true + vitest@1.6.1: + resolution: {integrity: sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.1 + '@vitest/ui': 1.6.1 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vocs@1.0.0-alpha.62: resolution: {integrity: sha512-WidbX8M33lPlDjOvvjQyZaYGtn3hRZ3iViFuwvlmgAqCX1yGXaQs1tLdS1Cy5ki+q0BIUqXvvy8jo9rBQ+fM6w==} hasBin: true @@ -6676,12 +7109,18 @@ packages: webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + whatwg-fetch@3.6.20: resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -6709,6 +7148,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -7304,138 +7748,213 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true + '@esbuild/aix-ppc64@0.24.2': + optional: true + '@esbuild/android-arm64@0.18.20': optional: true '@esbuild/android-arm64@0.21.5': optional: true + '@esbuild/android-arm64@0.24.2': + optional: true + '@esbuild/android-arm@0.18.20': optional: true '@esbuild/android-arm@0.21.5': optional: true + '@esbuild/android-arm@0.24.2': + optional: true + '@esbuild/android-x64@0.18.20': optional: true '@esbuild/android-x64@0.21.5': optional: true + '@esbuild/android-x64@0.24.2': + optional: true + '@esbuild/darwin-arm64@0.18.20': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true + '@esbuild/darwin-arm64@0.24.2': + optional: true + '@esbuild/darwin-x64@0.18.20': optional: true '@esbuild/darwin-x64@0.21.5': optional: true + '@esbuild/darwin-x64@0.24.2': + optional: true + '@esbuild/freebsd-arm64@0.18.20': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true + '@esbuild/freebsd-arm64@0.24.2': + optional: true + '@esbuild/freebsd-x64@0.18.20': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true + '@esbuild/freebsd-x64@0.24.2': + optional: true + '@esbuild/linux-arm64@0.18.20': optional: true '@esbuild/linux-arm64@0.21.5': optional: true + '@esbuild/linux-arm64@0.24.2': + optional: true + '@esbuild/linux-arm@0.18.20': optional: true '@esbuild/linux-arm@0.21.5': optional: true + '@esbuild/linux-arm@0.24.2': + optional: true + '@esbuild/linux-ia32@0.18.20': optional: true '@esbuild/linux-ia32@0.21.5': optional: true + '@esbuild/linux-ia32@0.24.2': + optional: true + '@esbuild/linux-loong64@0.18.20': optional: true '@esbuild/linux-loong64@0.21.5': optional: true + '@esbuild/linux-loong64@0.24.2': + optional: true + '@esbuild/linux-mips64el@0.18.20': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true + '@esbuild/linux-mips64el@0.24.2': + optional: true + '@esbuild/linux-ppc64@0.18.20': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true + '@esbuild/linux-ppc64@0.24.2': + optional: true + '@esbuild/linux-riscv64@0.18.20': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true + '@esbuild/linux-riscv64@0.24.2': + optional: true + '@esbuild/linux-s390x@0.18.20': optional: true '@esbuild/linux-s390x@0.21.5': optional: true + '@esbuild/linux-s390x@0.24.2': + optional: true + '@esbuild/linux-x64@0.18.20': optional: true '@esbuild/linux-x64@0.21.5': optional: true + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + '@esbuild/netbsd-x64@0.18.20': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + '@esbuild/openbsd-x64@0.18.20': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true + '@esbuild/openbsd-x64@0.24.2': + optional: true + '@esbuild/sunos-x64@0.18.20': optional: true '@esbuild/sunos-x64@0.21.5': optional: true + '@esbuild/sunos-x64@0.24.2': + optional: true + '@esbuild/win32-arm64@0.18.20': optional: true '@esbuild/win32-arm64@0.21.5': optional: true + '@esbuild/win32-arm64@0.24.2': + optional: true + '@esbuild/win32-ia32@0.18.20': optional: true '@esbuild/win32-ia32@0.21.5': optional: true + '@esbuild/win32-ia32@0.24.2': + optional: true + '@esbuild/win32-x64@0.18.20': optional: true '@esbuild/win32-x64@0.21.5': optional: true + '@esbuild/win32-x64@0.24.2': + optional: true + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -7681,6 +8200,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -8010,22 +8533,22 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)': + '@module-federation/enhanced@0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(react-dom@19.0.0(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.10 - '@module-federation/data-prefetch': 0.8.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@module-federation/dts-plugin': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@module-federation/data-prefetch': 0.8.10(react-dom@19.0.0(react@18.3.1))(react@18.3.1) + '@module-federation/dts-plugin': 0.8.10(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) '@module-federation/error-codes': 0.8.10 '@module-federation/inject-external-runtime-core-plugin': 0.8.10(@module-federation/runtime-tools@0.8.10) '@module-federation/managers': 0.8.10 - '@module-federation/manifest': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) - '@module-federation/rspack': 0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@module-federation/manifest': 0.8.10(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + '@module-federation/rspack': 0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) '@module-federation/runtime-tools': 0.8.10 '@module-federation/sdk': 0.8.10 btoa: 1.2.1 upath: 2.0.1 optionalDependencies: - typescript: 5.7.3 + typescript: 5.6.3 transitivePeerDependencies: - '@rspack/core' - bufferutil @@ -8035,22 +8558,22 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(react-dom@19.0.0(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)': + '@module-federation/enhanced@0.8.10(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.10 - '@module-federation/data-prefetch': 0.8.10(react-dom@19.0.0(react@18.3.1))(react@18.3.1) - '@module-federation/dts-plugin': 0.8.10(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + '@module-federation/data-prefetch': 0.8.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@module-federation/dts-plugin': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@module-federation/error-codes': 0.8.10 '@module-federation/inject-external-runtime-core-plugin': 0.8.10(@module-federation/runtime-tools@0.8.10) '@module-federation/managers': 0.8.10 - '@module-federation/manifest': 0.8.10(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) - '@module-federation/rspack': 0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + '@module-federation/manifest': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@module-federation/rspack': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@module-federation/runtime-tools': 0.8.10 '@module-federation/sdk': 0.8.10 btoa: 1.2.1 upath: 2.0.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.3 transitivePeerDependencies: - '@rspack/core' - bufferutil @@ -8124,7 +8647,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/rspack@0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)': + '@module-federation/rspack@0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.10 '@module-federation/dts-plugin': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) @@ -8133,7 +8656,6 @@ snapshots: '@module-federation/manifest': 0.8.10(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@module-federation/runtime-tools': 0.8.10 '@module-federation/sdk': 0.8.10 - '@rspack/core': 1.2.2(@swc/helpers@0.5.15) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: @@ -9014,6 +9536,8 @@ snapshots: '@shikijs/vscode-textmate@9.3.0': {} + '@sinclair/typebox@0.27.8': {} + '@socket.io/component-emitter@3.1.2': {} '@stablelib/aead@1.0.1': {} @@ -9573,6 +10097,35 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/expect@1.6.1': + dependencies: + '@vitest/spy': 1.6.1 + '@vitest/utils': 1.6.1 + chai: 4.5.0 + + '@vitest/runner@1.6.1': + dependencies: + '@vitest/utils': 1.6.1 + p-limit: 5.0.0 + pathe: 1.1.2 + + '@vitest/snapshot@1.6.1': + dependencies: + magic-string: 0.30.17 + pathe: 1.1.2 + pretty-format: 29.7.0 + + '@vitest/spy@1.6.1': + dependencies: + tinyspy: 2.2.1 + + '@vitest/utils@1.6.1': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + '@wagmi/connectors@5.7.7(@types/react@18.3.12)(@wagmi/core@2.16.4(@tanstack/query-core@5.66.0)(@types/react@18.3.12)(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)))(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)': dependencies: '@coinbase/wallet-sdk': 4.3.0 @@ -10008,6 +10561,10 @@ snapshots: dependencies: acorn: 8.14.0 + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + acorn@8.14.0: {} adm-zip@0.5.16: {} @@ -10042,6 +10599,8 @@ snapshots: dependencies: color-convert: 2.0.1 + ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} any-promise@1.3.0: {} @@ -10138,6 +10697,8 @@ snapshots: pvutils: 1.1.3 tslib: 2.8.1 + assertion-error@1.1.0: {} + ast-types-flow@0.0.8: {} astring@1.9.0: {} @@ -10178,14 +10739,14 @@ snapshots: axobject-query@4.1.0: {} - babel-plugin-styled-components@2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1))(supports-color@5.5.0): + babel-plugin-styled-components@2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1))(supports-color@5.5.0): dependencies: '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-module-imports': 7.25.9(supports-color@5.5.0) '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1) + styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1) transitivePeerDependencies: - '@babel/core' - supports-color @@ -10285,6 +10846,11 @@ snapshots: '@types/node': 20.17.6 '@types/ws': 8.5.14 + bundle-require@5.1.0(esbuild@0.24.2): + dependencies: + esbuild: 0.24.2 + load-tsconfig: 0.2.5 + busboy@1.6.0: dependencies: streamsearch: 1.1.0 @@ -10328,6 +10894,16 @@ snapshots: ccount@2.0.1: {} + chai@4.5.0: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.1.0 + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -10356,6 +10932,10 @@ snapshots: chardet@0.7.0: {} + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -10368,6 +10948,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + chroma-js@2.6.0: {} ci-info@3.9.0: {} @@ -10451,7 +11035,7 @@ snapshots: confbox@0.1.8: {} - connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)): + connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)): dependencies: '@tanstack/react-query': 5.66.0(react@18.3.1) buffer: 6.0.3 @@ -10463,13 +11047,15 @@ snapshots: react-transition-state: 1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-use-measure: 2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) resize-observer-polyfill: 1.5.1 - styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1) + styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1) viem: 2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) wagmi: 2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1) transitivePeerDependencies: - '@babel/core' - react-is + consola@3.4.0: {} + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -10622,6 +11208,10 @@ snapshots: dedent@1.5.3: {} + deep-eql@4.1.4: + dependencies: + type-detect: 4.1.0 + deep-equal@1.0.1: {} deep-is@0.1.4: {} @@ -10679,6 +11269,8 @@ snapshots: didyoumean@1.2.2: {} + diff-sequences@29.6.3: {} + dijkstrajs@1.0.3: {} dir-glob@3.0.1: @@ -10952,6 +11544,34 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + escalade@3.2.0: {} escape-html@1.0.3: {} @@ -11647,6 +12267,18 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + execa@8.0.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + expand-tilde@2.0.2: dependencies: homedir-polyfill: 1.0.3 @@ -11702,6 +12334,10 @@ snapshots: dependencies: format: 0.2.2 + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 @@ -11832,6 +12468,8 @@ snapshots: get-caller-file@2.0.5: {} + get-func-name@2.0.2: {} + get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 @@ -11862,6 +12500,8 @@ snapshots: get-stream@6.0.1: {} + get-stream@8.0.1: {} + get-symbol-description@1.0.2: dependencies: call-bind: 1.0.7 @@ -12192,6 +12832,8 @@ snapshots: human-signals@2.1.0: {} + human-signals@5.0.0: {} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -12362,6 +13004,8 @@ snapshots: is-stream@2.0.1: {} + is-stream@3.0.0: {} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -12460,6 +13104,8 @@ snapshots: jju@1.4.0: {} + joycon@3.1.1: {} + js-sdsl@4.4.2: {} js-sha3@0.5.7: {} @@ -12468,6 +13114,8 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.1: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -12603,6 +13251,13 @@ snapshots: lit-element: 3.3.3 lit-html: 2.8.0 + load-tsconfig@0.2.5: {} + + local-pkg@0.5.1: + dependencies: + mlly: 1.7.3 + pkg-types: 1.2.1 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -12617,6 +13272,8 @@ snapshots: lodash.merge@4.6.2: {} + lodash.sortby@4.7.0: {} + lodash.startcase@4.4.0: {} lodash@4.17.21: {} @@ -12646,6 +13303,10 @@ snapshots: lossless-json@4.0.2: {} + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + lru-cache@10.4.3: {} lru-cache@11.0.2: {} @@ -12661,6 +13322,10 @@ snapshots: luxon@3.5.0: {} + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + mark.js@8.11.1: {} markdown-extensions@2.0.0: {} @@ -13174,6 +13839,8 @@ snapshots: mimic-fn@2.1.0: {} + mimic-fn@4.0.0: {} + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -13377,6 +14044,10 @@ snapshots: dependencies: path-key: 3.1.1 + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + nth-check@2.1.1: dependencies: boolbase: 1.0.0 @@ -13451,6 +14122,10 @@ snapshots: dependencies: mimic-fn: 2.1.0 + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + oniguruma-to-es@0.4.1: dependencies: emoji-regex-xs: 1.0.0 @@ -13557,6 +14232,8 @@ snapshots: path-key@3.1.1: {} + path-key@4.0.0: {} + path-parse@1.0.7: {} path-scurry@1.11.1: @@ -13573,6 +14250,8 @@ snapshots: pathe@1.1.2: {} + pathval@1.1.1: {} + pbkdf2@3.1.2: dependencies: create-hash: 1.2.0 @@ -13658,6 +14337,14 @@ snapshots: optionalDependencies: postcss: 8.4.49 + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.49)(yaml@2.6.1): + dependencies: + lilconfig: 3.1.2 + optionalDependencies: + jiti: 1.21.6 + postcss: 8.4.49 + yaml: 2.6.1 + postcss-nested@6.2.0(postcss@8.4.49): dependencies: postcss: 8.4.49 @@ -13694,6 +14381,12 @@ snapshots: prettier@2.8.8: {} + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + process-nextick-args@2.0.1: {} process-warning@1.0.0: {} @@ -13798,6 +14491,8 @@ snapshots: react-is@16.13.1: {} + react-is@18.3.1: {} + react-refresh@0.14.2: {} react-remove-scroll-bar@2.3.6(@types/react@19.0.8)(react@19.0.0): @@ -13892,6 +14587,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.1.2: {} + real-require@0.1.0: {} recma-build-jsx@1.0.0: @@ -14297,6 +14994,8 @@ snapshots: get-intrinsic: 1.2.4 object-inspect: 1.13.3 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -14340,6 +15039,10 @@ snapshots: source-map@0.7.4: {} + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + space-separated-tokens@2.0.2: {} spawndamnit@2.0.0: @@ -14355,6 +15058,8 @@ snapshots: stable-hash@0.0.4: {} + stackback@0.0.2: {} + starkweb@0.0.15(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@19.0.0))(@types/react@19.0.8)(bufferutil@4.0.8)(react@19.0.0)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1): dependencies: '@adraffy/ens-normalize': 1.10.0 @@ -14391,11 +15096,11 @@ snapshots: - utf-8-validate - zod - starkweb@0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1): + starkweb@0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1): dependencies: '@0x/utils': 7.0.0(encoding@0.1.13) '@adraffy/ens-normalize': 1.10.0 - '@module-federation/enhanced': 0.8.10(@rspack/core@1.2.2(@swc/helpers@0.5.15))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@module-federation/enhanced': 0.8.10(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10) '@module-federation/runtime': 0.9.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 @@ -14437,19 +15142,19 @@ snapshots: - webpack - zod - starkwebkit-next-siwe@0.0.2(connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)))(koa@2.15.3)(next@12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starkweb@0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)): + starkwebkit-next-siwe@0.0.2(connectkit@1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)))(koa@2.15.3)(next@12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starkweb@0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)): dependencies: - connectkit: 1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)) + connectkit: 1.8.2(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(wagmi@2.14.11(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.23.2(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1))(zod@3.24.1)) iron-session: 6.3.1(koa@2.15.3)(next@12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) next: 12.3.0(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - starkweb: 0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) + starkweb: 0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) transitivePeerDependencies: - express - koa - starkwebkit@0.0.3(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(starkweb@0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)): + starkwebkit@0.0.3(@babel/core@7.26.0)(@tanstack/react-query@5.66.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(starkweb@0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1)): dependencies: '@tanstack/react-query': 5.66.0(react@18.3.1) buffer: 6.0.3 @@ -14461,8 +15166,8 @@ snapshots: react-transition-state: 1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-use-measure: 2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) resize-observer-polyfill: 1.5.1 - starkweb: 0.0.21(@rspack/core@1.2.2(@swc/helpers@0.5.15))(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) - styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1) + starkweb: 0.0.21(@tanstack/query-core@5.66.0)(@tanstack/react-query@5.66.0(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(zod@3.24.1) + styled-components: 5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1) transitivePeerDependencies: - '@babel/core' - react-is @@ -14471,6 +15176,8 @@ snapshots: statuses@2.0.1: {} + std-env@3.8.0: {} + stdin-discarder@0.1.0: dependencies: bl: 5.1.0 @@ -14577,8 +15284,14 @@ snapshots: strip-final-newline@2.0.0: {} + strip-final-newline@3.0.0: {} + strip-json-comments@3.1.1: {} + strip-literal@2.1.1: + dependencies: + js-tokens: 9.0.1 + style-to-object@0.4.4: dependencies: inline-style-parser: 0.1.1 @@ -14592,19 +15305,19 @@ snapshots: hey-listen: 1.0.8 tslib: 2.8.1 - styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1): + styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1): dependencies: '@babel/helper-module-imports': 7.25.9(supports-color@5.5.0) '@babel/traverse': 7.25.9(supports-color@5.5.0) '@emotion/is-prop-valid': 1.3.1 '@emotion/stylis': 0.8.5 '@emotion/unitless': 0.7.5 - babel-plugin-styled-components: 2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1))(supports-color@5.5.0) + babel-plugin-styled-components: 2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1))(supports-color@5.5.0) css-to-react-native: 3.2.0 hoist-non-react-statics: 3.3.2 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-is: 16.13.1 + react-is: 18.3.1 shallowequal: 1.1.0 supports-color: 5.5.0 transitivePeerDependencies: @@ -14695,6 +15408,19 @@ snapshots: dependencies: real-require: 0.1.0 + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + + tinyglobby@0.2.12: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + + tinypool@0.8.4: {} + + tinyspy@2.2.1: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -14709,6 +15435,12 @@ snapshots: tr46@0.0.3: {} + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + trim-lines@3.0.1: {} trough@2.2.0: {} @@ -14732,6 +15464,33 @@ snapshots: tsscmp@1.0.6: {} + tsup@8.3.6(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.3)(yaml@2.6.1): + dependencies: + bundle-require: 5.1.0(esbuild@0.24.2) + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.0 + debug: 4.3.7(supports-color@5.5.0) + esbuild: 0.24.2 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.49)(yaml@2.6.1) + resolve-from: 5.0.0 + rollup: 4.27.3 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.12 + tree-kill: 1.2.2 + optionalDependencies: + postcss: 8.4.49 + typescript: 5.7.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tsutils@3.21.0(typescript@5.7.3): dependencies: tslib: 1.14.1 @@ -14778,6 +15537,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-detect@4.1.0: {} + type-fest@0.20.2: {} type-is@1.6.18: @@ -15079,6 +15840,24 @@ snapshots: - supports-color - terser + vite-node@1.6.1(@types/node@22.9.0): + dependencies: + cac: 6.7.14 + debug: 4.3.7(supports-color@5.5.0) + pathe: 1.1.2 + picocolors: 1.1.1 + vite: 5.4.11(@types/node@22.9.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite@5.4.11(@types/node@22.9.0): dependencies: esbuild: 0.21.5 @@ -15088,6 +15867,40 @@ snapshots: '@types/node': 22.9.0 fsevents: 2.3.3 + vitest@1.6.1(@types/node@22.9.0): + dependencies: + '@vitest/expect': 1.6.1 + '@vitest/runner': 1.6.1 + '@vitest/snapshot': 1.6.1 + '@vitest/spy': 1.6.1 + '@vitest/utils': 1.6.1 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.3.7(supports-color@5.5.0) + execa: 8.0.1 + local-pkg: 0.5.1 + magic-string: 0.30.17 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 2.1.1 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.11(@types/node@22.9.0) + vite-node: 1.6.1(@types/node@22.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.9.0 + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vocs@1.0.0-alpha.62(@types/node@22.9.0)(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(acorn@8.14.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(typescript@5.7.3): dependencies: '@floating-ui/react': 0.26.28(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -15226,6 +16039,8 @@ snapshots: webidl-conversions@3.0.1: {} + webidl-conversions@4.0.2: {} + whatwg-fetch@3.6.20: {} whatwg-url@5.0.0: @@ -15233,6 +16048,12 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -15281,6 +16102,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} wrap-ansi@6.2.0: From 4763e188ed0bc896ef1005b73496ecbc2b4a79eb Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Tue, 25 Feb 2025 21:33:56 +0100 Subject: [PATCH 3/8] action: type resolution for getBlockWithTxHashes --- .cursorrules | 9 + app/starkweb-client/src/index.ts | 17 +- .../actions/public/getBlockWithTxHashes.ts | 33 ++- .../starkweb/src/clients/decorators/public.ts | 232 ++++++++++-------- .../src/core/actions/getBlockWithTxHashes.ts | 2 +- 5 files changed, 178 insertions(+), 115 deletions(-) create mode 100644 .cursorrules diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 0000000..da0ec28 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,9 @@ +# Cursor AI Rules + +## Import Rules +- When importing types, always use relative imports like `import type { Block } from '../../types/block.js'` +- Never use absolute imports like `import type { Block } from 'src/types/block.js'` + +## Code Generation Rules +- When generating or modifying imports for types, ensure paths are relative to the file location +- Convert any instances of `src/types/block.js` to the appropriate relative path (usually `../../types/block.js` in decorators) \ No newline at end of file diff --git a/app/starkweb-client/src/index.ts b/app/starkweb-client/src/index.ts index ad79e7f..4305f2b 100644 --- a/app/starkweb-client/src/index.ts +++ b/app/starkweb-client/src/index.ts @@ -3,16 +3,21 @@ */ // Import from the starkweb workspace package -import { http, type Transport } from 'starkweb'; -import { mainnet, sepolia } from 'starkweb/chains'; -import { createPublicClient } from 'starkweb'; - +import { + createPublicClient, + http, +} from 'starkweb'; +import { sepolia } from 'starkweb/chains'; const publicClient = createPublicClient({ chain: sepolia, transport: http(), }); -const specVersion = await publicClient.getSpecVersion(); +// Use 'as const' to let TypeScript know this is a literal 'pending' value +const pendingBlock = await publicClient.getBlockWithTxHashes({ + block_tag: 'pending', +}); -console.log(specVersion); \ No newline at end of file +// Now TypeScript should infer this is a PendingBlock +console.log(pendingBlock); \ No newline at end of file diff --git a/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts b/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts index 93ff165..d7e750e 100644 --- a/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts +++ b/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts @@ -7,6 +7,11 @@ import type { Chain } from '../../types/chain.js' import type { Hash } from '../../types/misc.js' import type { RequestErrorType } from '../../utils/buildRequest.js' +/** + * Parameters for the `getBlockWithTxHashes` action. + * + * @public + */ export type GetBlockWithTxHashesParameters = | { /** Hash of the block. */ @@ -27,7 +32,12 @@ export type GetBlockWithTxHashesParameters = block_tag?: BlockTag | undefined } -export type GetBlockWithTxHashesReturnType = Block | PendingBlock +/** + * The return type for the `getBlockWithTxHashes` action. + * + * @public + */ +export type GetBlockWithTxHashesReturnType = T extends { block_tag: 'pending' } ? PendingBlock : Block export type GetBlockWithTxHashesErrorType = RequestErrorType | ErrorType @@ -53,20 +63,23 @@ export type GetBlockWithTxHashesErrorType = RequestErrorType | ErrorType * }) * const count = await getBlockWithTxHashes(client) */ -export async function getBlockWithTxHashes( +export async function getBlockWithTxHashes< + TChain extends Chain | undefined, + TParams extends GetBlockWithTxHashesParameters +>( client: Client, - { block_hash, block_number, block_tag }: GetBlockWithTxHashesParameters = {}, -): Promise { + parameters: TParams = {} as TParams, +): Promise> { // Simplified block_id determination - const block_id = block_hash - ? { block_hash } - : block_number - ? { block_number } - : (block_tag ?? 'latest') + const block_id = parameters.block_hash + ? { block_hash: parameters.block_hash } + : parameters.block_number + ? { block_number: parameters.block_number } + : (parameters.block_tag ?? 'latest') // Directly return the result of the client request return await client.request({ method: 'starknet_getBlockWithTxHashes', params: { block_id }, }) -} +} \ No newline at end of file diff --git a/packages/starkweb/src/clients/decorators/public.ts b/packages/starkweb/src/clients/decorators/public.ts index 50572b6..17d27a9 100644 --- a/packages/starkweb/src/clients/decorators/public.ts +++ b/packages/starkweb/src/clients/decorators/public.ts @@ -264,28 +264,53 @@ import type { Abi } from '../../strk-types/abi.js' export type PublicActions = { /** - * Returns the number of the most recent block seen. + * Executes a call to a contract function. * - * - Docs: https://strk.sh/docs/actions/public/getBlockNumber - * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks - * - JSON-RPC Methods: [`starknet_blockNumber`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) + * - Docs: https://starkweb.xyz/docs/actions/public/call + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/contracts/calling-contracts + * - JSON-RPC Methods: [`starknet_call`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_call) * * @param args - {@link CallParameters} - * @returns The number of the block. {@link CallReturnType} + * @returns The call result. {@link CallReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const blockNumber = await client.call() - * // 69420n + * const result = await client.call({ + * contractAddress: '0x...', + * entrypoint: 'balanceOf', + * calldata: ['0x...'] + * }) */ call: (args: CallParameters) => Promise + /** + * Returns the balance of an account. + * + * - Docs: https://starkweb.xyz/docs/actions/public/getBalance + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/accounts/fetching-balance + * - JSON-RPC Methods: [`starknet_getBalance`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getbalance) + * + * @param args - {@link GetBalanceParameters} + * @returns The balance. {@link GetBalanceReturnTypes} + * + * @example + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' + * + * const client = createPublicClient({ + * chain: mainnet, + * transport: http(), + * }) + * const balance = await client.getBalance({ + * address: '0x...', + * }) + */ getBalance: ( args: GetBalanceParameters, ) => Promise @@ -293,7 +318,7 @@ export type PublicActions = { /** * Returns the number of the most recent block seen. * - * - Docs: https://strk.sh/docs/actions/public/getBlockNumber + * - Docs: https://starkweb.xyz/docs/actions/public/getBlockNumber * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks * - JSON-RPC Methods: [`starknet_blockNumber`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) * @@ -301,8 +326,8 @@ export type PublicActions = { * @returns The number of the block. {@link GetBlockNumberReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -318,7 +343,7 @@ export type PublicActions = { /** * Returns the block with transaction hashes. * - * - Docs: https://strk.sh/docs/actions/public/getBlockWithTxHashes + * - Docs: https://starkweb.xyz/docs/actions/public/getBlockWithTxHashes * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks-with-tx-hashes * - JSON-RPC Methods: [`starknet_getBlockWithTxHashes`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getblockwithtxhashes) * @@ -326,8 +351,8 @@ export type PublicActions = { * @returns The block with transaction hashes. {@link GetBlockWithTxHashesReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -339,10 +364,11 @@ export type PublicActions = { getBlockWithReceipts: ( args?: GetBlockWithReceiptsParameters | undefined, ) => Promise + /** * Returns the block with transaction hashes. * - * - Docs: https://strk.sh/docs/actions/public/getBlockWithTxHashes + * - Docs: https://starkweb.xyz/docs/actions/public/getBlockWithTxHashes * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks-with-tx-hashes * - JSON-RPC Methods: [`starknet_getBlockWithTxHashes`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getblockwithtxhashes) * @@ -350,8 +376,8 @@ export type PublicActions = { * @returns The block with transaction hashes. {@link GetBlockWithTxHashesReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -363,35 +389,36 @@ export type PublicActions = { getBlockWithTxs: ( args?: GetBlockWithTxsParameters | undefined, ) => Promise + /** * Returns the block with transactions. * - * - Docs: https://strk.sh/docs/actions/public/getBlockWithTxHashes - * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks-with-tx-hashes - * - JSON-RPC Methods: [`starknet_getBlockWithTxHashes`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getblockwithtxhashes) + * - Docs: https://starkweb.xyz/docs/actions/public/getBlockWithTxs + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-blocks-with-txs + * - JSON-RPC Methods: [`starknet_getBlockWithTxs`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getblockwithtxs) * - * @param args - {@link GetBlockWithTxHashesParameters} - * @returns The block with transaction hashes. {@link GetBlockWithTxHashesReturnType} + * @param args - {@link GetBlockWithTxsParameters} + * @returns The block with transactions. {@link GetBlockWithTxsReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const blockWithTxHashes = await client.getBlockWithTxHashes({ blockNumber: 12345 }) - * // { blockNumber: 12345, transactions: ['0x...', '0x...'] } + * const blockWithTxs = await client.getBlockWithTxs({ blockNumber: 12345 }) + * // { blockNumber: 12345, transactions: [{...}, {...}] } */ - getBlockWithTxHashes: ( - args?: GetBlockWithTxHashesParameters | undefined, - ) => Promise + getBlockWithTxHashes: ( + args?: TParams | undefined, + ) => Promise> /** * Returns the class at a specific address. * - * - Docs: https://strk.sh/docs/actions/public/getClassAt + * - Docs: https://starkweb.xyz/docs/actions/public/getClassAt * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/classes/fetching-class-at * - JSON-RPC Methods: [`starknet_getClassAt`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getclassat) * @@ -399,8 +426,8 @@ export type PublicActions = { * @returns The class at the specified address. {@link GetClassAtReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -414,15 +441,15 @@ export type PublicActions = { /** * Returns the spec version. * - * - Docs: https://strk.sh/docs/actions/public/getSpecVersion + * - Docs: https://starkweb.xyz/docs/actions/public/getSpecVersion * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/spec/fetching-spec-version * - JSON-RPC Methods: [`starknet_getSpecVersion`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getspecversion) * * @returns The spec version. {@link GetSpecVersionReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -436,15 +463,15 @@ export type PublicActions = { /** * Returns the chain ID. * - * - Docs: https://strk.sh/docs/actions/public/getChainId + * - Docs: https://starkweb.xyz/docs/actions/public/getChainId * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/chains/fetching-chain-id * - JSON-RPC Methods: [`starknet_chainId`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_chainid) * * @returns The chain ID. {@link GetChainIdReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, @@ -458,101 +485,110 @@ export type PublicActions = { /** * Returns the block state update. * - * - Docs: https://strk.sh/docs/actions/public/getBlockStateUpdate + * - Docs: https://starkweb.xyz/docs/actions/public/getBlockStateUpdate * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/blocks/fetching-block-state-update * - JSON-RPC Methods: [`starknet_getBlockStateUpdate`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getblockstateupdate) * * @param args - {@link GetBlockStateUpdateParameters} * @returns The block state update. {@link GetBlockStateUpdateReturnType} * + * @example + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' + * + * const client = createPublicClient({ + * chain: mainnet, + * transport: http(), + * }) + * const blockStateUpdate = await client.getBlockStateUpdate({ blockNumber: 12345 }) */ getBlockStateUpdate: ( args: GetBlockStateUpdateParameters, ) => Promise /** - * Returns the transaction by hash. + * Returns the storage value at a specific key. * - * - Docs: https://strk.sh/docs/actions/public/getTransactionByHash - * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-by-hash - * - JSON-RPC Methods: [`starknet_getTransactionByHash`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) + * - Docs: https://starkweb.xyz/docs/actions/public/getStorageAt + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/storage/fetching-storage + * - JSON-RPC Methods: [`starknet_getStorageAt`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getstorageat) * - * @param args - {@link GetTransactionByHashParameters} - * @returns The transaction by hash. {@link GetTransactionByHashReturnTypes} + * @param args - {@link GetStorageAtParameters} + * @returns The storage value. {@link GetStorageAtReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const transactionByHash = await client.getTransactionByHash({ - * transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11', + * const storage = await client.getStorageAt({ + * contractAddress: '0x...', + * key: '0x...', * }) - * // { transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11' } */ getStorageAt: ( args: GetStorageAtParameters, ) => Promise + /** - * Returns the transaction by hash. + * Returns the transaction status. * - * - Docs: https://strk.sh/docs/actions/public/getTransactionByHash - * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-by-hash - * - JSON-RPC Methods: [`starknet_getTransactionByHash`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) + * - Docs: https://starkweb.xyz/docs/actions/public/getTransactionStatus + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-status + * - JSON-RPC Methods: [`starknet_getTransactionStatus`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_gettransactionstatus) * - * @param args - {@link GetTransactionByHashParameters} - * @returns The transaction by hash. {@link GetTransactionByHashReturnTypes} + * @param args - {@link GetTransactionStatusParameters} + * @returns The transaction status. {@link GetTransactionStatusReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const transactionByHash = await client.getTransactionByHash({ - * transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11', + * const status = await client.getTransactionStatus({ + * transactionHash: '0x...', * }) - * // { transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11' } */ - getTransactionByHash: ( - args: GetTransactionByHashParameters, - ) => Promise + getTransactionStatus: ( + args: GetTransactionStatusParameters, + ) => Promise + /** * Returns the transaction by hash. * - * - Docs: https://strk.sh/docs/actions/public/getTransactionByHash + * - Docs: https://starkweb.xyz/docs/actions/public/getTransactionByHash * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-by-hash - * - JSON-RPC Methods: [`starknet_getTransactionByHash`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) + * - JSON-RPC Methods: [`starknet_getTransactionByHash`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_gettransactionbyhash) * * @param args - {@link GetTransactionByHashParameters} - * @returns The transaction by hash. {@link GetTransactionByHashReturnTypes} + * @returns The transaction. {@link GetTransactionByHashReturnTypes} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const transactionByHash = await client.getTransactionByHash({ - * transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11', + * const transaction = await client.getTransactionByHash({ + * hash: '0x...', * }) - * // { transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11' } */ - getTransactionStatus: ( - args: GetTransactionStatusParameters, - ) => Promise + getTransactionByHash: ( + args: GetTransactionByHashParameters, + ) => Promise /** * Returns the transaction receipt. * - * - Docs: https://strk.sh/docs/actions/public/getTransactionReceipt + * - Docs: https://starkweb.xyz/docs/actions/public/getTransactionReceipt * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-receipt * - JSON-RPC Methods: [`starknet_getTransactionReceipt`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_gettransactionreceipt) * @@ -560,53 +596,52 @@ export type PublicActions = { * @returns The transaction receipt. {@link GetTransactionReceiptReturnType} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const transactionReceipt = await client.getTransactionReceipt({ - * transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11', + * const receipt = await client.getTransactionReceipt({ + * transactionHash: '0x...', * }) - * // { status: 'success', transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11' } */ getTransactionReceipt: ( args: GetTransactionReceiptParameters, ) => Promise /** - * Returns the transaction by block id and index. + * Returns the transaction by block ID and index. * - * - Docs: https://strk.sh/docs/actions/public/getTransactionByBlockIdAndIndex - * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-by-hash - * - JSON-RPC Methods: [`starknet_getTransactionByHash`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_blocknumber) + * - Docs: https://starkweb.xyz/docs/actions/public/getTransactionByBlockIdAndIndex + * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/transactions/fetching-transaction-by-block-id-and-index + * - JSON-RPC Methods: [`starknet_getTransactionByBlockIdAndIndex`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_gettransactionbyblockidandindex) * * @param args - {@link GetTransactionByBlockIdAndIndexParameters} - * @returns The transaction by block id and index. {@link GetTransactionByBlockIdAndIndexReturnTypes} + * @returns The transaction. {@link GetTransactionByBlockIdAndIndexReturnTypes} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const transactionByBlockIdAndIndex = await client.getTransactionByBlockIdAndIndex({ - * block_tag: 'latest', + * const transaction = await client.getTransactionByBlockIdAndIndex({ + * blockIdentifier: 12345, * index: 0, * }) - * // { transaction_hash: '0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11' } */ getTransactionByBlockIdAndIndex: ( args: GetTransactionByBlockIdAndIndexParameters, ) => Promise + /** * Returns the class. * - * - Docs: https://strk.sh/docs/actions/public/getClass + * - Docs: https://starkweb.xyz/docs/actions/public/getClass * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/classes/fetching-class * - JSON-RPC Methods: [`starknet_getClass`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getclass) * @@ -614,22 +649,23 @@ export type PublicActions = { * @returns The class. {@link GetClassReturnTypes} * * @example - * import { createPublicClient, http } from 'strk' - * import { mainnet } from 'strk/chains' + * import { createPublicClient, http } from 'starkweb' + * import { mainnet } from 'starkweb/chains' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) - * const class = await client.getClass({ classHash: '0x...' }) - * // { classHash: '0x...', abi: [...] } + * const class = await client.getClass({ + * classHash: '0x...', + * }) */ getClass: (args: GetClassParameters) => Promise /** * Returns the class hash at a specific address. * - * - Docs: https://strk.sh/docs/actions/public/getClassHashAt + * - Docs: https://starkweb.xyz/docs/actions/public/getClassHashAt * - Examples: https://stackblitz.com/github/wevm/starkweb/tree/main/examples/classes/fetching-class-hash-at * - JSON-RPC Methods: [`starknet_getClassHashAt`](https://docs.starknet.io/api-references/json-rpc-api-reference#starknet_getclasshashat) * diff --git a/packages/starkweb/src/core/actions/getBlockWithTxHashes.ts b/packages/starkweb/src/core/actions/getBlockWithTxHashes.ts index a22cbdf..082d8e4 100644 --- a/packages/starkweb/src/core/actions/getBlockWithTxHashes.ts +++ b/packages/starkweb/src/core/actions/getBlockWithTxHashes.ts @@ -16,7 +16,7 @@ export type GetBlockWithTxHashesParameters = Evaluate< >; export type GetBlockWithTxHashesReturnType = Evaluate< - strkjs_GetBlockWithTxHashesReturnType & { + strkjs_GetBlockWithTxHashesReturnType & { chainId: Hex; } >; From ad9f32a5ffad93956b04a211162eafdfe3801536 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Wed, 26 Feb 2025 12:26:07 +0100 Subject: [PATCH 4/8] response resolution --- app/starkweb-client/src/index.ts | 9 ++------ .../actions/public/getBlockWithReceipts.ts | 20 ++++++++-------- .../actions/public/getBlockWithTxHashes.ts | 5 ++-- .../src/actions/public/getBlockWithTxs.ts | 23 ++++++++++--------- .../starkweb/src/clients/decorators/public.ts | 12 +++++----- .../src/core/actions/getBlockWithTxs.ts | 2 +- 6 files changed, 34 insertions(+), 37 deletions(-) diff --git a/app/starkweb-client/src/index.ts b/app/starkweb-client/src/index.ts index 4305f2b..2ef3cdb 100644 --- a/app/starkweb-client/src/index.ts +++ b/app/starkweb-client/src/index.ts @@ -14,10 +14,5 @@ const publicClient = createPublicClient({ transport: http(), }); -// Use 'as const' to let TypeScript know this is a literal 'pending' value -const pendingBlock = await publicClient.getBlockWithTxHashes({ - block_tag: 'pending', -}); - -// Now TypeScript should infer this is a PendingBlock -console.log(pendingBlock); \ No newline at end of file +const block = await publicClient.getBlockWithReceipts({ block_tag: 'latest' }); +console.log(block); \ No newline at end of file diff --git a/packages/starkweb/src/actions/public/getBlockWithReceipts.ts b/packages/starkweb/src/actions/public/getBlockWithReceipts.ts index a64d6e3..ae78f62 100644 --- a/packages/starkweb/src/actions/public/getBlockWithReceipts.ts +++ b/packages/starkweb/src/actions/public/getBlockWithReceipts.ts @@ -1,7 +1,7 @@ +import type { BLOCK_WITH_RECEIPTS, PENDING_BLOCK_WITH_RECEIPTS } from '../../types/components.js' import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { ErrorType } from '../../errors/utils.js' -import type { Block, PendingBlock } from '../../strk-types/provider.js' import type { BlockTag } from '../../types/block.js' import type { Chain } from '../../types/chain.js' import type { Hash } from '../../types/misc.js' @@ -27,7 +27,7 @@ export type GetBlockWithReceiptsParameters = block_tag?: BlockTag | undefined } -export type GetBlockWithReceiptsReturnType = Block | PendingBlock +export type GetBlockWithReceiptsReturnType = T extends { block_tag: 'pending' } ? PENDING_BLOCK_WITH_RECEIPTS : T extends { block_tag: 'latest' } ? BLOCK_WITH_RECEIPTS : BLOCK_WITH_RECEIPTS | PENDING_BLOCK_WITH_RECEIPTS export type GetBlockWithReceiptsErrorType = RequestErrorType | ErrorType @@ -53,16 +53,16 @@ export type GetBlockWithReceiptsErrorType = RequestErrorType | ErrorType * }) * const count = await getBlockWithReceipts(client) */ -export async function getBlockWithReceipts( +export async function getBlockWithReceipts( client: Client, - { block_hash, block_number, block_tag }: GetBlockWithReceiptsParameters = {}, -): Promise { + parameters: TParams = {} as TParams, +): Promise> { // Simplified block_id determination - const block_id = block_hash - ? { block_hash } - : block_number - ? { block_number } - : (block_tag ?? 'latest') + const block_id = parameters.block_hash + ? { block_hash: parameters.block_hash } + : parameters.block_number + ? { block_number: parameters.block_number } + : { block_tag: parameters.block_tag ?? 'latest' } // Directly return the result of the client request return await client.request({ diff --git a/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts b/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts index d7e750e..3316da6 100644 --- a/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts +++ b/packages/starkweb/src/actions/public/getBlockWithTxHashes.ts @@ -1,3 +1,4 @@ +import type { BlockNotFoundErrorType } from '../../errors/block.js' import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { ErrorType } from '../../errors/utils.js' @@ -37,9 +38,9 @@ export type GetBlockWithTxHashesParameters = * * @public */ -export type GetBlockWithTxHashesReturnType = T extends { block_tag: 'pending' } ? PendingBlock : Block +export type GetBlockWithTxHashesReturnType = T extends { block_tag: 'pending' } ? PendingBlock : T extends { block_tag: 'latest' } ? Block : Block | PendingBlock -export type GetBlockWithTxHashesErrorType = RequestErrorType | ErrorType +export type GetBlockWithTxHashesErrorType = RequestErrorType | ErrorType | BlockNotFoundErrorType /** * Returns the number of Transactions at a block number, hash, or tag. diff --git a/packages/starkweb/src/actions/public/getBlockWithTxs.ts b/packages/starkweb/src/actions/public/getBlockWithTxs.ts index 0f7eb73..80d22f1 100644 --- a/packages/starkweb/src/actions/public/getBlockWithTxs.ts +++ b/packages/starkweb/src/actions/public/getBlockWithTxs.ts @@ -1,11 +1,12 @@ import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { ErrorType } from '../../errors/utils.js' -import type { Block, PendingBlock } from '../../strk-types/provider.js' import type { BlockTag } from '../../types/block.js' import type { Chain } from '../../types/chain.js' import type { Hash } from '../../types/misc.js' import type { RequestErrorType } from '../../utils/buildRequest.js' +import type { BLOCK_WITH_TXS, PENDING_BLOCK_WITH_TXS } from '../../types/components.js' +import type { BlockNotFoundErrorType } from '../../errors/block.js' export type GetBlockWithTxsParameters = | { @@ -27,9 +28,9 @@ export type GetBlockWithTxsParameters = block_tag?: BlockTag | undefined } -export type GetBlockWithTxsReturnType = Block | PendingBlock +export type GetBlockWithTxsReturnType = T extends { block_tag: 'pending' } ? PENDING_BLOCK_WITH_TXS : T extends { block_tag: 'latest' } ? BLOCK_WITH_TXS : BLOCK_WITH_TXS | PENDING_BLOCK_WITH_TXS -export type GetBlockWithTxsErrorType = RequestErrorType | ErrorType +export type GetBlockWithTxsErrorType = RequestErrorType | ErrorType | BlockNotFoundErrorType /** * Returns the block with transactions. @@ -53,16 +54,16 @@ export type GetBlockWithTxsErrorType = RequestErrorType | ErrorType * }) * const count = await getBlockWithTxs(client) */ -export async function getBlockWithTxs( +export async function getBlockWithTxs( client: Client, - { block_hash, block_number, block_tag }: GetBlockWithTxsParameters = {}, -): Promise { + parameters: TParams = {} as TParams, +): Promise> { // Simplified block_id determination - const block_id = block_hash - ? { block_hash } - : block_number - ? { block_number } - : (block_tag ?? 'latest') + const block_id = parameters.block_hash + ? { block_hash: parameters.block_hash } + : parameters.block_number + ? { block_number: parameters.block_number } + : (parameters.block_tag ?? 'latest') // Directly return the result of the client request return await client.request({ diff --git a/packages/starkweb/src/clients/decorators/public.ts b/packages/starkweb/src/clients/decorators/public.ts index 17d27a9..c37ec7d 100644 --- a/packages/starkweb/src/clients/decorators/public.ts +++ b/packages/starkweb/src/clients/decorators/public.ts @@ -361,9 +361,9 @@ export type PublicActions = { * const blockWithTxHashes = await client.getBlockWithTxHashes({ blockNumber: 12345 }) * // { blockNumber: 12345, transactions: ['0x...', '0x...'] } */ - getBlockWithReceipts: ( - args?: GetBlockWithReceiptsParameters | undefined, - ) => Promise + getBlockWithReceipts: ( + args?: TParams | undefined, + ) => Promise> /** * Returns the block with transaction hashes. @@ -386,9 +386,9 @@ export type PublicActions = { * const blockWithTxHashes = await client.getBlockWithTxHashes({ blockNumber: 12345 }) * // { blockNumber: 12345, transactions: ['0x...', '0x...'] } */ - getBlockWithTxs: ( - args?: GetBlockWithTxsParameters | undefined, - ) => Promise + getBlockWithTxs: ( + args?: TParams | undefined, + ) => Promise> /** * Returns the block with transactions. diff --git a/packages/starkweb/src/core/actions/getBlockWithTxs.ts b/packages/starkweb/src/core/actions/getBlockWithTxs.ts index d44af39..f57a1c9 100644 --- a/packages/starkweb/src/core/actions/getBlockWithTxs.ts +++ b/packages/starkweb/src/core/actions/getBlockWithTxs.ts @@ -16,7 +16,7 @@ export type GetBlockWithTxsParameters = Evaluate< >; export type GetBlockWithTxsReturnType = Evaluate< - strkjs_GetBlockWithTxsReturnType & { + strkjs_GetBlockWithTxsReturnType & { chainId: Hex; } >; From e917a1e960ac475073da06f1d1c07f962f2d1904 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Wed, 26 Feb 2025 13:13:35 +0100 Subject: [PATCH 5/8] type validation --- app/starkweb-client/src/index.ts | 6 ++-- .../src/actions/public/getBlockStateUpdate.ts | 30 +++++++++---------- .../actions/public/getBlockWithReceipts.ts | 4 ++- .../starkweb/src/clients/decorators/public.ts | 6 ++-- .../src/core/actions/getBlockStateUpdate.ts | 12 ++++---- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/app/starkweb-client/src/index.ts b/app/starkweb-client/src/index.ts index 2ef3cdb..d58366b 100644 --- a/app/starkweb-client/src/index.ts +++ b/app/starkweb-client/src/index.ts @@ -14,5 +14,7 @@ const publicClient = createPublicClient({ transport: http(), }); -const block = await publicClient.getBlockWithReceipts({ block_tag: 'latest' }); -console.log(block); \ No newline at end of file +const block = await publicClient.getBlockStateUpdate({ + block_tag: 'latest', +}); +console.log(block.state_diff); \ No newline at end of file diff --git a/packages/starkweb/src/actions/public/getBlockStateUpdate.ts b/packages/starkweb/src/actions/public/getBlockStateUpdate.ts index 194a3eb..a996df3 100644 --- a/packages/starkweb/src/actions/public/getBlockStateUpdate.ts +++ b/packages/starkweb/src/actions/public/getBlockStateUpdate.ts @@ -1,3 +1,4 @@ +import type { PENDING_STATE_UPDATE, STATE_UPDATE } from '../../types/components.js' import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { ErrorType } from '../../errors/utils.js' @@ -26,29 +27,26 @@ export type GetBlockStateUpdateParameters = block_tag?: BlockTag | undefined } -export type GetBlockStateUpdateReturnType = any +export type GetBlockStateUpdateReturnType = T extends { block_tag: 'pending' } ? PENDING_STATE_UPDATE : T extends { block_tag: 'latest' } ? STATE_UPDATE : STATE_UPDATE | PENDING_STATE_UPDATE + export type GetBlockStateUpdateErrorType = RequestErrorType | ErrorType -export async function getBlockStateUpdate( +export async function getBlockStateUpdate( client: Client, - { - block_hash, - block_number, - block_tag = 'latest', - }: GetBlockStateUpdateParameters, -): Promise { - const block_id = block_hash - ? { block_hash } - : block_number - ? { block_number } - : (block_tag ?? 'latest') - const blockStateUpdate = await client.request( + parameters: TParams = {} as TParams, +): Promise> { + const block_id = parameters.block_hash + ? { block_hash: parameters.block_hash } + : parameters.block_number + ? { block_number: parameters.block_number } + : parameters.block_tag + ? parameters.block_tag + : 'latest' + return await client.request( { method: 'starknet_getStateUpdate', params: { block_id }, }, { dedupe: Boolean(block_id) }, ) - - return blockStateUpdate } diff --git a/packages/starkweb/src/actions/public/getBlockWithReceipts.ts b/packages/starkweb/src/actions/public/getBlockWithReceipts.ts index ae78f62..7de7a4c 100644 --- a/packages/starkweb/src/actions/public/getBlockWithReceipts.ts +++ b/packages/starkweb/src/actions/public/getBlockWithReceipts.ts @@ -62,7 +62,9 @@ export async function getBlockWithReceipts Promise + getBlockStateUpdate: ( + args?: TParams | undefined, + ) => Promise> /** * Returns the storage value at a specific key. diff --git a/packages/starkweb/src/core/actions/getBlockStateUpdate.ts b/packages/starkweb/src/core/actions/getBlockStateUpdate.ts index c33aa76..ce58747 100644 --- a/packages/starkweb/src/core/actions/getBlockStateUpdate.ts +++ b/packages/starkweb/src/core/actions/getBlockStateUpdate.ts @@ -15,18 +15,18 @@ export type GetBlockStateUpdateParameters = Evaluate< strkjs_GetBlockStateUpdateParameters & ChainIdParameter >; -export type GetBlockStateUpdateReturnType = Evaluate< - strkjs_GetBlockStateUpdateReturnType & { +export type GetBlockStateUpdateReturnType = Evaluate< + strkjs_GetBlockStateUpdateReturnType & { chainId: Hex; } >; export type GetBlockStateUpdateErrorType = strkjs_GetBlockStateUpdateErrorType; -export async function getBlockStateUpdate( +export async function getBlockStateUpdate( config: Config, - parameters: GetBlockStateUpdateParameters -): Promise { + parameters: TParams = {} as TParams, +): Promise> { const { chainId, ...rest } = parameters; const client = config.getClient({ chainId }); const action = getAction( @@ -34,5 +34,5 @@ export async function getBlockStateUpdate( strkjs_getBlockStateUpdate, 'getBlockStateUpdate' ); - return action(rest) as unknown as Promise; + return action(rest as strkjs_GetBlockStateUpdateParameters) as unknown as Promise>; } \ No newline at end of file From cb55ef05dde70d779fc59d191ba15f833e28bcec Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Wed, 26 Feb 2025 17:13:15 +0100 Subject: [PATCH 6/8] added starknet rpc errors --- packages/starkweb/src/errors/starkerror.ts | 154 +++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 packages/starkweb/src/errors/starkerror.ts diff --git a/packages/starkweb/src/errors/starkerror.ts b/packages/starkweb/src/errors/starkerror.ts new file mode 100644 index 0000000..0ff5dcd --- /dev/null +++ b/packages/starkweb/src/errors/starkerror.ts @@ -0,0 +1,154 @@ +import { BaseError } from './base.js' + +export type ClassHashNotFoundErrorType = ClassHashNotFoundError & { + name: 'ClassHashNotFoundError' +} +export class ClassHashNotFoundError extends BaseError { + override name = 'ClassHashNotFoundError' + constructor({ classHash }: { classHash: string }) { + super(`Class hash "${classHash}" not found.`) + } +} + +export type ClassAlreadyDeclaredErrorType = ClassAlreadyDeclaredError & { + name: 'ClassAlreadyDeclaredError' +} +export class ClassAlreadyDeclaredError extends BaseError { + override name = 'ClassAlreadyDeclaredError' + constructor({ classHash }: { classHash: string }) { + super(`Class with hash "${classHash}" already declared.`) + } +} + +export type InvalidTransactionNonceErrorType = InvalidTransactionNonceError & { + name: 'InvalidTransactionNonceError' +} +export class InvalidTransactionNonceError extends BaseError { + override name = 'InvalidTransactionNonceError' + constructor({ nonce }: { nonce: string | number }) { + super(`Invalid transaction nonce "${nonce}".`) + } +} + +export type InsufficientMaxFeeErrorType = InsufficientMaxFeeError & { + name: 'InsufficientMaxFeeError' +} +export class InsufficientMaxFeeError extends BaseError { + override name = 'InsufficientMaxFeeError' + constructor({ maxFee }: { maxFee: string | number }) { + super(`Max fee "${maxFee}" is smaller than the minimal transaction cost (validation plus fee transfer).`) + } +} + +export type InsufficientAccountBalanceErrorType = InsufficientAccountBalanceError & { + name: 'InsufficientAccountBalanceError' +} +export class InsufficientAccountBalanceError extends BaseError { + override name = 'InsufficientAccountBalanceError' + constructor({ address, balance, maxFee }: { address: string; balance?: string | number; maxFee?: string | number }) { + const message = balance !== undefined && maxFee !== undefined + ? `Account "${address}" balance "${balance}" is smaller than the transaction's max_fee "${maxFee}".` + : `Account "${address}" has insufficient balance for the transaction.` + super(message) + } +} + +export type ValidationFailureErrorType = ValidationFailureError & { + name: 'ValidationFailureError' +} +export class ValidationFailureError extends BaseError { + override name = 'ValidationFailureError' + data?: string + constructor({ address, data }: { address: string; data?: string }) { + super(`Account validation failed for address "${address}".`) + this.data = data + } +} + +export type CompilationFailedErrorType = CompilationFailedError & { + name: 'CompilationFailedError' +} +export class CompilationFailedError extends BaseError { + override name = 'CompilationFailedError' + constructor({ contractAddress }: { contractAddress?: string } = {}) { + const message = contractAddress + ? `Compilation failed for contract at address "${contractAddress}".` + : 'Compilation failed.' + super(message) + } +} + +export type ContractClassSizeTooLargeErrorType = ContractClassSizeTooLargeError & { + name: 'ContractClassSizeTooLargeError' +} +export class ContractClassSizeTooLargeError extends BaseError { + override name = 'ContractClassSizeTooLargeError' + constructor({ classHash }: { classHash?: string } = {}) { + const message = classHash + ? `Contract class size for class hash "${classHash}" is too large.` + : 'Contract class size is too large.' + super(message) + } +} + +export type NonAccountErrorType = NonAccountError & { + name: 'NonAccountError' +} +export class NonAccountError extends BaseError { + override name = 'NonAccountError' + constructor({ address }: { address: string }) { + super(`Sender address "${address}" is not an account contract.`) + } +} + +export type DuplicateTxErrorType = DuplicateTxError & { + name: 'DuplicateTxError' +} +export class DuplicateTxError extends BaseError { + override name = 'DuplicateTxError' + constructor({ txHash }: { txHash: string }) { + super(`A transaction with hash "${txHash}" already exists in the mempool.`) + } +} + +export type CompiledClassHashMismatchErrorType = CompiledClassHashMismatchError & { + name: 'CompiledClassHashMismatchError' +} +export class CompiledClassHashMismatchError extends BaseError { + override name = 'CompiledClassHashMismatchError' + constructor({ expected, actual }: { expected: string; actual: string }) { + super(`The compiled class hash "${actual}" did not match the one supplied in the transaction "${expected}".`) + } +} + +export type UnsupportedTxVersionErrorType = UnsupportedTxVersionError & { + name: 'UnsupportedTxVersionError' +} +export class UnsupportedTxVersionError extends BaseError { + override name = 'UnsupportedTxVersionError' + constructor({ version }: { version: string | number }) { + super(`The transaction version "${version}" is not supported.`) + } +} + +export type UnsupportedContractClassVersionErrorType = UnsupportedContractClassVersionError & { + name: 'UnsupportedContractClassVersionError' +} +export class UnsupportedContractClassVersionError extends BaseError { + override name = 'UnsupportedContractClassVersionError' + constructor({ version }: { version: string | number }) { + super(`The contract class version "${version}" is not supported.`) + } +} + +export type UnexpectedErrorType = UnexpectedError & { + name: 'UnexpectedError' +} +export class UnexpectedError extends BaseError { + override name = 'UnexpectedError' + data?: string + constructor({ message, data }: { message?: string; data?: string } = {}) { + super(message || 'An unexpected error occurred.') + this.data = data + } +} From 641102577255896eff6b52dec3298269d7152d24 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Thu, 27 Feb 2025 14:49:26 +0100 Subject: [PATCH 7/8] writeContract --- app/next/pages/index.tsx | 18 +- app/next/pages/wallet.tsx | 268 ++++ app/next/utils/abi/strk.ts | 1122 +++++++++++++++++ app/starkweb-client/src/index.ts | 2 + .../actions/wallet/addInvokeTransaction.ts | 8 +- .../src/actions/wallet/getPermissions.ts | 11 +- .../src/actions/wallet/writeContract.ts | 21 +- .../src/actions/wallet/writeContracts.ts | 2 +- .../starkweb/src/clients/decorators/wallet.ts | 2 +- .../src/core/actions/writeContract.ts | 8 +- .../starkweb/src/core/query/writeContract.ts | 2 +- 11 files changed, 1425 insertions(+), 39 deletions(-) create mode 100644 app/next/pages/wallet.tsx create mode 100644 app/next/utils/abi/strk.ts diff --git a/app/next/pages/index.tsx b/app/next/pages/index.tsx index 5451dbd..4f8c1aa 100644 --- a/app/next/pages/index.tsx +++ b/app/next/pages/index.tsx @@ -3,8 +3,8 @@ import type { NextPage } from 'next'; import dynamic from 'next/dynamic'; import { useAccount, useBalance, useBlockNumber, useChainId, useConfig, useConnect, useConnectorClient, useDisconnect, useSwitchAccount, useSwitchChain } from 'starkweb/react'; -import { useState, useEffect } from 'react'; import { useTheme } from 'next-themes'; +import Link from 'next/link'; const Connect = dynamic( () => import('../components/Connect').then(mod => mod.Connect), @@ -12,22 +12,24 @@ const Connect = dynamic( ); const Home: NextPage = () => { - const [mounted, setMounted] = useState(false); const { theme, setTheme } = useTheme(); - useEffect(() => { - setMounted(true); - }, []); - - if (!mounted) return null; return (
+ +
+

Your Wallet

+ +
+ + + + +
+
+
+ ); +}; + +export default Wallet; + +function Card({ title, children }: { title: string; children: React.ReactNode }) { + return ( +
+

{title}

+ {children} +
+ ); +} + +function WalletBalanceCard() { + const { address } = useAccount(); + const { data: balance } = useBalance({ address }); + + return ( + +
+ {balance?.formatted || '0.00'} +
+
+ {balance?.symbol || 'ETH'} +
+
+ ); +} + +function WalletInfoCard() { + const account = useAccount(); + const network = { + name: 'Sepolia', + id: '0x534e5000', + } + + return ( + +
+
+ Address: +
+ {account.address || 'Not connected'} +
+
+
+ Network: {network?.name || 'Unknown'} +
+
+ Status: + + {account.status || 'disconnected'} + +
+
+
+ ); +} + +function SendTransactionCard({ + recipient, + setRecipient, + amount, + setAmount +}: { + recipient: string; + setRecipient: (value: string) => void; + amount: string; + setAmount: (value: string) => void; +}) { + const [isPending, setIsPending] = useState(false); + const [isError, setIsError] = useState(false); + const [error, setError] = useState(null); + const { writeContractAsync } = useWriteContract(); + + const sendTransaction = useCallback(async (tx: { to: string; value: number }) => { + setIsPending(true); + setIsError(false); + setError(null); + + try { + await writeContractAsync({ + address: '0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D', + abi: erc20Abi, + functionName: 'transfer', + args: { + recipient: recipient as 'contract_address', + amount: { + high: parseFloat(amount), + low: 0, + } as unknown as 'u256', + } + }); + + console.log('Sending transaction:', tx); + // await new Promise(r => setTimeout(r, 1000)); // Simulate network delay + + return { hash: '0x' + Math.random().toString(16).substring(2) }; + } catch (e) { + const err = e instanceof Error ? e : new Error('Transaction failed'); + setIsError(true); + setError(err); + throw err; + } finally { + setIsPending(false); + } + }, [recipient, amount, writeContractAsync]); + + const handleSend = async () => { + if (!recipient || !amount) return; + + try { + await sendTransaction({ + to: recipient, + value: parseFloat(amount), + }); + + // Reset form on success + setRecipient(''); + setAmount(''); + } catch (e) { + console.error(e); + } + }; + + return ( + +
+
+ + setRecipient(e.target.value)} + className="w-full p-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white" + placeholder="0x..." + /> +
+ +
+ + setAmount(e.target.value)} + className="w-full p-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white" + placeholder="0.0" + /> +
+ + + + {isError && ( +
+ {error?.message || 'Error sending transaction'} +
+ )} +
+
+ ); +} + +function TransactionHistoryCard() { + // Note: This would normally fetch transaction history from an API or blockchain + // For now, using mock data + const transactions = [ + { id: '1', type: 'Send', amount: '0.05 ETH', to: '0x1234...5678', date: '2023-06-15' }, + { id: '2', type: 'Receive', amount: '0.2 ETH', from: '0x8765...4321', date: '2023-06-10' }, + { id: '3', type: 'Send', amount: '0.01 ETH', to: '0x5678...9012', date: '2023-06-05' }, + ]; + + return ( + + {transactions.length > 0 ? ( +
+ {transactions.map((tx) => ( +
+
+ + {tx.type} + + {tx.amount} +
+
+ {tx.type === 'Send' ? `To: ${tx.to}` : `From: ${tx.from}`} • {tx.date} +
+
+ ))} +
+ ) : ( +
+ No transactions found +
+ )} +
+ ); +} \ No newline at end of file diff --git a/app/next/utils/abi/strk.ts b/app/next/utils/abi/strk.ts new file mode 100644 index 0000000..eb73cf9 --- /dev/null +++ b/app/next/utils/abi/strk.ts @@ -0,0 +1,1122 @@ +export const erc20Abi = [ + { + "type": "impl", + "name": "LockingContract", + "interface_name": "src::mintable_lock_interface::ILockingContract" + }, + { + "type": "interface", + "name": "src::mintable_lock_interface::ILockingContract", + "items": [ + { + "type": "function", + "name": "set_locking_contract", + "inputs": [ + { + "name": "locking_contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_locking_contract", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "LockAndDelegate", + "interface_name": "src::mintable_lock_interface::ILockAndDelegate" + }, + { + "type": "struct", + "name": "core::integer::u256", + "members": [ + { + "name": "low", + "type": "core::integer::u128" + }, + { + "name": "high", + "type": "core::integer::u128" + } + ] + }, + { + "type": "interface", + "name": "src::mintable_lock_interface::ILockAndDelegate", + "items": [ + { + "type": "function", + "name": "lock_and_delegate", + "inputs": [ + { + "name": "delegatee", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "lock_and_delegate_by_sig", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "delegatee", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + }, + { + "name": "nonce", + "type": "core::felt252" + }, + { + "name": "expiry", + "type": "core::integer::u64" + }, + { + "name": "signature", + "type": "core::array::Array::" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "MintableToken", + "interface_name": "src::mintable_token_interface::IMintableToken" + }, + { + "type": "interface", + "name": "src::mintable_token_interface::IMintableToken", + "items": [ + { + "type": "function", + "name": "permissioned_mint", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "permissioned_burn", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "MintableTokenCamelImpl", + "interface_name": "src::mintable_token_interface::IMintableTokenCamel" + }, + { + "type": "interface", + "name": "src::mintable_token_interface::IMintableTokenCamel", + "items": [ + { + "type": "function", + "name": "permissionedMint", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "permissionedBurn", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "Replaceable", + "interface_name": "src::replaceability_interface::IReplaceable" + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "src::replaceability_interface::EICData", + "members": [ + { + "name": "eic_hash", + "type": "core::starknet::class_hash::ClassHash" + }, + { + "name": "eic_init_data", + "type": "core::array::Span::" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "src::replaceability_interface::EICData" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "src::replaceability_interface::ImplementationData", + "members": [ + { + "name": "impl_hash", + "type": "core::starknet::class_hash::ClassHash" + }, + { + "name": "eic_data", + "type": "core::option::Option::" + }, + { + "name": "final", + "type": "core::bool" + } + ] + }, + { + "type": "interface", + "name": "src::replaceability_interface::IReplaceable", + "items": [ + { + "type": "function", + "name": "get_upgrade_delay", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u64" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_impl_activation_time", + "inputs": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData" + } + ], + "outputs": [ + { + "type": "core::integer::u64" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "add_new_implementation", + "inputs": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "remove_implementation", + "inputs": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "replace_to", + "inputs": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "AccessControlImplExternal", + "interface_name": "src::access_control_interface::IAccessControl" + }, + { + "type": "interface", + "name": "src::access_control_interface::IAccessControl", + "items": [ + { + "type": "function", + "name": "has_role", + "inputs": [ + { + "name": "role", + "type": "core::felt252" + }, + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_role_admin", + "inputs": [ + { + "name": "role", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "RolesImpl", + "interface_name": "src::roles_interface::IMinimalRoles" + }, + { + "type": "interface", + "name": "src::roles_interface::IMinimalRoles", + "items": [ + { + "type": "function", + "name": "is_governance_admin", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_upgrade_governor", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "register_governance_admin", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "remove_governance_admin", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_upgrade_governor", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "remove_upgrade_governor", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "renounce", + "inputs": [ + { + "name": "role", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "ERC20Impl", + "interface_name": "openzeppelin::token::erc20::interface::IERC20" + }, + { + "type": "interface", + "name": "openzeppelin::token::erc20::interface::IERC20", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "total_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balance_of", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_from", + "inputs": [ + { + "name": "sender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "ERC20CamelOnlyImpl", + "interface_name": "openzeppelin::token::erc20::interface::IERC20CamelOnly" + }, + { + "type": "interface", + "name": "openzeppelin::token::erc20::interface::IERC20CamelOnly", + "items": [ + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "constructor", + "name": "constructor", + "inputs": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "symbol", + "type": "core::felt252" + }, + { + "name": "decimals", + "type": "core::integer::u8" + }, + { + "name": "initial_supply", + "type": "core::integer::u256" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "permitted_minter", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "provisional_governance_admin", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "upgrade_delay", + "type": "core::integer::u64" + } + ] + }, + { + "type": "function", + "name": "increase_allowance", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "added_value", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "decrease_allowance", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "subtracted_value", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "addedValue", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "subtractedValue", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "event", + "name": "src::strk::erc20_lockable::ERC20Lockable::Transfer", + "kind": "struct", + "members": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "value", + "type": "core::integer::u256", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::strk::erc20_lockable::ERC20Lockable::Approval", + "kind": "struct", + "members": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "value", + "type": "core::integer::u256", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::replaceability_interface::ImplementationAdded", + "kind": "struct", + "members": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::replaceability_interface::ImplementationRemoved", + "kind": "struct", + "members": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::replaceability_interface::ImplementationReplaced", + "kind": "struct", + "members": [ + { + "name": "implementation_data", + "type": "src::replaceability_interface::ImplementationData", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::replaceability_interface::ImplementationFinalized", + "kind": "struct", + "members": [ + { + "name": "impl_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::access_control_interface::RoleGranted", + "kind": "struct", + "members": [ + { + "name": "role", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "sender", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::access_control_interface::RoleRevoked", + "kind": "struct", + "members": [ + { + "name": "role", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "sender", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::access_control_interface::RoleAdminChanged", + "kind": "struct", + "members": [ + { + "name": "role", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "previous_admin_role", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "new_admin_role", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::roles_interface::GovernanceAdminAdded", + "kind": "struct", + "members": [ + { + "name": "added_account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "added_by", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::roles_interface::GovernanceAdminRemoved", + "kind": "struct", + "members": [ + { + "name": "removed_account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "removed_by", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::roles_interface::UpgradeGovernorAdded", + "kind": "struct", + "members": [ + { + "name": "added_account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "added_by", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::roles_interface::UpgradeGovernorRemoved", + "kind": "struct", + "members": [ + { + "name": "removed_account", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "removed_by", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "src::strk::erc20_lockable::ERC20Lockable::Event", + "kind": "enum", + "variants": [ + { + "name": "Transfer", + "type": "src::strk::erc20_lockable::ERC20Lockable::Transfer", + "kind": "nested" + }, + { + "name": "Approval", + "type": "src::strk::erc20_lockable::ERC20Lockable::Approval", + "kind": "nested" + }, + { + "name": "ImplementationAdded", + "type": "src::replaceability_interface::ImplementationAdded", + "kind": "nested" + }, + { + "name": "ImplementationRemoved", + "type": "src::replaceability_interface::ImplementationRemoved", + "kind": "nested" + }, + { + "name": "ImplementationReplaced", + "type": "src::replaceability_interface::ImplementationReplaced", + "kind": "nested" + }, + { + "name": "ImplementationFinalized", + "type": "src::replaceability_interface::ImplementationFinalized", + "kind": "nested" + }, + { + "name": "RoleGranted", + "type": "src::access_control_interface::RoleGranted", + "kind": "nested" + }, + { + "name": "RoleRevoked", + "type": "src::access_control_interface::RoleRevoked", + "kind": "nested" + }, + { + "name": "RoleAdminChanged", + "type": "src::access_control_interface::RoleAdminChanged", + "kind": "nested" + }, + { + "name": "GovernanceAdminAdded", + "type": "src::roles_interface::GovernanceAdminAdded", + "kind": "nested" + }, + { + "name": "GovernanceAdminRemoved", + "type": "src::roles_interface::GovernanceAdminRemoved", + "kind": "nested" + }, + { + "name": "UpgradeGovernorAdded", + "type": "src::roles_interface::UpgradeGovernorAdded", + "kind": "nested" + }, + { + "name": "UpgradeGovernorRemoved", + "type": "src::roles_interface::UpgradeGovernorRemoved", + "kind": "nested" + } + ] + } + ] as const; \ No newline at end of file diff --git a/app/starkweb-client/src/index.ts b/app/starkweb-client/src/index.ts index d58366b..104f747 100644 --- a/app/starkweb-client/src/index.ts +++ b/app/starkweb-client/src/index.ts @@ -5,6 +5,8 @@ // Import from the starkweb workspace package import { createPublicClient, + createWalletClient, + custom, http, } from 'starkweb'; import { sepolia } from 'starkweb/chains'; diff --git a/packages/starkweb/src/actions/wallet/addInvokeTransaction.ts b/packages/starkweb/src/actions/wallet/addInvokeTransaction.ts index 415ee83..225b422 100644 --- a/packages/starkweb/src/actions/wallet/addInvokeTransaction.ts +++ b/packages/starkweb/src/actions/wallet/addInvokeTransaction.ts @@ -3,13 +3,7 @@ import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { Account } from '../../types/account.js' import type { Chain } from '../../types/chain.js' -// @ts-ignore -import type { API_VERSION, FELT, INVOKE_CALL } from '../../types/components.js' - -// export type AddInvokeTransactionParameters = { -// invoke_transaction: INVOKE_CALL -// api_version?: API_VERSION -// } +import type { FELT } from '../../types/components.js' export type Call = { contract_address: Address diff --git a/packages/starkweb/src/actions/wallet/getPermissions.ts b/packages/starkweb/src/actions/wallet/getPermissions.ts index 3f8c29e..c2de4c6 100644 --- a/packages/starkweb/src/actions/wallet/getPermissions.ts +++ b/packages/starkweb/src/actions/wallet/getPermissions.ts @@ -2,20 +2,19 @@ import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { Account } from '../../types/account.js' import type { Chain } from '../../types/chain.js' -import type { API_VERSION } from '../../types/components.js' +import type { API_VERSION, PERMISSION } from '../../types/components.js' +import type { UnexpectedErrorType } from '../../errors/starkerror.js' +import type { API_VERSION_NOT_SUPPORTED } from '@starknet-io/types-js' export type GetPermissionsParameters = { api_version?: API_VERSION } export type GetPermissionsReturnType = { - permissions: string[] + result: PERMISSION[] | [] } -export type GetPermissionsErrorType = { - code: number - message: string -} +export type GetPermissionsErrorType = UnexpectedErrorType| API_VERSION_NOT_SUPPORTED export async function getPermissions< TChain extends Chain | undefined, diff --git a/packages/starkweb/src/actions/wallet/writeContract.ts b/packages/starkweb/src/actions/wallet/writeContract.ts index fd46b48..1b1b88d 100644 --- a/packages/starkweb/src/actions/wallet/writeContract.ts +++ b/packages/starkweb/src/actions/wallet/writeContract.ts @@ -1,6 +1,6 @@ import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' -import type { Abi, AbiStateMutability } from '../../strk-types/abi.js' +import type { Abi } from '../../strk-types/abi.js' import { compile } from '../../strk-utils/calldata/compile.js' import type { Account } from '../../types/account.js' import type { Chain } from '../../types/chain.js' @@ -8,29 +8,28 @@ import type { ContractFunctionArgs, ContractFunctionName, ContractFunctionParameters, -} from '../../types/contract.js' +} from '../../abi/parser.js' import { type Call, addInvokeTransaction } from './addInvokeTransaction.js' export type WriteContractParameters< abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName< abi, - AbiStateMutability - > = ContractFunctionName, + 'external' + > = ContractFunctionName, args extends ContractFunctionArgs< abi, - AbiStateMutability, + 'external', functionName - > = ContractFunctionArgs, + > = ContractFunctionArgs, /// - allFunctionNames = ContractFunctionName, + allFunctionNames = ContractFunctionName, > = ContractFunctionParameters< abi, - AbiStateMutability, + 'external', functionName, - args, - false, - allFunctionNames + allFunctionNames, + args > export type WriteContractReturnTypes = any diff --git a/packages/starkweb/src/actions/wallet/writeContracts.ts b/packages/starkweb/src/actions/wallet/writeContracts.ts index 966b205..78acba8 100644 --- a/packages/starkweb/src/actions/wallet/writeContracts.ts +++ b/packages/starkweb/src/actions/wallet/writeContracts.ts @@ -1,4 +1,4 @@ -import type { ContractFunctionArgs, ContractFunctionName } from '../../types/contract.js' +import type { ContractFunctionArgs, ContractFunctionName } from '../../abi/parser.js' import type { Client } from '../../clients/createClient.js' import type { Transport } from '../../clients/transports/createTransport.js' import type { Abi } from '../../strk-types/abi.js' diff --git a/packages/starkweb/src/clients/decorators/wallet.ts b/packages/starkweb/src/clients/decorators/wallet.ts index 99f9ac5..0472179 100644 --- a/packages/starkweb/src/clients/decorators/wallet.ts +++ b/packages/starkweb/src/clients/decorators/wallet.ts @@ -96,7 +96,7 @@ import type { Abi } from '../../strk-types/abi.js' import type { ContractFunctionArgs, ContractFunctionName, -} from '../../types/contract.js' +} from '../../abi/parser.js' export type WalletActions = { addDeclareTransaction: ( diff --git a/packages/starkweb/src/core/actions/writeContract.ts b/packages/starkweb/src/core/actions/writeContract.ts index fe999d7..f78226f 100644 --- a/packages/starkweb/src/core/actions/writeContract.ts +++ b/packages/starkweb/src/core/actions/writeContract.ts @@ -9,12 +9,12 @@ import { import type { Config } from '../createConfig.js' import type { ChainIdParameter, ConnectorParameter } from '../types/properties.js' import { getAction } from '../utils/getAction.js' -import type { ContractFunctionArgs } from '../../types/contract.js' -import type { ContractFunctionName } from '../../types/contract.js' +import type { ContractFunctionArgs, ContractFunctionName } from '../../abi/parser.js' import type { UnionCompute } from '../types/utils.js' import type { Chain } from '../../types/chain.js' import type { SelectChains } from '../types/chain.js' import type { Compute } from '../types/utils.js' +import { getConnectorClient } from './getConnectorClient.js' export type WriteContractParameters< @@ -55,7 +55,7 @@ export type WriteContractReturnType = starkweb_WriteContractReturnTypes export type WriteContractErrorType = starkweb_WriteContractErrorType /** https://starkweb.xyz/core/api/actions/writeContract */ -export function writeContract< +export async function writeContract< abi extends Abi | readonly unknown[], functionName extends ContractFunctionName = ContractFunctionName, args extends ContractFunctionArgs = ContractFunctionArgs, @@ -64,7 +64,7 @@ export function writeContract< parameters: WriteContractParameters, ): Promise { const { chainId, ...rest } = parameters - const client = config.getClient({ chainId }) + const client = await getConnectorClient(config, { connector: parameters.connector }) const action = getAction(client, starkweb_writeContract, 'writeContract') return action({ ...rest, diff --git a/packages/starkweb/src/core/query/writeContract.ts b/packages/starkweb/src/core/query/writeContract.ts index 594e52b..75157ed 100644 --- a/packages/starkweb/src/core/query/writeContract.ts +++ b/packages/starkweb/src/core/query/writeContract.ts @@ -7,7 +7,7 @@ import { } from '../actions/writeContract.js' import type { Config } from '../createConfig.js' import type { Compute } from '../types/utils.js' -import type { ContractFunctionArgs, ContractFunctionName } from '../../types/contract.js' +import type { ContractFunctionArgs, ContractFunctionName } from '../../abi/parser.js' import type { Abi } from '../../strk-types/abi.js' export function writeContractMutationOptions< From 323b0807cf9da363ae2e47d3c06f0f977eb94f43 Mon Sep 17 00:00:00 2001 From: Musa AbdulKareem Date: Thu, 27 Feb 2025 15:01:27 +0100 Subject: [PATCH 8/8] writeContracts --- .../starkweb/src/core/actions/writeContracts.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/starkweb/src/core/actions/writeContracts.ts b/packages/starkweb/src/core/actions/writeContracts.ts index 4e5dd99..1576558 100644 --- a/packages/starkweb/src/core/actions/writeContracts.ts +++ b/packages/starkweb/src/core/actions/writeContracts.ts @@ -1,30 +1,29 @@ -// @ts-nocheck import { type WriteContractsErrorType as strkjs_WriteContractsErrorType, type WriteContractsParameters as strkjs_WriteContractsParameters, type WriteContractsReturnTypes as strkjs_WriteContractsReturnTypes, writeContracts as strkjs_writeContracts, - } from 'strkjs/actions' + } from '../../actions/index.js' import type { Config } from '../createConfig.js' - import type { ChainIdParameter } from '../types/properties.js' + import type { ChainIdParameter, ConnectorParameter } from '../types/properties.js' import { getAction } from '../utils/getAction.js' - + import { getConnectorClient } from './getConnectorClient.js' export type WriteContractsParameters = strkjs_WriteContractsParameters & - ChainIdParameter + ChainIdParameter & ConnectorParameter export type WriteContractsReturnType = strkjs_WriteContractsReturnTypes export type WriteContractsErrorType = strkjs_WriteContractsErrorType /** https://starkweb.xyz/core/api/actions/writeContracts */ - export function writeContracts( + export async function writeContracts( config: Config, parameters: WriteContractsParameters, ): Promise { const { chainId, ...rest } = parameters - const client = config.getClient({ chainId }) + const client = await getConnectorClient(config, { connector: parameters.connector }) const action = getAction(client, strkjs_writeContracts, 'writeContracts') - return action({ ...rest, client }) as Promise + return action({ ...rest }) as Promise } \ No newline at end of file