diff --git a/apps/demo/CHANGELOG.md b/apps/demo/CHANGELOG.md index d2388fae6a..e2c06ce279 100644 --- a/apps/demo/CHANGELOG.md +++ b/apps/demo/CHANGELOG.md @@ -1,5 +1,14 @@ # @apps/demo +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/apps/demo/package.json b/apps/demo/package.json index 84c8c28629..f666005d41 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -1,6 +1,6 @@ { "name": "@apps/demo", - "version": "5.0.3", + "version": "5.0.4", "private": true, "scripts": { "dev:demo": "next dev", @@ -11,7 +11,7 @@ "dependencies": { "@radix-ui/react-switch": "1.0.3", "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "clsx": "2.1.0", "framer-motion": "11.0.8", "next": "14.2.3", diff --git a/apps/gallery/CHANGELOG.md b/apps/gallery/CHANGELOG.md index 5e77948568..bc44570fe6 100644 --- a/apps/gallery/CHANGELOG.md +++ b/apps/gallery/CHANGELOG.md @@ -1,5 +1,15 @@ # @apps/gallery +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/common@5.0.4 + - @web3modal/ui@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/apps/gallery/package.json b/apps/gallery/package.json index 7d4829083d..6f3be75310 100644 --- a/apps/gallery/package.json +++ b/apps/gallery/package.json @@ -1,6 +1,6 @@ { "name": "@apps/gallery", - "version": "5.0.3", + "version": "5.0.4", "private": true, "main": "index.js", "scripts": { @@ -9,8 +9,8 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/ui": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/ui": "5.0.4", "lit": "3.1.0", "storybook": "7.6.7" }, diff --git a/apps/laboratory/CHANGELOG.md b/apps/laboratory/CHANGELOG.md index bfbe7d6b64..eaff74db9b 100644 --- a/apps/laboratory/CHANGELOG.md +++ b/apps/laboratory/CHANGELOG.md @@ -1,5 +1,17 @@ # @apps/laboratory +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers@5.0.4 + - @web3modal/siwe@5.0.4 + - @web3modal/solana@5.0.4 + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/apps/laboratory/package.json b/apps/laboratory/package.json index 9eb888cb09..b5b635e097 100644 --- a/apps/laboratory/package.json +++ b/apps/laboratory/package.json @@ -1,6 +1,6 @@ { "name": "@apps/laboratory", - "version": "5.0.3", + "version": "5.0.4", "private": true, "scripts": { "dev:laboratory": "next dev", @@ -37,23 +37,25 @@ "@emotion/styled": "11.11.0", "@sentry/browser": "7.92.0", "@sentry/react": "7.92.0", + "@solana/wallet-adapter-backpack": "0.1.14", + "@solana/wallet-adapter-wallets": "0.19.32", "@solana/web3.js": "1.91.7", "@tanstack/react-query": "5.24.8", - "@web3modal/ethers": "5.0.3", - "@web3modal/siwe": "5.0.3", - "@web3modal/solana": "5.0.3", - "@web3modal/wagmi": "5.0.3", + "@wagmi/connectors": "5.0.8", + "@walletconnect/utils": "2.13.1", + "@web3modal/ethers": "5.0.4", + "@web3modal/siwe": "5.0.4", + "@web3modal/solana": "5.0.4", + "@web3modal/wagmi": "5.0.4", "ethers": "6.13.0", "framer-motion": "10.17.9", "next": "14.2.3", "next-auth": "4.24.5", "react-icons": "4.12.0", - "@walletconnect/utils": "2.13.1", + "rpc-websockets": "7.11.0", "valtio": "1.11.2", "viem": "2.10.3", - "wagmi": "2.9.10", - "@wagmi/connectors": "5.0.8", - "rpc-websockets": "7.11.0" + "wagmi": "2.9.10" }, "devDependencies": { "@aws-sdk/client-cloudwatch": "3.509.0", diff --git a/apps/laboratory/src/components/RandomLink.tsx b/apps/laboratory/src/components/RandomLink.tsx new file mode 100644 index 0000000000..b0223f66f3 --- /dev/null +++ b/apps/laboratory/src/components/RandomLink.tsx @@ -0,0 +1,12 @@ +'use client' + +import Link from 'next/link' + +export function RandomLink({ hrefs, children }: { hrefs: string[]; children: React.ReactNode }) { + const href = hrefs[Math.floor(Math.random() * hrefs.length)] + if (!href) { + throw new Error('No hrefs provided') + } + + return {children} +} diff --git a/apps/laboratory/src/pages/index.tsx b/apps/laboratory/src/pages/index.tsx index f963fb2c77..983724c6fc 100644 --- a/apps/laboratory/src/pages/index.tsx +++ b/apps/laboratory/src/pages/index.tsx @@ -12,11 +12,12 @@ import { } from '@chakra-ui/react' import { IoArrowForward } from 'react-icons/io5' import { wagmiSdkOptions, ethersSdkOptions, solanaSdkOptions } from '../utils/DataUtil' +import { RandomLink } from '../components/RandomLink' export default function HomePage() { return ( <> - + Testing @@ -33,16 +34,16 @@ export default function HomePage() { Configuration with all features enabled and randomly using ethers or wagmi - 0.5 ? '/library/wagmi-all' : '/library/ethers-all'}> + - + - + Wagmi diff --git a/apps/laboratory/src/pages/library/solana.tsx b/apps/laboratory/src/pages/library/solana.tsx index b1f3f484b5..343272dbc4 100644 --- a/apps/laboratory/src/pages/library/solana.tsx +++ b/apps/laboratory/src/pages/library/solana.tsx @@ -5,6 +5,13 @@ import { solana, solanaDevnet, solanaTestnet } from '../../utils/ChainsUtil' import { Web3ModalButtons } from '../../components/Web3ModalButtons' import { ConstantsUtil } from '../../utils/ConstantsUtil' import { SolanaTests } from '../../components/Solana/SolanaTests' +import { BackpackWalletAdapter } from '@solana/wallet-adapter-backpack' +import { + PhantomWalletAdapter, + HuobiWalletAdapter, + SolflareWalletAdapter, + TrustWalletAdapter +} from '@solana/wallet-adapter-wallets' const chains = [solana, solanaTestnet, solanaDevnet] @@ -21,7 +28,15 @@ const modal = createWeb3Modal({ chains, enableAnalytics: false, termsConditionsUrl: 'https://walletconnect.com/terms', - privacyPolicyUrl: 'https://walletconnect.com/privacy' + privacyPolicyUrl: 'https://walletconnect.com/privacy', + customWallets: ConstantsUtil.CustomWallets, + wallets: [ + new BackpackWalletAdapter(), + new HuobiWalletAdapter(), + new PhantomWalletAdapter(), + new SolflareWalletAdapter(), + new TrustWalletAdapter() + ] }) ThemeStore.setModal(modal) diff --git a/apps/laboratory/src/utils/SiweUtils.ts b/apps/laboratory/src/utils/SiweUtils.ts index 14e18445d8..05576e9127 100644 --- a/apps/laboratory/src/utils/SiweUtils.ts +++ b/apps/laboratory/src/utils/SiweUtils.ts @@ -1,7 +1,7 @@ import { getCsrfToken, signIn, signOut, getSession } from 'next-auth/react' import type { SIWEVerifyMessageArgs, SIWECreateMessageArgs, SIWESession } from '@web3modal/siwe' import { createSIWEConfig, formatMessage } from '@web3modal/siwe' -import { WagmiConstantsUtil } from '../utils/WagmiConstants' +import { WagmiConstantsUtil } from './WagmiConstants' export const siweConfig = createSIWEConfig({ signOutOnAccountChange: true, diff --git a/examples/html-ethers5/CHANGELOG.md b/examples/html-ethers5/CHANGELOG.md index 4420ca2dbe..e7cf7f5cf5 100644 --- a/examples/html-ethers5/CHANGELOG.md +++ b/examples/html-ethers5/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/html-ethers5 +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers5@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/html-ethers5/package.json b/examples/html-ethers5/package.json index 6917a12936..511f0b9a18 100644 --- a/examples/html-ethers5/package.json +++ b/examples/html-ethers5/package.json @@ -1,13 +1,13 @@ { "name": "@examples/html-ethers5", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3011", "build:examples": "vite build" }, "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2" }, "devDependencies": { diff --git a/examples/html-wagmi/CHANGELOG.md b/examples/html-wagmi/CHANGELOG.md index 54382b79f9..6ef64ebc9a 100644 --- a/examples/html-wagmi/CHANGELOG.md +++ b/examples/html-wagmi/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/html-wagmi +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/html-wagmi/package.json b/examples/html-wagmi/package.json index 8a97ad18b2..dd91d80ca4 100644 --- a/examples/html-wagmi/package.json +++ b/examples/html-wagmi/package.json @@ -1,7 +1,7 @@ { "name": "@examples/html-wagmi", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3001", "build:examples": "vite build" @@ -9,7 +9,7 @@ "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "react": "18.2.0", "react-dom": "18.2.0" }, diff --git a/examples/next-wagmi/CHANGELOG.md b/examples/next-wagmi/CHANGELOG.md index 7a0d1af252..dc68b61e48 100644 --- a/examples/next-wagmi/CHANGELOG.md +++ b/examples/next-wagmi/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/next-wagmi +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/next-wagmi/package.json b/examples/next-wagmi/package.json index b5310a0c70..286c9173f5 100644 --- a/examples/next-wagmi/package.json +++ b/examples/next-wagmi/package.json @@ -1,6 +1,6 @@ { "name": "@examples/next-wagmi", - "version": "5.0.3", + "version": "5.0.4", "private": true, "scripts": { "dev": "next dev", @@ -10,7 +10,7 @@ }, "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "next": "14.2.3", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/examples/react-ethers/CHANGELOG.md b/examples/react-ethers/CHANGELOG.md index 6bd6d9f0df..f7a9344349 100644 --- a/examples/react-ethers/CHANGELOG.md +++ b/examples/react-ethers/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/react-ethers5 +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/react-ethers/package.json b/examples/react-ethers/package.json index 6babb0ef84..aee649bfa6 100644 --- a/examples/react-ethers/package.json +++ b/examples/react-ethers/package.json @@ -1,13 +1,13 @@ { "name": "@examples/react-ethers", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3012", "build:examples": "vite build" }, "dependencies": { - "@web3modal/ethers": "5.0.3", + "@web3modal/ethers": "5.0.4", "ethers": "6.9.0", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/react-ethers5/CHANGELOG.md b/examples/react-ethers5/CHANGELOG.md index bcc32f493e..5c93d90d35 100644 --- a/examples/react-ethers5/CHANGELOG.md +++ b/examples/react-ethers5/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/react-ethers5 +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers5@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/react-ethers5/package.json b/examples/react-ethers5/package.json index bed32c1819..7ca79ebd4a 100644 --- a/examples/react-ethers5/package.json +++ b/examples/react-ethers5/package.json @@ -1,13 +1,13 @@ { "name": "@examples/react-ethers5", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3012", "build:examples": "vite build" }, "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/react-wagmi/CHANGELOG.md b/examples/react-wagmi/CHANGELOG.md index abe560845b..5cd3405eae 100644 --- a/examples/react-wagmi/CHANGELOG.md +++ b/examples/react-wagmi/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/react-wagmi +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/react-wagmi/package.json b/examples/react-wagmi/package.json index dff0ec2893..698130fc32 100644 --- a/examples/react-wagmi/package.json +++ b/examples/react-wagmi/package.json @@ -1,14 +1,14 @@ { "name": "@examples/react-wagmi", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3002", "build:examples": "vite build" }, "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "react": "18.2.0", "react-dom": "18.2.0", "vite": "5.2.11", diff --git a/examples/vue-ethers5/CHANGELOG.md b/examples/vue-ethers5/CHANGELOG.md index 4505712b10..ee45477651 100644 --- a/examples/vue-ethers5/CHANGELOG.md +++ b/examples/vue-ethers5/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/vue-ethers5 +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers5@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/vue-ethers5/package.json b/examples/vue-ethers5/package.json index 2b1c2dccad..0802ebfc1a 100644 --- a/examples/vue-ethers5/package.json +++ b/examples/vue-ethers5/package.json @@ -1,13 +1,13 @@ { "name": "@examples/vue-ethers5", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3013", "build:examples": "vite build" }, "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2" }, "devDependencies": { diff --git a/examples/vue-wagmi/CHANGELOG.md b/examples/vue-wagmi/CHANGELOG.md index bf1c577f88..8cd04d62ce 100644 --- a/examples/vue-wagmi/CHANGELOG.md +++ b/examples/vue-wagmi/CHANGELOG.md @@ -1,5 +1,14 @@ # @examples/vue-wagmi +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/examples/vue-wagmi/package.json b/examples/vue-wagmi/package.json index 04e6dfac04..f986d7e6ff 100644 --- a/examples/vue-wagmi/package.json +++ b/examples/vue-wagmi/package.json @@ -1,7 +1,7 @@ { "name": "@examples/vue-wagmi", "private": true, - "version": "5.0.3", + "version": "5.0.4", "scripts": { "dev:example": "vite --port 3003", "build:examples": "vite build" @@ -9,7 +9,7 @@ "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/wagmi": "5.0.3" + "@web3modal/wagmi": "5.0.4" }, "devDependencies": { "@vitejs/plugin-vue": "5.0.2" diff --git a/package-lock.json b/package-lock.json index 840d01a706..5e79237b8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,11 +45,11 @@ }, "apps/demo": { "name": "@apps/demo", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@radix-ui/react-switch": "1.0.3", "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "clsx": "2.1.0", "framer-motion": "11.0.8", "next": "14.2.3", @@ -129,10 +129,10 @@ }, "apps/gallery": { "name": "@apps/gallery", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/ui": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/ui": "5.0.4", "lit": "3.1.0", "storybook": "7.6.7" }, @@ -148,7 +148,7 @@ }, "apps/laboratory": { "name": "@apps/laboratory", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@chakra-ui/icons": "2.1.1", "@chakra-ui/react": "2.8.2", @@ -156,14 +156,16 @@ "@emotion/styled": "11.11.0", "@sentry/browser": "7.92.0", "@sentry/react": "7.92.0", + "@solana/wallet-adapter-backpack": "0.1.14", + "@solana/wallet-adapter-wallets": "0.19.32", "@solana/web3.js": "1.91.7", "@tanstack/react-query": "5.24.8", "@wagmi/connectors": "5.0.8", "@walletconnect/utils": "2.13.1", - "@web3modal/ethers": "5.0.3", - "@web3modal/siwe": "5.0.3", - "@web3modal/solana": "5.0.3", - "@web3modal/wagmi": "5.0.3", + "@web3modal/ethers": "5.0.4", + "@web3modal/siwe": "5.0.4", + "@web3modal/solana": "5.0.4", + "@web3modal/wagmi": "5.0.4", "ethers": "6.13.0", "framer-motion": "10.17.9", "next": "14.2.3", @@ -221,9 +223,9 @@ }, "examples/html-ethers5": { "name": "@examples/html-ethers5", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2" }, "devDependencies": { @@ -279,11 +281,11 @@ }, "examples/html-wagmi": { "name": "@examples/html-wagmi", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "react": "18.2.0", "react-dom": "18.2.0" }, @@ -293,10 +295,10 @@ }, "examples/next-wagmi": { "name": "@examples/next-wagmi", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "next": "14.2.3", "react": "18.2.0", "react-dom": "18.2.0", @@ -339,9 +341,9 @@ }, "examples/react-ethers": { "name": "@examples/react-ethers", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { - "@web3modal/ethers": "5.0.3", + "@web3modal/ethers": "5.0.4", "ethers": "6.9.0", "react": "18.2.0", "react-dom": "18.2.0" @@ -390,9 +392,9 @@ }, "examples/react-ethers5": { "name": "@examples/react-ethers5", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2", "react": "18.2.0", "react-dom": "18.2.0" @@ -451,10 +453,10 @@ }, "examples/react-wagmi": { "name": "@examples/react-wagmi", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@tanstack/react-query": "5.24.8", - "@web3modal/wagmi": "5.0.3", + "@web3modal/wagmi": "5.0.4", "react": "18.2.0", "react-dom": "18.2.0", "viem": "2.10.3", @@ -468,9 +470,9 @@ }, "examples/vue-ethers5": { "name": "@examples/vue-ethers5", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { - "@web3modal/ethers5": "5.0.3", + "@web3modal/ethers5": "5.0.4", "ethers": "5.7.2" }, "devDependencies": { @@ -526,11 +528,11 @@ }, "examples/vue-wagmi": { "name": "@examples/vue-wagmi", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/wagmi": "5.0.3" + "@web3modal/wagmi": "5.0.4" }, "devDependencies": { "@vitejs/plugin-vue": "5.0.2" @@ -5295,6 +5297,16 @@ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, + "node_modules/@emurgo/cardano-serialization-lib-browser": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-11.5.0.tgz", + "integrity": "sha512-qchOJ9NYDUz10tzs5r5QhP9hK0p+ZOlRiBwPdTAxqAYLw/8emYBkQQLaS8T1DF6EkeudyrgS00ym5Trw1fo4iA==" + }, + "node_modules/@emurgo/cardano-serialization-lib-nodejs": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-11.5.0.tgz", + "integrity": "sha512-IlVABlRgo9XaTR1NunwZpWcxnfEv04ba2l1vkUz4S1W7Jt36F4CtffP+jPeqBZGnAe+fnUwo0XjIJC3ZTNToNQ==" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.1.tgz", @@ -6476,29 +6488,38 @@ "resolved": "https://registry.npmjs.org/@fal-works/esbuild-plugin-global-externals/-/esbuild-plugin-global-externals-2.1.2.tgz", "integrity": "sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==" }, + "node_modules/@fivebinaries/coin-selection": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@fivebinaries/coin-selection/-/coin-selection-2.2.1.tgz", + "integrity": "sha512-iYFsYr7RY7TEvTqP9NKR4p/yf3Iybf9abUDR7lRjzanGsrLwVsREvIuyE05iRYFrvqarlk+gWRPsdR1N2hUBrg==", + "dependencies": { + "@emurgo/cardano-serialization-lib-browser": "^11.5.0", + "@emurgo/cardano-serialization-lib-nodejs": "11.5.0" + } + }, "node_modules/@floating-ui/core": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", - "integrity": "sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.3.tgz", + "integrity": "sha512-1ZpCvYf788/ZXOhRQGFxnYQOVgeU+pi0i+d0Ow34La7qjIXETi6RNswGVKkA6KcDO8/+Ysu2E/CeUmmeEBDvTg==", "dev": true, "dependencies": { - "@floating-ui/utils": "^0.2.0" + "@floating-ui/utils": "^0.2.3" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", - "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.6.tgz", + "integrity": "sha512-qiTYajAnh3P+38kECeffMSQgbvXty2VB6rS+42iWR4FPIlZjLK84E9qtLnMTLIpPz2znD/TaFqaiavMUrS+Hcw==", "dev": true, "dependencies": { "@floating-ui/core": "^1.0.0", - "@floating-ui/utils": "^0.2.0" + "@floating-ui/utils": "^0.2.3" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.0.tgz", - "integrity": "sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", + "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", "dev": true, "dependencies": { "@floating-ui/dom": "^1.0.0" @@ -6509,11 +6530,43 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", - "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.3.tgz", + "integrity": "sha512-XGndio0l5/Gvd6CLIABvsav9HHezgDFFhDfHk1bvLfr9ni8dojqLSvBbotJEjmIwNHL7vK4QzBJTdBRoB+c1ww==", "dev": true }, + "node_modules/@fractalwagmi/popup-connection": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@fractalwagmi/popup-connection/-/popup-connection-1.1.1.tgz", + "integrity": "sha512-hYL+45iYwNbwjvP2DxP3YzVsrAGtj/RV9LOgMpJyCxsfNoyyOoi2+YrnywKkiANingiG2kJ1nKsizbu1Bd4zZw==", + "peerDependencies": { + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" + } + }, + "node_modules/@fractalwagmi/solana-wallet-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@fractalwagmi/solana-wallet-adapter/-/solana-wallet-adapter-0.1.1.tgz", + "integrity": "sha512-oTZLEuD+zLKXyhZC5tDRMPKPj8iaxKLxXiCjqRfOo4xmSbS2izGRWLJbKMYYsJysn/OI3UJ3P6CWP8WUWi0dZg==", + "dependencies": { + "@fractalwagmi/popup-connection": "^1.0.18", + "@solana/wallet-adapter-base": "^0.9.17", + "bs58": "^5.0.0" + } + }, + "node_modules/@fractalwagmi/solana-wallet-adapter/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@fractalwagmi/solana-wallet-adapter/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, "node_modules/@gitbeaker/core": { "version": "35.8.1", "resolved": "https://registry.npmjs.org/@gitbeaker/core/-/core-35.8.1.tgz", @@ -6954,6 +7007,205 @@ "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", "dev": true }, + "node_modules/@keystonehq/alias-sampling": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@keystonehq/alias-sampling/-/alias-sampling-0.1.2.tgz", + "integrity": "sha512-5ukLB3bcgltgaFfQfYKYwHDUbwHicekYo53fSEa7xhVkAEqsA74kxdIwoBIURmGUtXe3EVIRm4SYlgcrt2Ri0w==" + }, + "node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.5.tgz", + "integrity": "sha512-PoclPHf0OhpIKLfLwzymsu+CjkWf5ZKvaVjpkq3HUalcI4KW8wLk0m8qI2kBVv6F0BQ0ERPqW8OfjLTVqIgWLA==", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-sol/-/bc-ur-registry-sol-0.3.1.tgz", + "integrity": "sha512-Okr5hwPxBZxB4EKLK1GSC9vsrh/tFMQ5dvs3EQ9NCOmCn7CXdXIMSeafrpGCHk484Jf5c6X0Wq0yf0VqY2A/8Q==", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.5.0", + "bs58check": "^2.1.2", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/sdk": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@keystonehq/sdk/-/sdk-0.13.1.tgz", + "integrity": "sha512-545l83TE5t1cyUZUaNqZOAh15ibWOg9QbK/YeLwnrxt+GOod+ATk3j9SpN6yTSLO8DNl2/x6dKRIFVtTEkZDAg==", + "dependencies": { + "@ngraveio/bc-ur": "^1.0.0", + "qrcode.react": "^1.0.1", + "react": "16.13.1", + "react-dom": "16.13.1", + "react-modal": "^3.12.1", + "react-qr-reader": "^2.2.1", + "rxjs": "^6.6.3", + "typescript": "^4.6.2" + } + }, + "node_modules/@keystonehq/sdk/node_modules/qrcode.react": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-1.0.1.tgz", + "integrity": "sha512-8d3Tackk8IRLXTo67Y+c1rpaiXjoz/Dd2HpcMdW//62/x8J1Nbho14Kh8x974t9prsLHN6XqVgcnRiBGFptQmg==", + "dependencies": { + "loose-envify": "^1.4.0", + "prop-types": "^15.6.0", + "qr.js": "0.0.0" + }, + "peerDependencies": { + "react": "^15.5.3 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@keystonehq/sdk/node_modules/react": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@keystonehq/sdk/node_modules/react-dom": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", + "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.13.1" + } + }, + "node_modules/@keystonehq/sdk/node_modules/react-qr-reader": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-2.2.1.tgz", + "integrity": "sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA==", + "dependencies": { + "jsqr": "^1.2.0", + "prop-types": "^15.7.2", + "webrtc-adapter": "^7.2.1" + }, + "peerDependencies": { + "react": "~16", + "react-dom": "~16" + } + }, + "node_modules/@keystonehq/sdk/node_modules/scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/@keystonehq/sdk/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@keystonehq/sol-keyring": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@keystonehq/sol-keyring/-/sol-keyring-0.3.1.tgz", + "integrity": "sha512-RU6I3HQrQ9NpRDP9TwlBIy5DftVcNcyk0NWfhkPy/YanhMcCB0cRPw68iQl1rMnR6n1G2+YrBHMxm6swCW+B4Q==", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.5.0", + "@keystonehq/bc-ur-registry-sol": "^0.3.1", + "@keystonehq/sdk": "^0.13.1", + "@solana/web3.js": "^1.36.0", + "bs58": "^5.0.0", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/sol-keyring/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@keystonehq/sol-keyring/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@keystonehq/sol-keyring/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@ledgerhq/devices": { + "version": "6.27.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.27.1.tgz", + "integrity": "sha512-jX++oy89jtv7Dp2X6gwt3MMkoajel80JFWcdc0HCouwDsV1mVJ3SQdwl/bQU0zd8HI6KebvUP95QTwbQLLK/RQ==", + "dependencies": { + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/logs": "^6.10.0", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@ledgerhq/errors": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.17.0.tgz", + "integrity": "sha512-xnOVpy/gUUkusEORdr2Qhw3Vd0MGfjyVGgkGR9Ck6FXE26OIdIQ3tNmG5BdZN+gwMMFJJVxxS4/hr0taQfZ43w==" + }, + "node_modules/@ledgerhq/hw-transport": { + "version": "6.27.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.1.tgz", + "integrity": "sha512-hnE4/Fq1YzQI4PA1W0H8tCkI99R3UWDb3pJeZd6/Xs4Qw/q1uiQO+vNLC6KIPPhK0IajUfuI/P2jk0qWcMsuAQ==", + "dependencies": { + "@ledgerhq/devices": "^6.27.1", + "@ledgerhq/errors": "^6.10.0", + "events": "^3.3.0" + } + }, + "node_modules/@ledgerhq/hw-transport-webhid": { + "version": "6.27.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.1.tgz", + "integrity": "sha512-u74rBYlibpbyGblSn74fRs2pMM19gEAkYhfVibq0RE1GNFjxDMFC1n7Sb+93Jqmz8flyfB4UFJsxs8/l1tm2Kw==", + "dependencies": { + "@ledgerhq/devices": "^6.27.1", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.27.1", + "@ledgerhq/logs": "^6.10.0" + } + }, + "node_modules/@ledgerhq/logs": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.12.0.tgz", + "integrity": "sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==" + }, "node_modules/@lit-labs/ssr-dom-shim": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz", @@ -7370,6 +7622,14 @@ "node": ">=16.0.0" } }, + "node_modules/@mobily/ts-belt": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/@mobily/ts-belt/-/ts-belt-3.13.1.tgz", + "integrity": "sha512-K5KqIhPI/EoCTbA6CGbrenM9s41OouyK8A03fGJJcla/zKucsgLbz8HNbeseoLarRPgyWJsUyCYqFhI7t3Ra9Q==", + "engines": { + "node": ">= 10.*" + } + }, "node_modules/@motionone/animation": { "version": "10.18.0", "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", @@ -7606,6 +7866,20 @@ "node": ">= 10" } }, + "node_modules/@ngraveio/bc-ur": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/@ngraveio/bc-ur/-/bc-ur-1.1.13.tgz", + "integrity": "sha512-j73akJMV4+vLR2yQ4AphPIT5HZmxVjn/LxpL7YHoINnXoH6ccc90Zzck6/n6a3bCXOVZwBxq+YHwbAKRV+P8Zg==", + "dependencies": { + "@keystonehq/alias-sampling": "^0.1.1", + "assert": "^2.0.0", + "bignumber.js": "^9.0.1", + "cbor-sync": "^1.0.4", + "crc": "^3.8.0", + "jsbi": "^3.1.5", + "sha.js": "^2.4.11" + } + }, "node_modules/@noble/curves": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", @@ -8093,6 +8367,53 @@ "node": "^16 || ^18 || >= 20" } }, + "node_modules/@particle-network/analytics": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@particle-network/analytics/-/analytics-1.0.1.tgz", + "integrity": "sha512-ApcSMo1BXQlywO+lvOpG3Y2/SVGNCpJzXO/4e3zHzE/9j+uMehsilDzPwWQwLhrCXZYwVm7mmE71Gs36yobiNw==", + "dependencies": { + "hash.js": "^1.1.7", + "uuidv4": "^6.2.13" + } + }, + "node_modules/@particle-network/auth": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@particle-network/auth/-/auth-1.3.1.tgz", + "integrity": "sha512-hu6ie5RjjN4X+6y/vfjyCsSX3pQuS8k8ZoMb61QWwhWsnZXKzpBUVeAEk55aGfxxXY+KfBkSmZosyaZHGoHnfw==", + "dependencies": { + "@particle-network/analytics": "^1.0.1", + "@particle-network/chains": "*", + "@particle-network/crypto": "^1.0.1", + "buffer": "^6.0.3", + "draggabilly": "^3.0.0" + } + }, + "node_modules/@particle-network/chains": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@particle-network/chains/-/chains-1.5.2.tgz", + "integrity": "sha512-inBLDBK6xd3kirDR9+XaU5PJCgqRWXqyaVnr51lZ+Ge2lm9Sa+UqBmheMZJuubhUvOmIn50j2F2wBA/L69YTtg==" + }, + "node_modules/@particle-network/crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@particle-network/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-GgvHmHcFiNkCLZdcJOgctSbgvs251yp+EAdUydOE3gSoIxN6KEr/Snu9DebENhd/nFb7FDk5ap0Hg49P7pj1fg==", + "dependencies": { + "crypto-js": "^4.1.1", + "uuidv4": "^6.2.13" + } + }, + "node_modules/@particle-network/solana-wallet": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@particle-network/solana-wallet/-/solana-wallet-1.3.2.tgz", + "integrity": "sha512-KviKVP87OtWq813y8IumM3rIQMNkTjHBaQmCUbTWGebz3csFOv54JIoy1r+3J3NnA+mBxBdZeRedZ5g+07v75w==", + "dependencies": { + "@particle-network/auth": "^1.3.1" + }, + "peerDependencies": { + "@solana/web3.js": "^1.50.1", + "bs58": "^4.0.1" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -8115,51 +8436,51 @@ } }, "node_modules/@playwright/test": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.1.tgz", - "integrity": "sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.45.0.tgz", + "integrity": "sha512-TVYsfMlGAaxeUllNkywbwek67Ncf8FRGn8ZlRdO291OL3NjG9oMbfVhyP82HQF0CZLMrYsvesqoUekxdWuF9Qw==", "optional": true, "peer": true, "dependencies": { - "playwright": "1.44.1" + "playwright": "1.45.0" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@playwright/test/node_modules/playwright": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.1.tgz", - "integrity": "sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.0.tgz", + "integrity": "sha512-4z3ac3plDfYzGB6r0Q3LF8POPR20Z8D0aXcxbJvmfMgSSq1hkcgvFRXJk9rUq5H/MJ0Ktal869hhOdI/zUTeLA==", "optional": true, "peer": true, "dependencies": { - "playwright-core": "1.44.1" + "playwright-core": "1.45.0" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/@playwright/test/node_modules/playwright-core": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.1.tgz", - "integrity": "sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.0.tgz", + "integrity": "sha512-lZmHlFQ0VYSpAs43dRq1/nJ9G/6SiTI7VPqidld9TDefL9tX87bTKExWZZUF5PeRyqtXqd8fQi2qmfIedkwsNQ==", "optional": true, "peer": true, "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@popperjs/core": { @@ -8171,6 +8492,80 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@project-serum/sol-wallet-adapter": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@project-serum/sol-wallet-adapter/-/sol-wallet-adapter-0.2.6.tgz", + "integrity": "sha512-cpIb13aWPW8y4KzkZAPDgw+Kb+DXjCC6rZoH74MGm3I/6e/zKyGnfAuW5olb2zxonFqsYgnv7ev8MQnvSgJ3/g==", + "dependencies": { + "bs58": "^4.0.1", + "eventemitter3": "^4.0.7" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.5.0" + } + }, + "node_modules/@project-serum/sol-wallet-adapter/node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@radix-ui/number": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.1.tgz", @@ -8274,9 +8669,9 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.0.tgz", - "integrity": "sha512-oiSJcsjbdC8JqbXrOuhOd7oaEaPp3x2L2zn6V7ie6SSpEjrAha/WabDX4po6laGwbhAu9DT0XxHL0DmcIXrR0A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", "dependencies": { "@radix-ui/primitive": "1.1.0", "@radix-ui/react-compose-refs": "1.1.0", @@ -8285,7 +8680,7 @@ "@radix-ui/react-focus-guards": "1.1.0", "@radix-ui/react-focus-scope": "1.1.0", "@radix-ui/react-id": "1.1.0", - "@radix-ui/react-portal": "1.1.0", + "@radix-ui/react-portal": "1.1.1", "@radix-ui/react-presence": "1.1.0", "@radix-ui/react-primitive": "2.0.0", "@radix-ui/react-slot": "1.1.0", @@ -8721,11 +9116,12 @@ } }, "node_modules/@radix-ui/react-portal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.0.tgz", - "integrity": "sha512-0tXZ5O6qAVvuN9SWP0X+zadHf9hzHiMf/vxOU+kXO+fbtS8lS57MXa6EmikDxk9s/Bmkk80+dcxgbvisIyeqxg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", "dependencies": { - "@radix-ui/react-primitive": "2.0.0" + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", @@ -8795,6 +9191,20 @@ } } }, + "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-presence": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", @@ -10661,9 +11071,9 @@ } }, "node_modules/@rnx-kit/chromium-edge-launcher/node_modules/@types/node": { - "version": "18.19.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.37.tgz", - "integrity": "sha512-Pi53fdVMk7Ig5IfAMltQQMgtY7xLzHaEous8IQasYsdQbYK3v90FkxI3XYQCe/Qme58pqp14lXJIsFmGP8VoZQ==", + "version": "18.19.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz", + "integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==", "peer": true, "dependencies": { "undici-types": "~5.26.4" @@ -11051,9 +11461,9 @@ } }, "node_modules/@safe-global/safe-gateway-typescript-sdk": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.21.4.tgz", - "integrity": "sha512-BCY+7RtCfjkGO8X6crBRqlXPqAGM/0Ki/k0PWLYxV3IGmwM6ah2qFGkpp1omWQsdILdiKWxsmIKiderAWOyLjA==", + "version": "3.21.7", + "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.21.7.tgz", + "integrity": "sha512-V9vOqQjb/O0Ylt5sKUtVl6f7fKDpH7HUQUCEON42BXk4PUpcKWdmziQjmf3/PR3OnkahcmXb7ULNwUi+04HmCw==", "engines": { "node": ">=16" } @@ -11864,6 +12274,34 @@ "node": ">=5.10" } }, + "node_modules/@solana/wallet-adapter-alpha": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-alpha/-/wallet-adapter-alpha-0.1.10.tgz", + "integrity": "sha512-TOUhDyUNSmp8bqeUueN0LPmurTAEmYm3PTrPGSnsq6JFeTzwTv5xZRygtCvULpBzCPZu/7AfIqh/TSoz4P92aw==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-avana": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-avana/-/wallet-adapter-avana-0.1.13.tgz", + "integrity": "sha512-dvKDzaFo9KgfNh0ohI6qOBTnOU2f6cHKPiDxdtLfXVubdic1mUYzuA2PcrBZQuRc5EBcvHbGCpr3Ds90cGB+xQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-adapter-backpack": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-backpack/-/wallet-adapter-backpack-0.1.14.tgz", @@ -11901,6 +12339,266 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, + "node_modules/@solana/wallet-adapter-bitkeep": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-bitkeep/-/wallet-adapter-bitkeep-0.3.20.tgz", + "integrity": "sha512-v6Jd13CZOPNIAX0nFlopAJ3HDvC+MhiB4sde3C8sSnNbjVi9h1WLHBmaUfgqU6mAyhDjWUZjKt4zYlMhLdp/bg==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-bitpie": { + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-bitpie/-/wallet-adapter-bitpie-0.5.18.tgz", + "integrity": "sha512-gEflEwAyUbfmU4NEmsoDYt1JNFyoBQGm99BBvrvXdJsDdExvT6PwHNi5YlQKp1A4EAqjqaEj+nQzr6ygUpmCBQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-clover": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-clover/-/wallet-adapter-clover-0.4.19.tgz", + "integrity": "sha512-48PoaPte/SRYeU25bvOSmSEqoKCcyOBH9CXebsDcXkrgf+g46KRlAlsY605q1ebzr+iaFEONtTdxW8LthvJtbA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-coin98": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-coin98/-/wallet-adapter-coin98-0.5.20.tgz", + "integrity": "sha512-gnDFNsFq4IeB6jtQj6fZOUthuuQpvtomCkwkwsOWARNhl8nhnsfbuNs3r4XaT4Q79my07ogNQUBPGKY/8CqjiA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23", + "bs58": "^4.0.1" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-coinbase": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-coinbase/-/wallet-adapter-coinbase-0.1.19.tgz", + "integrity": "sha512-hcf9ieAbQxD2g8/5glXVAt67w+3iixpjMMZC7lT7Wa8SJZsq6lmISC9AtZctDEQcWSVV0IkedZp3bg6bp22kng==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-coinhub": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-coinhub/-/wallet-adapter-coinhub-0.3.18.tgz", + "integrity": "sha512-yeJo+cHVlUBlH16Q+knnFDJrH9wzEB3zvSq57PXfqvlWSjySm4PkkK7srRoAwfNOxL/eArSJWfBwRprsymttJQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-fractal": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-fractal/-/wallet-adapter-fractal-0.1.8.tgz", + "integrity": "sha512-lV/rXOMQSR7sBIEDx8g0jwvXP/fT2Vw/47CSj9BaVYC5LGphhuoYbcI4ko1y0Zv+dJu8JVRTeKbnaiRBjht5DA==", + "dependencies": { + "@fractalwagmi/solana-wallet-adapter": "^0.1.1", + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-huobi": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-huobi/-/wallet-adapter-huobi-0.1.15.tgz", + "integrity": "sha512-VKwlK0fE7v97NEWwP86iBY/xgnB3fQJv2/RYaw8ODAcfJqVQZAV6EhDR8fo6++jdS1KkcWc2GcHdBMrqPli3yQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-hyperpay": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-hyperpay/-/wallet-adapter-hyperpay-0.1.14.tgz", + "integrity": "sha512-K0qMVpPHbeIVAvhwnn+2GR8jjBe/a5EP514TL/10SQQ8vTLd7ggNWZdTRCjUkHRlsbTOK7yYWAOHu3gx7429rw==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-keystone": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-keystone/-/wallet-adapter-keystone-0.1.15.tgz", + "integrity": "sha512-2A31/vuDRAfASOEyWvJ2YjtwCQohwim3/K+KzhPfvG20C4wr6agDbMXi1T2lDWwrd13kyP+dIgOzPfuLn09tWw==", + "dependencies": { + "@keystonehq/sol-keyring": "^0.3.1", + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-krystal": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-krystal/-/wallet-adapter-krystal-0.1.12.tgz", + "integrity": "sha512-umQV9cbLZcqJFkcjpdOgPvTeDvUjcivRSzWgbx27drmeQ9bi4w9bYH5XkFmbj9iD98q+fjrYQUOK772IHZqrkQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-ledger": { + "version": "0.9.25", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-ledger/-/wallet-adapter-ledger-0.9.25.tgz", + "integrity": "sha512-59yD3aveLwlzXqk4zBCaPLobeqAhmtMxPizfUBOjzwRKyepi1Nnnt9AC9Af3JrweU2x4qySRxAaZfU/iNqJ3rQ==", + "dependencies": { + "@ledgerhq/devices": "6.27.1", + "@ledgerhq/hw-transport": "6.27.1", + "@ledgerhq/hw-transport-webhid": "6.27.1", + "@solana/wallet-adapter-base": "^0.9.23", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-mathwallet": { + "version": "0.9.18", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-mathwallet/-/wallet-adapter-mathwallet-0.9.18.tgz", + "integrity": "sha512-sleBX+wB8Wahu2lLBCWihkFtnl64DMJgla/kgsf75PCNmNA93+WLA4gYOK+fFKeBkU12a/Hp5oZKEQsQGFPSOA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-neko": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-neko/-/wallet-adapter-neko-0.2.12.tgz", + "integrity": "sha512-ei1QoQZhiYMuH/qm3bnXlueT0jQmH4tZfQvEwudFB8+a0fLtSA8lZU+CYI1jd1YLDjkUEIiXV6R/u32nlCuYDA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-nightly": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-nightly/-/wallet-adapter-nightly-0.1.16.tgz", + "integrity": "sha512-JaPzT8R4HHUqGn/QdElx9iRW98h0NaANBt0j3CZZYWlqsdG0f8fFfy2xofILA+qnDL6NaRI9AzQ4NcQGuVZsVQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-nufi": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-nufi/-/wallet-adapter-nufi-0.1.17.tgz", + "integrity": "sha512-ggTZKvYPJS3m/9hsMaGSH0F8kqumPqP0WdY7WNihWR6O4Pr401kDBdgXPXNSGorIahdPrRBzp5UrahnrlodvTQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-onto": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-onto/-/wallet-adapter-onto-0.1.7.tgz", + "integrity": "sha512-WS4LY0Z0J+NcyEkjdjkD11uKURkRQ/RHMYSFE59U+MuBHggEpXJFZuJzUE9SZbG1ltlLTh13hS5ZuiEz7F+faA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-particle": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-particle/-/wallet-adapter-particle-0.1.12.tgz", + "integrity": "sha512-6tD5pbyuyCRDswDVD5LCakVQ/vIwjO2lXlVvJFDLdhGa6MinbjTHigLmE58nkTgKATRScyS8FuCCzGmYcXGbow==", + "dependencies": { + "@particle-network/solana-wallet": "^1.3.2", + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-adapter-phantom": { "version": "0.9.24", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-phantom/-/wallet-adapter-phantom-0.9.24.tgz", @@ -11915,6 +12613,63 @@ "@solana/web3.js": "^1.77.3" } }, + "node_modules/@solana/wallet-adapter-safepal": { + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-safepal/-/wallet-adapter-safepal-0.5.18.tgz", + "integrity": "sha512-E/EIO5j+f0FS9Yj5o5JLJ/qHh3Se/9jP2KdHKhooWTlXWbQDzrxMjV88qIKKl5sgWEndqRYDuDbAdW+2dhw6hw==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-saifu": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-saifu/-/wallet-adapter-saifu-0.1.15.tgz", + "integrity": "sha512-4nrziKQ+4QInh+COsICpNNUlUt456EJ60SZLxvG/z1AOGpatuzT0gN1+RdMcwHGUtiPBPCkEneUVhFZhhbMJlg==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-salmon": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-salmon/-/wallet-adapter-salmon-0.1.14.tgz", + "integrity": "sha512-CMXdbhaj3prloCJwvxO7e1wfAyRd58QiPB8pjvB4GBbznyoSnHbFXmpxZrKX1Dk6FoJOGBgjB71xnreGcc6oMw==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23", + "salmon-adapter-sdk": "^1.1.1" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-sky": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-sky/-/wallet-adapter-sky-0.1.15.tgz", + "integrity": "sha512-1vlk1/jnlOC/WfDDgDoUk3XtEhB3hq1fKtUb+xj0pVuSOg2Db+8ka9vPPYlVaKHoGvjm30iGGfr3ZrCxVfG6OQ==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-adapter-solflare": { "version": "0.6.28", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-solflare/-/wallet-adapter-solflare-0.6.28.tgz", @@ -11933,6 +12688,97 @@ "@solana/web3.js": "^1.77.3" } }, + "node_modules/@solana/wallet-adapter-solong": { + "version": "0.9.18", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-solong/-/wallet-adapter-solong-0.9.18.tgz", + "integrity": "sha512-n40eemFUbJlOP+FKvn8rgq+YAOW51lEsn7uVz5ZjmiaW6MnRQniId9KkGYPPOUjytFyM+6/4x6IXI+QJknlSqA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-spot": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-spot/-/wallet-adapter-spot-0.1.15.tgz", + "integrity": "sha512-daU2iBTSJp1RGfQrB2uV06+2WHfeyW0uhjoJ3zTkz24kXqv5/ycoPHr8Gi2jkDSGMFkewnjWF8g0KMEzq2VYug==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-tokenary": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-tokenary/-/wallet-adapter-tokenary-0.1.12.tgz", + "integrity": "sha512-iIsOzzEHfRfDUiwYy2BAVGeMl+xBUu92qYK1yAKeKxQPF5McJrnjS3FXwT/onBU5WMdxI6dWm0HKZUiDwefN6A==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-tokenpocket": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-tokenpocket/-/wallet-adapter-tokenpocket-0.4.19.tgz", + "integrity": "sha512-zKXTN+tuKIr/stSxUeG9XPBks9iqeliBWS9JF8eq+8u/Qb/bIDbNSQmd8Z5u1x2lf0puiStc9/iUu/+MLaOSVg==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-torus": { + "version": "0.11.28", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-torus/-/wallet-adapter-torus-0.11.28.tgz", + "integrity": "sha512-bu1oJQ+AoIZICxz8J1lVcdL+iBBrdbynnEs5N6dxwoM/cMGLbX7PGYqaH0J1dEXisA+1H5AzGAnW4UU05VBmLA==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23", + "@toruslabs/solana-embed": "^0.3.4", + "assert": "^2.0.0", + "crypto-browserify": "^3.12.0", + "process": "^0.11.10", + "stream-browserify": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-trezor": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-trezor/-/wallet-adapter-trezor-0.1.2.tgz", + "integrity": "sha512-x4nXntYi1SIv63ZdXWX/Rq/VKwguByKu67WpyUXsu8kOdviksb20bQMuAR7Ue41oJ9zSnLlTxAxA1SuWNkFRBg==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23", + "@trezor/connect-web": "^9.2.1", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-adapter-trust": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-trust/-/wallet-adapter-trust-0.1.13.tgz", @@ -11947,6 +12793,23 @@ "@solana/web3.js": "^1.77.3" } }, + "node_modules/@solana/wallet-adapter-unsafe-burner": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-unsafe-burner/-/wallet-adapter-unsafe-burner-0.1.7.tgz", + "integrity": "sha512-SuBVqQxA1NNUwP4Lo70rLPaM8aWkV1EFAlxkRoRLtwyw/gM8bxTO6+9EVyKCv+ix3yw1rCGIF3B0idXx0i37eQ==", + "dependencies": { + "@noble/curves": "^1.1.0", + "@solana/wallet-adapter-base": "^0.9.23", + "@solana/wallet-standard-features": "^1.1.0", + "@solana/wallet-standard-util": "^1.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-adapter-walletconnect": { "version": "0.1.16", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-walletconnect/-/wallet-adapter-walletconnect-0.1.16.tgz", @@ -11962,6 +12825,69 @@ "@solana/web3.js": "^1.77.3" } }, + "node_modules/@solana/wallet-adapter-wallets": { + "version": "0.19.32", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.19.32.tgz", + "integrity": "sha512-voZYQiIy1yXuKvm7x7YpnQ53eiJC7NpIYSQjzApOUiswiBRVeYcnPO4O/MMPUwsGkS7iZKqKZjo5CnOaN44n+g==", + "dependencies": { + "@solana/wallet-adapter-alpha": "^0.1.10", + "@solana/wallet-adapter-avana": "^0.1.13", + "@solana/wallet-adapter-bitkeep": "^0.3.20", + "@solana/wallet-adapter-bitpie": "^0.5.18", + "@solana/wallet-adapter-clover": "^0.4.19", + "@solana/wallet-adapter-coin98": "^0.5.20", + "@solana/wallet-adapter-coinbase": "^0.1.19", + "@solana/wallet-adapter-coinhub": "^0.3.18", + "@solana/wallet-adapter-fractal": "^0.1.8", + "@solana/wallet-adapter-huobi": "^0.1.15", + "@solana/wallet-adapter-hyperpay": "^0.1.14", + "@solana/wallet-adapter-keystone": "^0.1.15", + "@solana/wallet-adapter-krystal": "^0.1.12", + "@solana/wallet-adapter-ledger": "^0.9.25", + "@solana/wallet-adapter-mathwallet": "^0.9.18", + "@solana/wallet-adapter-neko": "^0.2.12", + "@solana/wallet-adapter-nightly": "^0.1.16", + "@solana/wallet-adapter-nufi": "^0.1.17", + "@solana/wallet-adapter-onto": "^0.1.7", + "@solana/wallet-adapter-particle": "^0.1.12", + "@solana/wallet-adapter-phantom": "^0.9.24", + "@solana/wallet-adapter-safepal": "^0.5.18", + "@solana/wallet-adapter-saifu": "^0.1.15", + "@solana/wallet-adapter-salmon": "^0.1.14", + "@solana/wallet-adapter-sky": "^0.1.15", + "@solana/wallet-adapter-solflare": "^0.6.28", + "@solana/wallet-adapter-solong": "^0.9.18", + "@solana/wallet-adapter-spot": "^0.1.15", + "@solana/wallet-adapter-tokenary": "^0.1.12", + "@solana/wallet-adapter-tokenpocket": "^0.4.19", + "@solana/wallet-adapter-torus": "^0.11.28", + "@solana/wallet-adapter-trezor": "^0.1.2", + "@solana/wallet-adapter-trust": "^0.1.13", + "@solana/wallet-adapter-unsafe-burner": "^0.1.7", + "@solana/wallet-adapter-walletconnect": "^0.1.16", + "@solana/wallet-adapter-xdefi": "^0.1.7" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, + "node_modules/@solana/wallet-adapter-xdefi": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-xdefi/-/wallet-adapter-xdefi-0.1.7.tgz", + "integrity": "sha512-d0icfBOQyaY8kpsdU/wQwaBIahZZPzkXkXfBjpMGwjixD8oeZUFfsg8LC7T1rOIUObeczlocaR/lwtEqWpnaeg==", + "dependencies": { + "@solana/wallet-adapter-base": "^0.9.23" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + } + }, "node_modules/@solana/wallet-standard-chains": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@solana/wallet-standard-chains/-/wallet-standard-chains-1.1.0.tgz", @@ -11985,6 +12911,19 @@ "node": ">=16" } }, + "node_modules/@solana/wallet-standard-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@solana/wallet-standard-util/-/wallet-standard-util-1.1.1.tgz", + "integrity": "sha512-dPObl4ntmfOc0VAGGyyFvrqhL8UkHXmVsgbj0K9RcznKV4KB3MgjGwzo8CTSX5El5lkb0rDeEzFqvToJXRz3dw==", + "dependencies": { + "@noble/curves": "^1.1.0", + "@solana/wallet-standard-chains": "^1.1.0", + "@solana/wallet-standard-features": "^1.2.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@solana/web3.js": { "version": "1.91.7", "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.7.tgz", @@ -13830,9 +14769,9 @@ } }, "node_modules/@storybook/core-common/node_modules/@types/node": { - "version": "18.19.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.37.tgz", - "integrity": "sha512-Pi53fdVMk7Ig5IfAMltQQMgtY7xLzHaEous8IQasYsdQbYK3v90FkxI3XYQCe/Qme58pqp14lXJIsFmGP8VoZQ==", + "version": "18.19.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz", + "integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -14086,9 +15025,9 @@ } }, "node_modules/@storybook/core-server/node_modules/@types/node": { - "version": "18.19.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.37.tgz", - "integrity": "sha512-Pi53fdVMk7Ig5IfAMltQQMgtY7xLzHaEous8IQasYsdQbYK3v90FkxI3XYQCe/Qme58pqp14lXJIsFmGP8VoZQ==", + "version": "18.19.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz", + "integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -14142,9 +15081,9 @@ } }, "node_modules/@storybook/csf": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.8.tgz", - "integrity": "sha512-Ntab9o7LjBCbFIao5l42itFiaSh/Qu+l16l/r/9qmV9LnYZkO+JQ7tzhdlwpgJfhs+B5xeejpdAtftDRyXNajw==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.9.tgz", + "integrity": "sha512-JlZ6v/iFn+iKohKGpYXnMeNeTiiAMeFoDhYnPLIC8GnyyIWqEI9wJYrOK9i9rxlJ8NZAH/ojGC/u/xVC41qSgQ==", "dependencies": { "type-fest": "^2.19.0" } @@ -14646,6 +15585,625 @@ "node": ">= 10" } }, + "node_modules/@toruslabs/base-controllers": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@toruslabs/base-controllers/-/base-controllers-2.9.0.tgz", + "integrity": "sha512-rKc+bR4QB/wdbH0CxLZC5e2PUZcIgkr9yY7TMd3oIffDklaYBnsuC5ES2/rgK1aRUDRWz+qWbTwLqsY6PlT37Q==", + "dependencies": { + "@ethereumjs/util": "^8.0.6", + "@toruslabs/broadcast-channel": "^6.2.0", + "@toruslabs/http-helpers": "^3.3.0", + "@toruslabs/openlogin-jrpc": "^4.0.0", + "async-mutex": "^0.4.0", + "bignumber.js": "^9.1.1", + "bowser": "^2.11.0", + "eth-rpc-errors": "^4.0.3", + "json-rpc-random-id": "^1.0.1", + "lodash": "^4.17.21", + "loglevel": "^1.8.1" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/@metamask/rpc-errors": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@metamask/rpc-errors/-/rpc-errors-5.1.1.tgz", + "integrity": "sha512-JjZnDi2y2CfvbohhBl+FOQRzmFlJpybcQlIk37zEX8B96eVSPbH/T8S0p7cSF8IE33IWx6JkD8Ycsd+2TXFxCw==", + "dependencies": { + "@metamask/utils": "^5.0.0", + "fast-safe-stringify": "^2.0.6" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/@metamask/utils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-5.0.2.tgz", + "integrity": "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==", + "dependencies": { + "@ethereumjs/tx": "^4.1.2", + "@types/debug": "^4.1.7", + "debug": "^4.3.4", + "semver": "^7.3.8", + "superstruct": "^1.0.3" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/@toruslabs/openlogin-jrpc": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-jrpc/-/openlogin-jrpc-4.7.2.tgz", + "integrity": "sha512-9Eb0cPc0lPuS6v2YkQlgzfbRnZ6fLez9Ike5wznoHSFA2/JVu1onwuI56EV1HwswdDrOWPPQEyzI1j9NriZ0ew==", + "dependencies": { + "@metamask/rpc-errors": "^5.1.1", + "@toruslabs/openlogin-utils": "^4.7.0", + "end-of-stream": "^1.4.4", + "events": "^3.3.0", + "fast-safe-stringify": "^2.1.1", + "once": "^1.4.0", + "pump": "^3.0.0", + "readable-stream": "^4.4.2" + }, + "engines": { + "node": ">=16.18.1", + "npm": ">=8.x" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/@toruslabs/openlogin-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-utils/-/openlogin-utils-4.7.0.tgz", + "integrity": "sha512-w6XkHs4WKuufsf/zzteBzs4EJuOknrUmJ+iv5FZ8HzIpMQeL/984CP8HYaFSEYkbGCP4ydAnhY4Uh0QAhpDbPg==", + "dependencies": { + "base64url": "^3.0.1" + }, + "engines": { + "node": ">=16.18.1", + "npm": ">=8.x" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@toruslabs/base-controllers/node_modules/superstruct": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.4.tgz", + "integrity": "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@toruslabs/broadcast-channel": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-6.3.1.tgz", + "integrity": "sha512-BEtJQ+9bMfFoGuCsp5NmxyY+C980Ho+3BZIKSiYwRtl5qymJ+jMX5lsoCppoQblcb34dP6FwEjeFw80Y9QC/rw==", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@toruslabs/eccrypto": "^2.1.1", + "@toruslabs/metadata-helpers": "^3.2.0", + "bowser": "^2.11.0", + "loglevel": "^1.8.1", + "oblivious-set": "1.1.1", + "socket.io-client": "^4.6.1", + "unload": "^2.4.1" + } + }, + "node_modules/@toruslabs/eccrypto": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-2.2.1.tgz", + "integrity": "sha512-7sviL0wLYsfA5ogEAOIdb0tu/QAOFXfHc9B8ONYtF04x4Mg3Nr89LL35FhjaEm055q8Ru7cUQhEFSiqJqm9GCw==", + "dependencies": { + "elliptic": "^6.5.4" + } + }, + "node_modules/@toruslabs/http-helpers": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-3.4.0.tgz", + "integrity": "sha512-CoeJSL32mpp0gmYjxv48odu6pfjHk/rbJHDwCtYPcMHAl+qUQ/DTpVOOn9U0fGkD+fYZrQmZbRkXFgLhiT0ajQ==", + "dependencies": { + "lodash.merge": "^4.6.2", + "loglevel": "^1.8.1" + }, + "engines": { + "node": ">=14.17.0", + "npm": ">=6.x" + }, + "peerDependencies": { + "@babel/runtime": "^7.x", + "@sentry/types": "^7.x" + }, + "peerDependenciesMeta": { + "@sentry/types": { + "optional": true + } + } + }, + "node_modules/@toruslabs/metadata-helpers": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@toruslabs/metadata-helpers/-/metadata-helpers-3.2.0.tgz", + "integrity": "sha512-2bCc6PNKd9y+aWfZQ1FXd47QmfyT4NmmqPGfsqk+sQS2o+MlxIyLuh9uh7deMgXo4b4qBDX+RQGbIKM1zVk56w==", + "dependencies": { + "@toruslabs/eccrypto": "^2.1.1", + "@toruslabs/http-helpers": "^3.4.0", + "elliptic": "^6.5.4", + "ethereum-cryptography": "^2.0.0", + "json-stable-stringify": "^1.0.2" + }, + "engines": { + "node": ">=14.17.0", + "npm": ">=6.x" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/openlogin-jrpc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-jrpc/-/openlogin-jrpc-3.2.0.tgz", + "integrity": "sha512-G+K0EHyVUaAEyeD4xGsnAZRpn/ner8lQ2HC2+pGKg6oGmzKI2wGMDcw2KMH6+HKlfBGVJ5/VR9AQfC/tZlLDmQ==", + "deprecated": "Not supported. Pls upgrade", + "dependencies": { + "@toruslabs/openlogin-utils": "^3.0.0", + "end-of-stream": "^1.4.4", + "eth-rpc-errors": "^4.0.3", + "events": "^3.3.0", + "fast-safe-stringify": "^2.1.1", + "once": "^1.4.0", + "pump": "^3.0.0", + "readable-stream": "^3.6.2" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/openlogin-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-utils/-/openlogin-utils-3.0.0.tgz", + "integrity": "sha512-T5t29/AIFqXc84x4OoAkZWjd0uoP2Lk6iaFndnIIMzCPu+BwwV0spX/jd/3YYNjZ8Po8D+faEnwAhiqemYeK2w==", + "deprecated": "Not supported. Pls upgrade", + "dependencies": { + "base64url": "^3.0.1", + "keccak": "^3.0.3", + "randombytes": "^2.1.0" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@toruslabs/solana-embed": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@toruslabs/solana-embed/-/solana-embed-0.3.4.tgz", + "integrity": "sha512-yj+aBJoBAneap7Jlu9/OOp7irWNuC5CqAhyhVcmb0IjWrCUFnioLdL0U7UfGaqVm/5O0leJh7/Z5Ll+3toWJBg==", + "dependencies": { + "@solana/web3.js": "^1.63.1", + "@toruslabs/base-controllers": "^2.8.0", + "@toruslabs/http-helpers": "^3.3.0", + "@toruslabs/openlogin-jrpc": "^3.2.0", + "eth-rpc-errors": "^4.0.3", + "fast-deep-equal": "^3.1.3", + "is-stream": "^2.0.1", + "lodash-es": "^4.17.21", + "loglevel": "^1.8.1", + "pump": "^3.0.0" + }, + "engines": { + "node": ">=14.17.0", + "npm": ">=6.x" + }, + "peerDependencies": { + "@babel/runtime": "7.x" + } + }, + "node_modules/@trezor/analytics": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@trezor/analytics/-/analytics-1.0.17.tgz", + "integrity": "sha512-FbMzdutD9OVbkhKaIqRJcEvqf7PeBkS3iqmQIKKVC1kL9R2w33D07pPNFMqgUqhV3CrOkjNkQOJpC8AxKxaIQw==", + "dependencies": { + "@trezor/env-utils": "1.0.17", + "@trezor/utils": "9.0.24" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/blockchain-link": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link/-/blockchain-link-2.1.30.tgz", + "integrity": "sha512-OVo/j1pP4o4CzwnSVn2RLi5xO4RyqIxHUywYq/t6aBLM3+sAoHi1vtZM9DBAtrYnoXSsz+w9Uaj2DwSlKJ93bA==", + "dependencies": { + "@solana/buffer-layout": "^4.0.1", + "@solana/web3.js": "^1.90.2", + "@trezor/blockchain-link-types": "1.0.17", + "@trezor/blockchain-link-utils": "1.0.18", + "@trezor/utils": "9.0.24", + "@trezor/utxo-lib": "2.0.10", + "@types/web": "^0.0.138", + "events": "^3.3.0", + "ripple-lib": "^1.10.1", + "socks-proxy-agent": "6.1.1", + "ws": "^8.16.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/blockchain-link-types": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-types/-/blockchain-link-types-1.0.17.tgz", + "integrity": "sha512-N37+dK/FtEaRhhQYpqQxmb041V83pXzHtXfUFvbQ3DAfXG1eBSg/q2UvIpDgQldL3r8uSUEh/Frh5OpR3KURfw==", + "dependencies": { + "@solana/web3.js": "^1.91.6", + "@trezor/type-utils": "1.0.5", + "@trezor/utxo-lib": "2.0.10", + "socks-proxy-agent": "6.1.1" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/blockchain-link-utils": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/@trezor/blockchain-link-utils/-/blockchain-link-utils-1.0.18.tgz", + "integrity": "sha512-kHjZX5GN7AIC+BU111wu6lTomaJiEEwehVgKG0g8rMsE5TWY1m4BazcH1jp5iUV7jR0B67Pd1jRMbgua59GsVQ==", + "dependencies": { + "@mobily/ts-belt": "^3.13.1", + "@solana/web3.js": "^1.91.6", + "@trezor/env-utils": "1.0.17", + "@trezor/utils": "9.0.24" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/blockchain-link/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@trezor/connect": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@trezor/connect/-/connect-9.2.4.tgz", + "integrity": "sha512-uAmdIQrJA2I+1MMe1bYNZqZgsgYx5K4TGJx/10cU5U5uNifN83QBaRekmqQufyTkmXzArvWsbG2UK3oXHLd1OA==", + "dependencies": { + "@babel/preset-typescript": "^7.23.3", + "@ethereumjs/common": "^4.2.0", + "@ethereumjs/tx": "^5.2.1", + "@fivebinaries/coin-selection": "2.2.1", + "@trezor/blockchain-link": "2.1.30", + "@trezor/blockchain-link-types": "1.0.17", + "@trezor/connect-analytics": "1.0.15", + "@trezor/connect-common": "0.0.33", + "@trezor/protobuf": "1.0.13", + "@trezor/protocol": "1.0.9", + "@trezor/schema-utils": "1.0.4", + "@trezor/transport": "1.1.29", + "@trezor/utils": "9.0.24", + "@trezor/utxo-lib": "2.0.10", + "blakejs": "^1.2.1", + "bs58": "^5.0.0", + "bs58check": "^3.0.1", + "cross-fetch": "^4.0.0", + "events": "^3.3.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/connect-analytics": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@trezor/connect-analytics/-/connect-analytics-1.0.15.tgz", + "integrity": "sha512-LAf//pBuogLFBNuS47s3MFs1SfeyT+7Mh959wJTOXTC+DSmHUCLIrcahf6odGxR8moqVXUXgWoWPBQpc9WvKDA==", + "dependencies": { + "@trezor/analytics": "1.0.17" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/connect-common": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@trezor/connect-common/-/connect-common-0.0.33.tgz", + "integrity": "sha512-OCGTjs1M4kmkiICQxz1QP52d31szWnO4EA3YkcLWPSGRNHjMV5c+DxoYU8FM6g1JSz9YW8SxjkGPAvHqowy0ZQ==", + "dependencies": { + "@trezor/env-utils": "1.0.17", + "@trezor/utils": "9.0.24" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/connect-web": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/@trezor/connect-web/-/connect-web-9.2.4.tgz", + "integrity": "sha512-BatNwWzkg7hYLYhkJIuAbV74Uw1l0Lee0Xp+2XdR7muuXPBVs5GbqlFfI0DE6SM8oVvzvvAFufXW/zfYd0iTGA==", + "dependencies": { + "@trezor/connect": "9.2.4", + "@trezor/connect-common": "0.0.33", + "@trezor/utils": "9.0.24", + "events": "^3.3.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/connect/node_modules/@ethereumjs/common": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-4.3.0.tgz", + "integrity": "sha512-shBNJ0ewcPNTUfZduHiczPmqkfJDn0Dh/9BR5fq7xUFTuIq7Fu1Vx00XDwQVIrpVL70oycZocOhBM6nDO+4FEQ==", + "dependencies": { + "@ethereumjs/util": "^9.0.3" + } + }, + "node_modules/@trezor/connect/node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@trezor/connect/node_modules/@ethereumjs/tx": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-5.3.0.tgz", + "integrity": "sha512-uv++XYuIfuqYbvymL3/o14hHuC6zX0nRQ1nI2FHsbkkorLZ2ChEIDqVeeVk7Xc9/jQNU/22sk9qZZkRlsveXxw==", + "dependencies": { + "@ethereumjs/common": "^4.3.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/util": "^9.0.3", + "ethereum-cryptography": "^2.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@trezor/connect/node_modules/@ethereumjs/util": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.0.3.tgz", + "integrity": "sha512-PmwzWDflky+7jlZIFqiGsBPap12tk9zK5SVH9YW2OEnDN7OEhCjUOMzbOqwuClrbkSIkM2ERivd7sXZ48Rh/vg==", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@trezor/connect/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@trezor/connect/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@trezor/connect/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, + "node_modules/@trezor/connect/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/@trezor/env-utils": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@trezor/env-utils/-/env-utils-1.0.17.tgz", + "integrity": "sha512-S6pY5VqmIdhQaXFOvfXJtxLkZs3WYeL1ZES9ZMmvCeP/mu0uBByxUoywFNu2bLaLYNitMYgCVFMCmo7jWfss0Q==", + "dependencies": { + "ua-parser-js": "^1.0.37" + }, + "peerDependencies": { + "expo-constants": "*", + "expo-localization": "*", + "react-native": "*", + "tslib": "^2.6.2" + }, + "peerDependenciesMeta": { + "expo-constants": { + "optional": true + }, + "expo-localization": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/@trezor/protobuf": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@trezor/protobuf/-/protobuf-1.0.13.tgz", + "integrity": "sha512-RqQsqEbwfJGYjzu/CG47v17fiABEZvlCvdLMWlfCB+LB5hzamTLEE3pMRrnsC5iJIPaA+ZSnhAIWznqVf8NOhw==", + "dependencies": { + "@trezor/schema-utils": "1.0.4", + "long": "^4.0.0", + "protobufjs": "7.2.6" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/protocol": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@trezor/protocol/-/protocol-1.0.9.tgz", + "integrity": "sha512-BlSVmHL9tYWZ3HvXHD9H4JFkzZM5LXXVwS10SFHDftpj7CcVqXumxKLcHhSV8LKEw0rVYUXgER7+lQ8n2UdrLQ==", + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/schema-utils": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@trezor/schema-utils/-/schema-utils-1.0.4.tgz", + "integrity": "sha512-wDcGD1ErjrDNc8afGihHRwGvfdKZzOOt3iJcrKkgKZAmVazYi8GpWwpIHDhY2yI0oqewAVNNhE9B26t9uWNFng==", + "dependencies": { + "@sinclair/typebox": "^0.31.28", + "ts-mixer": "^6.0.3" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/schema-utils/node_modules/@sinclair/typebox": { + "version": "0.31.28", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.31.28.tgz", + "integrity": "sha512-/s55Jujywdw/Jpan+vsy6JZs1z2ZTGxTmbZTPiuSL2wz9mfzA2gN1zzaqmvfi4pq+uOt7Du85fkiwv5ymW84aQ==" + }, + "node_modules/@trezor/transport": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/@trezor/transport/-/transport-1.1.29.tgz", + "integrity": "sha512-odGOuXnF43BRkS0jZmf59SHKMDG8SwyasxYss+lItRVCsia5S3bMBFGVRez0PHAIQ+GsS7j6QOc95tEC5at4Bg==", + "dependencies": { + "@trezor/protobuf": "1.0.13", + "@trezor/protocol": "1.0.9", + "@trezor/utils": "9.0.24", + "cross-fetch": "^4.0.0", + "json-stable-stringify": "^1.1.1", + "long": "^4.0.0", + "protobufjs": "7.2.6", + "usb": "^2.11.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/transport/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/@trezor/type-utils": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@trezor/type-utils/-/type-utils-1.0.5.tgz", + "integrity": "sha512-AK8Gg5yoPAMvxqK49LXr8yoop1oxIXRxkOhCuWGV51fDM02/L1dhGNKC04UyCTyG7jZ+H1f5ywuna81BVT/ptQ==" + }, + "node_modules/@trezor/utils": { + "version": "9.0.24", + "resolved": "https://registry.npmjs.org/@trezor/utils/-/utils-9.0.24.tgz", + "integrity": "sha512-U03PQChHODjmlMrN7XVR46PnV3F6XlO6ynGSgXdgQffhE/EmMq5U4mA9lqtnPf56xWaU+lQVLmF6/LN2GNQIAg==", + "dependencies": { + "bignumber.js": "^9.1.2" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/utxo-lib": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@trezor/utxo-lib/-/utxo-lib-2.0.10.tgz", + "integrity": "sha512-UIU8JWXnx0ykSYKWWv5MQV08sMdr0kRXG9rlVXkSi7y73FT3O76GTqiDz8iRo5If0gZUNEnk261W1oEnha1tTw==", + "dependencies": { + "@trezor/utils": "9.0.24", + "bchaddrjs": "^0.5.2", + "bech32": "^2.0.0", + "bip66": "^1.1.5", + "bitcoin-ops": "^1.4.1", + "blake-hash": "^2.0.0", + "blakejs": "^1.2.1", + "bn.js": "^5.2.1", + "bs58": "^5.0.0", + "bs58check": "^3.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "int64-buffer": "^1.0.1", + "pushdata-bitcoin": "^1.0.1", + "tiny-secp256k1": "^1.1.6", + "typeforce": "^1.18.0", + "varuint-bitcoin": "^1.1.2", + "wif": "^4.0.0" + }, + "peerDependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@trezor/utxo-lib/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@trezor/utxo-lib/node_modules/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, + "node_modules/@trezor/utxo-lib/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@trezor/utxo-lib/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -15072,6 +16630,16 @@ "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, + "node_modules/@types/w3c-web-usb": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz", + "integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==" + }, + "node_modules/@types/web": { + "version": "0.0.138", + "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.138.tgz", + "integrity": "sha512-oQD74hl+cNCZdSWIupJCXZ2azTuB3MJ/mrWlgYt+v4pD7/Dr78gl5hKAdieZNf9NrAqwUez79bHtnFVSNSscWA==" + }, "node_modules/@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -15521,14 +17089,14 @@ "dev": true }, "node_modules/@vue/compiler-core": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.29.tgz", - "integrity": "sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.30.tgz", + "integrity": "sha512-ZL8y4Xxdh8O6PSwfdZ1IpQ24PjTAieOz3jXb/MDTfDtANcKBMxg1KLm6OX2jofsaQGYfIVzd3BAG22i56/cF1w==", "devOptional": true, "peer": true, "dependencies": { "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.29", + "@vue/shared": "3.4.30", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" @@ -15542,28 +17110,28 @@ "peer": true }, "node_modules/@vue/compiler-dom": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.29.tgz", - "integrity": "sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.30.tgz", + "integrity": "sha512-+16Sd8lYr5j/owCbr9dowcNfrHd+pz+w2/b5Lt26Oz/kB90C9yNbxQ3bYOvt7rI2bxk0nqda39hVcwDFw85c2Q==", "devOptional": true, "peer": true, "dependencies": { - "@vue/compiler-core": "3.4.29", - "@vue/shared": "3.4.29" + "@vue/compiler-core": "3.4.30", + "@vue/shared": "3.4.30" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.29.tgz", - "integrity": "sha512-zygDcEtn8ZimDlrEQyLUovoWgKQic6aEQqRXce2WXBvSeHbEbcAsXyCk9oG33ZkyWH4sl9D3tkYc1idoOkdqZQ==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.30.tgz", + "integrity": "sha512-8vElKklHn/UY8+FgUFlQrYAPbtiSB2zcgeRKW7HkpSRn/JjMRmZvuOtwDx036D1aqKNSTtXkWRfqx53Qb+HmMg==", "devOptional": true, "peer": true, "dependencies": { "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.29", - "@vue/compiler-dom": "3.4.29", - "@vue/compiler-ssr": "3.4.29", - "@vue/shared": "3.4.29", + "@vue/compiler-core": "3.4.30", + "@vue/compiler-dom": "3.4.30", + "@vue/compiler-ssr": "3.4.30", + "@vue/shared": "3.4.30", "estree-walker": "^2.0.2", "magic-string": "^0.30.10", "postcss": "^8.4.38", @@ -15607,68 +17175,68 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.29.tgz", - "integrity": "sha512-rFbwCmxJ16tDp3N8XCx5xSQzjhidYjXllvEcqX/lopkoznlNPz3jyy0WGJCyhAaVQK677WWFt3YO/WUEkMMUFQ==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.30.tgz", + "integrity": "sha512-ZJ56YZGXJDd6jky4mmM0rNaNP6kIbQu9LTKZDhcpddGe/3QIalB1WHHmZ6iZfFNyj5mSypTa4+qDJa5VIuxMSg==", "devOptional": true, "peer": true, "dependencies": { - "@vue/compiler-dom": "3.4.29", - "@vue/shared": "3.4.29" + "@vue/compiler-dom": "3.4.30", + "@vue/shared": "3.4.30" } }, "node_modules/@vue/reactivity": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.29.tgz", - "integrity": "sha512-w8+KV+mb1a8ornnGQitnMdLfE0kXmteaxLdccm2XwdFxXst4q/Z7SEboCV5SqJNpZbKFeaRBBJBhW24aJyGINg==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.30.tgz", + "integrity": "sha512-bVJurnCe3LS0JII8PPoAA63Zd2MBzcKrEzwdQl92eHCcxtIbxD2fhNwJpa+KkM3Y/A4T5FUnmdhgKwOf6BfbcA==", "devOptional": true, "peer": true, "dependencies": { - "@vue/shared": "3.4.29" + "@vue/shared": "3.4.30" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.29.tgz", - "integrity": "sha512-s8fmX3YVR/Rk5ig0ic0NuzTNjK2M7iLuVSZyMmCzN/+Mjuqqif1JasCtEtmtoJWF32pAtUjyuT2ljNKNLeOmnQ==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.30.tgz", + "integrity": "sha512-qaFEbnNpGz+tlnkaualomogzN8vBLkgzK55uuWjYXbYn039eOBZrWxyXWq/7qh9Bz2FPifZqGjVDl/FXiq9L2g==", "devOptional": true, "peer": true, "dependencies": { - "@vue/reactivity": "3.4.29", - "@vue/shared": "3.4.29" + "@vue/reactivity": "3.4.30", + "@vue/shared": "3.4.30" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.29.tgz", - "integrity": "sha512-gI10atCrtOLf/2MPPMM+dpz3NGulo9ZZR9d1dWo4fYvm+xkfvRrw1ZmJ7mkWtiJVXSsdmPbcK1p5dZzOCKDN0g==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.30.tgz", + "integrity": "sha512-tV6B4YiZRj5QsaJgw2THCy5C1H+2UeywO9tqgWEc21tn85qHEERndHN/CxlyXvSBFrpmlexCIdnqPuR9RM9thw==", "devOptional": true, "peer": true, "dependencies": { - "@vue/reactivity": "3.4.29", - "@vue/runtime-core": "3.4.29", - "@vue/shared": "3.4.29", + "@vue/reactivity": "3.4.30", + "@vue/runtime-core": "3.4.30", + "@vue/shared": "3.4.30", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.29.tgz", - "integrity": "sha512-HMLCmPI2j/k8PVkSBysrA2RxcxC5DgBiCdj7n7H2QtR8bQQPqKAe8qoaxLcInzouBmzwJ+J0x20ygN/B5mYBng==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.30.tgz", + "integrity": "sha512-TBD3eqR1DeDc0cMrXS/vEs/PWzq1uXxnvjoqQuDGFIEHFIwuDTX/KWAQKIBjyMWLFHEeTDGYVsYci85z2UbTDg==", "devOptional": true, "peer": true, "dependencies": { - "@vue/compiler-ssr": "3.4.29", - "@vue/shared": "3.4.29" + "@vue/compiler-ssr": "3.4.30", + "@vue/shared": "3.4.30" }, "peerDependencies": { - "vue": "3.4.29" + "vue": "3.4.30" } }, "node_modules/@vue/shared": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.29.tgz", - "integrity": "sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.30.tgz", + "integrity": "sha512-CLg+f8RQCHQnKvuHY9adMsMaQOcqclh6Z5V9TaoMgy0ut0tz848joZ7/CYFFyF/yZ5i2yaw7Fn498C+CNZVHIg==", "devOptional": true, "peer": true }, @@ -15834,19 +17402,6 @@ "uint8arrays": "3.1.0" } }, - "node_modules/@walletconnect/core/node_modules/@walletconnect/types": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.13.3.tgz", - "integrity": "sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==", - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, "node_modules/@walletconnect/core/node_modules/@walletconnect/utils": { "version": "2.13.3", "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.13.3.tgz", @@ -15960,6 +17515,19 @@ "events": "3.3.0" } }, + "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/types": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.13.0.tgz", + "integrity": "sha512-MWaVT0FkZwzYbD3tvk8F+2qpPlz1LUSWHuqbINUtMXnSzJtXN49Y99fR7FuBhNFtDalfuWsEK17GrNA+KnAsPQ==", + "dependencies": { + "@walletconnect/events": "1.0.1", + "@walletconnect/heartbeat": "1.2.2", + "@walletconnect/jsonrpc-types": "1.0.4", + "@walletconnect/keyvaluestorage": "1.1.1", + "@walletconnect/logger": "2.1.2", + "events": "3.3.0" + } + }, "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/universal-provider": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.13.0.tgz", @@ -16503,19 +18071,6 @@ "events": "3.3.0" } }, - "node_modules/@walletconnect/sign-client/node_modules/@walletconnect/types": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.13.3.tgz", - "integrity": "sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==", - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, "node_modules/@walletconnect/sign-client/node_modules/@walletconnect/utils": { "version": "2.13.3", "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.13.3.tgz", @@ -16573,9 +18128,9 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/types": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.13.0.tgz", - "integrity": "sha512-MWaVT0FkZwzYbD3tvk8F+2qpPlz1LUSWHuqbINUtMXnSzJtXN49Y99fR7FuBhNFtDalfuWsEK17GrNA+KnAsPQ==", + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.13.3.tgz", + "integrity": "sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==", "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", @@ -16949,7 +18504,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "peer": true, "dependencies": { "event-target-shim": "^5.0.0" }, @@ -17018,7 +18572,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, "dependencies": { "debug": "4" }, @@ -17389,7 +18942,6 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -17399,14 +18951,12 @@ "node_modules/asn1.js/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/assert": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "is-nan": "^1.3.2", @@ -17694,6 +19244,28 @@ } ] }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bchaddrjs": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/bchaddrjs/-/bchaddrjs-0.5.2.tgz", + "integrity": "sha512-OO7gIn3m7ea4FVx4cT8gdlWQR2+++EquhdpWQJH9BQjK63tJJ6ngB3QMZDO6DiBoXiIGUsTPHjlrHVxPGcGxLQ==", + "dependencies": { + "bs58check": "2.1.2", + "buffer": "^6.0.3", + "cashaddrjs": "0.4.4", + "stream-browserify": "^3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -17791,6 +19363,19 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bitcoin-ops": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", + "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==" + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -17824,6 +19409,30 @@ "ieee754": "^1.1.13" } }, + "node_modules/blake-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz", + "integrity": "sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/blake-hash/node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -17976,7 +19585,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -17990,7 +19598,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, "dependencies": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -18001,7 +19608,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, "dependencies": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -18013,7 +19619,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, "dependencies": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" @@ -18023,7 +19628,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", - "dev": true, "dependencies": { "bn.js": "^5.2.1", "browserify-rsa": "^4.1.0", @@ -18044,7 +19648,6 @@ "version": "6.5.5", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", - "dev": true, "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -18058,20 +19661,17 @@ "node_modules/browserify-sign/node_modules/elliptic/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/browserify-sign/node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/browserify-sign/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -18085,14 +19685,12 @@ "node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/browserify-sign/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -18100,8 +19698,7 @@ "node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/browserify-zlib": { "version": "0.1.4", @@ -18150,6 +19747,16 @@ "base-x": "^3.0.2" } }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "node_modules/bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -18222,8 +19829,7 @@ "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "node_modules/bufferutil": { "version": "4.0.8", @@ -18401,9 +20007,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001638", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", + "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", "funding": [ { "type": "opencollective", @@ -18419,6 +20025,27 @@ } ] }, + "node_modules/cashaddrjs": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cashaddrjs/-/cashaddrjs-0.4.4.tgz", + "integrity": "sha512-xZkuWdNOh0uq/mxJIng6vYWfTowZLd9F4GMAlp2DwFHlcCqCm91NtuAc47RuV4L7r4PYcY5p6Cr2OKNb4hnkWA==", + "dependencies": { + "big-integer": "1.6.36" + } + }, + "node_modules/cashaddrjs/node_modules/big-integer": { + "version": "1.6.36", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", + "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/cbor-sync": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.4.tgz", + "integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==" + }, "node_modules/cbw-sdk": { "name": "@coinbase/wallet-sdk", "version": "3.9.3", @@ -18573,7 +20200,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -19219,6 +20845,14 @@ "node": ">=10" } }, + "node_modules/crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dependencies": { + "buffer": "^5.1.0" + } + }, "node_modules/crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", @@ -19230,11 +20864,33 @@ "node": ">=0.8" } }, + "node_modules/crc/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -19243,14 +20899,12 @@ "node_modules/create-ecdh/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -19263,7 +20917,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -19317,7 +20970,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, "dependencies": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -19335,6 +20987,11 @@ "node": "*" } }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -19671,6 +21328,11 @@ "node": ">=0.10.0" } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, "node_modules/decode-uri-component": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", @@ -19828,7 +21490,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -19932,7 +21593,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -20027,7 +21687,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -20037,8 +21696,7 @@ "node_modules/diffie-hellman/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/dijkstrajs": { "version": "1.0.3", @@ -20105,6 +21763,15 @@ "node": ">=12" } }, + "node_modules/draggabilly": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/draggabilly/-/draggabilly-3.0.0.tgz", + "integrity": "sha512-aEs+B6prbMZQMxc9lgTpCBfyCUhRur/VFucHhIOvlvvdARTj7TcDmX/cdOUtqbjJJUh7+agyJXR5Z6IFe1MxwQ==", + "dependencies": { + "get-size": "^3.0.0", + "unidragger": "^3.0.0" + } + }, "node_modules/duplexify": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", @@ -20160,9 +21827,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.807", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz", - "integrity": "sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A==" + "version": "1.4.812", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.812.tgz", + "integrity": "sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -21298,11 +22965,15 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, + "node_modules/ev-emitter": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-2.1.2.tgz", + "integrity": "sha512-jQ5Ql18hdCQ4qS+RCrbLfz1n+Pags27q5TwMKvZyhp5hh2UULUYZUy1keqj6k6SYsdqIYjnmz7xyyEY0V67B8Q==" + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "peer": true, "engines": { "node": ">=6" } @@ -21329,7 +23000,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -21373,6 +23043,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" + }, "node_modules/expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", @@ -21971,9 +23646,9 @@ "peer": true }, "node_modules/flow-parser": { - "version": "0.238.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.238.0.tgz", - "integrity": "sha512-VE7XSv1epljsIN2YeBnxCmGJihpNIAnLLu/pPOdA+Gkso7qDltJwUi6vfHjgxdBbjSdAuPGnhuOHJUQG+yYwIg==", + "version": "0.238.2", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.238.2.tgz", + "integrity": "sha512-fs7FSnzzKF6oSzjk14JlBHt82DPchYHVsXtPi4Fkn+qrunVjWaBZY7nSO/mC9X4l9+wRah/R69DRd5NGDOrWqw==", "engines": { "node": ">=0.4.0" } @@ -22310,6 +23985,11 @@ "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==" }, + "node_modules/get-size": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-size/-/get-size-3.0.0.tgz", + "integrity": "sha512-Y8aiXLq4leR7807UY0yuKEwif5s3kbVp1nTv+i4jBeoUzByTLKkLWu/HorS6/pB+7gsB0o7OTogC8AoOOeT0Hw==" + }, "node_modules/get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -22448,9 +24128,9 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -22702,7 +24382,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", - "dev": true, "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -22897,7 +24576,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -23085,6 +24763,14 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/int64-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/int64-buffer/-/int64-buffer-1.0.1.tgz", + "integrity": "sha512-+3azY4pXrjAupJHU1V9uGERWlhoqNswJNji6aD/02xac7oxol508AsMC5lxKhEqyZeDFy3enq5OGWXF4u75hiw==", + "engines": { + "node": ">= 4.5.0" + } + }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -23112,6 +24798,23 @@ "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==" }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -23239,11 +24942,14 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -23432,7 +25138,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3" @@ -24273,6 +25978,16 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbi": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", + "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==" + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, "node_modules/jsc-android": { "version": "250231.0.0", "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250231.0.0.tgz", @@ -24374,6 +26089,23 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/json-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", + "dependencies": { + "call-bind": "^1.0.5", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -24404,6 +26136,14 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -24421,6 +26161,14 @@ "node": ">=0.10.0" } }, + "node_modules/jsonschema": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.2.tgz", + "integrity": "sha512-iX5OFQ6yx9NgbHCwse51ohhKgLuLL7Z5cNOeZOPIlDUtAMrxlruHLzVZxbltdHE5mEDXN+75oFOwq6Gn0MZwsA==", + "engines": { + "node": "*" + } + }, "node_modules/JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -24458,6 +26206,11 @@ "npm": ">=6" } }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -24773,6 +26526,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -24852,8 +26610,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.mergewith": { "version": "4.6.2", @@ -24907,6 +26664,23 @@ "logkitty": "bin/logkitty.js" } }, + "node_modules/loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -25039,7 +26813,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -25698,7 +27471,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, "dependencies": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -25710,8 +27482,7 @@ "node_modules/miller-rabin/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/mime": { "version": "3.0.0", @@ -26045,6 +27816,11 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nan": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", + "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==" + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -26658,9 +28434,12 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -26669,7 +28448,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1" @@ -26685,7 +28463,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -26694,7 +28471,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -26788,6 +28564,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oblivious-set": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.1.1.tgz", + "integrity": "sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==" + }, "node_modules/ofetch": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.4.tgz", @@ -27086,7 +28867,6 @@ "version": "5.1.7", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", - "dev": true, "dependencies": { "asn1.js": "^4.10.1", "browserify-aes": "^1.2.0", @@ -27120,15 +28900,15 @@ } }, "node_modules/parse-github-url": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.3.tgz", + "integrity": "sha512-tfalY5/4SqGaV/GIGzWyHnFjlpTPTNpENR9Ea2lLldSJ8EWXMsvacWucqY3m3I4YPtas15IxTLQVQ5NSYXPrww==", "dev": true, "bin": { "parse-github-url": "cli.js" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, "node_modules/parse-json": { @@ -27278,7 +29058,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -27857,6 +29636,34 @@ "react-is": "^16.13.1" } }, + "node_modules/protobufjs": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/protobufjs/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -27889,7 +29696,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, "dependencies": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -27902,8 +29708,7 @@ "node_modules/public-encrypt/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/pump": { "version": "3.0.0", @@ -28076,6 +29881,14 @@ "async-limiter": "~1.0.0" } }, + "node_modules/pushdata-bitcoin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", + "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==", + "dependencies": { + "bitcoin-ops": "^1.3.0" + } + }, "node_modules/qr-code-styling": { "version": "1.6.0-rc.1", "resolved": "https://registry.npmjs.org/qr-code-styling/-/qr-code-styling-1.6.0-rc.1.tgz", @@ -28084,6 +29897,11 @@ "qrcode-generator": "^1.4.3" } }, + "node_modules/qr.js": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz", + "integrity": "sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==" + }, "node_modules/qrcode": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz", @@ -28227,7 +30045,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -28236,7 +30053,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, "dependencies": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -28305,9 +30121,9 @@ } }, "node_modules/react-devtools-core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-5.2.0.tgz", - "integrity": "sha512-vZK+/gvxxsieAoAyYaiRIVFxlajb7KXhgBDV7OsoMzaAE+IqGpoxusBjIgq5ibqA2IloKu0p9n7tE68z1xs18A==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-5.3.0.tgz", + "integrity": "sha512-IG3T+azv48Oc5VLdHR4XdBNKNZIUOKRtx0sJMRvb++Zom/uqtx73j6u37JCsIBNIaq6vA7RPH5Bbcf/Wj53KXA==", "peer": true, "dependencies": { "shell-quote": "^1.6.1", @@ -28409,6 +30225,29 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "node_modules/react-modal": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", + "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", + "dependencies": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" + } + }, "node_modules/react-native": { "version": "0.74.2", "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.74.2.tgz", @@ -29263,12 +31102,106 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, + "node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-binary-codec": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.11.0.tgz", + "integrity": "sha512-g7+gs3T+NfoeW6vIq5dcN0CkIT4t/zwRzFxz8X2RzfbrWRnewPUKqQbmBgs05tXLX5NuWPaneiaAVpFpYBcdfw==", + "dependencies": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-lib": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/ripple-lib/-/ripple-lib-1.10.1.tgz", + "integrity": "sha512-OQk+Syl2JfxKxV2KuF/kBMtnh012I5tNnziP3G4WDGCGSIAgeqkOgkR59IQ0YDNrs1YW8GbApxrdMSRi/QClcA==", + "deprecated": "ripple-lib is deprecated. Please migrate to xrpl.js using this migration guide: https://xrpl.org/xrpljs2-migration-guide.html", + "dependencies": { + "@types/lodash": "^4.14.136", + "@types/ws": "^7.2.0", + "bignumber.js": "^9.0.0", + "https-proxy-agent": "^5.0.0", + "jsonschema": "1.2.2", + "lodash": "^4.17.4", + "ripple-address-codec": "^4.1.1", + "ripple-binary-codec": "^1.1.3", + "ripple-keypairs": "^1.0.3", + "ripple-lib-transactionparser": "0.8.2", + "ws": "^7.2.0" + }, + "engines": { + "node": ">=10.13.0", + "yarn": "^1.15.2" + } + }, + "node_modules/ripple-lib-transactionparser": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/ripple-lib-transactionparser/-/ripple-lib-transactionparser-0.8.2.tgz", + "integrity": "sha512-1teosQLjYHLyOQrKUQfYyMjDR3MAq/Ga+MJuLUfpBMypl4LZB4bEoMcmG99/+WVTEiZOezJmH9iCSvm/MyxD+g==", + "dependencies": { + "bignumber.js": "^9.0.0", + "lodash": "^4.17.15" + } + }, + "node_modules/ripple-lib/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/rollup": { "version": "4.18.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", @@ -29472,6 +31405,18 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/rtcpeerconnection-shim": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", + "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", + "dependencies": { + "sdp": "^2.6.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -29494,6 +31439,22 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/rxjs/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/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -29561,6 +31522,23 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/salmon-adapter-sdk": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/salmon-adapter-sdk/-/salmon-adapter-sdk-1.1.1.tgz", + "integrity": "sha512-28ysSzmDjx2AbotxSggqdclh9MCwlPJUldKkCph48oS5Xtwu0QOg8T9ZRHS2Mben4Y8sTq6VvxXznKssCYFBJA==", + "dependencies": { + "@project-serum/sol-wallet-adapter": "^0.2.6", + "eventemitter3": "^4.0.7" + }, + "peerDependencies": { + "@solana/web3.js": "^1.44.3" + } + }, + "node_modules/salmon-adapter-sdk/node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -29574,6 +31552,11 @@ "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, + "node_modules/sdp": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", + "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + }, "node_modules/secp256k1": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", @@ -29908,6 +31891,15 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "peer": true }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/smartwrap": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", @@ -29954,6 +31946,32 @@ "node": ">=10.0.0" } }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", + "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.1", + "socks": "^2.6.1" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/sonic-boom": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", @@ -30245,7 +32263,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, "dependencies": { "inherits": "~2.0.4", "readable-stream": "^3.5.0" @@ -31106,6 +33123,27 @@ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, + "node_modules/tiny-secp256k1": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", + "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0", + "bn.js": "^4.11.8", + "create-hmac": "^1.1.7", + "elliptic": "^6.4.0", + "nan": "^2.13.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tiny-secp256k1/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/tinybench": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz", @@ -31225,6 +33263,11 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" + }, "node_modules/ts-toolbelt": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", @@ -31609,6 +33652,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, "node_modules/types-ramda": { "version": "0.29.10", "resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.29.10.tgz", @@ -31631,6 +33679,28 @@ "node": ">=14.17" } }, + "node_modules/ua-parser-js": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.38.tgz", + "integrity": "sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, "node_modules/ufo": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", @@ -31734,6 +33804,14 @@ "node": ">=4" } }, + "node_modules/unidragger": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unidragger/-/unidragger-3.0.1.tgz", + "integrity": "sha512-RngbGSwBFmqGBWjkaH+yB677uzR95blSQyxq6hYbrQCejH3Mx1nm8DVOuh3M9k2fQyTstWUG5qlgCnNqV/9jVw==", + "dependencies": { + "ev-emitter": "^2.0.0" + } + }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -31798,6 +33876,14 @@ "node": ">= 4.0.0" } }, + "node_modules/unload": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/unload/-/unload-2.4.1.tgz", + "integrity": "sha512-IViSAm8Z3sRBYA+9wc0fLQmU9Nrxb16rcDmIiR6Y9LJSZzI7QY5QsDhqPpKOjAn0O9/kfK1TfNEMMAGPTIraPw==", + "funding": { + "url": "https://github.com/sponsors/pubkey" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -31982,6 +34068,28 @@ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, + "node_modules/usb": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/usb/-/usb-2.13.0.tgz", + "integrity": "sha512-pTNKyxD1DfC1DYu8kFcIdpE8f33e0c2Sbmmi0HEs28HTVC555uocvYR1g5DDv4CBibacCh4BqRyYZJylN4mBbw==", + "hasInstallScript": true, + "dependencies": { + "@types/w3c-web-usb": "^1.0.6", + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.5.0" + }, + "engines": { + "node": ">=12.22.0 <13.0 || >=14.17.0" + } + }, + "node_modules/usb/node_modules/node-addon-api": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.0.0.tgz", + "integrity": "sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, "node_modules/use-callback-ref": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.2.tgz", @@ -32094,10 +34202,32 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/uuidv4": { + "version": "6.2.13", + "resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz", + "integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==", + "dependencies": { + "@types/uuid": "8.3.4", + "uuid": "8.3.2" + } + }, + "node_modules/uuidv4/node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + }, + "node_modules/uuidv4/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -32147,6 +34277,14 @@ } } }, + "node_modules/varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "dependencies": { + "safe-buffer": "^5.1.1" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -32964,17 +35102,17 @@ } }, "node_modules/vue": { - "version": "3.4.29", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz", - "integrity": "sha512-8QUYfRcYzNlYuzKPfge1UWC6nF9ym0lx7mpGVPJYNhddxEf3DD0+kU07NTL0sXuiT2HuJuKr/iEO8WvXvT0RSQ==", + "version": "3.4.30", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.30.tgz", + "integrity": "sha512-NcxtKCwkdf1zPsr7Y8+QlDBCGqxvjLXF2EX+yi76rV5rrz90Y6gK1cq0olIhdWGgrlhs9ElHuhi9t3+W5sG5Xw==", "devOptional": true, "peer": true, "dependencies": { - "@vue/compiler-dom": "3.4.29", - "@vue/compiler-sfc": "3.4.29", - "@vue/runtime-dom": "3.4.29", - "@vue/server-renderer": "3.4.29", - "@vue/shared": "3.4.29" + "@vue/compiler-dom": "3.4.30", + "@vue/compiler-sfc": "3.4.30", + "@vue/runtime-dom": "3.4.30", + "@vue/server-renderer": "3.4.30", + "@vue/shared": "3.4.30" }, "peerDependencies": { "typescript": "*" @@ -33158,6 +35296,14 @@ "makeerror": "1.0.12" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/watchpack": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", @@ -33203,6 +35349,19 @@ "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "dev": true }, + "node_modules/webrtc-adapter": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.1.tgz", + "integrity": "sha512-TbrbBmiQBL9n0/5bvDdORc6ZfRY/Z7JnEj+EYOD1ghseZdpJ+nF2yx14k3LgQKc7JZnG7HAcL+zHnY25So9d7A==", + "dependencies": { + "rtcpeerconnection-shim": "^1.2.15", + "sdp": "^2.12.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/whatwg-fetch": { "version": "3.6.20", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", @@ -33344,6 +35503,36 @@ "node": ">=8" } }, + "node_modules/wif": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wif/-/wif-4.0.0.tgz", + "integrity": "sha512-kADznC+4AFJNXpT8rLhbsfI7EmAcorc5nWvAdKUchGmwXEBD3n55q0/GZ3DBmc6auAvuTSsr/utiKizuXdNYOQ==", + "dependencies": { + "bs58check": "^3.0.1" + } + }, + "node_modules/wif/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/wif/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/wif/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -33682,14 +35871,49 @@ } } }, + "packages/adapters": { + "name": "@web3modal/adapters", + "version": "5.0.3", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@web3modal/common": "5.0.3", + "@web3modal/polyfills": "5.0.3", + "@web3modal/scaffold": "5.0.3", + "@web3modal/scaffold-utils": "5.0.3", + "@web3modal/siwe": "5.0.3", + "bs58": "^5.0.0", + "valtio": "1.11.2" + }, + "devDependencies": { + "@wagmi/connectors": "4.3.9", + "@wagmi/core": "2.9.7", + "viem": "2.10.3" + } + }, + "packages/appkit": { + "name": "@web3modal/appkit", + "version": "5.0.3", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@web3modal/common": "5.0.3", + "@web3modal/core": "5.0.3", + "@web3modal/scaffold-ui": "5.0.3", + "@web3modal/siwe": "5.0.3", + "@web3modal/ui": "5.0.3", + "@web3modal/wallet": "5.0.3", + "lit": "3.1.0" + } + }, "packages/cdn": { "name": "@web3modal/cdn", - "version": "5.0.3", + "version": "5.0.4", "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/ethers": "5.0.3", - "@web3modal/wagmi": "5.0.3", + "@web3modal/ethers": "5.0.4", + "@web3modal/wagmi": "5.0.4", "viem": "2.10.3", "vite": "5.2.11" }, @@ -33708,7 +35932,7 @@ }, "packages/common": { "name": "@web3modal/common", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "bignumber.js": "9.1.2", @@ -33722,11 +35946,11 @@ }, "packages/core": { "name": "@web3modal/core", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/wallet": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/wallet": "5.0.4", "valtio": "1.11.2" }, "devDependencies": { @@ -33735,17 +35959,17 @@ }, "packages/ethers": { "name": "@web3modal/ethers", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@coinbase/wallet-sdk": "4.0.3", "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4", "valtio": "1.11.2" }, "devDependencies": { @@ -33899,17 +36123,17 @@ }, "packages/ethers5": { "name": "@web3modal/ethers5", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@coinbase/wallet-sdk": "4.0.3", "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4", "valtio": "1.11.2" }, "devDependencies": { @@ -34112,7 +36336,7 @@ }, "packages/polyfills": { "name": "@web3modal/polyfills", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "buffer": "6.0.3" @@ -34120,25 +36344,25 @@ }, "packages/scaffold": { "name": "@web3modal/scaffold", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/core": "5.0.3", - "@web3modal/scaffold-ui": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/siwe": "5.0.3", - "@web3modal/ui": "5.0.3", - "@web3modal/wallet": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/core": "5.0.4", + "@web3modal/scaffold-ui": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/siwe": "5.0.4", + "@web3modal/ui": "5.0.4", + "@web3modal/wallet": "5.0.4", "lit": "3.1.0" } }, "packages/scaffold-react": { "name": "@web3modal/scaffold-react", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/scaffold": "5.0.3" + "@web3modal/scaffold": "5.0.4" }, "devDependencies": { "react": "18.2.0", @@ -34159,34 +36383,34 @@ }, "packages/scaffold-ui": { "name": "@web3modal/scaffold-ui", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/core": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/siwe": "5.0.3", - "@web3modal/ui": "5.0.3", - "@web3modal/wallet": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/core": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/siwe": "5.0.4", + "@web3modal/ui": "5.0.4", + "@web3modal/wallet": "5.0.4", "lit": "3.1.0" } }, "packages/scaffold-utils": { "name": "@web3modal/scaffold-utils", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/core": "5.0.3", - "@web3modal/polyfills": "5.0.3", + "@web3modal/core": "5.0.4", + "@web3modal/polyfills": "5.0.4", "valtio": "1.11.2" } }, "packages/scaffold-vue": { "name": "@web3modal/scaffold-vue", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { - "@web3modal/scaffold": "5.0.3" + "@web3modal/scaffold": "5.0.4" }, "devDependencies": { "vue": "3.4.3" @@ -34328,12 +36552,12 @@ }, "packages/siwe": { "name": "@web3modal/siwe", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@walletconnect/utils": "2.12.0", - "@web3modal/core": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", + "@web3modal/core": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", "lit": "3.1.0", "valtio": "1.11.2" } @@ -34415,28 +36639,25 @@ }, "packages/solana": { "name": "@web3modal/solana", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@ethersproject/sha2": "5.7.0", - "@solana/wallet-adapter-backpack": "0.1.14", "@solana/wallet-adapter-base": "0.9.23", - "@solana/wallet-adapter-phantom": "0.9.24", - "@solana/wallet-adapter-solflare": "0.6.28", - "@solana/wallet-adapter-trust": "0.1.13", - "@solana/wallet-adapter-walletconnect": "0.1.16", "@solana/web3.js": "1.91.7", "@walletconnect/universal-provider": "2.11.2", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", "bn.js": "5.2.1", "bs58": "5.0.0" }, "devDependencies": { - "@types/bn.js": "5.1.5" + "@types/bn.js": "5.1.5", + "@walletconnect/types": "2.13.3" }, "peerDependencies": { "react": ">=17", @@ -34470,7 +36691,7 @@ }, "packages/ui": { "name": "@web3modal/ui", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "lit": "3.1.0", @@ -34478,23 +36699,23 @@ }, "devDependencies": { "@types/qrcode": "1.5.5", - "@web3modal/common": "5.0.3", + "@web3modal/common": "5.0.4", "eslint-plugin-lit": "1.11.0", "eslint-plugin-wc": "2.0.4" } }, "packages/wagmi": { "name": "@web3modal/wagmi", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3" + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4" }, "devDependencies": { "@wagmi/connectors": "5.0.8", @@ -34652,11 +36873,11 @@ }, "packages/wallet": { "name": "@web3modal/wallet", - "version": "5.0.3", + "version": "5.0.4", "license": "Apache-2.0", "dependencies": { "@walletconnect/logger": "2.1.2", - "@web3modal/polyfills": "5.0.3", + "@web3modal/polyfills": "5.0.4", "zod": "3.22.4" } } diff --git a/packages/cdn/CHANGELOG.md b/packages/cdn/CHANGELOG.md index cb5871e606..3cbefb6426 100644 --- a/packages/cdn/CHANGELOG.md +++ b/packages/cdn/CHANGELOG.md @@ -1,5 +1,15 @@ # @web3modal/cdn +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/ethers@5.0.4 + - @web3modal/wagmi@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/cdn/package.json b/packages/cdn/package.json index 41077d146a..a8581e9649 100644 --- a/packages/cdn/package.json +++ b/packages/cdn/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/cdn", - "version": "5.0.3", + "version": "5.0.4", "main": "dist/wagmi.js", "type": "module", "files": [ @@ -28,8 +28,8 @@ "dependencies": { "@wagmi/connectors": "5.0.8", "@wagmi/core": "2.10.5", - "@web3modal/wagmi": "5.0.3", - "@web3modal/ethers": "5.0.3", + "@web3modal/wagmi": "5.0.4", + "@web3modal/ethers": "5.0.4", "viem": "2.10.3", "vite": "5.2.11" } diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 39935218d5..6f22ccfb02 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,11 @@ # @web3modal/common +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + ## 5.0.3 ### Patch Changes diff --git a/packages/common/package.json b/packages/common/package.json index e1362d9b1c..ea8b757a6f 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/common", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", diff --git a/packages/common/src/utils/ConstantsUtil.ts b/packages/common/src/utils/ConstantsUtil.ts index d34c59ee47..9cb36aa224 100644 --- a/packages/common/src/utils/ConstantsUtil.ts +++ b/packages/common/src/utils/ConstantsUtil.ts @@ -1,6 +1,16 @@ +import type { Chain } from './TypeUtil.js' + export const ConstantsUtil = { WC_NAME_SUFFIX: '.wcn.id', BLOCKCHAIN_API_RPC_URL: 'https://rpc.walletconnect.org', PULSE_API_URL: 'https://pulse.walletconnect.org', - W3M_API_URL: 'https://api.web3modal.org' + W3M_API_URL: 'https://api.web3modal.org', + CHAIN: { + EVM: 'evm' as Chain, + SOLANA: 'solana' as Chain + }, + CHAIN_NAME: { + EVM: 'Ethereum', + SOLANA: 'Solana' + } } diff --git a/packages/common/src/utils/NumberUtil.ts b/packages/common/src/utils/NumberUtil.ts index 5f008efb1b..162ca21826 100644 --- a/packages/common/src/utils/NumberUtil.ts +++ b/packages/common/src/utils/NumberUtil.ts @@ -1,8 +1,8 @@ -import BigNumber from 'bignumber.js' +import * as BigNumber from 'bignumber.js' export const NumberUtil = { - bigNumber(value: BigNumber.Value) { - return new BigNumber(value) + bigNumber(value: BigNumber.BigNumber.Value) { + return new BigNumber.BigNumber(value) }, /** @@ -11,14 +11,14 @@ export const NumberUtil = { * @param b string * @returns */ - multiply(a: BigNumber.Value | undefined, b: BigNumber.Value | undefined) { + multiply(a: BigNumber.BigNumber.Value | undefined, b: BigNumber.BigNumber.Value | undefined) { if (a === undefined || b === undefined) { // eslint-disable-next-line new-cap - return BigNumber(0) + return BigNumber.BigNumber(0) } - const aBigNumber = new BigNumber(a) - const bBigNumber = new BigNumber(b) + const aBigNumber = new BigNumber.BigNumber(a) + const bBigNumber = new BigNumber.BigNumber(b) return aBigNumber.multipliedBy(bBigNumber) }, diff --git a/packages/common/src/utils/TypeUtil.ts b/packages/common/src/utils/TypeUtil.ts index 3c4683df65..985752532a 100644 --- a/packages/common/src/utils/TypeUtil.ts +++ b/packages/common/src/utils/TypeUtil.ts @@ -14,6 +14,8 @@ export type TransactionImage = { url: string | undefined } +export type Chain = 'evm' | 'solana' + export interface Transaction { id: string metadata: TransactionMetadata diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 8b21ccf461..1092195b53 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,15 @@ # @web3modal/core +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/common@5.0.4 + - @web3modal/wallet@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/core/index.ts b/packages/core/index.ts index b8dbe3182f..81d9c0671b 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -11,6 +11,9 @@ export type { RouterControllerState } from './src/controllers/RouterController.j export { AccountController } from './src/controllers/AccountController.js' export type { AccountControllerState } from './src/controllers/AccountController.js' +export { ChainController } from './src/controllers/ChainController.js' +export type { ChainControllerState } from './src/controllers/ChainController.js' + export { NetworkController } from './src/controllers/NetworkController.js' export type { NetworkControllerClient, diff --git a/packages/core/package.json b/packages/core/package.json index 7d5732cb90..34551bd773 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/core", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -17,8 +17,8 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/wallet": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/wallet": "5.0.4", "valtio": "1.11.2" }, "devDependencies": { diff --git a/packages/core/src/controllers/AccountController.ts b/packages/core/src/controllers/AccountController.ts index 2acd44a204..a9ac5b3aec 100644 --- a/packages/core/src/controllers/AccountController.ts +++ b/packages/core/src/controllers/AccountController.ts @@ -1,5 +1,3 @@ -import { subscribeKey as subKey } from 'valtio/vanilla/utils' -import { proxy, ref, subscribe as sub } from 'valtio/vanilla' import { CoreHelperUtil } from '../utils/CoreHelperUtil.js' import type { CaipAddress, ConnectedWalletInfo, SocialProvider } from '../utils/TypeUtil.js' import type { Balance } from '@web3modal/common' @@ -8,7 +6,10 @@ import { SnackController } from './SnackController.js' import { SwapController } from './SwapController.js' import { SwapApiUtil } from '../utils/SwapApiUtil.js' import type { W3mFrameTypes } from '@web3modal/wallet' +import { ChainController } from './ChainController.js' +import type { Chain } from '@web3modal/common' import { NetworkController } from './NetworkController.js' +import { proxy } from 'valtio' // -- Types --------------------------------------------- // export interface AccountControllerState { @@ -29,8 +30,6 @@ export interface AccountControllerState { socialWindow?: Window } -type StateKey = keyof AccountControllerState - // -- State --------------------------------------------- // const state = proxy({ isConnected: false, @@ -43,89 +42,123 @@ const state = proxy({ export const AccountController = { state, - subscribe(callback: (newState: AccountControllerState) => void) { - return sub(state, () => callback(state)) + replaceState(newState: AccountControllerState) { + Object.assign(state, newState) + }, + + subscribe(callback: (val: AccountControllerState) => void) { + return ChainController.subscribeChainProp('accountState', accountState => { + if (accountState) { + return callback(accountState) + } + + return undefined + }) }, - subscribeKey(key: K, callback: (value: AccountControllerState[K]) => void) { - return subKey(state, key, callback) + subscribeKey( + property: K, + callback: (val: AccountControllerState[K]) => void + ) { + let prev: AccountControllerState[K] | undefined = undefined + + return ChainController.subscribeChainProp('accountState', accountState => { + if (accountState) { + const nextValue = accountState[property] + if (prev !== nextValue) { + prev = nextValue + callback(nextValue) + } + } + }) }, - setIsConnected(isConnected: AccountControllerState['isConnected']) { - state.isConnected = isConnected + setIsConnected(isConnected: AccountControllerState['isConnected'], chain?: Chain) { + ChainController.setAccountProp('isConnected', isConnected, chain) }, - setCaipAddress(caipAddress: AccountControllerState['caipAddress']) { - state.caipAddress = caipAddress - state.address = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined + setCaipAddress(caipAddress: AccountControllerState['caipAddress'], chain?: Chain) { + const newCaipAddress = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined + + ChainController.setAccountProp('caipAddress', caipAddress, chain) + ChainController.setAccountProp('address', newCaipAddress, chain) }, setBalance( balance: AccountControllerState['balance'], - balanceSymbol: AccountControllerState['balanceSymbol'] + balanceSymbol: AccountControllerState['balanceSymbol'], + chain?: Chain ) { - state.balance = balance - state.balanceSymbol = balanceSymbol + ChainController.setAccountProp('balance', balance, chain) + ChainController.setAccountProp('balanceSymbol', balanceSymbol, chain) }, - setProfileName(profileName: AccountControllerState['profileName']) { - state.profileName = profileName + setProfileName(profileName: AccountControllerState['profileName'], chain?: Chain) { + ChainController.setAccountProp('profileName', profileName, chain) }, - setProfileImage(profileImage: AccountControllerState['profileImage']) { - state.profileImage = profileImage + setProfileImage(profileImage: AccountControllerState['profileImage'], chain?: Chain) { + ChainController.setAccountProp('profileImage', profileImage, chain) }, - setAddressExplorerUrl(explorerUrl: AccountControllerState['addressExplorerUrl']) { - state.addressExplorerUrl = explorerUrl + setAddressExplorerUrl(explorerUrl: AccountControllerState['addressExplorerUrl'], chain?: Chain) { + ChainController.setAccountProp('addressExplorerUrl', explorerUrl, chain) }, - setSmartAccountDeployed(isDeployed: boolean) { - state.smartAccountDeployed = isDeployed + setSmartAccountDeployed(isDeployed: boolean, chain?: Chain) { + ChainController.setAccountProp('smartAccountDeployed', isDeployed, chain) }, - setCurrentTab(currentTab: AccountControllerState['currentTab']) { - state.currentTab = currentTab + setCurrentTab(currentTab: AccountControllerState['currentTab'], chain?: Chain) { + ChainController.setAccountProp('currentTab', currentTab, chain) }, - setTokenBalance(tokenBalance: AccountControllerState['tokenBalance']) { + setTokenBalance(tokenBalance: AccountControllerState['tokenBalance'], chain?: Chain) { if (tokenBalance) { - state.tokenBalance = ref(tokenBalance) + ChainController.setAccountProp('tokenBalance', tokenBalance, chain) } }, - setConnectedWalletInfo(connectedWalletInfo: AccountControllerState['connectedWalletInfo']) { - state.connectedWalletInfo = connectedWalletInfo + setConnectedWalletInfo( + connectedWalletInfo: AccountControllerState['connectedWalletInfo'], + chain?: Chain + ) { + ChainController.setAccountProp('connectedWalletInfo', connectedWalletInfo, chain) }, - setPreferredAccountType(preferredAccountType: AccountControllerState['preferredAccountType']) { - state.preferredAccountType = preferredAccountType + setPreferredAccountType( + preferredAccountType: AccountControllerState['preferredAccountType'], + chain?: Chain + ) { + ChainController.setAccountProp('preferredAccountType', preferredAccountType, chain) }, - setSocialProvider(socialProvider: AccountControllerState['socialProvider']) { + setSocialProvider(socialProvider: AccountControllerState['socialProvider'], chain?: Chain) { if (socialProvider) { - state.socialProvider = socialProvider + ChainController.setAccountProp('socialProvider', socialProvider, chain) } }, - setSocialWindow(socialWindow: AccountControllerState['socialWindow']) { + setSocialWindow(socialWindow: AccountControllerState['socialWindow'], chain?: Chain) { if (socialWindow) { - state.socialWindow = ref(socialWindow) + ChainController.setAccountProp('socialWindow', socialWindow, chain) } }, async fetchTokenBalance() { const chainId = NetworkController.state.caipNetwork?.id + const chain = NetworkController.state.caipNetwork?.chain + const address = AccountController.state.address try { - if (state.address && chainId) { - const response = await BlockchainApiController.getBalance(state.address, chainId) + if (address && chainId) { + const response = await BlockchainApiController.getBalance(address, chainId) const filteredBalances = response.balances.filter( balance => balance.quantity.decimals !== '0' ) - this.setTokenBalance(filteredBalances) + this.setTokenBalance(filteredBalances, chain) SwapController.setBalances(SwapApiUtil.mapBalancesToSwapTokens(response.balances)) } } catch (error) { @@ -133,21 +166,7 @@ export const AccountController = { } }, - resetAccount() { - state.isConnected = false - state.smartAccountDeployed = false - state.currentTab = 0 - state.caipAddress = undefined - state.address = undefined - state.balance = undefined - state.balanceSymbol = undefined - state.profileName = undefined - state.profileImage = undefined - state.addressExplorerUrl = undefined - state.tokenBalance = [] - state.connectedWalletInfo = undefined - state.preferredAccountType = undefined - state.socialProvider = undefined - state.socialWindow = undefined + resetAccount(chain?: Chain) { + ChainController.resetAccount(chain) } } diff --git a/packages/core/src/controllers/ApiController.ts b/packages/core/src/controllers/ApiController.ts index 5b34f91bd7..0f51a8fbcc 100644 --- a/packages/core/src/controllers/ApiController.ts +++ b/packages/core/src/controllers/ApiController.ts @@ -96,7 +96,8 @@ export const ApiController = { }, async fetchNetworkImages() { - const { requestedCaipNetworks } = NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const ids = requestedCaipNetworks?.map(({ imageId }) => imageId).filter(Boolean) if (ids) { await Promise.allSettled((ids as string[]).map(id => ApiController._fetchNetworkImage(id))) diff --git a/packages/core/src/controllers/AssetController.ts b/packages/core/src/controllers/AssetController.ts index fca9e0e33f..59b689a032 100644 --- a/packages/core/src/controllers/AssetController.ts +++ b/packages/core/src/controllers/AssetController.ts @@ -5,6 +5,7 @@ import { proxy, subscribe as sub } from 'valtio/vanilla' export interface AssetControllerState { walletImages: Record networkImages: Record + chainImages: Record connectorImages: Record tokenImages: Record currencyImages: Record @@ -16,6 +17,7 @@ type StateKey = keyof AssetControllerState const state = proxy({ walletImages: {}, networkImages: {}, + chainImages: {}, connectorImages: {}, tokenImages: {}, currencyImages: {} @@ -45,6 +47,10 @@ export const AssetController = { state.networkImages[key] = value }, + setChainImage(key: string, value: string) { + state.chainImages[key] = value + }, + setConnectorImage(key: string, value: string) { state.connectorImages[key] = value }, diff --git a/packages/core/src/controllers/ChainController.ts b/packages/core/src/controllers/ChainController.ts new file mode 100644 index 0000000000..756c9bfc46 --- /dev/null +++ b/packages/core/src/controllers/ChainController.ts @@ -0,0 +1,284 @@ +import { proxyMap, subscribeKey as subKey } from 'valtio/utils' +import { proxy, ref, subscribe as sub } from 'valtio/vanilla' +import type { CaipNetwork, ChainAdapter, Connector } from '../utils/TypeUtil.js' + +import { NetworkController, type NetworkControllerState } from './NetworkController.js' +import { AccountController, type AccountControllerState } from './AccountController.js' +import { PublicStateController } from './PublicStateController.js' +import { type Chain } from '@web3modal/common' + +// -- Types --------------------------------------------- // +export interface ChainControllerState { + multiChainEnabled: boolean + activeChain: Chain | undefined + activeCaipNetwork?: CaipNetwork + chains: Map + activeConnector?: Connector +} + +type ChainControllerStateKey = keyof ChainControllerState + +type ChainsInitializerAdapter = Pick< + ChainAdapter, + 'connectionControllerClient' | 'networkControllerClient' | 'chain' +> + +// -- Constants ----------------------------------------- // +const accountState: AccountControllerState = { + isConnected: false, + currentTab: 0, + tokenBalance: [], + smartAccountDeployed: false +} + +const networkState: NetworkControllerState = { + supportsAllNetworks: true, + isDefaultCaipNetwork: false, + smartAccountEnabledNetworks: [] +} + +// -- State --------------------------------------------- // +const state = proxy({ + multiChainEnabled: false, + chains: proxyMap(), + activeChain: undefined, + activeCaipNetwork: undefined +}) + +// -- Controller ---------------------------------------- // +export const ChainController = { + state, + + subscribeKey( + key: K, + callback: (value: ChainControllerState[K]) => void + ) { + return subKey(state, key, callback) + }, + + subscribeChain(callback: (value: ChainAdapter | undefined) => void) { + let prev: ChainAdapter | undefined = undefined + const activeChain = state.activeChain + + if (activeChain) { + return sub(state.chains, () => { + const nextValue = state.chains.get(activeChain) + if (!prev || prev !== nextValue) { + prev = nextValue + callback(nextValue) + } + }) + } + + // eslint-disable-next-line @typescript-eslint/no-empty-function + return () => {} + }, + + subscribeChainProp( + property: K, + callback: (value: ChainAdapter[K] | undefined) => void + ) { + let prev: ChainAdapter[K] | undefined = undefined + const activeChain = state.activeChain + + if (activeChain) { + return sub(state.chains, () => { + const nextValue = state.chains.get(activeChain)?.[property] + if (prev !== nextValue) { + prev = nextValue + callback(nextValue) + } + }) + } + + // eslint-disable-next-line @typescript-eslint/no-empty-function + return () => {} + }, + + initialize(adapters: ChainsInitializerAdapter[]) { + const firstChainToActivate = adapters?.[0]?.chain + + if (!firstChainToActivate) { + throw new Error('Chain is required to initialize ChainController') + } + + state.activeChain = firstChainToActivate + + adapters.forEach((adapter: ChainsInitializerAdapter) => { + state.chains.set(adapter.chain, { + chain: adapter.chain, + connectionControllerClient: adapter.connectionControllerClient, + networkControllerClient: adapter.networkControllerClient, + accountState, + networkState + }) + }) + }, + + setMultiChainEnabled(multiChain: boolean) { + state.multiChainEnabled = multiChain + }, + + setChainNetworkData(chain: Chain | undefined, props: Partial) { + if (!chain) { + throw new Error('Chain is required to update chain network data') + } + + const chainAdapter = state.chains.get(chain) + + if (chainAdapter) { + chainAdapter.networkState = { + ...chainAdapter.networkState, + ...props + } as NetworkControllerState + state.chains.set(chain, chainAdapter) + NetworkController.replaceState(chainAdapter.networkState) + } + }, + + setChainAccountData(chain: Chain | undefined, accountProps: Partial) { + if (!chain) { + throw new Error('Chain is required to update chain account data') + } + + const chainAdapter = state.chains.get(chain) + + if (chainAdapter) { + chainAdapter.accountState = { + ...chainAdapter.accountState, + ...accountProps + } as AccountControllerState + state.chains.set(chain, chainAdapter) + AccountController.replaceState(chainAdapter.accountState) + } + }, + + setAccountProp( + prop: keyof AccountControllerState, + value: AccountControllerState[keyof AccountControllerState], + chain?: Chain + ) { + this.setChainAccountData(state.multiChainEnabled ? chain : state.activeChain, { + [prop]: value + }) + }, + + setActiveChain(chain?: Chain) { + const newAdapter = chain ? state.chains.get(chain) : undefined + + if (newAdapter) { + state.activeChain = newAdapter.chain + state.activeCaipNetwork = state.chains.get(newAdapter.chain)?.networkState + ?.requestedCaipNetworks?.[0] + PublicStateController.set({ activeChain: chain }) + } + }, + + setActiveConnector(connector: ChainControllerState['activeConnector']) { + if (connector) { + state.activeConnector = ref(connector) + } + }, + + getNetworkControllerClient() { + const chain = state.activeChain + + if (!chain) { + throw new Error('Chain is required to get network controller client') + } + + const chainAdapter = state.chains.get(chain) + + if (!chainAdapter) { + throw new Error('Chain adapter not found') + } + + if (!chainAdapter.networkControllerClient) { + throw new Error('NetworkController client not set') + } + + return chainAdapter.networkControllerClient + }, + + getConnectionControllerClient() { + const chain = state.activeChain + + if (!chain) { + throw new Error('Chain is required to get connection controller client') + } + + const chainAdapter = state.chains.get(chain) + + if (!chainAdapter) { + throw new Error('Chain adapter not found') + } + + if (!chainAdapter.connectionControllerClient) { + throw new Error('ConnectionController client not set') + } + + return chainAdapter.connectionControllerClient + }, + + getAccountProp( + key: K + ): AccountControllerState[K] | undefined { + const chainToWrite = state.multiChainEnabled ? state.activeChain : state.activeChain + + if (!chainToWrite) { + return undefined + } + + const chainAccountState = state.chains.get(chainToWrite)?.accountState + + if (!chainAccountState) { + return undefined + } + + return chainAccountState[key] + }, + + getNetworkProp( + key: K + ): NetworkControllerState[K] | undefined { + const chainToWrite = state.multiChainEnabled ? state.activeChain : state.activeChain + + if (!chainToWrite) { + return undefined + } + + const chainNetworkState = state.chains.get(chainToWrite)?.networkState + + if (!chainNetworkState) { + return undefined + } + + return chainNetworkState[key] + }, + + resetAccount(chain?: Chain) { + const chainToWrite = state.multiChainEnabled ? chain : state.activeChain + + if (!chainToWrite) { + throw new Error('Chain is required to set account prop') + } + + this.setChainAccountData(chainToWrite, { + isConnected: false, + smartAccountDeployed: false, + currentTab: 0, + caipAddress: undefined, + address: undefined, + balance: undefined, + balanceSymbol: undefined, + profileName: undefined, + profileImage: undefined, + addressExplorerUrl: undefined, + tokenBalance: [], + connectedWalletInfo: undefined, + preferredAccountType: undefined, + socialProvider: undefined, + socialWindow: undefined + }) + } +} diff --git a/packages/core/src/controllers/ConnectionController.ts b/packages/core/src/controllers/ConnectionController.ts index 39499fdde7..b668e19e89 100644 --- a/packages/core/src/controllers/ConnectionController.ts +++ b/packages/core/src/controllers/ConnectionController.ts @@ -10,10 +10,12 @@ import type { WriteContractArgs } from '../utils/TypeUtil.js' import { TransactionsController } from './TransactionsController.js' +import { ChainController } from './ChainController.js' import { type W3mFrameTypes } from '@web3modal/wallet' import { ModalController } from './ModalController.js' import { ConnectorController } from './ConnectorController.js' import { EventsController } from './EventsController.js' +import type { Chain } from '@web3modal/common' import { NetworkController } from './NetworkController.js' // -- Types --------------------------------------------- // @@ -43,7 +45,6 @@ export interface ConnectionControllerClient { export interface ConnectionControllerState { _client?: ConnectionControllerClient wcUri?: string - wcPromise?: Promise wcPairingExpiry?: number wcLinking?: { href: string @@ -74,27 +75,24 @@ export const ConnectionController = { }, _getClient() { - if (!state._client) { - throw new Error('ConnectionController client not set') - } - - return state._client + return ChainController.getConnectionControllerClient() }, setClient(client: ConnectionControllerClient) { state._client = ref(client) }, - connectWalletConnect() { - state.wcPromise = this._getClient().connectWalletConnect(uri => { + async connectWalletConnect() { + StorageUtil.setConnectedConnector('WALLET_CONNECT') + await this._getClient().connectWalletConnect(uri => { state.wcUri = uri state.wcPairingExpiry = CoreHelperUtil.getPairingExpiry() }) - StorageUtil.setConnectedConnector('WALLET_CONNECT') }, - async connectExternal(options: ConnectExternalOptions) { + async connectExternal(options: ConnectExternalOptions, chain?: Chain) { await this._getClient().connectExternal?.(options) + ChainController.setActiveChain(chain) StorageUtil.setConnectedConnector(options.type) }, @@ -158,7 +156,6 @@ export const ConnectionController = { resetWcConnection() { state.wcUri = undefined state.wcPairingExpiry = undefined - state.wcPromise = undefined state.wcLinking = undefined state.recentWallet = undefined TransactionsController.resetTransactions() @@ -183,9 +180,14 @@ export const ConnectionController = { }, async disconnect() { - await this._getClient().disconnect() - StorageUtil.removeConnectedWalletImageUrl() - - this.resetWcConnection() + const client = this._getClient() + + try { + await client.disconnect() + StorageUtil.removeConnectedWalletImageUrl() + this.resetWcConnection() + } catch (error) { + throw new Error('Failed to disconnect') + } } } diff --git a/packages/core/src/controllers/ConnectorController.ts b/packages/core/src/controllers/ConnectorController.ts index d5a62a2232..2c686811ce 100644 --- a/packages/core/src/controllers/ConnectorController.ts +++ b/packages/core/src/controllers/ConnectorController.ts @@ -25,8 +25,47 @@ export const ConnectorController = { return subKey(state, key, callback) }, - setConnectors(connectors: ConnectorControllerState['connectors']) { - state.connectors = connectors.map(c => ref(c)) + setConnectors(connectors: ConnectorControllerState['connectors'], multiChain?: boolean) { + if (multiChain) { + state.connectors = [...state.connectors, ...connectors.map(c => ref(c))] + + state.connectors = this.mergeMultiChainConnectors(state.connectors) + } else { + state.connectors = connectors.map(c => ref(c)) + } + }, + + mergeMultiChainConnectors(connectors: ConnectorControllerState['connectors']) { + const mergedConnectors: Connector[] = [] + + connectors.forEach(connector => { + const { name, chain, type } = connector + + const existingConnectorIndex = mergedConnectors.findIndex( + existingConnector => existingConnector.name === name + ) + + if (existingConnectorIndex === -1) { + mergedConnectors.push({ ...connector }) + } else { + const existingConnector = mergedConnectors[existingConnectorIndex] + if (existingConnector) { + if (existingConnector?.chain === chain || existingConnector.type === type) { + mergedConnectors.push({ ...connector }) + } else if (existingConnector.type === 'MULTI_CHAIN') { + mergedConnectors.push({ ...connector }) + } else { + mergedConnectors[existingConnectorIndex] = { + ...existingConnector, + type: 'MULTI_CHAIN', + providers: [existingConnector, connector] + } + } + } + } + }) + + return mergedConnectors }, addConnector(connector: Connector | AuthConnector) { diff --git a/packages/core/src/controllers/NetworkController.ts b/packages/core/src/controllers/NetworkController.ts index 0a8f32689c..0c411b1f20 100644 --- a/packages/core/src/controllers/NetworkController.ts +++ b/packages/core/src/controllers/NetworkController.ts @@ -1,11 +1,11 @@ -import { subscribeKey as subKey } from 'valtio/utils' -import { proxy, ref, subscribe as sub } from 'valtio/vanilla' +import { proxy } from 'valtio/vanilla' import type { CaipNetwork, CaipNetworkId } from '../utils/TypeUtil.js' import { PublicStateController } from './PublicStateController.js' import { EventsController } from './EventsController.js' import { ModalController } from './ModalController.js' import { CoreHelperUtil } from '../utils/CoreHelperUtil.js' -import { NetworkUtil } from '@web3modal/common' +import { NetworkUtil, type Chain } from '@web3modal/common' +import { ChainController } from './ChainController.js' // -- Types --------------------------------------------- // export interface NetworkControllerClient { @@ -28,8 +28,6 @@ export interface NetworkControllerState { smartAccountEnabledNetworks?: number[] } -type StateKey = keyof NetworkControllerState - // -- State --------------------------------------------- // const state = proxy({ supportsAllNetworks: true, @@ -41,72 +39,173 @@ const state = proxy({ export const NetworkController = { state, - subscribe(callback: (newState: NetworkControllerState) => void) { - return sub(state, () => callback(state)) + replaceState(newState: NetworkControllerState) { + Object.assign(state, newState) }, - subscribeKey(key: K, callback: (value: NetworkControllerState[K]) => void) { - return subKey(state, key, callback) + subscribeKey( + property: K, + callback: (val: NetworkControllerState[K]) => void + ) { + let prev: NetworkControllerState[K] | undefined = undefined + + return ChainController.subscribeChainProp('networkState', networkState => { + if (networkState) { + const nextValue = networkState[property] + if (prev !== nextValue) { + prev = nextValue + callback(nextValue) + } + } + }) }, _getClient() { - if (!state._client) { - throw new Error('NetworkController client not set') - } - - return state._client + return ChainController.getNetworkControllerClient() }, - setClient(client: NetworkControllerClient) { - state._client = ref(client) + initializeDefaultNetwork() { + const networks = this.getRequestedCaipNetworks() + + if (networks.length > 0) { + this.setCaipNetwork(networks[0]) + } }, setCaipNetwork(caipNetwork: NetworkControllerState['caipNetwork']) { - state.caipNetwork = caipNetwork - PublicStateController.set({ selectedNetworkId: caipNetwork?.id }) - if (!this.state.allowUnsupportedChain) { + const chain = ChainController.state.multiChainEnabled + ? caipNetwork?.chain + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to set active network') + } + + if (!caipNetwork) { + throw new Error('caipNetwork is required to set active network') + } + + ChainController.state.activeCaipNetwork = caipNetwork + ChainController.state.activeChain = chain + ChainController.setChainNetworkData(chain, { caipNetwork }) + PublicStateController.set({ activeChain: chain, selectedNetworkId: caipNetwork?.id }) + + if (!ChainController.state.chains.get(chain)?.networkState?.allowUnsupportedChain) { this.checkIfSupportedNetwork() } }, - setDefaultCaipNetwork(caipNetwork: NetworkControllerState['caipNetwork']) { - state.caipNetwork = caipNetwork - PublicStateController.set({ selectedNetworkId: caipNetwork?.id }) - state.isDefaultCaipNetwork = true + setDefaultCaipNetwork(caipNetwork: NetworkControllerState['caipNetwork'], chain?: Chain) { + const chainToSet = ChainController.state.multiChainEnabled + ? chain + : ChainController.state.activeChain + + if (!chainToSet) { + throw new Error('chain is required to set default network') + } + + ChainController.state.activeCaipNetwork = caipNetwork + ChainController.state.activeChain = chainToSet + ChainController.setChainNetworkData(chainToSet, { caipNetwork, isDefaultCaipNetwork: true }) + PublicStateController.set({ selectedNetworkId: caipNetwork?.id, activeChain: chain }) }, - setRequestedCaipNetworks(requestedNetworks: NetworkControllerState['requestedCaipNetworks']) { - state.requestedCaipNetworks = requestedNetworks + setRequestedCaipNetworks( + requestedNetworks: NetworkControllerState['requestedCaipNetworks'], + chain?: Chain + ) { + ChainController.setChainNetworkData( + ChainController.state.multiChainEnabled ? chain : ChainController.state.activeChain, + { requestedCaipNetworks: requestedNetworks } + ) }, - setAllowUnsupportedChain(allowUnsupportedChain: NetworkControllerState['allowUnsupportedChain']) { - state.allowUnsupportedChain = allowUnsupportedChain + setAllowUnsupportedChain( + allowUnsupportedChain: NetworkControllerState['allowUnsupportedChain'], + chain?: Chain + ) { + ChainController.setChainNetworkData(chain || ChainController.state.activeChain, { + allowUnsupportedChain + }) }, setSmartAccountEnabledNetworks( - smartAccountEnabledNetworks: NetworkControllerState['smartAccountEnabledNetworks'] + smartAccountEnabledNetworks: NetworkControllerState['smartAccountEnabledNetworks'], + chain?: Chain ) { - state.smartAccountEnabledNetworks = smartAccountEnabledNetworks + ChainController.setChainNetworkData( + ChainController.state.multiChainEnabled ? chain : ChainController.state.activeChain, + { smartAccountEnabledNetworks } + ) }, - getRequestedCaipNetworks() { - const { approvedCaipNetworkIds, requestedCaipNetworks } = state + getRequestedCaipNetworks(chainToFilter?: Chain) { + let chainAdapters: Chain[] | undefined = undefined - const approvedIds = approvedCaipNetworkIds - const requestedNetworks = requestedCaipNetworks + if (!ChainController.state.activeChain) { + throw new Error('activeChain is required to get requested networks') + } - return CoreHelperUtil.sortRequestedNetworks(approvedIds, requestedNetworks) - }, + if (chainToFilter) { + const chain = ChainController.state.multiChainEnabled + ? chainToFilter + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to get requested networks') + } + + chainAdapters = [chain] + } else { + const chains = ChainController.state.multiChainEnabled + ? [...ChainController.state.chains.keys()] + : [ChainController.state.activeChain] + + chainAdapters = chains + } - async getApprovedCaipNetworksData() { - const data = await this._getClient().getApprovedCaipNetworksData() - state.supportsAllNetworks = data.supportsAllNetworks - state.approvedCaipNetworkIds = data.approvedCaipNetworkIds + const approvedIds: `${string}:${string}`[] = [] + const requestedNetworks: CaipNetwork[] = [] + + chainAdapters.forEach((chn: Chain) => { + if (ChainController.state.chains.get(chn)?.networkState?.approvedCaipNetworkIds) { + approvedIds.push( + ...(ChainController.state.chains.get(chn)?.networkState?.approvedCaipNetworkIds || []) + ) + } + if (ChainController.state.chains.get(chn)?.networkState?.requestedCaipNetworks) { + requestedNetworks.push( + ...(ChainController.state.chains.get(chn)?.networkState?.requestedCaipNetworks || []) + ) + } + }) + + const sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedIds, requestedNetworks) + + return sortedNetworks }, async switchActiveNetwork(network: NetworkControllerState['caipNetwork']) { - await this._getClient().switchCaipNetwork(network) - state.caipNetwork = network + const networkControllerClient = ChainController.getNetworkControllerClient() + await networkControllerClient.switchCaipNetwork(network) + + const chain = ChainController.state.multiChainEnabled + ? network?.chain + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to switch active network') + } + + if (!network) { + throw new Error('network is required to switch active network') + } + + ChainController.state.activeCaipNetwork = network + ChainController.state.activeChain = chain + ChainController.setChainNetworkData(chain, { caipNetwork: network }) + PublicStateController.set({ activeChain: chain, selectedNetworkId: network.id }) + if (network) { EventsController.sendEvent({ type: 'track', @@ -116,32 +215,110 @@ export const NetworkController = { } }, + getApprovedCaipNetworkIds(chainToFilter?: Chain) { + if (chainToFilter) { + const chain = ChainController.state.multiChainEnabled + ? chainToFilter + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to get approved network IDs') + } + + return ChainController.state.chains.get(chain)?.networkState?.approvedCaipNetworkIds + } + + const allCaipNetworkIds: CaipNetworkId[] = [] + + Object.values(ChainController.state.chains).forEach(adapter => { + if (adapter.networkState.approvedCaipNetworkIds) { + allCaipNetworkIds.push(...(adapter.networkState?.approvedCaipNetworkIds || [])) + } + }) + + return allCaipNetworkIds + }, + + async setApprovedCaipNetworksData(_chain?: Chain) { + const networkControllerClient = ChainController.getNetworkControllerClient() + const data = await networkControllerClient.getApprovedCaipNetworksData() + + const chain = ChainController.state.multiChainEnabled + ? _chain + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to set approved network data') + } + + ChainController.setChainNetworkData(chain, { + approvedCaipNetworkIds: data?.approvedCaipNetworkIds, + supportsAllNetworks: data?.supportsAllNetworks || false + }) + }, + checkIfSupportedNetwork() { - state.isUnsupportedChain = !state.requestedCaipNetworks?.some( - network => network.id === state.caipNetwork?.id - ) + const chain = ChainController.state.multiChainEnabled + ? ChainController.state.activeChain + : ChainController.state.activeChain - if (state.isUnsupportedChain) { - this.showUnsupportedChainUI() + if (!chain) { + return false } + + const activeCaipNetwork = ChainController.state.chains.get(chain)?.networkState?.caipNetwork + + const requestedCaipNetworks = this.getRequestedCaipNetworks() + + return requestedCaipNetworks?.some(network => network.id === activeCaipNetwork?.id) }, checkIfSmartAccountEnabled() { - const networkId = NetworkUtil.caipNetworkIdToNumber(state.caipNetwork?.id) + const networkId = NetworkUtil.caipNetworkIdToNumber(ChainController.state.activeCaipNetwork?.id) + const activeChain = ChainController.state.activeChain + + if (!activeChain) { + throw new Error('activeChain is required to check if smart account is enabled') + } + if (!networkId) { return false } - return Boolean(state.smartAccountEnabledNetworks?.includes(networkId)) + const smartAccountEnabledNetworks = + ChainController.state.chains.get(activeChain)?.networkState?.smartAccountEnabledNetworks || [] + + return Boolean(smartAccountEnabledNetworks?.includes(networkId)) }, resetNetwork() { - if (!state.isDefaultCaipNetwork) { - state.caipNetwork = undefined + const chain = ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to reset network') } - state.approvedCaipNetworkIds = undefined - state.supportsAllNetworks = true - state.smartAccountEnabledNetworks = [] + + if (!ChainController.state.chains.get(chain)?.networkState?.isDefaultCaipNetwork) { + ChainController.setChainNetworkData(chain, { caipNetwork: undefined }) + } + + ChainController.setChainNetworkData(chain, { + approvedCaipNetworkIds: undefined, + supportsAllNetworks: true, + smartAccountEnabledNetworks: [] + }) + }, + + getSupportsAllNetworks() { + const chain = ChainController.state.multiChainEnabled + ? ChainController.state.activeChain + : ChainController.state.activeChain + + if (!chain) { + throw new Error('chain is required to check if network supports all networks') + } + + return ChainController.state.chains.get(chain)?.networkState?.supportsAllNetworks }, showUnsupportedChainUI() { diff --git a/packages/core/src/controllers/OptionsController.ts b/packages/core/src/controllers/OptionsController.ts index eff3026752..003fd81ab9 100644 --- a/packages/core/src/controllers/OptionsController.ts +++ b/packages/core/src/controllers/OptionsController.ts @@ -1,5 +1,5 @@ import { subscribeKey as subKey } from 'valtio/vanilla/utils' -import { proxy, snapshot } from 'valtio/vanilla' +import { proxy } from 'valtio/vanilla' import type { CustomWallet, Metadata, ProjectId, SdkVersion, Tokens } from '../utils/TypeUtil.js' import { ApiController } from './ApiController.js' @@ -106,9 +106,5 @@ export const OptionsController = { setEIP6963Enabled(enableEIP6963: OptionsControllerState['enableEIP6963']) { state.enableEIP6963 = enableEIP6963 - }, - - getSnapshot() { - return snapshot(state) } } diff --git a/packages/core/src/controllers/PublicStateController.ts b/packages/core/src/controllers/PublicStateController.ts index 03f83ed2da..24d2ffa2b2 100644 --- a/packages/core/src/controllers/PublicStateController.ts +++ b/packages/core/src/controllers/PublicStateController.ts @@ -6,13 +6,15 @@ export interface PublicStateControllerState { loading: boolean open: boolean selectedNetworkId?: CaipNetworkId + activeChain?: string } // -- State --------------------------------------------- // const state = proxy({ loading: false, open: false, - selectedNetworkId: undefined + selectedNetworkId: undefined, + activeChain: undefined }) // -- Controller ---------------------------------------- // diff --git a/packages/core/src/controllers/SwapController.ts b/packages/core/src/controllers/SwapController.ts index 129b2d52db..cc2b78f546 100644 --- a/packages/core/src/controllers/SwapController.ts +++ b/packages/core/src/controllers/SwapController.ts @@ -170,8 +170,9 @@ export const SwapController = { }, getParams() { - const { address } = AccountController.state - const networkAddress = `${NetworkController.state.caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}` + const caipNetwork = NetworkController.state.caipNetwork + const address = AccountController.state.address + const networkAddress = `${caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}` if (!address) { throw new Error('No address found to swap the tokens from.') @@ -558,7 +559,7 @@ export const SwapController = { } if (!sourceTokenAddress) { - throw new Error('>>> createAllowanceTransaction - No source token address found.') + throw new Error('createAllowanceTransaction - No source token address found.') } try { diff --git a/packages/core/src/utils/RouterUtil.ts b/packages/core/src/utils/RouterUtil.ts index 4efacb330f..98d3fd5143 100644 --- a/packages/core/src/utils/RouterUtil.ts +++ b/packages/core/src/utils/RouterUtil.ts @@ -1,6 +1,8 @@ import { RouterController } from '../controllers/RouterController.js' import { ModalController } from '../controllers/ModalController.js' import { OptionsController } from '../controllers/OptionsController.js' +import { ChainController } from '../controllers/ChainController.js' +import { ConstantsUtil } from '@web3modal/common' export const RouterUtil = { goBackOrCloseModal() { @@ -21,7 +23,7 @@ export const RouterUtil = { }, navigateAfterPreferredAccountTypeSelect() { const { isSiweEnabled } = OptionsController.state - if (isSiweEnabled) { + if (isSiweEnabled && ChainController.state.activeChain === ConstantsUtil.CHAIN.EVM) { RouterController.push('ConnectingSiwe') } else { RouterController.push('Account') diff --git a/packages/core/src/utils/SwapApiUtil.ts b/packages/core/src/utils/SwapApiUtil.ts index adddbcfd72..16fc7f2a71 100644 --- a/packages/core/src/utils/SwapApiUtil.ts +++ b/packages/core/src/utils/SwapApiUtil.ts @@ -1,11 +1,11 @@ -import { NetworkController } from '../controllers/NetworkController.js' -import { AccountController } from '../controllers/AccountController.js' import { ConnectionController } from '../controllers/ConnectionController.js' import { ConstantsUtil } from './ConstantsUtil.js' import { BlockchainApiController } from '../controllers/BlockchainApiController.js' import type { SwapTokenWithBalance } from './TypeUtil.js' import { OptionsController } from '../controllers/OptionsController.js' import type { BlockchainApiSwapAllowanceRequest, BlockchainApiBalanceResponse } from './TypeUtil.js' +import { NetworkController } from '../controllers/NetworkController.js' +import { AccountController } from '../controllers/AccountController.js' // -- Types --------------------------------------------- // export type TokenInfo = { @@ -23,8 +23,9 @@ export type TokenInfo = { // -- Controller ---------------------------------------- // export const SwapApiUtil = { async getTokenList() { + const caipNetwork = NetworkController.state.caipNetwork const response = await BlockchainApiController.fetchSwapTokens({ - chainId: NetworkController.state.caipNetwork?.id, + chainId: caipNetwork?.id, projectId: OptionsController.state.projectId }) const tokens = diff --git a/packages/core/src/utils/TypeUtil.ts b/packages/core/src/utils/TypeUtil.ts index 4366f7c295..c225a1ada6 100644 --- a/packages/core/src/utils/TypeUtil.ts +++ b/packages/core/src/utils/TypeUtil.ts @@ -1,5 +1,11 @@ import type { W3mFrameProvider, W3mFrameTypes } from '@web3modal/wallet' -import type { Balance, Transaction } from '@web3modal/common' +import type { Balance, Transaction, Chain } from '@web3modal/common' +import type { + NetworkControllerClient, + NetworkControllerState +} from '../controllers/NetworkController.js' +import type { ConnectionControllerClient } from '../controllers/ConnectionController.js' +import type { AccountControllerState } from '../controllers/AccountController.js' import type { OnRampProviderOption } from '../controllers/OnRampController.js' export type CaipAddress = `${string}:${string}:${string}` @@ -19,6 +25,7 @@ export interface CaipNetwork { name?: string imageId?: string imageUrl?: string + chain: Chain } export type ConnectedWalletInfo = @@ -38,7 +45,13 @@ export type ProjectId = string export type Platform = 'mobile' | 'desktop' | 'browser' | 'web' | 'qrcode' | 'unsupported' -export type ConnectorType = 'EXTERNAL' | 'WALLET_CONNECT' | 'INJECTED' | 'ANNOUNCED' | 'AUTH' +export type ConnectorType = + | 'EXTERNAL' + | 'WALLET_CONNECT' + | 'INJECTED' + | 'ANNOUNCED' + | 'AUTH' + | 'MULTI_CHAIN' export type SocialProvider = 'google' | 'github' | 'apple' | 'facebook' | 'x' | 'discord' @@ -60,6 +73,8 @@ export type Connector = { socials?: SocialProvider[] showWallets?: boolean walletFeatures?: boolean + chain: Chain + providers?: Connector[] } export interface AuthConnector extends Connector { @@ -795,3 +810,11 @@ export interface WriteContractArgs { // eslint-disable-next-line @typescript-eslint/no-explicit-any abi: any } + +export type ChainAdapter = { + connectionControllerClient?: ConnectionControllerClient + networkControllerClient?: NetworkControllerClient + accountState?: AccountControllerState + networkState?: NetworkControllerState + chain: Chain +} diff --git a/packages/core/tests/controllers/AccountController.test.ts b/packages/core/tests/controllers/AccountController.test.ts index 1e3ec84403..ed14837b49 100644 --- a/packages/core/tests/controllers/AccountController.test.ts +++ b/packages/core/tests/controllers/AccountController.test.ts @@ -1,5 +1,6 @@ -import { describe, expect, it } from 'vitest' -import { AccountController } from '../../index.js' +import { beforeAll, describe, expect, it } from 'vitest' +import { AccountController, ChainController } from '../../index.js' +import { ConstantsUtil } from '@web3modal/common' // -- Setup -------------------------------------------------------------------- const caipAddress = 'eip155:1:0x123' @@ -10,6 +11,10 @@ const profileImage = 'https://ipfs.com/0x123.png' const explorerUrl = 'https://some.explorer.com/explore' // -- Tests -------------------------------------------------------------------- +beforeAll(() => { + ChainController.initialize([{ chain: ConstantsUtil.CHAIN.EVM }]) +}) + describe('AccountController', () => { it('should have valid default state', () => { expect(AccountController.state).toEqual({ diff --git a/packages/core/tests/controllers/ApiController.test.ts b/packages/core/tests/controllers/ApiController.test.ts index 19ec909170..d452f047c3 100644 --- a/packages/core/tests/controllers/ApiController.test.ts +++ b/packages/core/tests/controllers/ApiController.test.ts @@ -1,14 +1,20 @@ -import { describe, expect, it, vi } from 'vitest' +import { beforeAll, describe, expect, it, vi } from 'vitest' import { ApiController, AssetController, + ChainController, ConnectorController, NetworkController, OptionsController } from '../../index.js' import { api } from '../../src/controllers/ApiController.js' +import { ConstantsUtil } from '@web3modal/common' // -- Tests -------------------------------------------------------------------- +beforeAll(() => { + ChainController.initialize([{ chain: ConstantsUtil.CHAIN.EVM }]) +}) + describe('ApiController', () => { it('should have valid default state', () => { expect(ApiController.state).toEqual({ @@ -108,16 +114,19 @@ describe('ApiController', () => { { id: '155:1', name: 'Ethereum Mainnet', - imageId: '12341' + imageId: '12341', + chain: ConstantsUtil.CHAIN.EVM }, { id: '155:4', name: 'Ethereum Rinkeby', - imageId: '12342' + imageId: '12342', + chain: ConstantsUtil.CHAIN.EVM }, { id: '155:42', - name: 'Ethereum Kovan' + name: 'Ethereum Kovan', + chain: ConstantsUtil.CHAIN.EVM } ]) const fetchSpy = vi.spyOn(ApiController, '_fetchNetworkImage').mockResolvedValue() @@ -132,17 +141,20 @@ describe('ApiController', () => { { id: '155:1', name: 'Ethereum Mainnet', - imageId: '12341' + imageId: '12341', + chain: ConstantsUtil.CHAIN.EVM }, { id: '155:4', name: 'Ethereum Rinkeby', - imageId: '12342' + imageId: '12342', + chain: ConstantsUtil.CHAIN.EVM }, // Should not fetch this { id: '155:42', - name: 'Ethereum Kovan' + name: 'Ethereum Kovan', + chain: ConstantsUtil.CHAIN.EVM } ]) const fetchSpy = vi.spyOn(ApiController, '_fetchNetworkImage').mockResolvedValue() @@ -158,12 +170,14 @@ describe('ApiController', () => { id: '12341', name: 'MetaMask', imageId: '12341', - type: 'INJECTED' + type: 'INJECTED', + chain: ConstantsUtil.CHAIN.EVM }, { id: '12341', name: 'RandomConnector', - type: 'INJECTED' + type: 'INJECTED', + chain: ConstantsUtil.CHAIN.EVM } ]) const fetchSpy = vi.spyOn(ApiController, '_fetchConnectorImage').mockResolvedValue() diff --git a/packages/core/tests/controllers/AssetController.test.ts b/packages/core/tests/controllers/AssetController.test.ts index 56a65c03a9..e068411da7 100644 --- a/packages/core/tests/controllers/AssetController.test.ts +++ b/packages/core/tests/controllers/AssetController.test.ts @@ -28,6 +28,7 @@ const currency2 = 'EUR' describe('AssetController', () => { it('should have valid default state', () => { expect(AssetController.state).toEqual({ + chainImages: {}, walletImages: {}, networkImages: {}, connectorImages: {}, diff --git a/packages/core/tests/controllers/ChainController.test.ts b/packages/core/tests/controllers/ChainController.test.ts new file mode 100644 index 0000000000..5583709464 --- /dev/null +++ b/packages/core/tests/controllers/ChainController.test.ts @@ -0,0 +1,83 @@ +import { beforeAll, describe, expect, it } from 'vitest' +import { ConstantsUtil, type Chain } from '@web3modal/common' +import { ChainController } from '../../src/controllers/ChainController.js' +import { type ConnectionControllerClient } from '../../src/controllers/ConnectionController.js' +import { type NetworkControllerClient } from '../../src/controllers/NetworkController.js' + +// -- Setup -------------------------------------------------------------------- +const caipAddress = 'eip155:1:0x123' +const approvedCaipNetworkIds = ['eip155:1', 'eip155:4'] as `${string}:${string}`[] + +const connectionControllerClient: ConnectionControllerClient = { + connectWalletConnect: async () => Promise.resolve(), + disconnect: async () => Promise.resolve(), + estimateGas: async () => Promise.resolve(BigInt(0)), + signMessage: async (message: string) => Promise.resolve(message), + parseUnits: value => BigInt(value), + formatUnits: value => value.toString(), + sendTransaction: () => Promise.resolve('0x'), + writeContract: () => Promise.resolve('0x'), + getEnsAddress: async (value: string) => Promise.resolve(value), + getEnsAvatar: async (value: string) => Promise.resolve(value) +} + +const networkControllerClient: NetworkControllerClient = { + switchCaipNetwork: async _caipNetwork => Promise.resolve(), + getApprovedCaipNetworksData: async () => + Promise.resolve({ approvedCaipNetworkIds: [], supportsAllNetworks: false }) +} + +const evmAdapter = { + chain: 'evm' as Chain, + connectionControllerClient, + networkControllerClient +} + +beforeAll(() => { + ChainController.initialize([evmAdapter]) +}) + +// -- Tests -------------------------------------------------------------------- +describe('ChainController', () => { + it('should be initialized as expected', () => { + expect(ChainController.state.activeChain).toEqual(ConstantsUtil.CHAIN.EVM) + expect(ChainController.getConnectionControllerClient()).toEqual(connectionControllerClient) + expect(ChainController.getNetworkControllerClient()).toEqual(networkControllerClient) + }) + + it('should update account state as expected', () => { + ChainController.setAccountProp('caipAddress', caipAddress) + expect(ChainController.getAccountProp('caipAddress')).toEqual(caipAddress) + }) + + it('should update network state as expected', () => { + ChainController.setChainNetworkData(ChainController.state.activeChain, { + approvedCaipNetworkIds + }) + expect(ChainController.getNetworkProp('approvedCaipNetworkIds')).toEqual(approvedCaipNetworkIds) + }) + + it('should set multi-chain enabled flag as expected', () => { + ChainController.setMultiChainEnabled(true) + expect(ChainController.state.multiChainEnabled).toEqual(true) + }) + + it('should reset account as expected', () => { + ChainController.resetAccount(ChainController.state.activeChain) + expect(ChainController.getAccountProp('isConnected')).toEqual(false) + expect(ChainController.getAccountProp('smartAccountDeployed')).toEqual(false) + expect(ChainController.getAccountProp('currentTab')).toEqual(0) + expect(ChainController.getAccountProp('caipAddress')).toEqual(undefined) + expect(ChainController.getAccountProp('address')).toEqual(undefined) + expect(ChainController.getAccountProp('balance')).toEqual(undefined) + expect(ChainController.getAccountProp('balanceSymbol')).toEqual(undefined) + expect(ChainController.getAccountProp('profileName')).toEqual(undefined) + expect(ChainController.getAccountProp('profileImage')).toEqual(undefined) + expect(ChainController.getAccountProp('addressExplorerUrl')).toEqual(undefined) + expect(ChainController.getAccountProp('tokenBalance')).toEqual([]) + expect(ChainController.getAccountProp('connectedWalletInfo')).toEqual(undefined) + expect(ChainController.getAccountProp('preferredAccountType')).toEqual(undefined) + expect(ChainController.getAccountProp('socialProvider')).toEqual(undefined) + expect(ChainController.getAccountProp('socialWindow')).toEqual(undefined) + }) +}) diff --git a/packages/core/tests/controllers/ConnectionController.test.ts b/packages/core/tests/controllers/ConnectionController.test.ts index d0a61383a6..1005721751 100644 --- a/packages/core/tests/controllers/ConnectionController.test.ts +++ b/packages/core/tests/controllers/ConnectionController.test.ts @@ -1,6 +1,7 @@ -import { describe, expect, it, vi } from 'vitest' +import { beforeAll, describe, expect, it, vi } from 'vitest' import type { ConnectionControllerClient, ConnectorType } from '../../index.js' -import { ConnectionController, ConstantsUtil, StorageUtil } from '../../index.js' +import { ChainController, ConnectionController, ConstantsUtil, StorageUtil } from '../../index.js' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' // -- Setup -------------------------------------------------------------------- const walletConnectUri = 'wc://uri?=123' @@ -43,18 +44,19 @@ const partialClient: ConnectionControllerClient = { } // -- Tests -------------------------------------------------------------------- -describe('ConnectionController', () => { - it('should throw if client not set', () => { - expect(ConnectionController._getClient).toThrow('ConnectionController client not set') - }) +beforeAll(() => { + ChainController.initialize([{ chain: CommonConstantsUtil.CHAIN.EVM }]) +}) +describe('ConnectionController', () => { it('should have valid default state', () => { - ConnectionController.setClient(client) + ChainController.initialize([ + { chain: CommonConstantsUtil.CHAIN.EVM, connectionControllerClient: client } + ]) expect(ConnectionController.state).toEqual({ wcError: false, - buffering: false, - _client: ConnectionController._getClient() + buffering: false }) }) @@ -62,7 +64,6 @@ describe('ConnectionController', () => { await ConnectionController.disconnect() expect(ConnectionController.state.wcUri).toEqual(undefined) expect(ConnectionController.state.wcPairingExpiry).toEqual(undefined) - expect(ConnectionController.state.wcPromise).toEqual(undefined) }) it('should update state correctly and set wcPromise on connectWalletConnect()', async () => { @@ -71,11 +72,8 @@ describe('ConnectionController', () => { vi.useFakeTimers() vi.setSystemTime(fakeDate) - ConnectionController.connectWalletConnect() - expect(ConnectionController.state.wcPromise).toBeDefined() - // Await on set promise and check results - await ConnectionController.state.wcPromise + await ConnectionController.connectWalletConnect() expect(ConnectionController.state.wcUri).toEqual(walletConnectUri) expect(ConnectionController.state.wcPairingExpiry).toEqual(ConstantsUtil.FOUR_MINUTES_MS) expect(storageSpy).toHaveBeenCalledWith('WALLET_CONNECT') @@ -102,18 +100,19 @@ describe('ConnectionController', () => { }) it('should not throw when optional methods are undefined', async () => { - ConnectionController.setClient(partialClient) + ChainController.initialize([ + { chain: CommonConstantsUtil.CHAIN.EVM, connectionControllerClient: partialClient } + ]) await ConnectionController.connectExternal({ id: externalId, type }) ConnectionController.checkInstalled([externalId]) expect(clientCheckInstalledSpy).toHaveBeenCalledWith([externalId]) expect(clientCheckInstalledSpy).toHaveBeenCalledWith(undefined) - expect(ConnectionController.state._client).toEqual(partialClient) + expect(ConnectionController._getClient()).toEqual(partialClient) }) it('should update state correctly on resetWcConnection()', () => { ConnectionController.resetWcConnection() expect(ConnectionController.state.wcUri).toEqual(undefined) expect(ConnectionController.state.wcPairingExpiry).toEqual(undefined) - expect(ConnectionController.state.wcPromise).toEqual(undefined) }) }) diff --git a/packages/core/tests/controllers/ConnectorController.test.ts b/packages/core/tests/controllers/ConnectorController.test.ts index 30cff8fe47..ab7e8854c5 100644 --- a/packages/core/tests/controllers/ConnectorController.test.ts +++ b/packages/core/tests/controllers/ConnectorController.test.ts @@ -7,7 +7,7 @@ import { type ThemeMode, type ThemeVariables } from '../../index.js' -import { getW3mThemeVariables } from '@web3modal/common' +import { ConstantsUtil, getW3mThemeVariables } from '@web3modal/common' // -- Setup -------------------------------------------------------------------- const authProvider = { @@ -19,14 +19,25 @@ const authProvider = { const walletConnectConnector = { id: 'walletConnect', explorerId: 'walletConnectId', - type: 'WALLET_CONNECT' + type: 'WALLET_CONNECT', + chain: ConstantsUtil.CHAIN.EVM +} as const +const externalConnector = { + id: 'external', + type: 'EXTERNAL', + chain: ConstantsUtil.CHAIN.EVM +} as const +const authConnector = { + id: 'w3mAuth', + type: 'AUTH', + provider: authProvider, + chain: ConstantsUtil.CHAIN.EVM } as const -const externalConnector = { id: 'external', type: 'EXTERNAL' } as const -const authConnector = { id: 'w3mAuth', type: 'AUTH', provider: authProvider } as const const announcedConnector = { id: 'announced', type: 'ANNOUNCED', - info: { rdns: 'announced.io' } + info: { rdns: 'announced.io' }, + chain: ConstantsUtil.CHAIN.EVM } as const const syncDappDataSpy = vi.spyOn(authProvider, 'syncDappData') @@ -45,11 +56,13 @@ const mockDappData = { const metamaskConnector = { id: 'metamask', type: 'INJECTED', - info: { rdns: 'io.metamask.com' } + info: { rdns: 'io.metamask.com' }, + chain: ConstantsUtil.CHAIN.EVM } as const const zerionConnector = { id: 'ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18', - type: 'INJECTED' + type: 'INJECTED', + chain: ConstantsUtil.CHAIN.EVM } as const // -- Tests -------------------------------------------------------------------- describe('ConnectorController', () => { diff --git a/packages/core/tests/controllers/EnsController.test.ts b/packages/core/tests/controllers/EnsController.test.ts index e68701be5f..c7dc6d4c1f 100644 --- a/packages/core/tests/controllers/EnsController.test.ts +++ b/packages/core/tests/controllers/EnsController.test.ts @@ -1,6 +1,7 @@ -import { describe, expect, it, vi } from 'vitest' +import { beforeAll, describe, expect, it, vi } from 'vitest' import { AccountController, + ChainController, ConnectionController, ConnectorController, EnsController, @@ -68,6 +69,10 @@ vi.mock('../../src/controllers/BlockchainApiController.js', async importOriginal }) // -- Tests -------------------------------------------------------------------- +beforeAll(() => { + ChainController.initialize([{ chain: ConstantsUtil.CHAIN.EVM }]) +}) + describe('EnsController', () => { it('should have valid default state', () => { expect(EnsController.state).toEqual({ @@ -125,7 +130,7 @@ describe('EnsController', () => { // No network set const result = await EnsController.getNamesForAddress('0x123') expect(result).toEqual([]) - NetworkController.setCaipNetwork({ id: 'test:123' }) + NetworkController.setCaipNetwork({ id: 'test:123', chain: ConstantsUtil.CHAIN.EVM }) const resultWithNetwork = await EnsController.getNamesForAddress('0x123') expect(resultWithNetwork).toEqual([TEST_NAME]) @@ -135,12 +140,13 @@ describe('EnsController', () => { it('should register name', async () => { // Setup - NetworkController.setCaipNetwork({ id: 'test:123' }) + NetworkController.setCaipNetwork({ id: 'test:123', chain: ConstantsUtil.CHAIN.EVM }) AccountController.setCaipAddress('eip155:1:0x123') const getAuthConnectorSpy = vi.spyOn(ConnectorController, 'getAuthConnector').mockReturnValue({ provider: { getEmail: () => 'test@walletconnect.com' } as unknown as W3mFrameProvider, id: 'w3mAuth', - type: 'AUTH' + type: 'AUTH', + chain: ConstantsUtil.CHAIN.EVM }) const signMessageSpy = vi .spyOn(ConnectionController, 'signMessage') diff --git a/packages/core/tests/controllers/NetworkController.test.ts b/packages/core/tests/controllers/NetworkController.test.ts index 8f93b88d6e..d6b32d311a 100644 --- a/packages/core/tests/controllers/NetworkController.test.ts +++ b/packages/core/tests/controllers/NetworkController.test.ts @@ -1,13 +1,14 @@ import { describe, expect, it } from 'vitest' import type { CaipNetwork, CaipNetworkId, NetworkControllerClient } from '../../index.js' -import { EventsController, NetworkController } from '../../index.js' +import { ChainController, EventsController, NetworkController } from '../../index.js' +import { ConstantsUtil } from '@web3modal/common' // -- Setup -------------------------------------------------------------------- -const caipNetwork = { id: 'eip155:1', name: 'Ethereum' } as const +const caipNetwork = { id: 'eip155:1', name: 'Ethereum', chain: ConstantsUtil.CHAIN.EVM } as const const requestedCaipNetworks = [ - { id: 'eip155:1', name: 'Ethereum' }, - { id: 'eip155:42161', name: 'Arbitrum One' }, - { id: 'eip155:43114', name: 'Avalanche C-Chain' } + { id: 'eip155:1', name: 'Ethereum', chain: ConstantsUtil.CHAIN.EVM }, + { id: 'eip155:42161', name: 'Arbitrum One', chain: ConstantsUtil.CHAIN.EVM }, + { id: 'eip155:43114', name: 'Avalanche C-Chain', chain: ConstantsUtil.CHAIN.EVM } ] as CaipNetwork[] const approvedCaipNetworkIds = ['eip155:1', 'eip155:42161'] as CaipNetworkId[] const switchNetworkEvent = { @@ -25,14 +26,19 @@ const client: NetworkControllerClient = { // -- Tests -------------------------------------------------------------------- describe('NetworkController', () => { it('should throw if client not set', () => { + expect(NetworkController._getClient).toThrow( + 'Chain is required to get network controller client' + ) + ChainController.initialize([{ chain: ConstantsUtil.CHAIN.EVM }]) expect(NetworkController._getClient).toThrow('NetworkController client not set') }) it('should have valid default state', () => { - NetworkController.setClient(client) + ChainController.initialize([ + { chain: ConstantsUtil.CHAIN.EVM, networkControllerClient: client } + ]) expect(NetworkController.state).toEqual({ - _client: NetworkController._getClient(), supportsAllNetworks: true, isDefaultCaipNetwork: false, smartAccountEnabledNetworks: [] @@ -56,7 +62,7 @@ describe('NetworkController', () => { }) it('should update state correctly on getApprovedCaipNetworkIds()', async () => { - await NetworkController.getApprovedCaipNetworksData() + await NetworkController.setApprovedCaipNetworksData() expect(NetworkController.state.approvedCaipNetworkIds).toEqual(approvedCaipNetworkIds) }) @@ -88,7 +94,11 @@ describe('NetworkController', () => { expect(NetworkController.checkIfSmartAccountEnabled()).toEqual(false) NetworkController.setSmartAccountEnabledNetworks([2]) expect(NetworkController.checkIfSmartAccountEnabled()).toEqual(false) - NetworkController.setCaipNetwork({ id: 'eip155:2', name: 'Ethereum' }) + NetworkController.setCaipNetwork({ + id: 'eip155:2', + name: 'Ethereum', + chain: ConstantsUtil.CHAIN.EVM + }) expect(NetworkController.checkIfSmartAccountEnabled()).toEqual(true) }) }) diff --git a/packages/core/tests/controllers/RouterController.test.ts b/packages/core/tests/controllers/RouterController.test.ts index 72ac54ff24..ab615c9b54 100644 --- a/packages/core/tests/controllers/RouterController.test.ts +++ b/packages/core/tests/controllers/RouterController.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it } from 'vitest' import { RouterController } from '../../index.js' +import { ConstantsUtil } from '@web3modal/common' // -- Tests -------------------------------------------------------------------- describe('RouterController', () => { @@ -68,13 +69,13 @@ describe('RouterController', () => { it('should update state correctly on push() with data', () => { RouterController.push('ConnectingExternal', { - connector: { id: 'test', type: 'WALLET_CONNECT' } + connector: { id: 'test', type: 'WALLET_CONNECT', chain: ConstantsUtil.CHAIN.EVM } }) expect(RouterController.state).toEqual({ view: 'ConnectingExternal', history: ['Account', 'Networks', 'ConnectingExternal'], data: { - connector: { id: 'test', type: 'WALLET_CONNECT' } + connector: { id: 'test', type: 'WALLET_CONNECT', chain: ConstantsUtil.CHAIN.EVM } }, transactionStack: [] }) diff --git a/packages/core/tests/controllers/SwapController.test.ts b/packages/core/tests/controllers/SwapController.test.ts index 63effdb0ae..bc8a4c80a0 100644 --- a/packages/core/tests/controllers/SwapController.test.ts +++ b/packages/core/tests/controllers/SwapController.test.ts @@ -3,6 +3,7 @@ import { parseUnits } from 'viem' import { AccountController, BlockchainApiController, + ChainController, ConnectionController, NetworkController, SwapController, @@ -19,9 +20,10 @@ import { tokensResponse } from '../mocks/SwapController.js' import { SwapApiUtil } from '../../src/utils/SwapApiUtil.js' +import { ConstantsUtil } from '@web3modal/common' // - Mocks --------------------------------------------------------------------- -const caipNetwork = { id: 'eip155:137', name: 'Polygon' } as const +const caipNetwork = { id: 'eip155:137', name: 'Polygon', chain: ConstantsUtil.CHAIN.EVM } as const const approvedCaipNetworkIds = ['eip155:1', 'eip155:137'] as CaipNetworkId[] const client: NetworkControllerClient = { switchCaipNetwork: async _caipNetwork => Promise.resolve(), @@ -37,7 +39,7 @@ const toTokenAddress = 'eip155:137:0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b' // - Setup --------------------------------------------------------------------- beforeAll(async () => { // -- Set Account and - NetworkController.setClient(client) + ChainController.initialize([{ chain: ConstantsUtil.CHAIN.EVM, networkControllerClient: client }]) await NetworkController.switchActiveNetwork(caipNetwork) AccountController.setCaipAddress(caipAddress) diff --git a/packages/ethers/CHANGELOG.md b/packages/ethers/CHANGELOG.md index 4ef45b673c..711decd965 100644 --- a/packages/ethers/CHANGELOG.md +++ b/packages/ethers/CHANGELOG.md @@ -1,5 +1,19 @@ # @web3modal/ethers +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/polyfills@5.0.4 + - @web3modal/scaffold@5.0.4 + - @web3modal/scaffold-react@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/scaffold-vue@5.0.4 + - @web3modal/siwe@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/ethers/package.json b/packages/ethers/package.json index 86a465c488..8af7076d3a 100644 --- a/packages/ethers/package.json +++ b/packages/ethers/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/ethers", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -45,12 +45,12 @@ "dependencies": { "@coinbase/wallet-sdk": "4.0.3", "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4", "valtio": "1.11.2" }, "peerDependencies": { diff --git a/packages/ethers/src/client.ts b/packages/ethers/src/client.ts index c89abb79a4..60644d46b6 100644 --- a/packages/ethers/src/client.ts +++ b/packages/ethers/src/client.ts @@ -14,9 +14,11 @@ import type { } from '@web3modal/scaffold' import { Web3ModalScaffold } from '@web3modal/scaffold' import { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' import EthereumProvider, { OPTIONAL_METHODS } from '@walletconnect/ethereum-provider' import type { Web3ModalSIWEClient } from '@web3modal/siwe' import { ConstantsUtil as CommonConstants } from '@web3modal/common' +import type { Chain as AvailableChain } from '@web3modal/common' import type { Address, Metadata, @@ -80,7 +82,7 @@ declare global { } } -// @ts-expect-error: Overriden state type is correct +// @ts-expect-error: Overridden state type is correct interface Web3ModalState extends PublicStateControllerState { selectedNetworkId: number | undefined } @@ -115,6 +117,8 @@ export class Web3Modal extends Web3ModalScaffold { private chains: Chain[] + private chain: AvailableChain = CommonConstantsUtil.CHAIN.EVM + private metadata?: Metadata private options: Web3ModalClientOptions | undefined = undefined @@ -473,6 +477,7 @@ export class Web3Modal extends Web3ModalScaffold { } super({ + chain: CommonConstantsUtil.CHAIN.EVM, networkControllerClient, connectionControllerClient, siweControllerClient: siweConfig, @@ -525,7 +530,7 @@ export class Web3Modal extends Web3ModalScaffold { // -- Public ------------------------------------------------------------------ - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override getState() { const state = super.getState() @@ -535,7 +540,7 @@ export class Web3Modal extends Web3ModalScaffold { } } - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override subscribeState(callback: (state: Web3ModalState) => void) { return super.subscribeState(state => callback({ @@ -820,7 +825,7 @@ export class Web3Modal extends Web3ModalScaffold { EthersStoreUtil.setIsConnected(true) EthersStoreUtil.setAddress(address as Address) EthersStoreUtil.setPreferredAccountType(preferredAccountType as W3mFrameTypes.AccountType) - this.setSmartAccountDeployed(Boolean(smartAccountDeployed)) + this.setSmartAccountDeployed(Boolean(smartAccountDeployed), this.chain) this.watchAuth() this.watchModal() @@ -1076,13 +1081,13 @@ export class Web3Modal extends Web3ModalScaffold { const caipAddress: CaipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}` this.setIsConnected(isConnected) - this.setPreferredAccountType(preferredAccountType) + this.setPreferredAccountType(preferredAccountType, this.chain) this.setCaipAddress(caipAddress) this.syncConnectedWalletInfo() await Promise.all([ this.syncProfile(address), this.syncBalance(address), - this.getApprovedCaipNetworksData() + this.setApprovedCaipNetworksData() ]) this.hasSyncedConnectedAccount = true @@ -1106,7 +1111,8 @@ export class Web3Modal extends Web3ModalScaffold { id: caipChainId, name: chain.name, imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId], - imageUrl: chainImages?.[chain.chainId] + imageUrl: chainImages?.[chain.chainId], + chain: this.chain }) if (isConnected && address) { const caipAddress: CaipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}` @@ -1124,7 +1130,8 @@ export class Web3Modal extends Web3ModalScaffold { } } else if (isConnected) { this.setCaipNetwork({ - id: `${ConstantsUtil.EIP155}:${chainId}` + id: `${ConstantsUtil.EIP155}:${chainId}`, + chain: this.chain }) } } @@ -1209,25 +1216,24 @@ export class Web3Modal extends Web3ModalScaffold { ) if (currentProvider) { - this.setConnectedWalletInfo({ - ...currentProvider.info - }) + this.setConnectedWalletInfo({ ...currentProvider.info }, this.chain) } } } else if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) { const provider = EthersStoreUtil.state.provider as unknown as EthereumProvider if (provider.session) { - this.setConnectedWalletInfo({ - ...provider.session.peer.metadata, - name: provider.session.peer.metadata.name, - icon: provider.session.peer.metadata.icons?.[0] - }) + this.setConnectedWalletInfo( + { + ...provider.session.peer.metadata, + name: provider.session.peer.metadata.name, + icon: provider.session.peer.metadata.icons?.[0] + }, + this.chain + ) } } else if (currentActiveWallet) { - this.setConnectedWalletInfo({ - name: currentActiveWallet - }) + this.setConnectedWalletInfo({ name: currentActiveWallet }, this.chain) } } @@ -1371,7 +1377,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], - type: connectorType + type: connectorType, + chain: this.chain }) } @@ -1385,7 +1392,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.INJECTED_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.INJECTED_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.INJECTED_CONNECTOR_ID], - type: injectedConnectorType + type: injectedConnectorType, + chain: this.chain }) } } @@ -1397,7 +1405,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], - type: 'EXTERNAL' + type: 'EXTERNAL', + chain: this.chain }) } @@ -1416,6 +1425,7 @@ export class Web3Modal extends Web3ModalScaffold { email: auth?.email, socials: auth?.socials, showWallets: auth?.showWallets === undefined ? true : auth.showWallets, + chain: this.chain, walletFeatures: auth?.walletFeatures }) @@ -1454,7 +1464,8 @@ export class Web3Modal extends Web3ModalScaffold { info.icon ?? this.options?.connectorImages?.[ConstantsUtil.EIP6963_CONNECTOR_ID], name: info.name, provider, - info + info, + chain: this.chain }) const eip6963ProviderObj = { diff --git a/packages/ethers5/CHANGELOG.md b/packages/ethers5/CHANGELOG.md index f1a58b3f2e..e287ebc3db 100644 --- a/packages/ethers5/CHANGELOG.md +++ b/packages/ethers5/CHANGELOG.md @@ -1,5 +1,19 @@ # @web3modal/ethers5 +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/polyfills@5.0.4 + - @web3modal/scaffold@5.0.4 + - @web3modal/scaffold-react@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/scaffold-vue@5.0.4 + - @web3modal/siwe@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/ethers5/package.json b/packages/ethers5/package.json index 33a9f0c051..3e3ba22a84 100644 --- a/packages/ethers5/package.json +++ b/packages/ethers5/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/ethers5", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -45,12 +45,12 @@ "dependencies": { "@coinbase/wallet-sdk": "4.0.3", "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4", "valtio": "1.11.2" }, "devDependencies": { diff --git a/packages/ethers5/src/client.ts b/packages/ethers5/src/client.ts index eb20786058..45c5509eaa 100644 --- a/packages/ethers5/src/client.ts +++ b/packages/ethers5/src/client.ts @@ -14,6 +14,7 @@ import type { import { Web3ModalScaffold } from '@web3modal/scaffold' import type { Web3ModalSIWEClient } from '@web3modal/siwe' import { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' import EthereumProvider, { OPTIONAL_METHODS } from '@walletconnect/ethereum-provider' import type { Address, @@ -31,6 +32,7 @@ import { } from '@web3modal/scaffold-utils/ethers' import type { EthereumProviderOptions } from '@walletconnect/ethereum-provider' import { NetworkUtil } from '@web3modal/common' +import type { Chain as AvailableChain } from '@web3modal/common' // -- Types --------------------------------------------------------------------- export interface Web3ModalClientOptions extends Omit { @@ -57,7 +59,7 @@ declare global { } } -// @ts-expect-error: Overriden state type is correct +// @ts-expect-error: Overridden state type is correct interface Web3ModalState extends PublicStateControllerState { selectedNetworkId: number | undefined } @@ -92,6 +94,8 @@ export class Web3Modal extends Web3ModalScaffold { private chains: Chain[] + private chain: AvailableChain = CommonConstantsUtil.CHAIN.EVM + private metadata?: Metadata private options: Web3ModalClientOptions | undefined = undefined @@ -351,6 +355,7 @@ export class Web3Modal extends Web3ModalScaffold { } super({ + chain: CommonConstantsUtil.CHAIN.EVM, networkControllerClient, connectionControllerClient, siweControllerClient: siweConfig, @@ -399,7 +404,7 @@ export class Web3Modal extends Web3ModalScaffold { // -- Public ------------------------------------------------------------------ - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override getState() { const state = super.getState() @@ -409,7 +414,7 @@ export class Web3Modal extends Web3ModalScaffold { } } - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override subscribeState(callback: (state: Web3ModalState) => void) { return super.subscribeState(state => callback({ @@ -820,7 +825,7 @@ export class Web3Modal extends Web3ModalScaffold { await Promise.all([ this.syncProfile(address), this.syncBalance(address), - this.getApprovedCaipNetworksData() + this.setApprovedCaipNetworksData() ]) this.hasSyncedConnectedAccount = true @@ -844,7 +849,8 @@ export class Web3Modal extends Web3ModalScaffold { id: caipChainId, name: chain.name, imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId], - imageUrl: chainImages?.[chain.chainId] + imageUrl: chainImages?.[chain.chainId], + chain: this.chain }) if (isConnected && address) { const caipAddress: CaipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}` @@ -861,7 +867,8 @@ export class Web3Modal extends Web3ModalScaffold { } } else if (isConnected) { this.setCaipNetwork({ - id: `${ConstantsUtil.EIP155}:${chainId}` + id: `${ConstantsUtil.EIP155}:${chainId}`, + chain: this.chain }) } } @@ -925,25 +932,24 @@ export class Web3Modal extends Web3ModalScaffold { ) if (currentProvider) { - this.setConnectedWalletInfo({ - ...currentProvider.info - }) + this.setConnectedWalletInfo({ ...currentProvider.info }, this.chain) } } } else if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) { const provider = EthersStoreUtil.state.provider as unknown as EthereumProvider if (provider.session) { - this.setConnectedWalletInfo({ - ...provider.session.peer.metadata, - name: provider.session.peer.metadata.name, - icon: provider.session.peer.metadata.icons?.[0] - }) + this.setConnectedWalletInfo( + { + ...provider.session.peer.metadata, + name: provider.session.peer.metadata.name, + icon: provider.session.peer.metadata.icons?.[0] + }, + this.chain + ) } } else if (currentActiveWallet) { - this.setConnectedWalletInfo({ - name: currentActiveWallet - }) + this.setConnectedWalletInfo({ name: currentActiveWallet }, this.chain) } } @@ -1041,7 +1047,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID], - type: connectorType + type: connectorType, + chain: this.chain }) } @@ -1055,7 +1062,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.INJECTED_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.INJECTED_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.INJECTED_CONNECTOR_ID], - type: injectedConnectorType + type: injectedConnectorType, + chain: this.chain }) } } @@ -1067,7 +1075,8 @@ export class Web3Modal extends Web3ModalScaffold { imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], imageUrl: this.options?.connectorImages?.[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.COINBASE_SDK_CONNECTOR_ID], - type: 'EXTERNAL' + type: 'EXTERNAL', + chain: this.chain }) } @@ -1097,7 +1106,8 @@ export class Web3Modal extends Web3ModalScaffold { info.icon ?? this.options?.connectorImages?.[ConstantsUtil.EIP6963_CONNECTOR_ID], name: info.name, provider, - info + info, + chain: this.chain }) const eip6963ProviderObj = { diff --git a/packages/polyfills/CHANGELOG.md b/packages/polyfills/CHANGELOG.md index 6335547a5f..e8d9b1b0a7 100644 --- a/packages/polyfills/CHANGELOG.md +++ b/packages/polyfills/CHANGELOG.md @@ -1,5 +1,11 @@ # @web3modal/polyfills +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + ## 5.0.3 ### Patch Changes diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 3b2b615456..3eb36edbcb 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/polyfills", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", diff --git a/packages/scaffold-react/CHANGELOG.md b/packages/scaffold-react/CHANGELOG.md index 9028e31773..e73e9d8b78 100644 --- a/packages/scaffold-react/CHANGELOG.md +++ b/packages/scaffold-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @web3modal/scaffold-react +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/scaffold@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/scaffold-react/index.ts b/packages/scaffold-react/index.ts index f817822d1d..3f66346253 100644 --- a/packages/scaffold-react/index.ts +++ b/packages/scaffold-react/index.ts @@ -88,7 +88,7 @@ export function useWeb3Modal() { export function useWalletInfo() { if (!modal) { - throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" hook') + throw new Error('Please call "createWeb3Modal" before using "useWalletInfo" hook') } const walletInfo = useSyncExternalStore( @@ -122,7 +122,7 @@ export function useWeb3ModalState() { export function useWeb3ModalEvents() { if (!modal) { - throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalState" hook') + throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalEvents" hook') } const [event, setEvents] = useState(modal.getEvent()) diff --git a/packages/scaffold-react/package.json b/packages/scaffold-react/package.json index a437f70573..c9c4ecbd1a 100644 --- a/packages/scaffold-react/package.json +++ b/packages/scaffold-react/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/scaffold-react", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -16,7 +16,7 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/scaffold": "5.0.3" + "@web3modal/scaffold": "5.0.4" }, "peerDependencies": { "react": ">=17", diff --git a/packages/scaffold-ui/CHANGELOG.md b/packages/scaffold-ui/CHANGELOG.md index 117b64fa71..2b1a94a957 100644 --- a/packages/scaffold-ui/CHANGELOG.md +++ b/packages/scaffold-ui/CHANGELOG.md @@ -1,5 +1,19 @@ # @web3modal/scaffold +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/common@5.0.4 + - @web3modal/core@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/siwe@5.0.4 + - @web3modal/ui@5.0.4 + - @web3modal/wallet@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/scaffold-ui/package.json b/packages/scaffold-ui/package.json index 48f9fd6161..77998ea937 100644 --- a/packages/scaffold-ui/package.json +++ b/packages/scaffold-ui/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/scaffold-ui", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -28,13 +28,13 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/core": "5.0.3", - "@web3modal/ui": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/core": "5.0.4", + "@web3modal/ui": "5.0.4", "lit": "3.1.0", - "@web3modal/siwe": "5.0.3", - "@web3modal/wallet": "5.0.3" + "@web3modal/siwe": "5.0.4", + "@web3modal/wallet": "5.0.4" }, "keywords": [ "web3", diff --git a/packages/scaffold-ui/src/modal/w3m-account-button/index.ts b/packages/scaffold-ui/src/modal/w3m-account-button/index.ts index 4de7cf4251..e13fa115be 100644 --- a/packages/scaffold-ui/src/modal/w3m-account-button/index.ts +++ b/packages/scaffold-ui/src/modal/w3m-account-button/index.ts @@ -60,8 +60,12 @@ export class W3mAccountButton extends LitElement { this.balanceSymbol = '' } }), - NetworkController.subscribeKey('caipNetwork', val => (this.network = val)), - NetworkController.subscribeKey('isUnsupportedChain', val => (this.isUnsupportedChain = val)) + NetworkController.subscribeKey('caipNetwork', val => { + this.network = val + }), + NetworkController.subscribeKey('isUnsupportedChain', val => { + this.isUnsupportedChain = val + }) ] ) } diff --git a/packages/scaffold-ui/src/modal/w3m-button/index.ts b/packages/scaffold-ui/src/modal/w3m-button/index.ts index 322753e259..a724ee1f2a 100644 --- a/packages/scaffold-ui/src/modal/w3m-button/index.ts +++ b/packages/scaffold-ui/src/modal/w3m-button/index.ts @@ -34,13 +34,11 @@ export class W3mButton extends LitElement { @state() private isLoading = ModalController.state.loading // -- Lifecycle ----------------------------------------- // - public constructor() { - super() + public override firstUpdated() { this.unsubscribe.push( AccountController.subscribeKey('isConnected', val => { this.isAccount = val }), - ModalController.subscribeKey('loading', val => { this.isLoading = val }) diff --git a/packages/scaffold-ui/src/modal/w3m-network-button/index.ts b/packages/scaffold-ui/src/modal/w3m-network-button/index.ts index f39ea92c0f..bf860d55df 100644 --- a/packages/scaffold-ui/src/modal/w3m-network-button/index.ts +++ b/packages/scaffold-ui/src/modal/w3m-network-button/index.ts @@ -31,8 +31,7 @@ export class W3mNetworkButton extends LitElement { @state() private isUnsupportedChain = NetworkController.state.isUnsupportedChain // -- Lifecycle ----------------------------------------- // - public constructor() { - super() + public override firstUpdated() { this.unsubscribe.push( ...[ NetworkController.subscribeKey('caipNetwork', val => (this.network = val)), diff --git a/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts index de428ccccb..c6d898c114 100644 --- a/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts @@ -56,13 +56,13 @@ export class W3mAccountDefaultWidget extends LitElement { } else if (!this.disconnecting) { SnackController.showError('Account not found') } + }), + NetworkController.subscribeKey('caipNetwork', val => { + if (val?.id) { + this.network = val + } }) - ], - NetworkController.subscribeKey('caipNetwork', val => { - if (val?.id) { - this.network = val - } - }) + ] ) } @@ -204,7 +204,7 @@ export class W3mAccountDefaultWidget extends LitElement { } private explorerBtnTemplate() { - const { addressExplorerUrl } = AccountController.state + const addressExplorerUrl = AccountController.state.addressExplorerUrl if (!addressExplorerUrl) { return null @@ -220,7 +220,7 @@ export class W3mAccountDefaultWidget extends LitElement { } private isAllowedNetworkSwitch() { - const { requestedCaipNetworks } = NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id) @@ -273,7 +273,8 @@ export class W3mAccountDefaultWidget extends LitElement { } private onExplorer() { - const { addressExplorerUrl } = AccountController.state + const addressExplorerUrl = AccountController.state.addressExplorerUrl + if (addressExplorerUrl) { CoreHelperUtil.openHref(addressExplorerUrl, '_blank') } diff --git a/packages/scaffold-ui/src/partials/w3m-account-wallet-features-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-account-wallet-features-widget/index.ts index 907a841d95..b15470f599 100644 --- a/packages/scaffold-ui/src/partials/w3m-account-wallet-features-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-account-wallet-features-widget/index.ts @@ -64,8 +64,8 @@ export class W3mAccountWalletFeaturesWidget extends LitElement { } }) ], - NetworkController.subscribe(val => { - this.network = val.caipNetwork + NetworkController.subscribeKey('caipNetwork', val => { + this.network = val }) ) this.watchSwapValues() diff --git a/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts index dff0358f61..7402a31cf4 100644 --- a/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts @@ -54,6 +54,8 @@ export class W3mConnectInjectedWidget extends LitElement { } if (!ConnectionController.checkInstalled()) { + this.style.cssText = `display: none` + return null } diff --git a/packages/scaffold-ui/src/partials/w3m-connector-list/index.ts b/packages/scaffold-ui/src/partials/w3m-connector-list/index.ts index de648bac1c..725a453cbc 100644 --- a/packages/scaffold-ui/src/partials/w3m-connector-list/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-connector-list/index.ts @@ -2,7 +2,14 @@ import { customElement } from '@web3modal/ui' import { LitElement, html } from 'lit' import styles from './styles.js' -import { ApiController, ConnectorController, OptionsController, StorageUtil } from '@web3modal/core' +import { + ApiController, + ChainController, + ConnectorController, + OptionsController, + StorageUtil +} from '@web3modal/core' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' import { state } from 'lit/decorators.js' import { ConstantsUtil } from '@web3modal/scaffold-utils' import { WalletUtil } from '../../utils/WalletUtil.js' @@ -71,14 +78,16 @@ export class W3mConnectorList extends LitElement { const coinbase = this.connectors.find( connector => connector.id === ConstantsUtil.COINBASE_SDK_CONNECTOR_ID ) + const isEVM = ChainController.state.activeChain === CommonConstantsUtil.CHAIN.EVM + const includeAnnouncedAndInjected = isEVM ? OptionsController.state.enableEIP6963 : true return { custom, recent, coinbase, external, - announced: OptionsController.state.enableEIP6963 ? announced : [], - injected: OptionsController.state.enableEIP6963 ? injected : [], + announced: includeAnnouncedAndInjected ? announced : [], + injected: includeAnnouncedAndInjected ? injected : [], recommended: filteredRecommended, featured: filteredFeatured } diff --git a/packages/scaffold-ui/src/partials/w3m-onramp-provider-item/index.ts b/packages/scaffold-ui/src/partials/w3m-onramp-provider-item/index.ts index ff1b552299..a3ba494e79 100644 --- a/packages/scaffold-ui/src/partials/w3m-onramp-provider-item/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-onramp-provider-item/index.ts @@ -53,8 +53,8 @@ export class W3mOnRampProviderItem extends LitElement { // -- Private ------------------------------------------- // private networksTemplate() { - const networks = NetworkController.getRequestedCaipNetworks() - const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5) + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const slicedNetworks = requestedCaipNetworks?.filter(network => network?.imageId)?.slice(0, 5) return html` diff --git a/packages/scaffold-ui/src/partials/w3m-social-login-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-social-login-widget/index.ts index a162b479dd..f4adddd0b2 100644 --- a/packages/scaffold-ui/src/partials/w3m-social-login-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-social-login-widget/index.ts @@ -1,5 +1,6 @@ import { AccountController, + ChainController, ConnectorController, CoreHelperUtil, EventsController, @@ -151,7 +152,7 @@ export class W3mSocialLoginWidget extends LitElement { async onSocialClick(socialProvider?: SocialProvider) { if (socialProvider) { - AccountController.setSocialProvider(socialProvider) + AccountController.setSocialProvider(socialProvider, ChainController.state.activeChain) EventsController.sendEvent({ type: 'track', event: 'SOCIAL_LOGIN_STARTED', @@ -173,7 +174,7 @@ export class W3mSocialLoginWidget extends LitElement { }) if (this.popupWindow && uri) { - AccountController.setSocialWindow(this.popupWindow) + AccountController.setSocialWindow(this.popupWindow, ChainController.state.activeChain) this.popupWindow.location.href = uri } else { this.popupWindow?.close() diff --git a/packages/scaffold-ui/src/views/w3m-account-settings-view/index.ts b/packages/scaffold-ui/src/views/w3m-account-settings-view/index.ts index cf7fdcb5a7..682649bec0 100644 --- a/packages/scaffold-ui/src/views/w3m-account-settings-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-account-settings-view/index.ts @@ -192,7 +192,7 @@ export class W3mAccountSettingsView extends LitElement { } private isAllowedNetworkSwitch() { - const { requestedCaipNetworks } = NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id) diff --git a/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/index.ts b/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/index.ts new file mode 100644 index 0000000000..bcd1647df1 --- /dev/null +++ b/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/index.ts @@ -0,0 +1,138 @@ +import { + AssetUtil, + ChainController, + CoreHelperUtil, + NetworkController, + RouterController, + type CaipNetwork +} from '@web3modal/core' +import { customElement } from '@web3modal/ui' + +import { html, LitElement } from 'lit' +import { state } from 'lit/decorators.js' +import { ifDefined } from 'lit/directives/if-defined.js' +import styles from './styles.js' +import { ConstantsUtil } from '@web3modal/common' + +@customElement('w3m-connecting-multi-chain-view') +export class W3mConnectingMultiChainView extends LitElement { + public static override styles = styles + + // -- Members ------------------------------------------- // + private unsubscribe: (() => void)[] = [] + + // -- State & Properties -------------------------------- // + @state() protected activeConnector = ChainController.state.activeConnector + + public constructor() { + super() + this.unsubscribe.push( + ...[ChainController.subscribeKey('activeConnector', val => (this.activeConnector = val))] + ) + } + + // -- Render -------------------------------------------- // + public override render() { + return html` + + + + + + + + Select Chain for ${this.activeConnector?.name} + + Select which chain to connect to your multi chain wallet + + + ${this.networksTemplate()} + + + ` + } + + // Private Methods ------------------------------------- // + private networksTemplate() { + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds + const supportsAllNetworks = NetworkController.state.supportsAllNetworks + const chains = ChainController.state.chains + + const sortedNetworks = CoreHelperUtil.sortRequestedNetworks( + approvedCaipNetworkIds, + requestedCaipNetworks + ) + + const networks: CaipNetwork[] | null | undefined = [] + + if (chains.get(ConstantsUtil.CHAIN.EVM)) { + const network = sortedNetworks.find(element => element.name === 'Ethereum') + if (network) { + networks.push(network) + } + } + if (chains.get(ConstantsUtil.CHAIN.SOLANA)) { + const network = sortedNetworks.find(element => element.name === 'Solana') + if (network) { + networks.push(network) + } + } + + return networks?.map( + network => html` + this.onSwitchNetwork(network)} + .disabled=${!supportsAllNetworks && !approvedCaipNetworkIds?.includes(network.id)} + > + ` + ) + } + + private onSwitchNetwork(network: CaipNetwork) { + NetworkController.setCaipNetwork(network) + if (network.name === ConstantsUtil.CHAIN_NAME.EVM) { + const connector = this.activeConnector?.providers?.find( + provider => provider.chain === ConstantsUtil.CHAIN.EVM + ) + RouterController.push('ConnectingExternal', { connector }) + } else if (network.name === ConstantsUtil.CHAIN_NAME.SOLANA) { + const connector = this.activeConnector?.providers?.find( + provider => provider.chain === ConstantsUtil.CHAIN.SOLANA + ) + RouterController.push('ConnectingExternal', { connector }) + } + } +} + +declare global { + interface HTMLElementTagNameMap { + 'w3m-connecting-multi-chain-view': W3mConnectingMultiChainView + } +} diff --git a/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/styles.ts b/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/styles.ts new file mode 100644 index 0000000000..2db7b3a49a --- /dev/null +++ b/packages/scaffold-ui/src/views/w3m-connecting-multi-chain-view/styles.ts @@ -0,0 +1,8 @@ +import { css } from 'lit' + +export default css` + wui-flex, + wui-list-wallet { + width: 100%; + } +` diff --git a/packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts b/packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts index 6921c608eb..d74f7962ad 100644 --- a/packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts @@ -1,6 +1,7 @@ /* eslint-disable max-depth */ import { AccountController, + ChainController, ConnectionController, ConnectorController, EventsController, @@ -119,7 +120,7 @@ export class W3mConnectingSocialView extends LitElement { if (this.authConnector && !this.connecting) { if (this.socialWindow) { this.socialWindow.close() - AccountController.setSocialWindow(undefined) + AccountController.setSocialWindow(undefined, ChainController.state.activeChain) } this.connecting = true this.updateMessage() diff --git a/packages/scaffold-ui/src/views/w3m-connecting-wc-view/index.ts b/packages/scaffold-ui/src/views/w3m-connecting-wc-view/index.ts index 448f30c2be..d85b48d1a1 100644 --- a/packages/scaffold-ui/src/views/w3m-connecting-wc-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-connecting-wc-view/index.ts @@ -59,7 +59,6 @@ export class W3mConnectingWcView extends LitElement { try { const { wcPairingExpiry } = ConnectionController.state if (retry || CoreHelperUtil.isPairingExpired(wcPairingExpiry)) { - ConnectionController.connectWalletConnect() if (this.wallet) { const url = AssetUtil.getWalletImage(this.wallet) if (url) { @@ -74,7 +73,7 @@ export class W3mConnectingWcView extends LitElement { } } - await ConnectionController.state.wcPromise + await ConnectionController.connectWalletConnect() this.finalizeConnection() if (OptionsController.state.isSiweEnabled) { const { SIWEController } = await import('@web3modal/siwe') diff --git a/packages/scaffold-ui/src/views/w3m-networks-view/index.ts b/packages/scaffold-ui/src/views/w3m-networks-view/index.ts index a0921ac54f..a9c4f13efb 100644 --- a/packages/scaffold-ui/src/views/w3m-networks-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-networks-view/index.ts @@ -23,6 +23,8 @@ export class W3mNetworksView extends LitElement { // -- State & Properties -------------------------------- // @state() public caipNetwork = NetworkController.state.caipNetwork + @state() public requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + public constructor() { super() this.unsubscribe.push( @@ -62,8 +64,9 @@ export class W3mNetworksView extends LitElement { } private networksTemplate() { - const { approvedCaipNetworkIds, requestedCaipNetworks, supportsAllNetworks } = - NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds + const supportsAllNetworks = NetworkController.state.supportsAllNetworks const sortedNetworks = CoreHelperUtil.sortRequestedNetworks( approvedCaipNetworkIds, @@ -86,15 +89,18 @@ export class W3mNetworksView extends LitElement { } private async onSwitchNetwork(network: CaipNetwork) { - const { isConnected } = AccountController.state - const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state - const { data } = RouterController.state + const isConnected = AccountController.state.isConnected + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds + const supportsAllNetworks = NetworkController.state.supportsAllNetworks + const caipNetwork = NetworkController.state.caipNetwork + const routerData = RouterController.state.data + if (isConnected && caipNetwork?.id !== network.id) { if (approvedCaipNetworkIds?.includes(network.id)) { await NetworkController.switchActiveNetwork(network) await NetworkUtil.onNetworkChange() } else if (supportsAllNetworks) { - RouterController.push('SwitchNetwork', { ...data, network }) + RouterController.push('SwitchNetwork', { ...routerData, network }) } } else if (!isConnected) { NetworkController.setCaipNetwork(network) diff --git a/packages/scaffold-ui/src/views/w3m-unsupported-chain-view/index.ts b/packages/scaffold-ui/src/views/w3m-unsupported-chain-view/index.ts index 5118b366cf..6a4741f22b 100644 --- a/packages/scaffold-ui/src/views/w3m-unsupported-chain-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-unsupported-chain-view/index.ts @@ -84,7 +84,8 @@ export class W3mUnsupportedChainView extends LitElement { } private networksTemplate() { - const { approvedCaipNetworkIds, requestedCaipNetworks } = NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds const sortedNetworks = CoreHelperUtil.sortRequestedNetworks( approvedCaipNetworkIds, @@ -125,16 +126,18 @@ export class W3mUnsupportedChainView extends LitElement { } private async onSwitchNetwork(network: CaipNetwork) { - const { isConnected } = AccountController.state - const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state - const { data } = RouterController.state + const isConnected = AccountController.state.isConnected + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds + const supportsAllNetworks = NetworkController.state.supportsAllNetworks + const caipNetwork = NetworkController.state.caipNetwork + const routerData = RouterController.state.data if (isConnected && caipNetwork?.id !== network.id) { if (approvedCaipNetworkIds?.includes(network.id)) { await NetworkController.switchActiveNetwork(network) await NetworkUtil.onNetworkChange() } else if (supportsAllNetworks) { - RouterController.push('SwitchNetwork', { ...data, network }) + RouterController.push('SwitchNetwork', { ...routerData, network }) } } else if (!isConnected) { NetworkController.setCaipNetwork(network) diff --git a/packages/scaffold-ui/src/views/w3m-wallet-compatible-networks-view/index.ts b/packages/scaffold-ui/src/views/w3m-wallet-compatible-networks-view/index.ts index de615156f0..f6ffdc43d4 100644 --- a/packages/scaffold-ui/src/views/w3m-wallet-compatible-networks-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-wallet-compatible-networks-view/index.ts @@ -46,7 +46,9 @@ export class W3mWalletCompatibleNetworksView extends LitElement { // -- Private ------------------------------------------- // networkTemplate() { - const { approvedCaipNetworkIds, requestedCaipNetworks, caipNetwork } = NetworkController.state + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() + const approvedCaipNetworkIds = NetworkController.state.approvedCaipNetworkIds + const caipNetwork = NetworkController.state.caipNetwork const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled() let sortedNetworks = CoreHelperUtil.sortRequestedNetworks( diff --git a/packages/scaffold-ui/src/views/w3m-wallet-receive-view/index.ts b/packages/scaffold-ui/src/views/w3m-wallet-receive-view/index.ts index ccffa2c3d0..6c77b41236 100644 --- a/packages/scaffold-ui/src/views/w3m-wallet-receive-view/index.ts +++ b/packages/scaffold-ui/src/views/w3m-wallet-receive-view/index.ts @@ -104,7 +104,7 @@ export class W3mWalletReceiveView extends LitElement { // -- Private ------------------------------------------- // networkTemplate() { - const networks = NetworkController.getRequestedCaipNetworks() + const requestedCaipNetworks = NetworkController.getRequestedCaipNetworks() const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled() const caipNetwork = NetworkController.state.caipNetwork @@ -122,7 +122,7 @@ export class W3mWalletReceiveView extends LitElement { .networkImages=${[AssetUtil.getNetworkImage(caipNetwork) ?? '']} >` } - const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5) + const slicedNetworks = requestedCaipNetworks?.filter(network => network?.imageId)?.slice(0, 5) const imagesArray = slicedNetworks.map(AssetUtil.getNetworkImage).filter(Boolean) as string[] return html`, - VERSION: '5.0.3' + VERSION: '5.0.4' } diff --git a/packages/scaffold-vue/CHANGELOG.md b/packages/scaffold-vue/CHANGELOG.md index 770e82aa31..0333ab7e07 100644 --- a/packages/scaffold-vue/CHANGELOG.md +++ b/packages/scaffold-vue/CHANGELOG.md @@ -1,5 +1,14 @@ # @web3modal/scaffold-vue +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/scaffold@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/scaffold-vue/package.json b/packages/scaffold-vue/package.json index 5bd33c15af..ea0df1cbd4 100644 --- a/packages/scaffold-vue/package.json +++ b/packages/scaffold-vue/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/scaffold-vue", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -16,7 +16,7 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/scaffold": "5.0.3" + "@web3modal/scaffold": "5.0.4" }, "peerDependencies": { "vue": ">=3" diff --git a/packages/scaffold/CHANGELOG.md b/packages/scaffold/CHANGELOG.md index 825229a939..4417933434 100644 --- a/packages/scaffold/CHANGELOG.md +++ b/packages/scaffold/CHANGELOG.md @@ -1,5 +1,20 @@ # @web3modal/scaffold +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/common@5.0.4 + - @web3modal/core@5.0.4 + - @web3modal/scaffold-ui@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/siwe@5.0.4 + - @web3modal/ui@5.0.4 + - @web3modal/wallet@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/scaffold/package.json b/packages/scaffold/package.json index efa02e36f1..1243ce3590 100644 --- a/packages/scaffold/package.json +++ b/packages/scaffold/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/scaffold", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -16,14 +16,14 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, "dependencies": { - "@web3modal/common": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-ui": "5.0.3", - "@web3modal/core": "5.0.3", - "@web3modal/ui": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-ui": "5.0.4", + "@web3modal/core": "5.0.4", + "@web3modal/ui": "5.0.4", "lit": "3.1.0", - "@web3modal/siwe": "5.0.3", - "@web3modal/wallet": "5.0.3" + "@web3modal/siwe": "5.0.4", + "@web3modal/wallet": "5.0.4" }, "keywords": [ "web3", diff --git a/packages/scaffold/src/client.ts b/packages/scaffold/src/client.ts index 38f13c9483..bb1e9247d9 100644 --- a/packages/scaffold/src/client.ts +++ b/packages/scaffold/src/client.ts @@ -13,7 +13,6 @@ import type { RouterControllerState } from '@web3modal/core' import { - AccountController, BlockchainApiController, ConnectionController, ConnectorController, @@ -26,11 +25,13 @@ import { ThemeController, SnackController, RouterController, - EnsController + EnsController, + ChainController, + AccountController } from '@web3modal/core' import { setColorTheme, setThemeVariables } from '@web3modal/ui' import type { SIWEControllerClient } from '@web3modal/siwe' -import { ConstantsUtil } from '@web3modal/common' +import { ConstantsUtil, type Chain } from '@web3modal/common' // -- Helpers ------------------------------------------------------------------- let isInitialized = false @@ -59,6 +60,7 @@ export interface LibraryOptions { } export interface ScaffoldOptions extends LibraryOptions { + chain: Chain networkControllerClient: NetworkControllerClient connectionControllerClient: ConnectionControllerClient siweControllerClient?: SIWEControllerClient @@ -173,30 +175,37 @@ export class Web3ModalScaffold { ]?.replace } - protected setIsConnected: (typeof AccountController)['setIsConnected'] = isConnected => { - AccountController.setIsConnected(isConnected) + protected setIsConnected: (typeof AccountController)['setIsConnected'] = (isConnected, chain) => { + AccountController.setIsConnected(isConnected, chain) } protected getIsConnectedState = () => AccountController.state.isConnected - protected setCaipAddress: (typeof AccountController)['setCaipAddress'] = caipAddress => { - AccountController.setCaipAddress(caipAddress) + protected setCaipAddress: (typeof AccountController)['setCaipAddress'] = (caipAddress, chain) => { + AccountController.setCaipAddress(caipAddress, chain) } - protected setBalance: (typeof AccountController)['setBalance'] = (balance, balanceSymbol) => { - AccountController.setBalance(balance, balanceSymbol) + protected setBalance: (typeof AccountController)['setBalance'] = ( + balance, + balanceSymbol, + chain + ) => { + AccountController.setBalance(balance, balanceSymbol, chain) } - protected setProfileName: (typeof AccountController)['setProfileName'] = profileName => { - AccountController.setProfileName(profileName) + protected setProfileName: (typeof AccountController)['setProfileName'] = (profileName, chain) => { + AccountController.setProfileName(profileName, chain) } - protected setProfileImage: (typeof AccountController)['setProfileImage'] = profileImage => { - AccountController.setProfileImage(profileImage) + protected setProfileImage: (typeof AccountController)['setProfileImage'] = ( + profileImage, + chain + ) => { + AccountController.setProfileImage(profileImage, chain) } - protected resetAccount: (typeof AccountController)['resetAccount'] = () => { - AccountController.resetAccount() + protected resetAccount: (typeof AccountController)['resetAccount'] = chain => { + AccountController.resetAccount(chain) } protected setCaipNetwork: (typeof NetworkController)['setCaipNetwork'] = caipNetwork => { @@ -205,13 +214,18 @@ export class Web3ModalScaffold { protected getCaipNetwork = () => NetworkController.state.caipNetwork - protected setRequestedCaipNetworks: (typeof NetworkController)['setRequestedCaipNetworks'] = - requestedCaipNetworks => { - NetworkController.setRequestedCaipNetworks(requestedCaipNetworks) - } + protected setRequestedCaipNetworks: (typeof NetworkController)['setRequestedCaipNetworks'] = ( + requestedCaipNetworks, + chain + ) => { + NetworkController.setRequestedCaipNetworks(requestedCaipNetworks, chain) + } + + protected getApprovedCaipNetworkIds: (typeof NetworkController)['getApprovedCaipNetworkIds'] = + () => NetworkController.getApprovedCaipNetworkIds() - protected getApprovedCaipNetworksData: (typeof NetworkController)['getApprovedCaipNetworksData'] = - () => NetworkController.getApprovedCaipNetworksData() + protected setApprovedCaipNetworksData: (typeof NetworkController)['setApprovedCaipNetworksData'] = + () => NetworkController.setApprovedCaipNetworksData() protected resetNetwork: (typeof NetworkController)['resetNetwork'] = () => { NetworkController.resetNetwork() @@ -235,30 +249,38 @@ export class Web3ModalScaffold { protected fetchIdentity: (typeof BlockchainApiController)['fetchIdentity'] = request => BlockchainApiController.fetchIdentity(request) - protected setAddressExplorerUrl: (typeof AccountController)['setAddressExplorerUrl'] = - addressExplorerUrl => { - AccountController.setAddressExplorerUrl(addressExplorerUrl) - } + protected setAddressExplorerUrl: (typeof AccountController)['setAddressExplorerUrl'] = ( + addressExplorerUrl, + chain + ) => { + AccountController.setAddressExplorerUrl(addressExplorerUrl, chain) + } - protected setSmartAccountDeployed: (typeof AccountController)['setSmartAccountDeployed'] = - isDeployed => { - AccountController.setSmartAccountDeployed(isDeployed) - } + protected setSmartAccountDeployed: (typeof AccountController)['setSmartAccountDeployed'] = ( + isDeployed, + chain + ) => { + AccountController.setSmartAccountDeployed(isDeployed, chain) + } - protected setConnectedWalletInfo: (typeof AccountController)['setConnectedWalletInfo'] = - connectedWalletInfo => { - AccountController.setConnectedWalletInfo(connectedWalletInfo) - } + protected setConnectedWalletInfo: (typeof AccountController)['setConnectedWalletInfo'] = ( + connectedWalletInfo, + chain + ) => { + AccountController.setConnectedWalletInfo(connectedWalletInfo, chain) + } protected setSmartAccountEnabledNetworks: (typeof NetworkController)['setSmartAccountEnabledNetworks'] = - smartAccountEnabledNetworks => { - NetworkController.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks) + (smartAccountEnabledNetworks, chain) => { + NetworkController.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks, chain) } - protected setPreferredAccountType: (typeof AccountController)['setPreferredAccountType'] = - preferredAccountType => { - AccountController.setPreferredAccountType(preferredAccountType) - } + protected setPreferredAccountType: (typeof AccountController)['setPreferredAccountType'] = ( + preferredAccountType, + chain + ) => { + AccountController.setPreferredAccountType(preferredAccountType, chain) + } protected getWalletConnectName: (typeof EnsController)['getNamesForAddress'] = address => EnsController.getNamesForAddress(address) @@ -277,8 +299,14 @@ export class Web3ModalScaffold { // -- Private ------------------------------------------------------------------ private async initControllers(options: ScaffoldOptions) { - NetworkController.setClient(options.networkControllerClient) - NetworkController.setDefaultCaipNetwork(options.defaultChain) + ChainController.initialize([ + { + networkControllerClient: options.networkControllerClient, + connectionControllerClient: options.connectionControllerClient, + chain: options.chain + } + ]) + NetworkController.setDefaultCaipNetwork(options.defaultChain, options.chain) OptionsController.setProjectId(options.projectId) OptionsController.setAllWallets(options.allWallets) @@ -319,8 +347,6 @@ export class Web3ModalScaffold { SIWEController.setSIWEClient(options.siweControllerClient) } - - ConnectionController.setClient(options.connectionControllerClient) } private async initOrContinue() { diff --git a/packages/siwe/CHANGELOG.md b/packages/siwe/CHANGELOG.md index 029e38c397..e63afea962 100644 --- a/packages/siwe/CHANGELOG.md +++ b/packages/siwe/CHANGELOG.md @@ -1,5 +1,15 @@ # @web3modal/siwe +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/core@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/siwe/package.json b/packages/siwe/package.json index ab067718d6..90d7116372 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/siwe", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -17,8 +17,8 @@ }, "dependencies": { "@walletconnect/utils": "2.12.0", - "@web3modal/core": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", + "@web3modal/core": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", "valtio": "1.11.2", "lit": "3.1.0" }, diff --git a/packages/siwe/scaffold/views/w3m-connecting-siwe-view/index.ts b/packages/siwe/scaffold/views/w3m-connecting-siwe-view/index.ts index 13b271a039..ce8f225cfb 100644 --- a/packages/siwe/scaffold/views/w3m-connecting-siwe-view/index.ts +++ b/packages/siwe/scaffold/views/w3m-connecting-siwe-view/index.ts @@ -135,7 +135,7 @@ export class W3mConnectingSiweView extends LitElement { } private async onCancel() { - const { isConnected } = AccountController.state + const isConnected = AccountController.state.isConnected if (isConnected) { await ConnectionController.disconnect() ModalController.close() diff --git a/packages/siwe/src/client.ts b/packages/siwe/src/client.ts index dc0201bcd6..06e916ff8a 100644 --- a/packages/siwe/src/client.ts +++ b/packages/siwe/src/client.ts @@ -8,12 +8,12 @@ import type { import type { SIWEControllerClient } from '../core/controller/SIWEController.js' import { - AccountController, - NetworkController, ConnectionController, RouterUtil, RouterController, - StorageUtil + StorageUtil, + NetworkController, + AccountController } from '@web3modal/core' import { NetworkUtil } from '@web3modal/common' @@ -90,7 +90,7 @@ export class Web3ModalSIWEClient { } async signIn(): Promise { - const { address } = AccountController.state + const address = AccountController.state.address const nonce = await this.methods.getNonce(address) if (!address) { throw new Error('An address is required to create a SIWE message.') diff --git a/packages/solana/CHANGELOG.md b/packages/solana/CHANGELOG.md index e5bb01e8fd..9e3ac0eaec 100644 --- a/packages/solana/CHANGELOG.md +++ b/packages/solana/CHANGELOG.md @@ -1,5 +1,19 @@ # @web3modal/solana +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/common@5.0.4 + - @web3modal/polyfills@5.0.4 + - @web3modal/scaffold@5.0.4 + - @web3modal/scaffold-react@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/scaffold-vue@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/solana/package.json b/packages/solana/package.json index d104dd3301..e072893415 100644 --- a/packages/solana/package.json +++ b/packages/solana/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/solana", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -44,24 +44,21 @@ }, "dependencies": { "@ethersproject/sha2": "5.7.0", - "@solana/web3.js": "1.91.7", - "@solana/wallet-adapter-backpack": "0.1.14", "@solana/wallet-adapter-base": "0.9.23", - "@solana/wallet-adapter-phantom": "0.9.24", - "@solana/wallet-adapter-solflare": "0.6.28", - "@solana/wallet-adapter-trust": "0.1.13", - "@solana/wallet-adapter-walletconnect": "0.1.16", + "@solana/web3.js": "1.91.7", "@walletconnect/universal-provider": "2.11.2", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", + "@web3modal/common": "5.0.4", + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", "bn.js": "5.2.1", "bs58": "5.0.0" }, "devDependencies": { - "@types/bn.js": "5.1.5" + "@types/bn.js": "5.1.5", + "@walletconnect/types": "2.13.3" }, "peerDependencies": { "react": ">=17", diff --git a/packages/solana/src/client.ts b/packages/solana/src/client.ts index 11c8789de6..04bb1feb52 100644 --- a/packages/solana/src/client.ts +++ b/packages/solana/src/client.ts @@ -9,8 +9,9 @@ import { OptionsController } from '@web3modal/core' import { ConstantsUtil, HelpersUtil, PresetsUtil } from '@web3modal/scaffold-utils' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' -import { createWalletAdapters, syncInjectedWallets } from './connectors/walletAdapters.js' +import { syncInjectedWallets } from './connectors/walletAdapters.js' import { SolConstantsUtil, SolHelpersUtil, SolStoreUtil } from './utils/scaffold/index.js' import { WalletConnectConnector } from './connectors/walletConnectConnector.js' @@ -28,9 +29,9 @@ import type { CaipAddress, CaipNetwork } from '@web3modal/scaffold' +import type { Chain as AvailableChain } from '@web3modal/common' -import type { AdapterKey } from './connectors/walletAdapters.js' -import type { ProviderType, Chain, Provider, SolStoreUtilState } from './utils/scaffold/index.js' +import type { Chain, Provider, ProviderType, SolStoreUtilState } from './utils/scaffold/index.js' export interface Web3ModalClientOptions extends Omit { solanaConfig: ProviderType @@ -40,6 +41,7 @@ export interface Web3ModalClientOptions extends Omit connectorImages?: Record tokens?: Record + wallets: BaseWalletAdapter[] } export type Web3ModalOptions = Omit @@ -49,10 +51,12 @@ export class Web3Modal extends Web3ModalScaffold { private hasSyncedConnectedAccount = false private WalletConnectConnector: WalletConnectConnector - private walletAdapters: Record + private walletAdapters: BaseWalletAdapter[] private chains: Chain[] + private chain: AvailableChain = CommonConstantsUtil.CHAIN.SOLANA + public connectionSettings: Commitment | ConnectionConfig public constructor(options: Web3ModalClientOptions) { @@ -63,8 +67,10 @@ export class Web3Modal extends Web3ModalScaffold { _sdkVersion, chainImages, connectionSettings = 'confirmed', + wallets, ...w3mOptions } = options + const { metadata } = solanaConfig if (!solanaConfig) { @@ -80,11 +86,14 @@ export class Web3Modal extends Web3ModalScaffold { if (caipNetwork) { try { // Update chain for Solflare - this.walletAdapters = createWalletAdapters(caipNetwork?.id.split(':')[1]) + this.walletAdapters = wallets const walletId = localStorage.getItem(SolConstantsUtil.WALLET_ID) - const wallet = walletId?.split('_')[1] as AdapterKey + const wallet = walletId?.split('_')[1] if (wallet === 'solflare' && window[wallet as keyof Window]) { - const adapter = this.walletAdapters[wallet] + const adapter = this.walletAdapters.find(a => a.name.toLocaleLowerCase() === wallet) + if (!adapter) { + return + } await adapter.connect() const address = adapter.publicKey?.toString() this.setInjectedProvider(adapter as unknown as Provider, wallet, address) @@ -115,22 +124,22 @@ export class Web3Modal extends Web3ModalScaffold { throw new Error('connectionControllerClient:getWalletConnectUri - provider is undefined') } - WalletConnectProvider.on('display_uri', (uri: string) => { - onUri(uri) - }) + WalletConnectProvider.on('display_uri', onUri) const address = await this.WalletConnectConnector.connect() this.setWalletConnectProvider(address) + WalletConnectProvider.removeListener('display_uri', onUri) }, connectExternal: async ({ id }) => { - const adapterId = this.transformWalletId(id) - await this.walletAdapters[adapterId].connect() - const address = this.walletAdapters[adapterId].publicKey?.toString() - this.setInjectedProvider( - this.walletAdapters[adapterId] as unknown as Provider, - adapterId, - address + const adapter = this.walletAdapters.find( + a => a.name.toLocaleLowerCase() === id.toLocaleLowerCase() ) + if (!adapter) { + return + } + await adapter.connect() + const address = adapter.publicKey?.toString() + this.setInjectedProvider(adapter as unknown as Provider, id, address) }, disconnect: async () => { @@ -181,8 +190,11 @@ export class Web3Modal extends Web3ModalScaffold { } super({ + chain: CommonConstantsUtil.CHAIN.SOLANA, networkControllerClient, connectionControllerClient, + supportedWallets: wallets, + defaultChain: SolHelpersUtil.getChainFromCaip( chains, typeof window === 'object' ? localStorage.getItem(SolConstantsUtil.CAIP_CHAIN_ID) : '' @@ -206,7 +218,7 @@ export class Web3Modal extends Web3ModalScaffold { } this.syncNetwork(chainImages) - this.walletAdapters = createWalletAdapters(chain?.chainId) + this.walletAdapters = wallets this.WalletConnectConnector = new WalletConnectConnector({ relayerRegion: 'wss://relay.walletconnect.com', metadata, @@ -323,14 +335,15 @@ export class Web3Modal extends Web3ModalScaffold { try { if (walletId === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) { - await this.WalletConnectConnector.connect(true) const provider = await this.WalletConnectConnector.getProvider() - const accounts = await provider.enable() - this.setWalletConnectProvider(accounts[0]) + if (provider.session) { + const account = provider.session.namespaces['solana']?.accounts[0] + this.setWalletConnectProvider(account?.split(':')[2]) + } } else { - const wallet = walletId?.split('_')[1] as AdapterKey - const adapter = this.walletAdapters[wallet] - if (window[wallet as keyof Window]) { + const wallet = walletId?.split('_')[1] + const adapter = this.walletAdapters.find(a => a.name.toLocaleLowerCase() === wallet) + if (adapter && wallet && window[wallet as keyof Window]) { await adapter.connect() const address = adapter.publicKey?.toString() this.setInjectedProvider(adapter as unknown as Provider, wallet, address) @@ -342,11 +355,6 @@ export class Web3Modal extends Web3ModalScaffold { } // -- Private ----------------------------------------------------------------- - private transformWalletId(walletId: string) { - return walletId.toLocaleLowerCase() === 'Trust' - ? 'trustWallet' - : (walletId.toLocaleLowerCase() as AdapterKey) - } private syncConnectors() { const w3mConnectors: Connector[] = [] @@ -359,7 +367,8 @@ export class Web3Modal extends Web3ModalScaffold { type: connectorType, imageUrl: 'https://avatars.githubusercontent.com/u/37784886', name: this.WalletConnectConnector.name, - provider: this.WalletConnectConnector.getProvider() + provider: this.WalletConnectConnector.getProvider(), + chain: this.chain }) } @@ -371,7 +380,6 @@ export class Web3Modal extends Web3ModalScaffold { const address = SolStoreUtil.state.address const chainId = SolStoreUtil.state.currentChain?.chainId const isConnected = SolStoreUtil.state.isConnected - this.resetAccount() if (isConnected && address && chainId) { @@ -408,7 +416,8 @@ export class Web3Modal extends Web3ModalScaffold { id: `solana:${chain.chainId}`, name: chain.name, imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId], - imageUrl: chainImages?.[chain.chainId] + imageUrl: chainImages?.[chain.chainId], + chain: this.chain }) as CaipNetwork ) this.setRequestedCaipNetworks(requestedCaipNetworks ?? []) @@ -416,24 +425,28 @@ export class Web3Modal extends Web3ModalScaffold { public async switchNetwork(caipNetwork: CaipNetwork) { const caipChainId = caipNetwork.id - const providerType = SolStoreUtil.state.providerType - const chain = SolHelpersUtil.getChainFromCaip(this.chains, caipChainId) + if (this.chains) { if (chain) { SolStoreUtil.setCaipChainId(`solana:${chain.chainId}`) SolStoreUtil.setCurrentChain(chain) localStorage.setItem(SolConstantsUtil.CAIP_CHAIN_ID, `solana:${chain.chainId}`) if (providerType?.includes(ConstantsUtil.INJECTED_CONNECTOR_ID)) { - const wallet = this.transformWalletId(providerType) SolStoreUtil.setConnection( new Connection( SolHelpersUtil.detectRpcUrl(chain, OptionsController.state.projectId), this.connectionSettings ) ) - this.setAddress(this.walletAdapters[wallet].publicKey?.toString()) + this.setAddress( + this.walletAdapters + .find( + adapter => adapter.name.toLocaleLowerCase() === providerType.toLocaleLowerCase() + ) + ?.publicKey?.toString() + ) await this.syncAccount() return @@ -469,7 +482,8 @@ export class Web3Modal extends Web3ModalScaffold { id: caipChainId, name: chain.name, imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId], - imageUrl: chainImages?.[chain.chainId] + imageUrl: chainImages?.[chain.chainId], + chain: this.chain }) if (isConnected && address) { if (chain.explorerUrl) { @@ -510,10 +524,10 @@ export class Web3Modal extends Web3ModalScaffold { SolConstantsUtil.WALLET_ID, ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID ) - await Promise.all([this.syncBalance(address), this.getApprovedCaipNetworksData()]) + await Promise.all([this.syncBalance(address), this.setApprovedCaipNetworksData()]) } - private setInjectedProvider(provider: Provider, adapter: AdapterKey, address = '') { + private setInjectedProvider(provider: Provider, adapter: string, address = '') { window?.localStorage.setItem( SolConstantsUtil.WALLET_ID, `${ConstantsUtil.INJECTED_CONNECTOR_ID}_${adapter}` diff --git a/packages/solana/src/connectors/universalProvider.ts b/packages/solana/src/connectors/universalProvider.ts index eee862917e..95d8e70c24 100644 --- a/packages/solana/src/connectors/universalProvider.ts +++ b/packages/solana/src/connectors/universalProvider.ts @@ -32,7 +32,6 @@ export class UniversalProviderFactory { // Subscribe to session delete UniversalProviderFactory.provider.on('session_delete', () => { - delete UniversalProviderFactory.provider?.session?.namespaces['solana'] SolStoreUtil.setAddress('') }) } diff --git a/packages/solana/src/connectors/walletAdapters.ts b/packages/solana/src/connectors/walletAdapters.ts index 0685e4b687..b3f830d17a 100644 --- a/packages/solana/src/connectors/walletAdapters.ts +++ b/packages/solana/src/connectors/walletAdapters.ts @@ -1,47 +1,17 @@ -import { - PhantomWalletAdapter, - BackpackWalletAdapter, - SolflareWalletAdapter, - TrustWalletAdapter -} from './walletAdapters/index.js' - -import { WalletAdapterNetwork, type BaseWalletAdapter } from '@solana/wallet-adapter-base' -import { solana, solanaDevnet, solanaTestnet } from '../utils/chains.js' import type { Connector } from '@web3modal/scaffold' +import { ConstantsUtil } from '@web3modal/common' -export type AdapterKey = 'phantom' | 'solflare' | 'trustWallet' | 'backpack' -export const supportedWallets: AdapterKey[] = ['phantom', 'solflare', 'trustWallet', 'backpack'] - -const chainMap = { - [solana.chainId]: WalletAdapterNetwork.Mainnet, - [solanaDevnet.chainId]: WalletAdapterNetwork.Devnet, - [solanaTestnet.chainId]: WalletAdapterNetwork.Testnet -} +import type { BaseWalletAdapter } from '@solana/wallet-adapter-base' -export function createWalletAdapters(chainId?: string) { - return { - phantom: new PhantomWalletAdapter(), - trustWallet: new TrustWalletAdapter(), - backpack: new BackpackWalletAdapter(), - solflare: new SolflareWalletAdapter({ - network: chainMap[chainId || solana.chainId] +export function syncInjectedWallets(w3mConnectors: Connector[], adapters: BaseWalletAdapter[]) { + for (const adapter of adapters) { + w3mConnectors.push({ + id: adapter.name, + type: 'EXTERNAL', + imageUrl: adapter.icon, + name: adapter.name, + provider: adapter, + chain: ConstantsUtil.CHAIN.SOLANA }) } } - -export function syncInjectedWallets( - w3mConnectors: Connector[], - adapters: Record -) { - supportedWallets.forEach(wallet => { - if (window[wallet as keyof Window]) { - w3mConnectors.push({ - id: adapters[wallet].name, - type: 'ANNOUNCED', - imageUrl: adapters[wallet].icon, - name: adapters[wallet].name, - provider: adapters[wallet] - }) - } - }) -} diff --git a/packages/solana/src/connectors/walletConnectConnector.ts b/packages/solana/src/connectors/walletConnectConnector.ts index 8037cf964a..128275941c 100644 --- a/packages/solana/src/connectors/walletConnectConnector.ts +++ b/packages/solana/src/connectors/walletConnectConnector.ts @@ -11,6 +11,11 @@ import type UniversalProvider from '@walletconnect/universal-provider' import type { Connector } from './baseConnector.js' import type { Chain } from '../utils/scaffold/SolanaTypesUtil.js' +import { + getChainsFromChainId, + getDefaultChainFromSession, + type ChainIDType +} from '../utils/chainPath/index.js' export interface WalletConnectAppMetadata { name: string @@ -49,24 +54,14 @@ export class WalletConnectConnector extends BaseConnector implements Connector { qrcode: this.qrcode }) - UniversalProviderFactory.getProvider().then(provider => { - provider.on('session_delete', () => { - delete provider.session?.namespaces['solana'] - }) - }) + UniversalProviderFactory.init() } public static readonly connectorName = 'walletconnect' public async disconnect() { const provider = await UniversalProviderFactory.getProvider() - - try { - await provider.disconnect() - } finally { - delete provider.session?.namespaces['solana'] - } - + await provider.disconnect() SolStoreUtil.setAddress('') } @@ -216,14 +211,13 @@ export class WalletConnectConnector extends BaseConnector implements Connector { return acc }, {}) - const chainsNamespaces = [`solana:${chainId}`] const rpcMap = { [chainId]: rpcs[chainId] ?? '' } return { solana: { - chains: [...chainsNamespaces], + chains: getChainsFromChainId(`solana:${chainId}` as ChainIDType), methods: ['solana_signMessage', 'solana_signTransaction'], events: [], rpcMap @@ -231,30 +225,29 @@ export class WalletConnectConnector extends BaseConnector implements Connector { } } - public async connect(useURI?: boolean) { - const solanaNamespace = this.generateNamespaces(SolStoreUtil.state.currentChain?.chainId ?? '') + public async connect() { + const currentChainId = SolStoreUtil.state.currentChain?.chainId + const solanaNamespace = this.generateNamespaces(currentChainId ?? '') const provider = await UniversalProviderFactory.getProvider() return new Promise((resolve, reject) => { - provider.on('display_uri', (uri: string) => { - if (!(this.qrcode && !useURI)) { - resolve(uri) - } - }) - // Without namespaces provider.enable() will not work (reconnect flow) provider .connect({ - pairingTopic: undefined, - namespaces: solanaNamespace, optionalNamespaces: solanaNamespace }) - .then(providerResult => { - if (!providerResult) { + .then(session => { + if (!session) { throw new Error('Failed connection.') } - const address = providerResult.namespaces['solana']?.accounts[0]?.split(':')[2] ?? null + const address = session.namespaces['solana']?.accounts[0]?.split(':')[2] ?? null if (address && this.qrcode) { + const defaultChain = getDefaultChainFromSession( + session, + `solana:${currentChainId}` as ChainIDType + ) + provider.setDefaultChain(defaultChain) + resolve(address) } else { reject(new Error('Could not resolve address')) diff --git a/packages/solana/src/utils/chainPath/constants.ts b/packages/solana/src/utils/chainPath/constants.ts new file mode 100644 index 0000000000..0367b5cc87 --- /dev/null +++ b/packages/solana/src/utils/chainPath/constants.ts @@ -0,0 +1,6 @@ +export const SolanaChainIDs = { + Mainnet: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', + Devnet: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + Deprecated_Mainnet: 'solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ', + Deprecated_Devnet: 'solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K' +} as const diff --git a/packages/solana/src/utils/chainPath/index.ts b/packages/solana/src/utils/chainPath/index.ts new file mode 100644 index 0000000000..c63f5fb838 --- /dev/null +++ b/packages/solana/src/utils/chainPath/index.ts @@ -0,0 +1,55 @@ +import type { SessionTypes } from '@walletconnect/types' +import { SolanaChainIDs as Chains } from './constants.js' + +export type ChainIDType = (typeof Chains)[keyof typeof Chains] + +export function getChainsFromChainId(chainId: ChainIDType) { + let chains: ChainIDType[] = [chainId] + if (chainId === Chains.Mainnet || chainId === Chains.Deprecated_Mainnet) { + chains = [Chains.Mainnet, Chains.Deprecated_Mainnet] + + if (chainId === Chains.Deprecated_Mainnet) { + console.warn(chainWarns.mainnet) + } + } else if (chainId === Chains.Deprecated_Devnet || chainId === Chains.Devnet) { + chains = [Chains.Devnet, Chains.Deprecated_Devnet] + if (Chains.Deprecated_Devnet) { + console.warn(chainWarns.devnet) + } + } + + return chains +} + +const chainWarns = { + mainnet: `You are using a deprecated chain ID for Solana Mainnet, please use ${Chains.Mainnet} instead.`, + devnet: `You are using a deprecated chain ID for Solana Devnet, please use ${Chains.Devnet} instead.`, + wallet: + 'The connected wallet is using a deprecated chain ID for Solana. Please, contact them to upgrade. You can learn more at https://github.com/ChainAgnostic/namespaces/blob/main/solana/caip10.md#chain-ids' +} + +export function getDefaultChainFromSession( + session: SessionTypes.Struct, + selectedChain: ChainIDType +) { + const chains = session.namespaces['solana']?.accounts.map( + (account: string) => `solana:${account.split(':')[1]}` + ) + + if (selectedChain === Chains.Mainnet) { + if (chains?.find((chain: string) => chain === Chains.Mainnet)) { + return Chains.Mainnet + } + console.warn(chainWarns.wallet) + + return Chains.Deprecated_Mainnet + } else if (selectedChain === Chains.Devnet) { + if (chains?.find((chain: string) => chain === Chains.Devnet)) { + return Chains.Devnet + } + console.warn(chainWarns.wallet) + + return Chains.Deprecated_Devnet + } + throw Error('WalletConnect Solana Adapter: Unable to get a default chain from the session.') +} diff --git a/packages/solana/src/utils/chains.ts b/packages/solana/src/utils/chains.ts index 1f2ce6000c..82e1d1227a 100644 --- a/packages/solana/src/utils/chains.ts +++ b/packages/solana/src/utils/chains.ts @@ -5,7 +5,8 @@ export const solana = { name: 'Solana', currency: 'SOL', explorerUrl: 'https://solscan.io', - rpcUrl: `${ConstantsUtil.BLOCKCHAIN_API_RPC_URL}/v1` + rpcUrl: `${ConstantsUtil.BLOCKCHAIN_API_RPC_URL}/v1`, + chain: ConstantsUtil.CHAIN.SOLANA } export const solanaTestnet = { @@ -13,7 +14,8 @@ export const solanaTestnet = { name: 'Solana Testnet', currency: 'SOL', explorerUrl: 'https://explorer.solana.com/?cluster=testnet', - rpcUrl: 'https://api.testnet.solana.com' + rpcUrl: 'https://api.testnet.solana.com', + chain: ConstantsUtil.CHAIN.SOLANA } export const solanaDevnet = { @@ -21,5 +23,6 @@ export const solanaDevnet = { name: 'Solana Devnet', currency: 'SOL', explorerUrl: 'https://explorer.solana.com/?cluster=devnet', - rpcUrl: 'https://api.devnet.solana.com' + rpcUrl: 'https://api.devnet.solana.com', + chain: ConstantsUtil.CHAIN.SOLANA } diff --git a/packages/solana/src/utils/scaffold/SolanaConstantsUtil.ts b/packages/solana/src/utils/scaffold/SolanaConstantsUtil.ts index 946d413220..24f446c437 100644 --- a/packages/solana/src/utils/scaffold/SolanaConstantsUtil.ts +++ b/packages/solana/src/utils/scaffold/SolanaConstantsUtil.ts @@ -31,6 +31,7 @@ export const SolConstantsUtil = { name: 'Solana', currency: 'SOL', explorerUrl: 'https://solscan.io', - rpcUrl: `${ConstantsUtil.BLOCKCHAIN_API_RPC_URL}/v1` + rpcUrl: `${ConstantsUtil.BLOCKCHAIN_API_RPC_URL}/v1`, + chain: ConstantsUtil.CHAIN.SOLANA } } diff --git a/packages/solana/src/utils/scaffold/SolanaHelpersUtils.ts b/packages/solana/src/utils/scaffold/SolanaHelpersUtils.ts index c16ee8eccf..442763bd20 100644 --- a/packages/solana/src/utils/scaffold/SolanaHelpersUtils.ts +++ b/packages/solana/src/utils/scaffold/SolanaHelpersUtils.ts @@ -34,14 +34,16 @@ export const SolHelpersUtil = { return { ...selectedChain, id: `solana:${chainId}`, - imageId: PresetsUtil.EIP155NetworkImageIds[chainId] + imageId: PresetsUtil.EIP155NetworkImageIds[chainId], + chain: ConstantsUtil.CHAIN.SOLANA } } return { ...SolConstantsUtil.DEFAULT_CHAIN, id: `solana:${chainId}`, - imageId: PresetsUtil.EIP155NetworkImageIds[chainId] + imageId: PresetsUtil.EIP155NetworkImageIds[chainId], + chain: ConstantsUtil.CHAIN.SOLANA } }, diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 345b421d9d..fa1e75856e 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,11 @@ # @web3modal/ui +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + ## 5.0.3 ### Patch Changes diff --git a/packages/ui/index.ts b/packages/ui/index.ts index 864f305716..d665533c25 100644 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -81,4 +81,4 @@ export { UiHelperUtil } from './src/utils/UiHelperUtil.js' export { TransactionUtil } from './src/utils/TransactionUtil.js' export { customElement } from './src/utils/WebComponentsUtil.js' -export type { IconType, VisualType } from './src/utils/TypeUtil.js' +export type { IconType, VisualType, ColorType } from './src/utils/TypeUtil.js' diff --git a/packages/ui/package.json b/packages/ui/package.json index 9ad408b5e5..80318480a6 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/ui", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -22,7 +22,7 @@ }, "devDependencies": { "@types/qrcode": "1.5.5", - "@web3modal/common": "5.0.3", + "@web3modal/common": "5.0.4", "eslint-plugin-lit": "1.11.0", "eslint-plugin-wc": "2.0.4" }, diff --git a/packages/ui/src/composites/wui-tabs/styles.ts b/packages/ui/src/composites/wui-tabs/styles.ts index 36af76ff97..91352df950 100644 --- a/packages/ui/src/composites/wui-tabs/styles.ts +++ b/packages/ui/src/composites/wui-tabs/styles.ts @@ -8,6 +8,7 @@ export default css` padding: var(--wui-spacing-3xs); position: relative; height: 36px; + min-height: 36px; overflow: hidden; } diff --git a/packages/ui/src/utils/QrCode.ts b/packages/ui/src/utils/QrCode.ts index 65a1414081..e9a8117a2e 100644 --- a/packages/ui/src/utils/QrCode.ts +++ b/packages/ui/src/utils/QrCode.ts @@ -107,7 +107,7 @@ export const QrCodeUtil = { // Cx to multiple cys const circlesToConnect: Record = {} - // Mapping all dots cicles on the same x axis + // Mapping all dots circles on the same x axis circles.forEach(([cx, cy]) => { // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (circlesToConnect[cx]) { diff --git a/packages/wagmi/CHANGELOG.md b/packages/wagmi/CHANGELOG.md index 3e2c6b14ae..07b4e11cd2 100644 --- a/packages/wagmi/CHANGELOG.md +++ b/packages/wagmi/CHANGELOG.md @@ -1,5 +1,19 @@ # @web3modal/wagmi +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/polyfills@5.0.4 + - @web3modal/scaffold@5.0.4 + - @web3modal/scaffold-react@5.0.4 + - @web3modal/scaffold-utils@5.0.4 + - @web3modal/scaffold-vue@5.0.4 + - @web3modal/siwe@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/wagmi/package.json b/packages/wagmi/package.json index 2f2341e9fc..2a1bfaed6d 100644 --- a/packages/wagmi/package.json +++ b/packages/wagmi/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/wagmi", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/exports/index.js", "types": "./dist/types/exports/index.d.ts", @@ -52,12 +52,12 @@ }, "dependencies": { "@walletconnect/ethereum-provider": "2.13.0", - "@web3modal/polyfills": "5.0.3", - "@web3modal/scaffold": "5.0.3", - "@web3modal/scaffold-react": "5.0.3", - "@web3modal/scaffold-utils": "5.0.3", - "@web3modal/scaffold-vue": "5.0.3", - "@web3modal/siwe": "5.0.3" + "@web3modal/polyfills": "5.0.4", + "@web3modal/scaffold": "5.0.4", + "@web3modal/scaffold-react": "5.0.4", + "@web3modal/scaffold-utils": "5.0.4", + "@web3modal/scaffold-vue": "5.0.4", + "@web3modal/siwe": "5.0.4" }, "devDependencies": { "@wagmi/connectors": "5.0.8", diff --git a/packages/wagmi/src/client.ts b/packages/wagmi/src/client.ts index 2c6138585f..306af625a3 100644 --- a/packages/wagmi/src/client.ts +++ b/packages/wagmi/src/client.ts @@ -40,7 +40,8 @@ import type { Hex } from 'viem' import { Web3ModalScaffold } from '@web3modal/scaffold' import type { Web3ModalSIWEClient } from '@web3modal/siwe' import { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils' -import { ConstantsUtil as CommonConstants } from '@web3modal/common' +import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common' +import type { Chain as AvailableChain } from '@web3modal/common' import { getCaipDefaultChain, getEmailCaipNetworks, @@ -70,7 +71,7 @@ export interface Web3ModalClientOptions export type Web3ModalOptions = Omit, '_sdkVersion'> -// @ts-expect-error: Overriden state type is correct +// @ts-expect-error: Overridden state type is correct interface Web3ModalState extends PublicStateControllerState { selectedNetworkId: number | undefined } @@ -83,6 +84,8 @@ export class Web3Modal extends Web3ModalScaffold { private wagmiConfig: Web3ModalClientOptions['wagmiConfig'] + private chain: AvailableChain = CommonConstantsUtil.CHAIN.EVM + public constructor(options: Web3ModalClientOptions) { const { wagmiConfig, siweConfig, defaultChain, tokens, _sdkVersion, ...w3mOptions } = options @@ -303,7 +306,7 @@ export class Web3Modal extends Web3ModalScaffold { let ensName: boolean | GetEnsAddressReturnType = false let wcName: boolean | string = false - if (value?.endsWith(CommonConstants.WC_NAME_SUFFIX)) { + if (value?.endsWith(CommonConstantsUtil.WC_NAME_SUFFIX)) { wcName = await this.resolveWalletConnectName(value) } @@ -341,6 +344,7 @@ export class Web3Modal extends Web3ModalScaffold { } super({ + chain: CommonConstantsUtil.CHAIN.EVM, networkControllerClient, connectionControllerClient, siweControllerClient: siweConfig, @@ -369,7 +373,7 @@ export class Web3Modal extends Web3ModalScaffold { // -- Public ------------------------------------------------------------------ - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override getState() { const state = super.getState() @@ -379,7 +383,7 @@ export class Web3Modal extends Web3ModalScaffold { } } - // @ts-expect-error: Overriden state type is correct + // @ts-expect-error: Overridden state type is correct public override subscribeState(callback: (state: Web3ModalState) => void) { return super.subscribeState(state => callback({ @@ -419,7 +423,7 @@ export class Web3Modal extends Web3ModalScaffold { this.syncProfile(address, chainId), this.syncBalance(address, chainId), this.syncConnectedWalletInfo(connector), - this.getApprovedCaipNetworksData() + this.setApprovedCaipNetworksData() ]) this.hasSyncedConnectedAccount = true } else if (!isConnected && this.hasSyncedConnectedAccount) { @@ -439,7 +443,8 @@ export class Web3Modal extends Web3ModalScaffold { id: caipChainId, name, imageId: PresetsUtil.EIP155NetworkImageIds[id], - imageUrl: this.options?.chainImages?.[id] + imageUrl: this.options?.chainImages?.[id], + chain: this.chain }) if (isConnected && address && chainId) { const caipAddress: CaipAddress = `${ConstantsUtil.EIP155}:${id}:${address}` @@ -530,14 +535,17 @@ export class Web3Modal extends Web3ModalScaffold { ReturnType<(typeof EthereumProvider)['init']> > if (walletConnectProvider.session) { - this.setConnectedWalletInfo({ - ...walletConnectProvider.session.peer.metadata, - name: walletConnectProvider.session.peer.metadata.name, - icon: walletConnectProvider.session.peer.metadata.icons?.[0] - }) + this.setConnectedWalletInfo( + { + ...walletConnectProvider.session.peer.metadata, + name: walletConnectProvider.session.peer.metadata.name, + icon: walletConnectProvider.session.peer.metadata.icons?.[0] + }, + this.chain + ) } } else { - this.setConnectedWalletInfo({ name: connector.name, icon: connector.icon }) + this.setConnectedWalletInfo({ name: connector.name, icon: connector.icon }, this.chain) } } @@ -572,7 +580,8 @@ export class Web3Modal extends Web3ModalScaffold { type: PresetsUtil.ConnectorTypesMap[type] ?? 'EXTERNAL', info: { rdns: id - } + }, + chain: this.chain }) } }) @@ -602,6 +611,7 @@ export class Web3Modal extends Web3ModalScaffold { email: authConnector.email, socials: authConnector.socials, showWallets: authConnector.showWallets, + chain: this.chain, walletFeatures: authConnector.walletFeatures }) } @@ -698,8 +708,11 @@ export class Web3Modal extends Web3ModalScaffold { provider.onIsConnected(req => { this.setIsConnected(true) - this.setSmartAccountDeployed(Boolean(req.smartAccountDeployed)) - this.setPreferredAccountType(req.preferredAccountType as W3mFrameTypes.AccountType) + this.setSmartAccountDeployed(Boolean(req.smartAccountDeployed), this.chain) + this.setPreferredAccountType( + req.preferredAccountType as W3mFrameTypes.AccountType, + this.chain + ) super.setLoading(false) }) @@ -711,7 +724,7 @@ export class Web3Modal extends Web3ModalScaffold { if (!address) { return } - this.setPreferredAccountType(type as W3mFrameTypes.AccountType) + this.setPreferredAccountType(type as W3mFrameTypes.AccountType, this.chain) }) } } diff --git a/packages/wallet/CHANGELOG.md b/packages/wallet/CHANGELOG.md index 913453d466..e7175d607a 100644 --- a/packages/wallet/CHANGELOG.md +++ b/packages/wallet/CHANGELOG.md @@ -1,5 +1,14 @@ # @web3modal/wallet +## 5.0.4 + +### Patch Changes + +- fix: wcPromise incompatibility issues + +- Updated dependencies []: + - @web3modal/polyfills@5.0.4 + ## 5.0.3 ### Patch Changes diff --git a/packages/wallet/package.json b/packages/wallet/package.json index fb8f95701f..313e591a79 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -1,6 +1,6 @@ { "name": "@web3modal/wallet", - "version": "5.0.3", + "version": "5.0.4", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -17,7 +17,7 @@ }, "dependencies": { "@walletconnect/logger": "2.1.2", - "@web3modal/polyfills": "5.0.3", + "@web3modal/polyfills": "5.0.4", "zod": "3.22.4" }, "keywords": [