From 9beb9792e6c66dc95a28ee988d91b79ab8dcaa61 Mon Sep 17 00:00:00 2001 From: lbqds Date: Wed, 25 Dec 2024 18:44:15 +0800 Subject: [PATCH] Support switching between different EVM chains when using WalletConnect --- bridge_ui/package-lock.json | 1456 ++++++++--------- bridge_ui/package.json | 2 +- .../src/contexts/EthereumProviderContext.tsx | 17 +- bridge_ui/src/hooks/useIsWalletReady.ts | 45 +- 4 files changed, 757 insertions(+), 763 deletions(-) diff --git a/bridge_ui/package-lock.json b/bridge_ui/package-lock.json index 2cf74bf0..b26b2c82 100644 --- a/bridge_ui/package-lock.json +++ b/bridge_ui/package-lock.json @@ -9,7 +9,6 @@ "version": "0.1.0", "dependencies": { "@alephium/token-list": "0.0.12", - "@alephium/walletconnect-ethereum-provider": "0.1.1", "@alephium/walletconnect-qrcode-modal": "0.1.0", "@alephium/web3": "^1.11.0", "@alephium/web3-react": "^1.11.0", @@ -29,6 +28,7 @@ "@solana/wallet-adapter-wallets": "^0.16.1", "@solana/web3.js": "^1.35.1", "@terra-money/wallet-provider": "^3.8.0", + "@walletconnect/ethereum-provider": "2.17.2", "algosdk": "2.4.0", "axios": "^0.21.1", "bech32": "^1.1.4", @@ -166,337 +166,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/@alephium/walletconnect-ethereum-provider": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.1.tgz", - "integrity": "sha512-nCIOTsTbGF1zIZic+LHKn/DGfE9aumvh0aGW192SHLRRbF09kIniZlmArwTgJ3U351vpd+dj5j9Vr/DGitNCIQ==", - "dependencies": { - "@walletconnect/jsonrpc-http-connection": "^1.0.7", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "^1.0.2", - "@walletconnect/jsonrpc-utils": "^1.0.7", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/modal": "2.4.3", - "@walletconnect/sign-client": "2.10.6", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/core": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.6.tgz", - "integrity": "sha512-Z4vh4ZdfcoQjgPEOxeuF9HUZCVLtV3MgRbS/awLIj/omDrFnOwlBhxi5Syr4Y8muVGC0ocRetQYHae0/gX5crQ==", - "dependencies": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.14", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/heartbeat": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", - "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", - "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/time": "^1.0.2", - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/jsonrpc-provider": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", - "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/safe-json": "^1.0.2", - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/jsonrpc-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", - "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", - "dependencies": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/keyvaluestorage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", - "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", - "dependencies": { - "@walletconnect/safe-json": "^1.0.1", - "idb-keyval": "^6.2.1", - "unstorage": "^1.9.0" - }, - "peerDependencies": { - "@react-native-async-storage/async-storage": "1.x" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/modal": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.4.3.tgz", - "integrity": "sha512-YcvkfBN7qBdZk0juUxnbPsyA9n0v15PK+7vL55u1v1mgMhPosvUU2dMIcPqlan+TgSPByo7moEBbHtCbYZpLVw==", - "dependencies": { - "@web3modal/core": "2.4.3", - "@web3modal/ui": "2.4.3" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/safe-json": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", - "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/sign-client": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.6.tgz", - "integrity": "sha512-EvUWjaZBQu2yKnH5/5F2qzbuiIuUN9ZgrNKgvXkw5z1Dq5RJCks0S9/MFlKH/ZSGqXnLl7uAzBXtoX4sMgbCMA==", - "deprecated": "Reliability and performance greatly improved - please see https://github.com/WalletConnect/walletconnect-monorepo/releases", - "dependencies": { - "@walletconnect/core": "2.10.6", - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/types": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.6.tgz", - "integrity": "sha512-WgHfiTG1yakmxheaBRiXhUdEmgxwrvsAdOIWaMf/spvrzVKYh6sHI3oyEEky5qj5jjiMiyQBeB57QamzCotbcQ==", - "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "events": "^3.3.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/utils": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.6.tgz", - "integrity": "sha512-oRsWWhN2+hi3aiDXrQEOfysz6FHQJGXLsNQPVt+WIBJplO6Szmdau9dbleD88u1iiT4GKPqE0R9FOYvvPm1H/w==", - "dependencies": { - "@stablelib/chacha20poly1305": "1.0.1", - "@stablelib/hkdf": "1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/sha256": "1.0.1", - "@stablelib/x25519": "^1.0.3", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/window-getters": "^1.0.1", - "@walletconnect/window-metadata": "^1.0.1", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "^3.1.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/window-getters": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", - "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/@walletconnect/window-metadata": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", - "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", - "dependencies": { - "@walletconnect/window-getters": "^1.0.1", - "tslib": "1.14.1" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/detect-browser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", - "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "dependencies": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@alephium/walletconnect-ethereum-provider/node_modules/unstorage": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", - "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", - "dependencies": { - "anymatch": "^3.1.3", - "chokidar": "^3.6.0", - "citty": "^0.1.6", - "destr": "^2.0.3", - "h3": "^1.13.0", - "listhen": "^1.9.0", - "lru-cache": "^10.4.3", - "node-fetch-native": "^1.6.4", - "ofetch": "^1.4.1", - "ufo": "^1.5.4" - }, - "peerDependencies": { - "@azure/app-configuration": "^1.8.0", - "@azure/cosmos": "^4.2.0", - "@azure/data-tables": "^13.3.0", - "@azure/identity": "^4.5.0", - "@azure/keyvault-secrets": "^4.9.0", - "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3", - "@deno/kv": ">=0.8.4", - "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", - "@planetscale/database": "^1.19.0", - "@upstash/redis": "^1.34.3", - "@vercel/blob": ">=0.27.0", - "@vercel/kv": "^1.0.1", - "aws4fetch": "^1.0.20", - "db0": ">=0.2.1", - "idb-keyval": "^6.2.1", - "ioredis": "^5.4.1", - "uploadthing": "^7.4.1" - }, - "peerDependenciesMeta": { - "@azure/app-configuration": { - "optional": true - }, - "@azure/cosmos": { - "optional": true - }, - "@azure/data-tables": { - "optional": true - }, - "@azure/identity": { - "optional": true - }, - "@azure/keyvault-secrets": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@capacitor/preferences": { - "optional": true - }, - "@deno/kv": { - "optional": true - }, - "@netlify/blobs": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@vercel/blob": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "aws4fetch": { - "optional": true - }, - "db0": { - "optional": true - }, - "idb-keyval": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "uploadthing": { - "optional": true - } - } - }, "node_modules/@alephium/walletconnect-provider": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/@alephium/walletconnect-provider/-/walletconnect-provider-1.11.0.tgz", @@ -10647,6 +10316,187 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "license": "0BSD" }, + "node_modules/@walletconnect/ethereum-provider": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.17.2.tgz", + "integrity": "sha512-o4aL4KkUKT+n0iDwGzC6IY4bl+9n8bwOeT2KwifaVHsFw/irhtRPlsAQQH4ezOiPyk8cri1KN9dPk/YeU0pe6w==", + "dependencies": { + "@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/modal": "2.7.0", + "@walletconnect/sign-client": "2.17.2", + "@walletconnect/types": "2.17.2", + "@walletconnect/universal-provider": "2.17.2", + "@walletconnect/utils": "2.17.2", + "events": "3.3.0" + } + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/keyvaluestorage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", + "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", + "dependencies": { + "@walletconnect/safe-json": "^1.0.1", + "idb-keyval": "^6.2.1", + "unstorage": "^1.9.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "1.x" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } + } + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/ethereum-provider/node_modules/unstorage": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", + "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", + "dependencies": { + "anymatch": "^3.1.3", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "destr": "^2.0.3", + "h3": "^1.13.0", + "listhen": "^1.9.0", + "lru-cache": "^10.4.3", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.4.1", + "ufo": "^1.5.4" + }, + "peerDependencies": { + "@azure/app-configuration": "^1.8.0", + "@azure/cosmos": "^4.2.0", + "@azure/data-tables": "^13.3.0", + "@azure/identity": "^4.5.0", + "@azure/keyvault-secrets": "^4.9.0", + "@azure/storage-blob": "^12.26.0", + "@capacitor/preferences": "^6.0.3", + "@deno/kv": ">=0.8.4", + "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", + "@planetscale/database": "^1.19.0", + "@upstash/redis": "^1.34.3", + "@vercel/blob": ">=0.27.0", + "@vercel/kv": "^1.0.1", + "aws4fetch": "^1.0.20", + "db0": ">=0.2.1", + "idb-keyval": "^6.2.1", + "ioredis": "^5.4.1", + "uploadthing": "^7.4.1" + }, + "peerDependenciesMeta": { + "@azure/app-configuration": { + "optional": true + }, + "@azure/cosmos": { + "optional": true + }, + "@azure/data-tables": { + "optional": true + }, + "@azure/identity": { + "optional": true + }, + "@azure/keyvault-secrets": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@capacitor/preferences": { + "optional": true + }, + "@deno/kv": { + "optional": true + }, + "@netlify/blobs": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/blob": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "aws4fetch": { + "optional": true + }, + "db0": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "uploadthing": { + "optional": true + } + } + }, "node_modules/@walletconnect/events": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", @@ -10868,6 +10718,34 @@ "version": "1.4.0", "license": "MIT" }, + "node_modules/@walletconnect/modal": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.7.0.tgz", + "integrity": "sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==", + "dependencies": { + "@walletconnect/modal-core": "2.7.0", + "@walletconnect/modal-ui": "2.7.0" + } + }, + "node_modules/@walletconnect/modal-core": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.7.0.tgz", + "integrity": "sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==", + "dependencies": { + "valtio": "1.11.2" + } + }, + "node_modules/@walletconnect/modal-ui": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz", + "integrity": "sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==", + "dependencies": { + "@walletconnect/modal-core": "2.7.0", + "lit": "2.8.0", + "motion": "10.16.2", + "qrcode": "1.5.3" + } + }, "node_modules/@walletconnect/randombytes": { "version": "1.0.2", "license": "MIT", @@ -11367,34 +11245,26 @@ } } }, - "node_modules/@walletconnect/utils": { + "node_modules/@walletconnect/universal-provider": { "version": "2.17.2", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.17.2.tgz", - "integrity": "sha512-T7eLRiuw96fgwUy2A5NZB5Eu87ukX8RCVoO9lji34RFV4o2IGU9FhTEWyd4QQKI8OuQRjSknhbJs0tU0r0faPw==", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.17.2.tgz", + "integrity": "sha512-yIWDhBODRa9J349d/i1sObzon0vy4n+7R3MvGQQYaU1EVrV+WfoGSRsu8U7rYsL067/MAUu9t/QrpPblaSbz7g==", "dependencies": { - "@ethersproject/hash": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@stablelib/chacha20poly1305": "1.0.1", - "@stablelib/hkdf": "1.0.1", - "@stablelib/random": "1.0.2", - "@stablelib/sha256": "1.0.1", - "@stablelib/x25519": "1.0.3", + "@walletconnect/events": "1.0.1", + "@walletconnect/jsonrpc-http-connection": "1.0.8", + "@walletconnect/jsonrpc-provider": "1.0.14", + "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.0.4", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", + "@walletconnect/logger": "2.1.2", + "@walletconnect/sign-client": "2.17.2", "@walletconnect/types": "2.17.2", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "detect-browser": "5.3.0", - "elliptic": "6.6.0", - "query-string": "7.1.3", - "uint8arrays": "3.1.0" + "@walletconnect/utils": "2.17.2", + "events": "3.3.0", + "lodash": "4.17.21" } }, - "node_modules/@walletconnect/utils/node_modules/@walletconnect/keyvaluestorage": { + "node_modules/@walletconnect/universal-provider/node_modules/@walletconnect/keyvaluestorage": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", @@ -11412,7 +11282,7 @@ } } }, - "node_modules/@walletconnect/utils/node_modules/@walletconnect/safe-json": { + "node_modules/@walletconnect/universal-provider/node_modules/@walletconnect/safe-json": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", @@ -11420,29 +11290,7 @@ "tslib": "1.14.1" } }, - "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-getters": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", - "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-metadata": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", - "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", - "dependencies": { - "@walletconnect/window-getters": "^1.0.1", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/utils/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" - }, - "node_modules/@walletconnect/utils/node_modules/chokidar": { + "node_modules/@walletconnect/universal-provider/node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", @@ -11465,48 +11313,12 @@ "fsevents": "~2.3.2" } }, - "node_modules/@walletconnect/utils/node_modules/detect-browser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", - "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" - }, - "node_modules/@walletconnect/utils/node_modules/elliptic": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", - "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/@walletconnect/utils/node_modules/lru-cache": { + "node_modules/@walletconnect/universal-provider/node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" }, - "node_modules/@walletconnect/utils/node_modules/query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "dependencies": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@walletconnect/utils/node_modules/readdirp": { + "node_modules/@walletconnect/universal-provider/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", @@ -11517,12 +11329,12 @@ "node": ">=8.10.0" } }, - "node_modules/@walletconnect/utils/node_modules/tslib": { + "node_modules/@walletconnect/universal-provider/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@walletconnect/utils/node_modules/unstorage": { + "node_modules/@walletconnect/universal-provider/node_modules/unstorage": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", @@ -11615,67 +11427,263 @@ } } }, - "node_modules/@walletconnect/window-getters": { - "version": "1.0.0", - "license": "MIT" + "node_modules/@walletconnect/utils": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.17.2.tgz", + "integrity": "sha512-T7eLRiuw96fgwUy2A5NZB5Eu87ukX8RCVoO9lji34RFV4o2IGU9FhTEWyd4QQKI8OuQRjSknhbJs0tU0r0faPw==", + "dependencies": { + "@ethersproject/hash": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@stablelib/chacha20poly1305": "1.0.1", + "@stablelib/hkdf": "1.0.1", + "@stablelib/random": "1.0.2", + "@stablelib/sha256": "1.0.1", + "@stablelib/x25519": "1.0.3", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/keyvaluestorage": "1.1.1", + "@walletconnect/relay-api": "1.0.11", + "@walletconnect/relay-auth": "1.0.4", + "@walletconnect/safe-json": "1.0.2", + "@walletconnect/time": "1.0.2", + "@walletconnect/types": "2.17.2", + "@walletconnect/window-getters": "1.0.1", + "@walletconnect/window-metadata": "1.0.1", + "detect-browser": "5.3.0", + "elliptic": "6.6.0", + "query-string": "7.1.3", + "uint8arrays": "3.1.0" + } }, - "node_modules/@walletconnect/window-metadata": { - "version": "1.0.0", - "license": "MIT", + "node_modules/@walletconnect/utils/node_modules/@walletconnect/keyvaluestorage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", + "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", "dependencies": { - "@walletconnect/window-getters": "^1.0.0" + "@walletconnect/safe-json": "^1.0.1", + "idb-keyval": "^6.2.1", + "unstorage": "^1.9.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "1.x" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } } }, - "node_modules/@web3modal/core": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-2.4.3.tgz", - "integrity": "sha512-7Z/sDe9RIYQ2k9ITcxgEa/u7FvlI76vcVVZn9UY4ISivefqrH4JAS3GX4JmVNUUlovwuiZdyqBv4llAQOMK6Rg==", - "deprecated": "Web3Modal is now Reown AppKit. Please follow the upgrade guide at https://docs.reown.com/appkit/upgrade/from-w3m-to-reown", + "node_modules/@walletconnect/utils/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", "dependencies": { - "buffer": "6.0.3", - "valtio": "1.10.5" + "tslib": "1.14.1" } }, - "node_modules/@web3modal/core/node_modules/valtio": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.10.5.tgz", - "integrity": "sha512-jTp0k63VXf4r5hPoaC6a6LCG4POkVSh629WLi1+d5PlajLsbynTMd7qAgEiOSPxzoX5iNvbN7iZ/k/g29wrNiQ==", + "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-getters": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", + "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", "dependencies": { - "proxy-compare": "2.5.1", - "use-sync-external-store": "1.2.0" + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-metadata": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", + "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", + "dependencies": { + "@walletconnect/window-getters": "^1.0.1", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/utils/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" + }, + "node_modules/@walletconnect/utils/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=12.20.0" + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@walletconnect/utils/node_modules/detect-browser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", + "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" + }, + "node_modules/@walletconnect/utils/node_modules/elliptic": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", + "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/@walletconnect/utils/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/@walletconnect/utils/node_modules/query-string": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@walletconnect/utils/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@walletconnect/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/utils/node_modules/unstorage": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", + "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", + "dependencies": { + "anymatch": "^3.1.3", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "destr": "^2.0.3", + "h3": "^1.13.0", + "listhen": "^1.9.0", + "lru-cache": "^10.4.3", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.4.1", + "ufo": "^1.5.4" }, "peerDependencies": { - "react": ">=16.8" + "@azure/app-configuration": "^1.8.0", + "@azure/cosmos": "^4.2.0", + "@azure/data-tables": "^13.3.0", + "@azure/identity": "^4.5.0", + "@azure/keyvault-secrets": "^4.9.0", + "@azure/storage-blob": "^12.26.0", + "@capacitor/preferences": "^6.0.3", + "@deno/kv": ">=0.8.4", + "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", + "@planetscale/database": "^1.19.0", + "@upstash/redis": "^1.34.3", + "@vercel/blob": ">=0.27.0", + "@vercel/kv": "^1.0.1", + "aws4fetch": "^1.0.20", + "db0": ">=0.2.1", + "idb-keyval": "^6.2.1", + "ioredis": "^5.4.1", + "uploadthing": "^7.4.1" }, "peerDependenciesMeta": { - "react": { + "@azure/app-configuration": { + "optional": true + }, + "@azure/cosmos": { + "optional": true + }, + "@azure/data-tables": { + "optional": true + }, + "@azure/identity": { + "optional": true + }, + "@azure/keyvault-secrets": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@capacitor/preferences": { + "optional": true + }, + "@deno/kv": { + "optional": true + }, + "@netlify/blobs": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/blob": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "aws4fetch": { + "optional": true + }, + "db0": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "uploadthing": { "optional": true } } }, - "node_modules/@web3modal/ui": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@web3modal/ui/-/ui-2.4.3.tgz", - "integrity": "sha512-J989p8CdtEhI9gZHf/rZ/WFqYlrAHWw9GmAhFoiNODwjAp0BoG/uoaPiijJMchXdngihZOjLGCQwDXU16DHiKg==", - "deprecated": "Web3Modal is now Reown AppKit. Please follow the upgrade guide at https://docs.reown.com/appkit/upgrade/from-w3m-to-reown", - "dependencies": { - "@web3modal/core": "2.4.3", - "lit": "2.7.5", - "motion": "10.16.2", - "qrcode": "1.5.3" - } + "node_modules/@walletconnect/window-getters": { + "version": "1.0.0", + "license": "MIT" }, - "node_modules/@web3modal/ui/node_modules/lit": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.7.5.tgz", - "integrity": "sha512-i/cH7Ye6nBDUASMnfwcictBnsTN91+aBjXoTHF2xARghXScKxpD4F4WYI+VLXg9lqbMinDfvoI7VnZXjyHgdfQ==", + "node_modules/@walletconnect/window-metadata": { + "version": "1.0.0", + "license": "MIT", "dependencies": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.7.0" + "@walletconnect/window-getters": "^1.0.0" } }, "node_modules/@webassemblyjs/ast": { @@ -29609,6 +29617,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lit": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", + "dependencies": { + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" + } + }, "node_modules/lit-element": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", @@ -43164,6 +43182,30 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/valtio": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", + "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", + "dependencies": { + "proxy-compare": "2.5.1", + "use-sync-external-store": "1.2.0" + }, + "engines": { + "node": ">=12.20.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + } + } + }, "node_modules/value-equal": { "version": "1.0.1", "license": "MIT" @@ -45595,237 +45637,6 @@ } } }, - "@alephium/walletconnect-ethereum-provider": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@alephium/walletconnect-ethereum-provider/-/walletconnect-ethereum-provider-0.1.1.tgz", - "integrity": "sha512-nCIOTsTbGF1zIZic+LHKn/DGfE9aumvh0aGW192SHLRRbF09kIniZlmArwTgJ3U351vpd+dj5j9Vr/DGitNCIQ==", - "requires": { - "@walletconnect/jsonrpc-http-connection": "^1.0.7", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "^1.0.2", - "@walletconnect/jsonrpc-utils": "^1.0.7", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/modal": "2.4.3", - "@walletconnect/sign-client": "2.10.6", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0" - }, - "dependencies": { - "@walletconnect/core": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.6.tgz", - "integrity": "sha512-Z4vh4ZdfcoQjgPEOxeuF9HUZCVLtV3MgRbS/awLIj/omDrFnOwlBhxi5Syr4Y8muVGC0ocRetQYHae0/gX5crQ==", - "requires": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.14", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" - } - }, - "@walletconnect/heartbeat": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", - "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", - "requires": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/time": "^1.0.2", - "tslib": "1.14.1" - } - }, - "@walletconnect/jsonrpc-provider": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", - "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", - "requires": { - "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/safe-json": "^1.0.2", - "tslib": "1.14.1" - } - }, - "@walletconnect/jsonrpc-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", - "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", - "requires": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" - } - }, - "@walletconnect/keyvaluestorage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", - "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", - "requires": { - "@walletconnect/safe-json": "^1.0.1", - "idb-keyval": "^6.2.1", - "unstorage": "^1.9.0" - } - }, - "@walletconnect/modal": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.4.3.tgz", - "integrity": "sha512-YcvkfBN7qBdZk0juUxnbPsyA9n0v15PK+7vL55u1v1mgMhPosvUU2dMIcPqlan+TgSPByo7moEBbHtCbYZpLVw==", - "requires": { - "@web3modal/core": "2.4.3", - "@web3modal/ui": "2.4.3" - } - }, - "@walletconnect/safe-json": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", - "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", - "requires": { - "tslib": "1.14.1" - } - }, - "@walletconnect/sign-client": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.6.tgz", - "integrity": "sha512-EvUWjaZBQu2yKnH5/5F2qzbuiIuUN9ZgrNKgvXkw5z1Dq5RJCks0S9/MFlKH/ZSGqXnLl7uAzBXtoX4sMgbCMA==", - "requires": { - "@walletconnect/core": "2.10.6", - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/utils": "2.10.6", - "events": "^3.3.0" - } - }, - "@walletconnect/types": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.6.tgz", - "integrity": "sha512-WgHfiTG1yakmxheaBRiXhUdEmgxwrvsAdOIWaMf/spvrzVKYh6sHI3oyEEky5qj5jjiMiyQBeB57QamzCotbcQ==", - "requires": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "events": "^3.3.0" - } - }, - "@walletconnect/utils": { - "version": "2.10.6", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.6.tgz", - "integrity": "sha512-oRsWWhN2+hi3aiDXrQEOfysz6FHQJGXLsNQPVt+WIBJplO6Szmdau9dbleD88u1iiT4GKPqE0R9FOYvvPm1H/w==", - "requires": { - "@stablelib/chacha20poly1305": "1.0.1", - "@stablelib/hkdf": "1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/sha256": "1.0.1", - "@stablelib/x25519": "^1.0.3", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.6", - "@walletconnect/window-getters": "^1.0.1", - "@walletconnect/window-metadata": "^1.0.1", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "^3.1.0" - } - }, - "@walletconnect/window-getters": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", - "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", - "requires": { - "tslib": "1.14.1" - } - }, - "@walletconnect/window-metadata": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", - "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", - "requires": { - "@walletconnect/window-getters": "^1.0.1", - "tslib": "1.14.1" - } - }, - "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "detect-browser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", - "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" - }, - "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" - }, - "query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "requires": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "unstorage": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", - "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", - "requires": { - "anymatch": "^3.1.3", - "chokidar": "^3.6.0", - "citty": "^0.1.6", - "destr": "^2.0.3", - "h3": "^1.13.0", - "listhen": "^1.9.0", - "lru-cache": "^10.4.3", - "node-fetch-native": "^1.6.4", - "ofetch": "^1.4.1", - "ufo": "^1.5.4" - } - } - } - }, "@alephium/walletconnect-provider": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/@alephium/walletconnect-provider/-/walletconnect-provider-1.11.0.tgz", @@ -52915,6 +52726,94 @@ } } }, + "@walletconnect/ethereum-provider": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.17.2.tgz", + "integrity": "sha512-o4aL4KkUKT+n0iDwGzC6IY4bl+9n8bwOeT2KwifaVHsFw/irhtRPlsAQQH4ezOiPyk8cri1KN9dPk/YeU0pe6w==", + "requires": { + "@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/modal": "2.7.0", + "@walletconnect/sign-client": "2.17.2", + "@walletconnect/types": "2.17.2", + "@walletconnect/universal-provider": "2.17.2", + "@walletconnect/utils": "2.17.2", + "events": "3.3.0" + }, + "dependencies": { + "@walletconnect/keyvaluestorage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", + "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", + "requires": { + "@walletconnect/safe-json": "^1.0.1", + "idb-keyval": "^6.2.1", + "unstorage": "^1.9.0" + } + }, + "@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "requires": { + "tslib": "1.14.1" + } + }, + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "unstorage": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", + "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", + "requires": { + "anymatch": "^3.1.3", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "destr": "^2.0.3", + "h3": "^1.13.0", + "listhen": "^1.9.0", + "lru-cache": "^10.4.3", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.4.1", + "ufo": "^1.5.4" + } + } + } + }, "@walletconnect/events": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", @@ -53134,6 +53033,34 @@ "@walletconnect/mobile-registry": { "version": "1.4.0" }, + "@walletconnect/modal": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.7.0.tgz", + "integrity": "sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==", + "requires": { + "@walletconnect/modal-core": "2.7.0", + "@walletconnect/modal-ui": "2.7.0" + } + }, + "@walletconnect/modal-core": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.7.0.tgz", + "integrity": "sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==", + "requires": { + "valtio": "1.11.2" + } + }, + "@walletconnect/modal-ui": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz", + "integrity": "sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==", + "requires": { + "@walletconnect/modal-core": "2.7.0", + "lit": "2.8.0", + "motion": "10.16.2", + "qrcode": "1.5.3" + } + }, "@walletconnect/randombytes": { "version": "1.0.2", "requires": { @@ -53429,6 +53356,95 @@ } } }, + "@walletconnect/universal-provider": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.17.2.tgz", + "integrity": "sha512-yIWDhBODRa9J349d/i1sObzon0vy4n+7R3MvGQQYaU1EVrV+WfoGSRsu8U7rYsL067/MAUu9t/QrpPblaSbz7g==", + "requires": { + "@walletconnect/events": "1.0.1", + "@walletconnect/jsonrpc-http-connection": "1.0.8", + "@walletconnect/jsonrpc-provider": "1.0.14", + "@walletconnect/jsonrpc-types": "1.0.4", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/keyvaluestorage": "1.1.1", + "@walletconnect/logger": "2.1.2", + "@walletconnect/sign-client": "2.17.2", + "@walletconnect/types": "2.17.2", + "@walletconnect/utils": "2.17.2", + "events": "3.3.0", + "lodash": "4.17.21" + }, + "dependencies": { + "@walletconnect/keyvaluestorage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", + "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", + "requires": { + "@walletconnect/safe-json": "^1.0.1", + "idb-keyval": "^6.2.1", + "unstorage": "^1.9.0" + } + }, + "@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "requires": { + "tslib": "1.14.1" + } + }, + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "unstorage": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.14.1.tgz", + "integrity": "sha512-0MBKpoVhNLL/Ixvue9lIsrHkwwWW9/f3TRftsYu1R7nZJJyHSdgPMBDjny2op07nirnS3OX6H3u+YDFGld+1Bg==", + "requires": { + "anymatch": "^3.1.3", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "destr": "^2.0.3", + "h3": "^1.13.0", + "listhen": "^1.9.0", + "lru-cache": "^10.4.3", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.4.1", + "ufo": "^1.5.4" + } + } + } + }, "@walletconnect/utils": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.17.2.tgz", @@ -53587,49 +53603,6 @@ "@walletconnect/window-getters": "^1.0.0" } }, - "@web3modal/core": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-2.4.3.tgz", - "integrity": "sha512-7Z/sDe9RIYQ2k9ITcxgEa/u7FvlI76vcVVZn9UY4ISivefqrH4JAS3GX4JmVNUUlovwuiZdyqBv4llAQOMK6Rg==", - "requires": { - "buffer": "6.0.3", - "valtio": "1.10.5" - }, - "dependencies": { - "valtio": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.10.5.tgz", - "integrity": "sha512-jTp0k63VXf4r5hPoaC6a6LCG4POkVSh629WLi1+d5PlajLsbynTMd7qAgEiOSPxzoX5iNvbN7iZ/k/g29wrNiQ==", - "requires": { - "proxy-compare": "2.5.1", - "use-sync-external-store": "1.2.0" - } - } - } - }, - "@web3modal/ui": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@web3modal/ui/-/ui-2.4.3.tgz", - "integrity": "sha512-J989p8CdtEhI9gZHf/rZ/WFqYlrAHWw9GmAhFoiNODwjAp0BoG/uoaPiijJMchXdngihZOjLGCQwDXU16DHiKg==", - "requires": { - "@web3modal/core": "2.4.3", - "lit": "2.7.5", - "motion": "10.16.2", - "qrcode": "1.5.3" - }, - "dependencies": { - "lit": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.7.5.tgz", - "integrity": "sha512-i/cH7Ye6nBDUASMnfwcictBnsTN91+aBjXoTHF2xARghXScKxpD4F4WYI+VLXg9lqbMinDfvoI7VnZXjyHgdfQ==", - "requires": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.7.0" - } - } - } - }, "@webassemblyjs/ast": { "version": "1.11.1", "requires": { @@ -66175,6 +66148,16 @@ } } }, + "lit": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", + "requires": { + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" + } + }, "lit-element": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", @@ -75502,6 +75485,15 @@ "spdx-expression-parse": "^3.0.0" } }, + "valtio": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", + "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", + "requires": { + "proxy-compare": "2.5.1", + "use-sync-external-store": "1.2.0" + } + }, "value-equal": { "version": "1.0.1" }, diff --git a/bridge_ui/package.json b/bridge_ui/package.json index 789457c7..18fef52b 100644 --- a/bridge_ui/package.json +++ b/bridge_ui/package.json @@ -23,7 +23,7 @@ "@solana/web3.js": "^1.35.1", "@terra-money/wallet-provider": "^3.8.0", "@alephium/walletconnect-qrcode-modal": "0.1.0", - "@alephium/walletconnect-ethereum-provider": "0.1.1", + "@walletconnect/ethereum-provider": "2.17.2", "algosdk": "2.4.0", "axios": "^0.21.1", "bech32": "^1.1.4", diff --git a/bridge_ui/src/contexts/EthereumProviderContext.tsx b/bridge_ui/src/contexts/EthereumProviderContext.tsx index 341a4688..ec11f1c4 100644 --- a/bridge_ui/src/contexts/EthereumProviderContext.tsx +++ b/bridge_ui/src/contexts/EthereumProviderContext.tsx @@ -1,5 +1,5 @@ import detectEthereumProvider from "@metamask/detect-provider"; -import EthereumProvider from "@alephium/walletconnect-ethereum-provider"; +import EthereumProvider from "@walletconnect/ethereum-provider"; import { BigNumber, ethers } from "ethers"; import React, { ReactChildren, @@ -14,7 +14,7 @@ import walletconnectIcon from "../icons/walletconnect.svg"; import { EVM_RPC_MAP } from "../utils/metaMaskChainParameters"; import QRCodeModal from '@alephium/walletconnect-qrcode-modal' import { getEvmChainId } from "../utils/consts"; -import { ChainId } from "@alephium/wormhole-sdk"; +import { CHAIN_ID_BSC, CHAIN_ID_ETH, ChainId } from "@alephium/wormhole-sdk"; import { useTranslation } from "react-i18next"; const WALLET_CONNECT_PROJECT_ID = '6e2562e43678dd68a9070a62b6d52207' @@ -41,6 +41,7 @@ interface IEthereumProviderContext { signerAddress: string | undefined; providerError: string | null; availableConnections: Connection[]; + walletConnectProvider: EthereumProvider | undefined; connectType: ConnectType | undefined; } @@ -54,6 +55,7 @@ const EthereumProviderContext = React.createContext({ providerError: null, availableConnections: [], connectType: undefined, + walletConnectProvider: undefined, }); export const EthereumProviderProvider = ({ @@ -219,8 +221,9 @@ export const EthereumProviderProvider = ({ EthereumProvider.init({ projectId: WALLET_CONNECT_PROJECT_ID, showQrModal: false, - chains: [getEvmChainId(wormholeChainId) as number], - rpcMap: EVM_RPC_MAP + chains: [getEvmChainId(CHAIN_ID_ETH) as number, getEvmChainId(CHAIN_ID_BSC) as number], + rpcMap: EVM_RPC_MAP, + customStoragePrefix: 'ethereum' }).then((walletConnectProvider) => { setWalletConnectProvider(walletConnectProvider); walletConnectProvider.on('display_uri', (uri) => { @@ -268,6 +271,10 @@ export const EthereumProviderProvider = ({ "disconnect", () => { disconnect() } ); + walletConnectProvider.on( + 'chainChanged', + (hexChainId) => setChainId(BigNumber.from(hexChainId).toNumber()) + ); setProvider(provider); const signer = provider.getSigner(); setSigner(signer); @@ -306,6 +313,7 @@ export const EthereumProviderProvider = ({ providerError, availableConnections, connectType, + walletConnectProvider }), [ connect, @@ -317,6 +325,7 @@ export const EthereumProviderProvider = ({ providerError, availableConnections, connectType, + walletConnectProvider ] ); return ( diff --git a/bridge_ui/src/hooks/useIsWalletReady.ts b/bridge_ui/src/hooks/useIsWalletReady.ts index 5754f54c..90eaf6e8 100644 --- a/bridge_ui/src/hooks/useIsWalletReady.ts +++ b/bridge_ui/src/hooks/useIsWalletReady.ts @@ -16,10 +16,7 @@ import { } from "../contexts/EthereumProviderContext"; import { useSolanaWallet } from "../contexts/SolanaWalletContext"; import { CLUSTER, getEvmChainId } from "../utils/consts"; -import { - EVM_RPC_MAP, - METAMASK_CHAIN_PARAMETERS, -} from "../utils/metaMaskChainParameters"; +import { METAMASK_CHAIN_PARAMETERS } from "../utils/metaMaskChainParameters"; import { useWallet } from "@alephium/web3-react"; import { useTranslation } from "react-i18next"; @@ -56,7 +53,7 @@ function useIsWalletReady( signerAddress, chainId: evmChainId, connectType, - disconnect, + walletConnectProvider } = useEthereumProvider(); const hasEthInfo = !!provider && !!signerAddress; const correctEvmNetwork = getEvmChainId(chainId); @@ -69,29 +66,25 @@ function useIsWalletReady( if (!isEVMChain(chainId)) { return; } - if ( - connectType === ConnectType.WALLETCONNECT && - EVM_RPC_MAP[correctEvmNetwork] === undefined - ) { - // WalletConnect requires a rpc url for this chain - // Force user to switch connect type - disconnect(); - return; - } - - // `wallet_switchEthereumChain` does not work if connected to - // metamask-mobile via walletconnect: - // https://github.com/MetaMask/metamask-mobile/issues/6655 - // https://github.com/MetaMask/metamask-mobile/issues/7023 - if (connectType === ConnectType.WALLETCONNECT) { - disconnect() - return; + try { + if (connectType === ConnectType.WALLETCONNECT && walletConnectProvider) { + await walletConnectProvider.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: hexStripZeros(hexlify(correctEvmNetwork)) }] + }) + return + } + } catch (error) { + console.error(`Failed to switch chain to ${correctEvmNetwork}: `, error) + return } try { - await provider.send("wallet_switchEthereumChain", [ - { chainId: hexStripZeros(hexlify(correctEvmNetwork)) }, - ]); + if (connectType === ConnectType.METAMASK) { + await provider.send("wallet_switchEthereumChain", [ + { chainId: hexStripZeros(hexlify(correctEvmNetwork)) }, + ]); + } } catch (switchError: any) { // This error code indicates that the chain has not been added to MetaMask. if (switchError.code === 4902) { @@ -109,7 +102,7 @@ function useIsWalletReady( } } } - }, [provider, correctEvmNetwork, chainId, connectType, disconnect]); + }, [provider, correctEvmNetwork, chainId, connectType, walletConnectProvider]); return useMemo(() => { if (chainId === CHAIN_ID_ALEPHIUM && alphWallet && alphWallet.nodeProvider) {