{"_id":"@alephium/walletconnect-ethereum-provider","_rev":"5-b1d4ec5336131fd7e0d1c7d19e6fb806","name":"@alephium/walletconnect-ethereum-provider","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@alephium/walletconnect-ethereum-provider","version":"0.1.0","keywords":["wallet","walletconnect"],"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","_id":"@alephium/walletconnect-ethereum-provider@0.1.0","maintainers":[{"name":"mikapote","email":"m.vaivre@gmail.com"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"alephium-personal","email":"dev@alephium.org"}],"homepage":"https://github.com/alephium/walletconnect-ethereum-provider/","bugs":{"url":"https://github.com/alephium/walletconnect-ethereum-provider/issues"},"dist":{"shasum":"018ced05d4c6956bb4e6de6582e94faf56d0eb3e","tarball":"https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.0.tgz","fileCount":64,"integrity":"sha512-AxiGIFpU0imQKvM5Ok0awX//f2j6eU+6o8opve6WMx2ydOizVPBWkVnV36bkMYb9IPexMt/Y6hgUiHcPmsIPVg==","signatures":[{"sig":"MEUCIFhD7GEkq3gR5iIauM4Z3NkmFJq2nKuxReI3fpxIiQb6AiEAsZdE24+L/JOHvgYsd7MNI8vFsq2N/nHDzYcK5edMoK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5831701},"main":"dist/index.cjs.js","types":"dist/types/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.es.js","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"gitHead":"4a1dba6ebd583d029552f7c936a7c6c3df9d83e7","scripts":{"lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","test":"npm run test:pre; vitest run --dir test","build":"npm run build:pre; npm run build:source; npm run build:types","clean":"rm -rf dist","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'","test:pre":"rm -rf ./test/tmp && mkdir ./test/tmp","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js"},"_npmUser":{"name":"alephium-personal","email":"dev@alephium.org"},"repository":{"url":"git+https://github.com/alephium/walletconnect-ethereum-provider.git","type":"git","directory":"."},"_npmVersion":"8.19.4","description":"Ethereum Provider for WalletConnect Protocol","directories":{},"_nodeVersion":"16.20.2","dependencies":{"events":"^3.3.0","@walletconnect/modal":"2.4.3","@walletconnect/types":"2.10.6","@walletconnect/utils":"2.10.6","@walletconnect/logger":"^2.0.1","@walletconnect/sign-client":"2.10.6","@walletconnect/jsonrpc-types":"^1.0.2","@walletconnect/jsonrpc-utils":"^1.0.7","@walletconnect/jsonrpc-provider":"1.0.13","@walletconnect/jsonrpc-http-connection":"^1.0.7"},"_hasShrinkwrap":false,"devDependencies":{"web3":"1.7.5","ethers":"5.7.0","rollup":"2.78.0","vitest":"^0.22.1","typescript":"4.7.4","uint8arrays":"^3.0.0","@types/lodash":"^4.14.202","cosmos-wallet":"^1.2.0","ethereum-test-network":"0.1.6","rollup-plugin-esbuild":"4.9.3","@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/walletconnect-ethereum-provider_0.1.0_1702367655413_0.2814346245410615","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@alephium/walletconnect-ethereum-provider","version":"0.1.1","keywords":["wallet","walletconnect"],"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","_id":"@alephium/walletconnect-ethereum-provider@0.1.1","maintainers":[{"name":"mikapote","email":"m.vaivre@gmail.com"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"alephium-personal","email":"dev@alephium.org"}],"homepage":"https://github.com/alephium/walletconnect-ethereum-provider/","bugs":{"url":"https://github.com/alephium/walletconnect-ethereum-provider/issues"},"dist":{"shasum":"f753e752e4b0e69227145c1a698f6b73e9d1f2fc","tarball":"https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.1.tgz","fileCount":64,"integrity":"sha512-nCIOTsTbGF1zIZic+LHKn/DGfE9aumvh0aGW192SHLRRbF09kIniZlmArwTgJ3U351vpd+dj5j9Vr/DGitNCIQ==","signatures":[{"sig":"MEUCIAar8dbdoDRqYBEBZmkKYgvgHMn7UfyEofvI//0jwUi/AiEAucBPatKSoWW2gt8hdD2q4xRCUpB4kwOirYc3zMKTVRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5833858},"main":"dist/index.cjs.js","types":"dist/types/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.es.js","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"gitHead":"80d548a9c98619b48695f19e0d2e2ce0378f20b7","scripts":{"lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","test":"npm run test:pre; vitest run --dir test","build":"npm run build:pre; npm run build:source; npm run build:types","clean":"rm -rf dist","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'","test:pre":"rm -rf ./test/tmp && mkdir ./test/tmp","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js"},"_npmUser":{"name":"alephium-personal","email":"dev@alephium.org"},"repository":{"url":"git+https://github.com/alephium/walletconnect-ethereum-provider.git","type":"git","directory":"."},"_npmVersion":"8.19.4","description":"Ethereum Provider for WalletConnect Protocol","directories":{},"_nodeVersion":"16.20.2","dependencies":{"events":"^3.3.0","@walletconnect/modal":"2.4.3","@walletconnect/types":"2.10.6","@walletconnect/utils":"2.10.6","@walletconnect/logger":"^2.0.1","@walletconnect/sign-client":"2.10.6","@walletconnect/jsonrpc-types":"^1.0.2","@walletconnect/jsonrpc-utils":"^1.0.7","@walletconnect/jsonrpc-provider":"1.0.13","@walletconnect/jsonrpc-http-connection":"^1.0.7"},"_hasShrinkwrap":false,"devDependencies":{"web3":"1.7.5","ethers":"5.7.0","rollup":"2.78.0","vitest":"^0.22.1","typescript":"4.7.4","uint8arrays":"^3.0.0","@types/lodash":"^4.14.202","cosmos-wallet":"^1.2.0","ethereum-test-network":"0.1.6","rollup-plugin-esbuild":"4.9.3","@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/walletconnect-ethereum-provider_0.1.1_1702643523990_0.06753210718292957","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@alephium/walletconnect-ethereum-provider","version":"0.1.2","keywords":["wallet","walletconnect"],"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","_id":"@alephium/walletconnect-ethereum-provider@0.1.2","maintainers":[{"name":"alephium-personal","email":"dev@alephium.org"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"mikapote","email":"m.vaivre@gmail.com"}],"homepage":"https://github.com/alephium/walletconnect-ethereum-provider/","bugs":{"url":"https://github.com/alephium/walletconnect-ethereum-provider/issues"},"dist":{"shasum":"0a6ce4e3ef2a6c4a1b060740b618bf99af856f72","tarball":"https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.2.tgz","fileCount":64,"integrity":"sha512-UQ5cb3sPLm7dz8KQ04ksoL0brYD8eM0uOVsodUXKMV0yImrIvmLrVUQcpqa6xb35E043U5JcNFLHaaBOpkE40A==","signatures":[{"sig":"MEQCIAiPwVDPqNgaN049JFxQv0cZr3aN3CiQFgTHJY7gZs8xAiAstdpDsq1REY+Kh9NwrInjSukMi/5HanKFv+C/4dbKkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6569570},"main":"dist/index.cjs.js","types":"dist/types/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.es.js","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"gitHead":"fe9eb7038bc8847a4e10b83b5f441e9250473070","scripts":{"lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","test":"npm run test:pre; vitest run --dir test","build":"npm run build:pre; npm run build:source; npm run build:types","clean":"rm -rf dist","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'","test:pre":"rm -rf ./test/tmp && mkdir ./test/tmp","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js"},"_npmUser":{"name":"alephium-personal","email":"dev@alephium.org"},"repository":{"url":"git+https://github.com/alephium/walletconnect-ethereum-provider.git","type":"git","directory":"."},"_npmVersion":"8.19.4","description":"Ethereum Provider for WalletConnect Protocol","directories":{},"_nodeVersion":"16.20.2","dependencies":{"events":"^3.3.0","@walletconnect/modal":"2.4.3","@walletconnect/types":"2.15.1","@walletconnect/utils":"2.15.1","@walletconnect/logger":"^2.1.2","@walletconnect/sign-client":"2.15.1","@walletconnect/jsonrpc-types":"^1.0.4","@walletconnect/jsonrpc-utils":"^1.0.8","@walletconnect/jsonrpc-provider":"1.0.14","@walletconnect/jsonrpc-http-connection":"^1.0.8"},"_hasShrinkwrap":false,"devDependencies":{"web3":"1.7.5","ethers":"5.7.0","rollup":"2.78.0","vitest":"^0.22.1","typescript":"4.7.4","uint8arrays":"^3.0.0","@types/lodash":"^4.14.202","cosmos-wallet":"^1.2.0","ethereum-test-network":"0.1.6","rollup-plugin-esbuild":"4.9.3","@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/walletconnect-ethereum-provider_0.1.2_1733729087870_0.5528500605158213","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@alephium/walletconnect-ethereum-provider","version":"0.1.3","keywords":["wallet","walletconnect"],"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","_id":"@alephium/walletconnect-ethereum-provider@0.1.3","maintainers":[{"name":"alephium-personal","email":"dev@alephium.org"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"mikapote","email":"m.vaivre@gmail.com"}],"homepage":"https://github.com/alephium/walletconnect-ethereum-provider/","bugs":{"url":"https://github.com/alephium/walletconnect-ethereum-provider/issues"},"dist":{"shasum":"d3799f8a1506ca8f4bbebf169b1ce153cada9f95","tarball":"https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.3.tgz","fileCount":64,"integrity":"sha512-mP2/2m54U6NmCKakh+b0f7T1kwhk33jyAHGy6RBcl8OaARMBjhZY0o4CwAH4FJxixzcvmQ2a9ZvFOY6ojcKmmg==","signatures":[{"sig":"MEUCIHJ4VUk/Y+caVvOA8P+ARMOGBpSiye6/TGHabkHbqkNPAiEAk/Kl6Jr2A65Ozyac/5m1SIXB6KW1UMgc7iWby5D/Ymg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7850346},"main":"dist/index.cjs.js","types":"dist/types/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.es.js","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"gitHead":"a70431d1962d6ea5e6e1552c0539909f27442053","scripts":{"lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","test":"npm run test:pre; vitest run --dir test","build":"npm run build:pre; npm run build:source; npm run build:types","clean":"rm -rf dist","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'","test:pre":"rm -rf ./test/tmp && mkdir ./test/tmp","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js"},"_npmUser":{"name":"alephium-personal","email":"dev@alephium.org"},"repository":{"url":"git+https://github.com/alephium/walletconnect-ethereum-provider.git","type":"git","directory":"."},"_npmVersion":"8.19.4","description":"Ethereum Provider for WalletConnect Protocol","directories":{},"_nodeVersion":"16.20.2","dependencies":{"events":"^3.3.0","@walletconnect/modal":"2.4.3","@walletconnect/types":"2.17.2","@walletconnect/utils":"2.17.2","@walletconnect/logger":"^2.1.2","@walletconnect/sign-client":"2.17.2","@walletconnect/jsonrpc-types":"^1.0.4","@walletconnect/jsonrpc-utils":"^1.0.8","@walletconnect/jsonrpc-provider":"^1.0.14","@walletconnect/jsonrpc-http-connection":"^1.0.8"},"_hasShrinkwrap":false,"devDependencies":{"web3":"1.7.5","ethers":"5.7.0","rollup":"2.78.0","vitest":"^0.22.1","typescript":"4.7.4","uint8arrays":"^3.0.0","@types/lodash":"^4.14.202","cosmos-wallet":"^1.2.0","@rollup/plugin-json":"^6.1.0","ethereum-test-network":"0.1.6","rollup-plugin-esbuild":"4.9.3","@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/walletconnect-ethereum-provider_0.1.3_1735016827678_0.426650869256912","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@alephium/walletconnect-ethereum-provider","description":"Ethereum Provider for WalletConnect Protocol","version":"0.2.0","author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"homepage":"https://github.com/walletconnect/walletconnect-monorepo/","repository":{"type":"git","url":"git+https://github.com/WalletConnect/walletconnect-monorepo.git","directory":"providers/ethereum-provider"},"license":"SEE LICENSE IN LICENSE.md","main":"dist/index.cjs","module":"dist/index.js","unpkg":"dist/index.umd.js","types":"dist/types/index.d.ts","react-native":"dist/index.native.js","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.js","default":"./dist/index.cjs"}},"keywords":["wallet","walletconnect"],"scripts":{"clean":"rm -rf dist","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js","build":"npm run build:pre; npm run build:source; npm run build:types","test:pre":"rm -rf ./test/test.db","test:run":"vitest run --dir test","test":"npm run test:pre; npm run test:run","test:ignoreUnhandled":"npm run test:pre; npm run test:run -- --dangerouslyIgnoreUnhandledErrors","lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'"},"dependencies":{"@reown/appkit":"1.8.9","@walletconnect/jsonrpc-http-connection":"1.0.8","@walletconnect/jsonrpc-provider":"1.0.14","@walletconnect/jsonrpc-types":"1.0.4","@walletconnect/jsonrpc-utils":"1.0.8","@walletconnect/keyvaluestorage":"1.1.1","@walletconnect/sign-client":"2.22.4","@walletconnect/types":"2.22.4","@alephium/walletconnect-universal-provider":"0.2.0","@walletconnect/utils":"2.22.4","@walletconnect/logger":"3.0.0","events":"3.3.0"},"devDependencies":{"hardhat":"^3.0.6","ethers":"6.15.0","@rollup/plugin-alias":"^5.1.1","uint8arrays":"3.1.0","web3":"4.16.0"},"_id":"@alephium/walletconnect-ethereum-provider@0.2.0","gitHead":"b1e0d0061ffcf89ede7ffa939a05f0eef17d0dc7","bugs":{"url":"https://github.com/WalletConnect/walletconnect-monorepo/issues"},"_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-L3a690reNkoppkZP3zEdsP9YUwawwCWEzeTf9OrZftxFo/FkeeEjjSVUPWWPpDO1VMv4kMr+Rq4bKrGqjO8dxg==","shasum":"1fac505b066c8eaa0cf52f4684d7beaf04c7778f","tarball":"https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.2.0.tgz","fileCount":30,"unpackedSize":13357320,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGBUY8GJgfrFvSS/NMHIf4Ce/U1JlDIsq7Nz6thmebTnAiEAp7KwRhmIceUUQB19j8Hl/HwpZDKFTbenTRcZu0AGxjo="}]},"_npmUser":{"name":"alephium-personal","email":"dev@alephium.org"},"directories":{},"maintainers":[{"name":"alephium-personal","email":"dev@alephium.org"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"mikapote","email":"m.vaivre@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/walletconnect-ethereum-provider_0.2.0_1761811771418_0.9360777539377705"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-12T07:54:15.313Z","modified":"2025-10-30T08:09:32.014Z","0.1.0":"2023-12-12T07:54:15.637Z","0.1.1":"2023-12-15T12:32:04.269Z","0.1.2":"2024-12-09T07:24:48.086Z","0.1.3":"2024-12-24T05:07:07.917Z","0.2.0":"2025-10-30T08:09:31.726Z"},"bugs":{"url":"https://github.com/WalletConnect/walletconnect-monorepo/issues"},"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"SEE LICENSE IN LICENSE.md","homepage":"https://github.com/walletconnect/walletconnect-monorepo/","keywords":["wallet","walletconnect"],"repository":{"type":"git","url":"git+https://github.com/WalletConnect/walletconnect-monorepo.git","directory":"providers/ethereum-provider"},"description":"Ethereum Provider for WalletConnect Protocol","maintainers":[{"name":"alephium-personal","email":"dev@alephium.org"},{"name":"eyettea","email":"hlias.nop@gmail.com"},{"name":"mikapote","email":"m.vaivre@gmail.com"}],"readme":"# @walletconnect/ethereum-provider\n\nEthereum Provider for WalletConnect Protocol.\n\n## Installation\n\n```\nnpm i @walletconnect/ethereum-provider\n```\n\n## Initialization\n\n```typescript\nimport { EthereumProvider } from \"@walletconnect/ethereum-provider\";\n\nconst provider = await EthereumProvider.init({\n  projectId, // REQUIRED your projectId\n  chains, // DEPRECATED, use `optionalChains` instead\n  optionalChains, // REQUIRED optional chain ids e.g. 1 (Ethereum), 10 (Optimism), 42161 (Arbitrum)\n  showQrModal, // REQUIRED set to \"true\" to use @walletconnect/modal,\n  methods, // OPTIONAL ethereum methods\n  events, // OPTIONAL ethereum events\n  rpcMap, // OPTIONAL rpc urls for each chain\n  metadata, // OPTIONAL metadata of your app\n  storage, // OPTIONAL custom storage implementation\n  storageOptions, // OPTIONAL storage config options\n  qrModalOptions, // OPTIONAL - `undefined` by default\n});\n```\n\n## Display WalletConnectModal with QR code / Handle connection URI\n\n```typescript\n// WalletConnectModal is disabled by default, enable it during init() to display a QR code modal\nawait provider.connect({\n  chains, // OPTIONAL chain ids\n  rpcMap, // OPTIONAL rpc urls\n  pairingTopic, // OPTIONAL pairing topic\n});\n// or\nawait provider.enable();\n```\n\n```typescript\n// If you are not using WalletConnectModal,\n// you can subscribe to the `display_uri` event and handle the URI yourself.\nprovider.on(\"display_uri\", (uri: string) => {\n  // ... custom logic\n});\n\nawait provider.connect();\n// or\nawait provider.enable();\n```\n\n## Sending Requests\n\n```typescript\nconst result = await provider.request({ method: \"eth_requestAccounts\" });\n\n// OR\n\nprovider.sendAsync({ method: \"eth_requestAccounts\" }, CallBackFunction);\n```\n\n## Events\n\n```typescript\n// chain changed\nprovider.on(\"chainChanged\", handler);\n// accounts changed\nprovider.on(\"accountsChanged\", handler);\n// session established\nprovider.on(\"connect\", handler);\n// session event - chainChanged/accountsChanged/custom events\nprovider.on(\"session_event\", handler);\n// connection uri\nprovider.on(\"display_uri\", handler);\n// session disconnect\nprovider.on(\"disconnect\", handler);\n```\n\n## Supported WalletConnectModal options (qrModalOptions)\n\nPlease reference [up to date documentation](https://docs.walletconnect.com/2.0/web/web3modal/html/ethereum-provider/options) for `WalletConnectModal`\n\n## Usage with SSR Frameworks (e.g., Next.js)\n\nThe Ethereum Provider interacts with browser-specific APIs (like `window`, `document`, `localStorage`) which are not available during Server-Side Rendering (SSR). Attempting to import or initialize the provider directly in code that runs on the server will cause errors (e.g., `ReferenceError: HTMLElement is not defined`).\n\nTo use `@walletconnect/ethereum-provider` with frameworks like Next.js (using the App Router or Pages Router), you must ensure that the library is only imported and used on the client-side.\n\n**Recommended Approach (Next.js):**\n\n1.  **Isolate Usage:** Create a dedicated React component (e.g., `WalletConnectProvider.tsx` or `Web3Provider.tsx`) that handles the initialization and interaction with the `EthereumProvider`. Mark this component as a Client Component using the `\"use client\";` directive at the top of the file.\n2.  **Dynamic Import:** In the parent component (which could be a Server Component page or another Client Component), import your dedicated component dynamically with SSR disabled.\n\n**Example (`src/app/page.tsx` or similar):**\n\n```typescript\n// src/app/page.tsx (or your main layout/page)\n\"use client\"; // Required if the page itself uses the dynamic import directly\n\nimport dynamic from 'next/dynamic';\nimport { Suspense } from 'react'; // Optional: Add loading UI\n\n// Dynamically import the component that uses EthereumProvider\nconst WalletConnectLogic = dynamic(\n  () => import('@/components/WalletConnectLogic'), // Path to your client component\n  {\n    ssr: false, // This is crucial to prevent server-side execution\n    // Optional: Display a loading state while the component is loading\n    // loading: () => <p>Loading WalletConnect...</p>,\n  }\n);\n\nexport default function Home() {\n  return (\n    <div>\n      {/* Other page content */}\n      <Suspense fallback={<p>Loading WalletConnect...</p>}> {/* Optional Suspense boundary */}\n        <WalletConnectLogic />\n      </Suspense>\n      {/* Other page content */}\n    </div>\n  );\n}\n```\n\n**Example (`src/components/WalletConnectLogic.tsx`):**\n\n```typescript\n// src/components/WalletConnectLogic.tsx\n\"use client\"; // Mark this component as client-side only\n\nimport { EthereumProvider } from \"@walletconnect/ethereum-provider\";\nimport { useEffect, useState, useCallback } from \"react\";\n\n// Your WalletConnect Project ID\nconst projectId = process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!;\n\nlet provider: Awaited<ReturnType<typeof EthereumProvider.init>> | null = null;\n\nexport default function WalletConnectLogic() {\n  const [account, setAccount] = useState<string | null>(null);\n  // ... other state (isConnected, chainId, etc.)\n\n  const initialize = useCallback(async () => {\n    if (!projectId) {\n       throw new Error(\"Missing NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID\");\n    }\n    if (provider) return; // Already initialized\n\n    try {\n      provider = await EthereumProvider.init({\n        projectId: projectId,\n        optionalChains: [1, 10, 137], // Example chains\n        showQrModal: true,\n        metadata: { /* ... your metadata ... */ }\n        // ... other options\n      });\n\n      // --- Add event listeners ---\n      provider.on(\"connect\", (info: { chainId: string }) => {\n         console.log(\"connect\", info);\n         // Set initial account/chain state\n      });\n      provider.on(\"accountsChanged\", (accounts: string[]) => {\n         console.log(\"accountsChanged\", accounts);\n         setAccount(accounts[0] ?? null);\n      });\n      // ... other listeners (disconnect, chainChanged)\n\n      // Check for existing session\n      if (provider.session && provider.accounts.length > 0) {\n        setAccount(provider.accounts[0]);\n        // set chainId, isConnected etc.\n      }\n\n    } catch (error) {\n      console.error(\"Failed to initialize WalletConnect Provider\", error);\n    }\n  }, []);\n\n  useEffect(() => {\n    // Initialize provider on component mount (client-side)\n    initialize();\n\n    // Optional: Cleanup listeners on unmount\n    return () => {\n      // provider?.off(...);\n    };\n  }, [initialize]);\n\n  const connectWallet = useCallback(async () => {\n    if (!provider) {\n       console.error(\"Provider not initialized\");\n       return;\n    }\n    try {\n      await provider.connect();\n    } catch (error) {\n      console.error(\"Failed to connect:\", error);\n    }\n  }, []);\n\n  // ... other functions (disconnect, signMessage, etc.)\n\n  return (\n    <div>\n      {/* Your Connect/Disconnect buttons, account display, etc. */}\n      {!account ? (\n        <button onClick={connectWallet}>Connect Wallet</button>\n      ) : (\n        <p>Connected: {account}</p>\n      )}\n      {/* ... */}\n    </div>\n  );\n}\n\n```\n\nThis pattern ensures the provider code only runs in the browser, avoiding SSR compatibility issues. Similar approaches (lazy loading components that use browser APIs) exist for other SSR frameworks.","readmeFilename":"README.md"}