(https://reown.com)",
"license": "Apache-2.0",
- "homepage": "https://github.com/web3modal/web3modal",
+ "homepage": "https://github.com/WalletConnect/web3modal",
"repository": {
"type": "git",
- "url": "git+https://github.com/web3modal/web3modal.git"
+ "url": "git+https://github.com/WalletConnect/web3modal.git"
},
"bugs": {
- "url": "https://github.com/web3modal/web3modal/issues"
+ "url": "https://github.com/WalletConnect/web3modal/issues"
}
}
diff --git a/packages/common/readme.md b/packages/common/readme.md
index a2b8551feb..a0afe8b4d9 100644
--- a/packages/common/readme.md
+++ b/packages/common/readme.md
@@ -1,10 +1,10 @@
-#### ๐ [Documentation](https://docs.walletconnect.com/2.0/web3modal/about)
+#### ๐ [Documentation](https://docs.reown.com/2.0/appkit/about)
-#### ๐ [Website](https://web3modal.com)
+#### ๐ [Website](https://reown.com/appkit)
-# Web3Modal
+# AppKit
-Your on-ramp to web3 multichain. Web3Modal is a versatile library that makes it super easy to connect users with your Dapp and start interacting with the blockchain.
+Your on-ramp to web3 multichain. AppKit is a versatile library that makes it super easy to connect users with your Dapp and start interacting with the blockchain.
diff --git a/packages/common/src/utils/CaipNetworksUtil.ts b/packages/common/src/utils/CaipNetworksUtil.ts
new file mode 100644
index 0000000000..9d75cc6612
--- /dev/null
+++ b/packages/common/src/utils/CaipNetworksUtil.ts
@@ -0,0 +1,22 @@
+const RPC_URL_HOST = 'rpc.walletconnect.org'
+
+export const CaipNetworksUtil = {
+ /**
+ * Extends the RPC URL with the project ID if the RPC URL is a Reown URL
+ * @param rpcUrl - The RPC URL to extend
+ * @param projectId - The project ID to extend the RPC URL with
+ * @returns The extended RPC URL
+ */
+ extendRpcUrlWithProjectId(rpcUrl: string, projectId: string) {
+ const isReownUrl = rpcUrl.includes(RPC_URL_HOST)
+
+ if (isReownUrl) {
+ const url = new URL(rpcUrl)
+ url.searchParams.set('projectId', projectId)
+
+ return url.toString()
+ }
+
+ return rpcUrl
+ }
+}
diff --git a/packages/common/src/utils/ConstantsUtil.ts b/packages/common/src/utils/ConstantsUtil.ts
index 0bf14a751b..fac245c069 100644
--- a/packages/common/src/utils/ConstantsUtil.ts
+++ b/packages/common/src/utils/ConstantsUtil.ts
@@ -1,16 +1,19 @@
-import type { Chain } from './TypeUtil.js'
+import type { ChainNamespace } from './TypeUtil.js'
export const ConstantsUtil = {
- WC_NAME_SUFFIX: '.wcn.id',
+ WC_NAME_SUFFIX: '.reown.id',
+ WC_NAME_SUFFIX_LEGACY: '.wcn.id',
BLOCKCHAIN_API_RPC_URL: 'https://rpc.walletconnect.org',
PULSE_API_URL: 'https://pulse.walletconnect.org',
W3M_API_URL: 'https://api.web3modal.org',
CHAIN: {
- EVM: 'evm' as Chain,
- SOLANA: 'solana' as Chain
- },
+ EVM: 'eip155',
+ SOLANA: 'solana',
+ POLKADOT: 'polkadot'
+ } as const satisfies Record,
CHAIN_NAME_MAP: {
- evm: 'Ethereum',
- solana: 'Solana'
- }
-}
+ eip155: 'Ethereum',
+ solana: 'Solana',
+ polkadot: 'Polkadot'
+ } as const satisfies Record
+} as const
diff --git a/packages/common/src/utils/NamesUtil.ts b/packages/common/src/utils/NamesUtil.ts
new file mode 100644
index 0000000000..14b63108ca
--- /dev/null
+++ b/packages/common/src/utils/NamesUtil.ts
@@ -0,0 +1,8 @@
+import { ConstantsUtil } from './ConstantsUtil.js'
+
+export function isReownName(value: string) {
+ return (
+ value?.endsWith(ConstantsUtil.WC_NAME_SUFFIX_LEGACY) ||
+ value?.endsWith(ConstantsUtil.WC_NAME_SUFFIX)
+ )
+}
diff --git a/packages/common/src/utils/ParseUtil.ts b/packages/common/src/utils/ParseUtil.ts
new file mode 100644
index 0000000000..f4da9e10b2
--- /dev/null
+++ b/packages/common/src/utils/ParseUtil.ts
@@ -0,0 +1,50 @@
+import type { CaipAddress, CaipNetworkId, ChainId, ChainNamespace } from './TypeUtil.js'
+
+type ParsedCaipAddress = {
+ chainNamespace: ChainNamespace
+ chainId: ChainId
+ address: string
+}
+
+type ParsedCaipNetworkId = {
+ chainNamespace: ChainNamespace
+ chainId: ChainId
+}
+
+export const ParseUtil = {
+ parseCaipAddress(caipAddress: CaipAddress): ParsedCaipAddress {
+ const parts = caipAddress.split(':')
+ if (parts.length !== 3) {
+ throw new Error(`Invalid CAIP-10 address: ${caipAddress}`)
+ }
+
+ const [chainNamespace, chainId, address] = parts
+
+ if (!chainNamespace || !chainId || !address) {
+ throw new Error(`Invalid CAIP-10 address: ${caipAddress}`)
+ }
+
+ return {
+ chainNamespace: chainNamespace as ChainNamespace,
+ chainId: chainId as ChainId,
+ address
+ }
+ },
+ parseCaipNetworkId(caipNetworkId: CaipNetworkId): ParsedCaipNetworkId {
+ const parts = caipNetworkId.split(':')
+ if (parts.length !== 2) {
+ throw new Error(`Invalid CAIP-2 network id: ${caipNetworkId}`)
+ }
+
+ const [chainNamespace, chainId] = parts
+
+ if (!chainNamespace || !chainId) {
+ throw new Error(`Invalid CAIP-2 network id: ${caipNetworkId}`)
+ }
+
+ return {
+ chainNamespace: chainNamespace as ChainNamespace,
+ chainId: chainId as ChainId
+ }
+ }
+}
diff --git a/packages/base/utils/SafeLocalStorage.ts b/packages/common/src/utils/SafeLocalStorage.ts
similarity index 63%
rename from packages/base/utils/SafeLocalStorage.ts
rename to packages/common/src/utils/SafeLocalStorage.ts
index cfcad189d2..107003d96b 100644
--- a/packages/base/utils/SafeLocalStorage.ts
+++ b/packages/common/src/utils/SafeLocalStorage.ts
@@ -1,9 +1,23 @@
export type SafeLocalStorageItems = {
'@w3m/wallet_id': string
- '@w3m/solana_caip_chain': string
+ '@w3m/wallet_name': string
'@w3m/solana_wallet': string
+ '@w3m/solana_caip_chain': string
+ '@w3m/active_caip_network': string
+ '@w3m/active_caip_network_id': string
+ '@w3m/connected_connector': string
}
+export const SafeLocalStorageKeys = {
+ WALLET_ID: '@w3m/wallet_id',
+ WALLET_NAME: '@w3m/wallet_name',
+ SOLANA_WALLET: '@w3m/solana_wallet',
+ SOLANA_CAIP_CHAIN: '@w3m/solana_caip_chain',
+ ACTIVE_CAIP_NETWORK: '@w3m/active_caip_network',
+ ACTIVE_CAIP_NETWORK_ID: '@w3m/active_caip_network_id',
+ CONNECTED_CONNECTOR: '@w3m/connected_connector'
+} as const
+
export const SafeLocalStorage = {
setItem(
key: Key,
@@ -21,7 +35,7 @@ export const SafeLocalStorage = {
try {
return JSON.parse(value)
} catch {
- return null
+ return value
}
}
}
diff --git a/packages/common/src/utils/TypeUtil.ts b/packages/common/src/utils/TypeUtil.ts
index a0e3410e0f..3a5eb64533 100644
--- a/packages/common/src/utils/TypeUtil.ts
+++ b/packages/common/src/utils/TypeUtil.ts
@@ -1,4 +1,24 @@
-export type CaipNetworkId = `${string}:${string}`
+export type CaipNetworkId = `${ChainNamespace}:${ChainId}`
+
+export type CaipAddress = `${ChainNamespace}:${ChainId}:${string}`
+
+export type ChainId = string | number
+
+export type ChainNamespace = 'eip155' | 'solana' | 'polkadot'
+
+export type CaipNetwork = {
+ id: CaipNetworkId
+ chainId: ChainId
+ chainNamespace: ChainNamespace
+ name: string
+ currency: string
+ explorerUrl: string
+ rpcUrl: string
+ imageUrl?: string
+ imageId?: string
+}
+
+export type AdapterType = 'solana' | 'wagmi' | 'ethers' | 'ethers5' | 'universal' | 'polkadot'
export type CoinbaseTransactionStatus =
| 'ONRAMP_TRANSACTION_STATUS_SUCCESS'
@@ -14,8 +34,6 @@ export type TransactionImage = {
url: string | undefined
}
-export type Chain = 'evm' | 'solana'
-
export interface Transaction {
id: string
metadata: TransactionMetadata
@@ -92,3 +110,11 @@ type BalanceQuantity = {
decimals: string
numeric: string
}
+
+export type SIWEStatus = 'uninitialized' | 'ready' | 'loading' | 'success' | 'rejected' | 'error'
+
+export type SdkFramework = 'html' | 'react' | 'vue'
+
+export type SdkVersion = `${SdkFramework}-${AdapterType}-${string}`
+
+export type AppKitSdkVersion = `${SdkFramework}-${string}-${string}`
diff --git a/packages/common/tests/InputUtil.test.ts b/packages/common/tests/InputUtil.test.ts
new file mode 100644
index 0000000000..fa8f8f1681
--- /dev/null
+++ b/packages/common/tests/InputUtil.test.ts
@@ -0,0 +1,85 @@
+import { describe, test, expect, beforeEach, vi } from 'vitest'
+import { InputUtil } from '../src/utils/InputUtil'
+
+describe('InputUtil', () => {
+ describe('numericInputKeyDown', () => {
+ let mockEvent: Partial
+ let mockOnChange: ReturnType
+
+ beforeEach(() => {
+ mockEvent = {
+ key: '',
+ preventDefault: vi.fn(),
+ metaKey: false,
+ ctrlKey: false
+ }
+ mockOnChange = vi.fn()
+ })
+
+ test('allows numeric keys', () => {
+ const numericKey = '5'
+ const mockEventWithNumericKey = { ...mockEvent, key: numericKey }
+ InputUtil.numericInputKeyDown(mockEventWithNumericKey as KeyboardEvent, '', mockOnChange)
+ expect(mockEventWithNumericKey.preventDefault).not.toHaveBeenCalled()
+ })
+
+ test('allows dot when there is no existing dot', () => {
+ const mockEventWithDot = { ...mockEvent, key: '.' }
+ InputUtil.numericInputKeyDown(mockEventWithDot as KeyboardEvent, '123', mockOnChange)
+ expect(mockEventWithDot.preventDefault).not.toHaveBeenCalled()
+ })
+
+ test('prevents dot when there is an existing dot', () => {
+ const mockEventWithDot = { ...mockEvent, key: '.' }
+ InputUtil.numericInputKeyDown(mockEventWithDot as KeyboardEvent, '123.45', mockOnChange)
+ expect(mockEventWithDot.preventDefault).toHaveBeenCalled()
+ })
+
+ test('adds leading zero when dot is first character', () => {
+ const mockEventWithDot = { ...mockEvent, key: '.' }
+ InputUtil.numericInputKeyDown(mockEventWithDot as KeyboardEvent, '', mockOnChange)
+ expect(mockOnChange).toHaveBeenCalledWith('0.')
+ expect(mockEventWithDot.preventDefault).toHaveBeenCalled()
+ })
+
+ test('replaces zero with new number', () => {
+ const mockEventWithFive = { ...mockEvent, key: '5' }
+ InputUtil.numericInputKeyDown(mockEventWithFive as KeyboardEvent, '0', mockOnChange)
+ expect(mockOnChange).toHaveBeenCalledWith('5')
+ expect(mockEventWithFive.preventDefault).toHaveBeenCalled()
+ })
+
+ test('prevents non-numeric and non-allowed keys', () => {
+ const mockEventWithE = { ...mockEvent, key: 'e' }
+ InputUtil.numericInputKeyDown(mockEventWithE as KeyboardEvent, '123', mockOnChange)
+ expect(mockEventWithE.preventDefault).toHaveBeenCalled()
+ })
+
+ test('allows control keys', () => {
+ const controlKeys = ['Backspace', 'ArrowLeft', 'ArrowRight', 'Tab']
+ controlKeys.forEach(key => {
+ const mockEventWithControlKey = { ...mockEvent, key }
+ InputUtil.numericInputKeyDown(mockEventWithControlKey as KeyboardEvent, '123', mockOnChange)
+ expect(mockEventWithControlKey.preventDefault).not.toHaveBeenCalled()
+ })
+ })
+
+ test('prevents ctrl+a/c/v/x without control key', () => {
+ const keys = ['a', 'c', 'v', 'x']
+ keys.forEach(key => {
+ const mockEventWithKey = { ...mockEvent, key }
+ InputUtil.numericInputKeyDown(mockEventWithKey as KeyboardEvent, '123', mockOnChange)
+ expect(mockEventWithKey.preventDefault).toHaveBeenCalled()
+ })
+ })
+
+ test('allows ctrl+a/c/v/x with control key', () => {
+ const keys = ['a', 'c', 'v', 'x']
+ keys.forEach(key => {
+ const mockEventWithKeyAndCtrl = { ...mockEvent, key, ctrlKey: true }
+ InputUtil.numericInputKeyDown(mockEventWithKeyAndCtrl as KeyboardEvent, '123', mockOnChange)
+ expect(mockEventWithKeyAndCtrl.preventDefault).not.toHaveBeenCalled()
+ })
+ })
+ })
+})
diff --git a/packages/common/tests/NamesUtil.test.ts b/packages/common/tests/NamesUtil.test.ts
new file mode 100644
index 0000000000..c143477be2
--- /dev/null
+++ b/packages/common/tests/NamesUtil.test.ts
@@ -0,0 +1,26 @@
+import { describe, test, expect } from 'vitest'
+import { isReownName } from '../src/utils/NamesUtil'
+import { ConstantsUtil } from '../src/utils/ConstantsUtil'
+
+describe('NamesUtil', () => {
+ describe('isReownName', () => {
+ test('returns true for names ending with legacy suffix', () => {
+ const legacyName = `testname${ConstantsUtil.WC_NAME_SUFFIX_LEGACY}`
+ expect(isReownName(legacyName)).toBe(true)
+ })
+
+ test('returns true for names ending with current suffix', () => {
+ const currentName = `testname${ConstantsUtil.WC_NAME_SUFFIX}`
+ expect(isReownName(currentName)).toBe(true)
+ })
+
+ test('returns false for names not ending with either suffix', () => {
+ expect(isReownName('testname')).toBe(false)
+ expect(isReownName('testname.com')).toBe(false)
+ })
+
+ test('returns false for empty string', () => {
+ expect(isReownName('')).toBe(false)
+ })
+ })
+})
diff --git a/packages/common/tests/NetworkUtil.test.ts b/packages/common/tests/NetworkUtil.test.ts
new file mode 100644
index 0000000000..60ca01d96b
--- /dev/null
+++ b/packages/common/tests/NetworkUtil.test.ts
@@ -0,0 +1,35 @@
+import { describe, test, expect } from 'vitest'
+import { NetworkUtil } from '../src/utils/NetworkUtil'
+
+describe('NetworkUtil', () => {
+ describe('caipNetworkIdToNumber', () => {
+ test('converts valid CAIP network ID to number', () => {
+ expect(NetworkUtil.caipNetworkIdToNumber('eip155:1')).toBe(1)
+ expect(NetworkUtil.caipNetworkIdToNumber('eip155:42')).toBe(42)
+ })
+
+ test('returns undefined for undefined input', () => {
+ expect(NetworkUtil.caipNetworkIdToNumber(undefined)).toBeUndefined()
+ })
+
+ test('returns NaN for invalid CAIP network ID', () => {
+ expect(NetworkUtil.caipNetworkIdToNumber('invalid:id' as any)).toBeNaN()
+ })
+ })
+
+ describe('parseEvmChainId', () => {
+ test('parses string CAIP network ID', () => {
+ expect(NetworkUtil.parseEvmChainId('eip155:1')).toBe(1)
+ expect(NetworkUtil.parseEvmChainId('eip155:42')).toBe(42)
+ })
+
+ test('returns number input as-is', () => {
+ expect(NetworkUtil.parseEvmChainId(1)).toBe(1)
+ expect(NetworkUtil.parseEvmChainId(42)).toBe(42)
+ })
+
+ test('returns NaN for invalid string input', () => {
+ expect(NetworkUtil.parseEvmChainId('invalid')).toBeNaN()
+ })
+ })
+})
diff --git a/packages/common/tests/ParseUtil.test.ts b/packages/common/tests/ParseUtil.test.ts
new file mode 100644
index 0000000000..5389aa1b84
--- /dev/null
+++ b/packages/common/tests/ParseUtil.test.ts
@@ -0,0 +1,70 @@
+import { describe, test, expect } from 'vitest'
+import { ParseUtil } from '../src/utils/ParseUtil'
+import type { CaipAddress, CaipNetworkId } from '../src/utils/TypeUtil'
+
+describe('ParseUtil', () => {
+ describe('parseCaipAddress', () => {
+ test('parses valid CAIP-10 address', () => {
+ const caipAddress: CaipAddress = 'eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
+ const result = ParseUtil.parseCaipAddress(caipAddress)
+ expect(result).toEqual({
+ chainNamespace: 'eip155',
+ chainId: '1',
+ address: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
+ })
+ })
+
+ test('throws error for invalid CAIP-10 address with missing parts', () => {
+ const invalidAddress = 'eip155:1'
+ expect(() => ParseUtil.parseCaipAddress(invalidAddress as CaipAddress)).toThrow(
+ 'Invalid CAIP-10 address'
+ )
+ })
+
+ test('throws error for invalid CAIP-10 address with empty parts', () => {
+ const invalidAddress = 'eip155::0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
+ expect(() => ParseUtil.parseCaipAddress(invalidAddress as CaipAddress)).toThrow(
+ 'Invalid CAIP-10 address'
+ )
+ })
+
+ test('throws error for invalid CAIP-10 address with too many parts', () => {
+ const invalidAddress = 'eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e:extra'
+ expect(() => ParseUtil.parseCaipAddress(invalidAddress as CaipAddress)).toThrow(
+ 'Invalid CAIP-10 address'
+ )
+ })
+ })
+
+ describe('parseCaipNetworkId', () => {
+ test('parses valid CAIP-2 network id', () => {
+ const caipNetworkId: CaipNetworkId = 'eip155:1'
+ const result = ParseUtil.parseCaipNetworkId(caipNetworkId)
+ expect(result).toEqual({
+ chainNamespace: 'eip155',
+ chainId: '1'
+ })
+ })
+
+ test('throws error for invalid CAIP-2 network id with missing parts', () => {
+ const invalidNetworkId = 'eip155'
+ expect(() => ParseUtil.parseCaipNetworkId(invalidNetworkId as CaipNetworkId)).toThrow(
+ 'Invalid CAIP-2 network id'
+ )
+ })
+
+ test('throws error for invalid CAIP-2 network id with empty parts', () => {
+ const invalidNetworkId = 'eip155:'
+ expect(() => ParseUtil.parseCaipNetworkId(invalidNetworkId as CaipNetworkId)).toThrow(
+ 'Invalid CAIP-2 network id'
+ )
+ })
+
+ test('throws error for invalid CAIP-2 network id with too many parts', () => {
+ const invalidNetworkId = 'eip155:1:extra'
+ expect(() => ParseUtil.parseCaipNetworkId(invalidNetworkId as CaipNetworkId)).toThrow(
+ 'Invalid CAIP-2 network id'
+ )
+ })
+ })
+})
diff --git a/packages/base/utils/SafeLocalStorage.test.ts b/packages/common/tests/SafeLocalStorage.test.ts
similarity index 95%
rename from packages/base/utils/SafeLocalStorage.test.ts
rename to packages/common/tests/SafeLocalStorage.test.ts
index 8415025d0c..dfabb7e131 100644
--- a/packages/base/utils/SafeLocalStorage.test.ts
+++ b/packages/common/tests/SafeLocalStorage.test.ts
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'
-import { SafeLocalStorage } from './SafeLocalStorage'
+import { SafeLocalStorage } from '../src/utils/SafeLocalStorage'
const previousLocalStorage = globalThis.localStorage
const previousWindow = globalThis.window
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index 9c0e205c94..9489b0717f 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -1,819 +1,63 @@
-# @web3modal/core
+# @reown/appkit-core
-## 5.1.8
+## 1.0.1
### Patch Changes
-- - chore: changed RN links to wildcards by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2839
- - feat: solana send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2802
- - Feat/solana onramp by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2525
- - chore: update assetlinks.json by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2838
- - Chore/add base sepolia by @tomiir in https://github.com/WalletConnect/web3modal/pull/2840
- - fix: solana default chain logic by @zoruka in https://github.com/WalletConnect/web3modal/pull/2849
-- Updated dependencies []:
- - @web3modal/common@5.1.8
- - @web3modal/wallet@5.1.8
+- [#54](https://github.com/WalletConnect/web3modal/pull/54) [`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09) Thanks [@tomiir](https://github.com/tomiir)! - Makes packages public
-## 5.1.7
+- Updated dependencies [[`dc6dd8d`](https://github.com/WalletConnect/web3modal/commit/dc6dd8d37cbe79ae3b0bcaf7bdace1fe6ad11b09)]:
+ - @reown/appkit-common@1.0.1
+ - @reown/appkit-wallet@1.0.1
-### Patch Changes
-
-- - chore: version bump for 5.1.6 by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2797
- - fix(deps): update walletconnect to v2.15.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2722
- - chore: fix public URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2806
- - fix: RPC requests causing modal to close by @tomiir in https://github.com/WalletConnect/web3modal/pull/2799
- - chore: use apiVersion v2 on names endpoint by @tomiir in https://github.com/WalletConnect/web3modal/pull/2805
- - fix: import valtio from vanilla path by @jd1378 in https://github.com/WalletConnect/web3modal/pull/2810
- - chore: use shared gh token by @tomiir in https://github.com/WalletConnect/web3modal/pull/2809
- - chore: add input secrets to setup workflow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2822
- - fix: remove deprecated params from sign transaction wc rpc request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2816
- - chore: changed android and ios links for react native sample apps by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2825
- - chore: changed order of links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2826
- - fix(siwe): fix undefined SIWE chainId by @Cali93 in https://github.com/WalletConnect/web3modal/pull/2820
- - chore: update monorepo deps to 2.16.1 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2829
- - fix: don't capitalize first character of email field on mobile by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2815
- - chore(deps): update dependency ethers to v6.13.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2434
- - chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2711
-- Updated dependencies []:
- - @web3modal/common@5.1.7
- - @web3modal/wallet@5.1.7
-
-## 5.1.6
-
-### Patch Changes
-
-- fix: update CSP by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2775
-- fix: ethers5 adapter import in exports by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2754
-- fix/missing action functions exports from clients by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2778
-- fix: logics to set default chain by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2787
-- Implement actions using userOpBuilder service instead of permissionless.js by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2758
-- chore: run Playwright on self-hosted runners by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2788
-- chore: add NEXT_PUBLIC_SECURE_SITE_SDK_URL to CSP by @tomiir in https://github.com/WalletConnect/web3modal/pull/2791
-- chore: enable verify tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2774
-- fix: social login shows `undefined` by @magiziz in https://github.com/WalletConnect/web3modal/pull/2783
-
-* Updated dependencies []:
- - @web3modal/common@5.1.6
- - @web3modal/wallet@5.1.6
-
-## 5.1.5
-
-### Patch Changes
-
-- - chore: add safety for localstorage by @zoruka in https://github.com/WalletConnect/web3modal/pull/2770
- - fix: impossible to press on send placeholder input on mobile by @magiziz in https://github.com/WalletConnect/web3modal/pull/2771
- - feat: solana sign all transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2772
- - chore: change universal provider relay url and move to constants file by @zoruka in https://github.com/WalletConnect/web3modal/pull/2776
- - chore: remove coinbase SDK de-duplication by @tomiir in https://github.com/WalletConnect/web3modal/pull/2768
- - fix: add missing chainId param for transactions request by @zoruka in https://github.com/WalletConnect/web3modal/pull/2779
- - fix: remove coming message from solana transactions by @zoruka in https://github.com/WalletConnect/web3modal/pull/2780
-
-- Updated dependencies []:
- - @web3modal/common@5.1.5
- - @web3modal/wallet@5.1.5
-
-## 5.1.4
-
-### Patch Changes
-
-- - Added entries on assetlinks for flutter wallet by @quetool in https://github.com/WalletConnect/web3modal/pull/2746
- - chore: only upgrade ethers v6 by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2741
- - chore: fix wagmi not disconnecting and add adapter tests by @magiziz in https://github.com/WalletConnect/web3modal/pull/2751
- - Added more fingerprints to Flutter apps by @quetool in https://github.com/WalletConnect/web3modal/pull/2748
- - fix: remove auth connector from ethers and check for socials length by @tomiir in https://github.com/WalletConnect/web3modal/pull/2715
- - chore: make all socials enabled by default by @tomiir in https://github.com/WalletConnect/web3modal/pull/2747
- - fix: social logins not working in laboratory by @magiziz in https://github.com/WalletConnect/web3modal/pull/2765
- - chore: expose solana provider type by @zoruka in https://github.com/WalletConnect/web3modal/pull/2756
- - fix: Connector image mismatch by @tomiir in https://github.com/WalletConnect/web3modal/pull/2745
-- Updated dependencies []:
- - @web3modal/common@5.1.4
- - @web3modal/wallet@5.1.4
-
-## 5.1.3
-
-### Patch Changes
-
-- refactor: defaultChain ts mismatch, custom hooks, separation of dependencies
-
-- Updated dependencies []:
- - @web3modal/common@5.1.3
- - @web3modal/wallet@5.1.3
-
-## 5.1.2
-
-### Patch Changes
-
-- Added Solana Auth Provider types and schemas
-
-- Updated dependencies []:
- - @web3modal/common@5.1.2
- - @web3modal/wallet@5.1.2
-
-## 5.1.1
-
-### Patch Changes
-
-- Update EthProvider to v 2.15.1
-
-- Updated dependencies []:
- - @web3modal/common@5.1.1
- - @web3modal/wallet@5.1.1
-
-## 5.1.0
-
-### Minor Changes
-
-Enhanced compatibility, performance, developer experience, and user interface updates across various features
-
-- fix: remove limitation on sending versioned tx by @tomiir in https://github.com/WalletConnect/web3modal/pull/2638
-- refactor: fix missing ens screens by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2639
-- chore: remove non-Blockchain API RPCs by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2640
-- chore: update wagmi dependencies to latest version by @tomiir in https://github.com/WalletConnect/web3modal/pull/2642
-- chore: dynamic metadata URL by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2628
-- add icons and wallets by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2637
-- chore: fix playwright tests by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2633
-- chore: more renovate by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2619
-- chore: test single retry in tests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2648
-- feat/automated tests with metamask by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2636
-- fix: import types from the package root in partials by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2650
-- feat: add support for eip5792 getCapabilities and sendCalls by @tomiir in https://github.com/WalletConnect/web3modal/pull/2576
-- chore: ID allocation service by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2574
-- refactor: solana sign and send transaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2646
-- chore: renovate updates by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2673
-- fix(solana): injected connectors not detected by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2656
-- chore: fix renovate includePaths by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2674
-- chore: update lab names & images by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2653
-- chore: fix typo by @riyueguang in https://github.com/WalletConnect/web3modal/pull/2600
-- refactor: handle balance and balanceSymbol fetch to update w3m-button by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2433
-- added filter transactions by chain by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/1834
-- refactor/wallet card item with image optimization by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2572
-- fix: small balance format by @imlonghao in https://github.com/WalletConnect/web3modal/pull/2651
-- feat: add git hooks with husky and add pre-push hook by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2558
-- fix: add getApprovedCaipNetworks implementation by @tomiir in https://github.com/WalletConnect/web3modal/pull/2644
-- chore: update vitest to v2 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2678
-- feat: add sender to identity and reverse resolution by @tomiir in https://github.com/WalletConnect/web3modal/pull/2649
-- refactor: solana walletconnect rpc interface by @zoruka in https://github.com/WalletConnect/web3modal/pull/2677
-- Wagmi: Erc7715 permissions with Appkit embedded wallet by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2615
-- fix issue with modal not closing by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2680
-- fix: wagmi not showing loading indicator on email reconnection by @tomiir in https://github.com/WalletConnect/web3modal/pull/2682
-- fix: ethers disconnection error by @tomiir in https://github.com/WalletConnect/web3modal/pull/2683
-- fix: Wagmi Switch To by @tomiir in https://github.com/WalletConnect/web3modal/pull/2679
-- refactor: improvements to siwe flow and modal animations by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2672
-- chore: added rn samples in apple file by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2687
-- chore: Web3Modal -> AppKit by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2686
-- chore: fix metadata icon by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2685
-- fix(multi-account): account switch on wagmi by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2689
-- Added Flutter universal links by @quetool in https://github.com/WalletConnect/web3modal/pull/2695
-- feat: add bundle size check by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2694
-- chore: remove unnecessary window.postMessage for W3mFrame by @zoruka in https://github.com/WalletConnect/web3modal/pull/2658
-- refactor: standardize solana provider adapters by @zoruka in https://github.com/WalletConnect/web3modal/pull/2690
-- fix: bring back old parameters for RPC call on solana_signTransaction by @zoruka in https://github.com/WalletConnect/web3modal/pull/2692
-- refactor: export missing type defs from siwe package by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2703
-- fix: solana qa round by @zoruka in https://github.com/WalletConnect/web3modal/pull/2704
-- chore: update with latest V5 changes by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2635
-- fix(deps): update walletconnect to v2.15.0 by @renovate in https://github.com/WalletConnect/web3modal/pull/2675
-- chore(deps): update wagmi by @renovate in https://github.com/WalletConnect/web3modal/pull/2676
-- chore: URL on lab pages by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2702
-- chore: update vite-size to 0.0.5 by @lukaisailovic in https://github.com/WalletConnect/web3modal/pull/2700
-- chore: change chainId type to accept string and its dependencies by @zoruka in https://github.com/WalletConnect/web3modal/pull/2632
-- fix(deps): update dependency @solana/web3.js to v1.95.2 by @renovate in https://github.com/WalletConnect/web3modal/pull/2312
-
-### New Contributors
-
-- @riyueguang made their first contribution in https://github.com/WalletConnect/web3modal/pull/2600
-- @imlonghao made their first contribution in https://github.com/WalletConnect/web3modal/pull/2651
-- @quetool made their first contribution in https://github.com/WalletConnect/web3modal/pull/2695
-
-**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.11...5.1.0
-
-### Patch Changes
-
-- Updated dependencies []:
- - @web3modal/common@5.1.0
- - @web3modal/wallet@5.1.0
-
-## 5.0.11
-
-### Patch Changes
-
-- - Hotfix to prevent loading state with QR code
-
-- Updated dependencies []:
- - @web3modal/common@5.0.11
- - @web3modal/wallet@5.0.11
-
-## 5.0.10
-
-- chore: update with v5 by @tomiir in https://github.com/WalletConnect/web3modal/pull/2612
-- fix: move the wagmi state mutation to outside of 1-click auth flow by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2585
-- :hotfix fix svg error when requesting farcaster qr code by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2621
-
-**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.9...5.0.10
-
-- Updated dependencies []:
- - @web3modal/common@5.0.10
- - @web3modal/wallet@5.0.10
-
-## 5.0.9
-
-### Patch Changes
-
-- - chore: refine link names by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2588
- - hotfix change secure site origin domain to .org by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2603
-
-**Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.8...5.0.9
-
-## 5.0.8
-
-### Patch Changes
-
-- - chore: lab loading indicator by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2548
- - fix: not allow multiple account syncs for same caip address by @zoruka in https://github.com/WalletConnect/web3modal/pull/2547
- - fix: missing network not supported modal on wallet network switch by @zoruka in https://github.com/WalletConnect/web3modal/pull/2565
- - chore: add clientId to BlockchainAPI requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2521
- - Chore/split internal external testing by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2563
- - fix: remove 200ms QR delay by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2567
- - [TDW] move from npm to pnpm by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2545
- - feat: enableSwaps option by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2573
- - build: fix dockerfile and bring back turbo by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2582
- - chore: updates providers to `2.14` by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2557
- - fix: gets chains from approved accounts by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2562
- - :fix show right icon for multi-address account by @svenvoskamp in https://github.com/WalletConnect/web3modal/pull/2560
- - feat: add wallet features and socials github tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2571
- - fix: multiple account syncs on wagmi by @zoruka in https://github.com/WalletConnect/web3modal/pull/2575
- - feat: apply RPC refactor and EIP5792 schema changes by @tomiir in https://github.com/WalletConnect/web3modal/pull/2580
- - refactor: turbo pipeline by @segunadebayo in https://github.com/WalletConnect/web3modal/pull/2587
-
- **Full Changelog**: https://github.com/WalletConnect/web3modal/compare/5.0.7...5.0.8
-
-- Updated dependencies []:
- - @web3modal/common@5.0.8
- - @web3modal/wallet@5.0.8
-
-## 5.0.7
-
-### Patch Changes
-
-- - feat: multi address by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2286
- - feat: feat: added vue for exports in solana by @phoenixVS in https://github.com/WalletConnect/web3modal/pull/2449
- - fix: wagmi authConnector connectExternal resolving issue and enable wagmi email tests by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2504
- - chore: configures report-only CSP for lab by @bkrem in https://github.com/WalletConnect/web3modal/pull/2388
- - fix: settings btn styling by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2523
- - Add Wallet Standard to AppKit + Solana by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2482
- - chore: remove onramp widget from labs by @tomiir in https://github.com/WalletConnect/web3modal/pull/2526
- - feat: support custom connectors by @chris13524 in https://github.com/WalletConnect/web3modal/pull/2119
- - fix: disconnect logic for EIP6963 & Injected provider types for @web3modal/ethers by @hmzakhalid in https://github.com/WalletConnect/web3modal/pull/2289
- - Feat ERC7715 grant_permissions support on lab by @KannuSingh in https://github.com/WalletConnect/web3modal/pull/2500
- - update chain on network change by @glitch-txs in https://github.com/WalletConnect/web3modal/pull/2497
- - fix: make accounts optional in social response by @tomiir in https://github.com/WalletConnect/web3modal/pull/2520
- - chore: SA Tests switch network before flow by @tomiir in https://github.com/WalletConnect/web3modal/pull/2529
- - chore: changed react native universal links by @ignaciosantise in https://github.com/WalletConnect/web3modal/pull/2535
- - chore: change labs' ethers rpc urls to walletconnect.org by @tomiir in https://github.com/WalletConnect/web3modal/pull/2530
- - chore: remove 'no-cache' from API requests by @tomiir in https://github.com/WalletConnect/web3modal/pull/2538
- - fix: makes `getMessageParams` siwe client method optional by @ganchoradkov in https://github.com/WalletConnect/web3modal/pull/2305
- - chore: update secure site url to org domain by @tomiir in https://github.com/WalletConnect/web3modal/pull/2537
- - fix: multiple name by @tomiir in https://github.com/WalletConnect/web3modal/pull/2410
- - refactor(common): utils by @Simon-He95 in https://github.com/WalletConnect/web3modal/pull/2447
- - fix: reorder chains to have current chain Id as main message by @tomiir in https://github.com/WalletConnect/web3modal/pull/2423
- - refactor: change solana testnet and devnet rpcs to wc by @enesozturk in https://github.com/WalletConnect/web3modal/pull/2541
- - refactor: laboratory wagmi tests by @zoruka in https://github.com/WalletConnect/web3modal/pull/2552
- - fix: sync accounts in wagmi and subscribe to account change by @tomiir in https://github.com/WalletConnect/web3modal/pull/2544
-- Updated dependencies []:
- - @web3modal/common@5.0.7
- - @web3modal/wallet@5.0.7
-
-## 5.0.6
-
-### Patch Changes
-
-- fix: Social Login illegal invocation issue. Wagmi tests
-
-- Updated dependencies []:
- - @web3modal/common@5.0.6
- - @web3modal/wallet@5.0.6
-
-## 5.0.5
-
-### Patch Changes
-
-- feat: universal link internal flag. Add kotlin assetlinks. Fix email truncation'
-
-- Updated dependencies []:
- - @web3modal/common@5.0.5
- - @web3modal/wallet@5.0.5
-
-## 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
-
-- fix: ethers5 coinbase issues. Turbo build issues. Upate cb connector.
-
-- Updated dependencies []:
- - @web3modal/common@5.0.3
- - @web3modal/wallet@5.0.3
-
-## 5.0.2
-
-### Patch Changes
-
-- fix: siwe signOutOnNetwork change issue. fix: wallets filtered by rdns matched from explorer api. fix: solana network id issue
-
-- Updated dependencies []:
- - @web3modal/common@5.0.2
- - @web3modal/wallet@5.0.2
-
-## 5.0.1
-
-### Patch Changes
-
-- fix: remove walletconnect restriction on names
-
-- Updated dependencies []:
- - @web3modal/common@5.0.1
- - @web3modal/wallet@5.0.1
-
-## 5.0.0
+## 1.0.0
### Major Changes
-- Release V5
+- [#53](https://github.com/WalletConnect/web3modal/pull/53) [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a) Thanks [@tomiir](https://github.com/tomiir)! - Reown v1.0.0
### Patch Changes
-- Updated dependencies []:
- - @web3modal/common@5.0.0
- - @web3modal/wallet@5.0.0
+- [#49](https://github.com/WalletConnect/web3modal/pull/49) [`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates prop names, adapter names, network exported path name
-## 5.0.0-cn-v5.0
+- [#52](https://github.com/WalletConnect/web3modal/pull/52) [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6) Thanks [@zoruka](https://github.com/zoruka)! - Fix network availability and wagmi reconnect
-### Major Changes
+- Updated dependencies [[`e678965`](https://github.com/WalletConnect/web3modal/commit/e67896504762ea2220aaedb3202077eec83fdc7f), [`3d62df8`](https://github.com/WalletConnect/web3modal/commit/3d62df8e0f29977ee82f96f17fbbac66f39ae6a6), [`f4a378d`](https://github.com/WalletConnect/web3modal/commit/f4a378de8bf67f296ab5cc2d730533e7362ba36a)]:
+ - @reown/appkit-common@1.0.0
+ - @reown/appkit-wallet@1.0.0
-- Test V5
+## 0.0.5
### Patch Changes
-- Updated dependencies []:
- - @web3modal/common@5.0.0-cn-v5.0
- - @web3modal/wallet@5.0.0-cn-v5.0
+- [#45](https://github.com/WalletConnect/web3modal/pull/45) [`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates RPC urls project id query params dynamically
-## 4.2.3
+- [#46](https://github.com/WalletConnect/web3modal/pull/46) [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef) Thanks [@enesozturk](https://github.com/enesozturk)! - Updates sdk type and sdk version values
-### Patch Changes
-
-- feat: - feat: restricted ens names. fix: iat set automatically if not present in messageParams. Adds siwe config handlers
-
-- Updated dependencies []:
- - @web3modal/common@4.2.3
- - @web3modal/wallet@4.2.3
-
-## 4.2.3-alpha.0
-
-### Patch Changes
-
-- feat: add support for coinbase smart accounts
+- [#42](https://github.com/WalletConnect/web3modal/pull/42) [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04) Thanks [@tomiir](https://github.com/tomiir)! - Fix circular dependency in OptionsController
-- Updated dependencies []:
- - @web3modal/common@4.2.3-alpha.0
- - @web3modal/wallet@4.2.3-alpha.0
+- Updated dependencies [[`395398c`](https://github.com/WalletConnect/web3modal/commit/395398c7c943142776da2ea8011205e600d8ab86), [`756ab0d`](https://github.com/WalletConnect/web3modal/commit/756ab0d9f7b86abc6b1a4831197058176618d9ef), [`8c90093`](https://github.com/WalletConnect/web3modal/commit/8c90093f724dc1ba4e86f7101fac8772b58fae04)]:
+ - @reown/appkit-common@0.0.5
+ - @reown/appkit-wallet@0.0.5
-## 4.2.2
+## 0.0.4
### Patch Changes
-- feat: social login refactor. wagmi sendCalls support. refactor theme variables
+- [#38](https://github.com/WalletConnect/web3modal/pull/38) [`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b) Thanks [@tomiir](https://github.com/tomiir)! - Base reown package rename setup.
-- Updated dependencies []:
- - @web3modal/common@4.2.2
- - @web3modal/wallet@4.2.2
+- Updated dependencies [[`89fb054`](https://github.com/WalletConnect/web3modal/commit/89fb054d7e2513b80940c73101dc395e7ea2694b)]:
+ - @reown/appkit-common@0.0.4
+ - @reown/appkit-wallet@0.0.4
-## 4.2.1
+## 0.0.3
### Patch Changes
-- Hotfix to support injected and announced wallets in in app browsers
-
-- Updated dependencies []:
- - @web3modal/common@4.2.1
- - @web3modal/wallet@4.2.1
-
-## 4.2.0
-
-### Patch Changes
-
-- release: 4.2.0 version release
-
-- Updated dependencies []:
- - @web3modal/common@4.2.0
- - @web3modal/wallet@4.2.0
-
-## 4.2.0-alpha.0
-
-### Patch Changes
-
-- feat: 4.2.0-alpha release
-
-- Updated dependencies []:
- - @web3modal/common@4.2.0-alpha.0
- - @web3modal/wallet@4.2.0-alpha.0
-
-## 4.2.0-03e4f4a8.2
-
-### Patch Changes
-
-- fix: Issue with SIWE + Wagmi sign out. Fixes issue where signature verification fail resulted in empty open modal'
-
-- Updated dependencies []:
- - @web3modal/common@4.2.0-03e4f4a8.2
- - @web3modal/wallet@4.2.0-03e4f4a8.2
-
-## 4.2.0-448f7f4.1
-
-### Minor Changes
-
-- refactor: improvements to all features (siwe, send, swaps, ui and ux)
-
-### Patch Changes
-
-- Updated dependencies []:
- - @web3modal/common@4.2.0-448f7f4.1
- - @web3modal/wallet@4.2.0-448f7f4.1
-
-## 4.1.12-910a844.0
-
-### Patch Changes
-
-- refactor: sync theme with secure site
-
-- Updated dependencies []:
- - @web3modal/common@4.1.12-910a844.0
- - @web3modal/wallet@4.1.12-910a844.0
-
-## 4.1.11
-
-### Patch Changes
-
-- refactor: Solana exported helper methods and proram instruction improvements
-- refactor: email and smart account improvements
-- refactor: unit test CI check improvements
-- feat: convert
-
-- Updated dependencies []:
- - @web3modal/common@4.1.11
- - @web3modal/wallet@4.1.11
-
-## 4.1.10
-
-### Patch Changes
-
-- Fix activity list styling issue
-
-- Updated dependencies []:
- - @web3modal/common@4.1.10
- - @web3modal/wallet@4.1.10
-
-## 4.1.9
-
-### Patch Changes
-
-- Blockchain API fix
-
-- Updated dependencies []:
- - @web3modal/common@4.1.9
- - @web3modal/wallet@4.1.9
-
-## 4.1.8
-
-### Patch Changes
-
-- Hotfix for redundant tokenbalance calls
-
-- Updated dependencies []:
- - @web3modal/common@4.1.8
- - @web3modal/wallet@4.1.8
-
-## 4.1.7
-
-### Patch Changes
-
-- Hotfix for inccorect state of w3m-button when email is enabled
-
-- Updated dependencies []:
- - @web3modal/common@4.1.7
- - @web3modal/wallet@4.1.7
-
-## 4.1.6
-
-### Patch Changes
-
-- Fix modal default height. Fix ethers email connection lag. Fix ethers + rc relay disconnect issue. Adds new wui-components for secure site.
-
-- Updated dependencies []:
- - @web3modal/common@4.1.6
- - @web3modal/wallet@4.1.6
-
-## 4.1.6-a0733f5.0
-
-### Patch Changes
-
-- chore: canary release for siwe dependency
-
-- Updated dependencies []:
- - @web3modal/ethers@4.1.6-a0733f5.0
- - @web3modal/siwe@4.1.6-a0733f5.0
- - @web3modal/solana@4.1.6-a0733f5.0
- - @web3modal/wagmi@4.1.6-a0733f5.0
-
-## 4.1.5
-
-### Patch Changes
-
-- release: v4.1.5
-
-- Updated dependencies []:
- - @web3modal/common@4.1.5
- - @web3modal/wallet@4.1.5
-
-## 4.1.5-93c81127.0
-
-### Patch Changes
-
-- fix: polyfill process in wallet package
-
-- Updated dependencies []:
- - @web3modal/wallet@4.1.5-93c81127.0
- - @web3modal/common@4.1.5-93c81127.0
-
-## 4.1.4
-
-### Patch Changes
-
-- feat: wallet info hook
-
-- Updated dependencies []:
- - @web3modal/common@4.1.4
- - @web3modal/wallet@4.1.4
-
-## 4.1.3
-
-### Patch Changes
-
-- feat: wallet info hook
-
-- feat: reset version to 4.1.3
-
-- Updated dependencies []:
- - @web3modal/common@4.1.3
- - @web3modal/wallet@4.1.3
-
-## 4.1.3-5f2ae345.1
-
-### Patch Changes
-
-- canary: test imports
-
-- Updated dependencies []:
- - @web3modal/common@4.1.3-5f2ae345.1
- - @web3modal/wallet@4.1.3-5f2ae345.1
-
-## 4.1.3-8e039e.0
-
-### Patch Changes
-
-- feat: update optional dependencies
-
-- Updated dependencies []:
- - @web3modal/common@4.1.3-8e039e.0
- - @web3modal/wallet@4.1.3-8e039e.0
-
-## 4.1.2
-
-### Patch Changes
-
-- 4.1.2 release
-
-- Updated dependencies []:
- - @web3modal/common@4.1.2 - @web3modal/wallet@4.1.2
-
-## 4.2.0-4b5257b4.1
-
-### Minor Changes
-
-- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436) Thanks [@enesozturk](https://github.com/enesozturk)! - refactor: add missing extensions on imports
-
-- feat: export solana chains from the solana package
-
-- [#2052](https://github.com/WalletConnect/web3modal/pull/2052) [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07) Thanks [@enesozturk](https://github.com/enesozturk)! - chore: new solana canary release
-
-### Patch Changes
-
-- Updated dependencies [[`1b90376`](https://github.com/WalletConnect/web3modal/commit/1b903765a675f0f1b9ea0a44bcf84e2dad6b4436), [`729313f`](https://github.com/WalletConnect/web3modal/commit/729313fe9dfb402ca694cbd77f49cc61895e2d07)]:
- - @web3modal/wallet@4.2.0-4b5257b4.1
- - @web3modal/common@4.2.0-4b5257b4.1
-
-## 4.2.0-dbbd8c44.0
-
-### Minor Changes
-
-- refactor: add missing extensions on imports
-
-### Patch Changes
-
-- Updated dependencies []:
- - @web3modal/ui@4.2.0-dbbd8c44.0
- - @web3modal/common@4.2.0-dbbd8c44.0
-
-## 4.2.0-500a38.0
-
-### Minor Changes
-
-- feat: solana integration
-
-### Patch Changes
-
-- Updated dependencies []:
- - @web3modal/wallet@4.2.0-500a38.0
- - @web3modal/common@4.2.0-500a38.0
-
-## 4.1.1
-
-### Patch Changes
-
-- Fix siwe version
-
-- Updated dependencies []:
- - @web3modal/common@4.1.1
- - @web3modal/wallet@4.1.1
-
-## 4.1.0
-
-### Minor Changes
-
-- Email Stable release
-
-### Patch Changes
-
-- Updated dependencies []:
- - @web3modal/common@4.1.0
- - @web3modal/wallet@4.1.0
-
-## 4.0.13
-
-### Patch Changes
-
-- Fix secure site url
-
-- Updated dependencies []:
- - @web3modal/wallet@4.0.13
- - @web3modal/common@4.0.13
-
-## 4.0.12
-
-### Patch Changes
-
-- [#2014](https://github.com/WalletConnect/web3modal/pull/2014) [`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0) Thanks [@tomiir](https://github.com/tomiir)! - Smart Account RPC handler canary
-
-- Smart Account initialization and feature flag
-
-- Updated dependencies [[`95b35e1`](https://github.com/WalletConnect/web3modal/commit/95b35e1ebaf261a56a29cd9254d85b7c1430bfc0)]:
- - @web3modal/wallet@4.0.12
- - @web3modal/common@4.0.12
-
-## 4.0.12-0c59f84f.0
-
-### Patch Changes
-
-- Smart Account RPC handler canary
-
-- Updated dependencies []:
- - @web3modal/wallet@4.0.12-0c59f84f.0
- - @web3modal/common@4.0.12-0c59f84f.0
-
-## 4.0.11
-
-### Patch Changes
-
-- Analytics connection event improvements. Unsupported chain flag. Siwe package refactor. RPC improvements. UI improvements'
-
-- Updated dependencies []:
- - @web3modal/common@4.0.11
- - @web3modal/wallet@4.0.11
-
-## 4.0.10
-
-### Patch Changes
-
-- Add error state to wui-chip composite
-
-- Updated dependencies []:
- - @web3modal/common@4.0.10
- - @web3modal/wallet@4.0.10
-
-## 4.0.9
-
-### Patch Changes
-
-- Add all rpc methods + auto reject when modal closes
-
-- Updated dependencies []:
- - @web3modal/wallet@4.0.9
- - @web3modal/common@4.0.9
-
-## 4.0.8
-
-### Patch Changes
-
-- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber
-
-- Updated dependencies [[`c3366e7`](https://github.com/WalletConnect/web3modal/commit/c3366e7211dba2f5c6d3377c9d9a77da5a52c0d8)]:
- - @web3modal/wallet@4.0.8
- - @web3modal/common@4.0.8
-
-## 4.0.8-f1845392.0
-
-### Patch Changes
-
-- [#1954](https://github.com/WalletConnect/web3modal/pull/1954) [`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54) Thanks [@tomiir](https://github.com/tomiir)! - Add support for eth_getBlockByNumber
-
-- Updated dependencies [[`4755109`](https://github.com/WalletConnect/web3modal/commit/475510962a92ea9f4388db1d08c979d99da18e54)]:
- - @web3modal/wallet@4.0.8-f1845392.0
- - @web3modal/common@4.0.8-f1845392.0
-
-## 4.0.7
-
-### Patch Changes
-
-- Add eth_getBalance to list of allowed methods
-
-- Updated dependencies []:
- - @web3modal/wallet@4.0.7
- - @web3modal/common@4.0.7
-
-## 4.0.6
-
-### Patch Changes
-
-- Email stability fixes
-
-- Updated dependencies []:
- - @web3modal/common@4.0.6
- - @web3modal/wallet@4.0.6
-
-## 4.0.5
-
-### Patch Changes
-
-- [#1917](https://github.com/WalletConnect/web3modal/pull/1917) [`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97) Thanks [@tomiir](https://github.com/tomiir)! - Replaces public url with blockchain api for supported networks
-
-- Updated dependencies [[`f79566c`](https://github.com/WalletConnect/web3modal/commit/f79566ca5119fa12795dd49fce01aea8e1a05d97)]:
- - @web3modal/common@4.0.5
- - @web3modal/wallet@4.0.5
-
-## 4.0.4
-
-### Patch Changes
-
-- Fix theming issue for email
-
-- Updated dependencies []:
- - @web3modal/common@4.0.4
- - @web3modal/wallet@4.0.4
-
-## 4.0.3
-
-### Patch Changes
-
-- Tag email beta, Sync Theme For Secure Wallet, Use manual version in constants
-
-- Updated dependencies []:
- - @web3modal/common@4.0.3
- - @web3modal/wallet@4.0.3
-
-## 4.0.2
-
-### Patch Changes
-
-- [#1899](https://github.com/WalletConnect/web3modal/pull/1899) [`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66) Thanks [@xzilja](https://github.com/xzilja)! - Reverted change that removed email update flow from account view
-
-- Updated dependencies [[`42e97a0`](https://github.com/WalletConnect/web3modal/commit/42e97a04eb60090a821019ae80d62acacf35fc66)]:
- - @web3modal/common@4.0.2
- - @web3modal/wallet@4.0.2
-
-## 4.0.1
-
-### Patch Changes
+- [#28](https://github.com/WalletConnect/web3modal/pull/28) [`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797) Thanks [@tomiir](https://github.com/tomiir)! - Package setup. Reset Changelogs
-- [#1879](https://github.com/WalletConnect/web3modal/pull/1879) [`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640) Thanks [@svenvoskamp](https://github.com/svenvoskamp)! - Fix various issues on ethers/ethers5 package
+- [#12](https://github.com/WalletConnect/web3modal/pull/12) [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a) Thanks [@tomiir](https://github.com/tomiir)! - Adds test vitest.workspace file
-- Updated dependencies [[`e3fa353`](https://github.com/WalletConnect/web3modal/commit/e3fa35396e3d2b1153d12bfaf92738bc67b46640)]:
- - @web3modal/common@4.0.1
- - @web3modal/wallet@4.0.1
+- Updated dependencies [[`91d0296`](https://github.com/WalletConnect/web3modal/commit/91d02963cbe3c2d06b74801b519ce23dd30ff797), [`51eff9f`](https://github.com/WalletConnect/web3modal/commit/51eff9f82c296b0ba2b5ab33af92a1fa54a77f7a)]:
+ - @reown/appkit-common@0.0.3
+ - @reown/appkit-wallet@0.0.3
diff --git a/packages/core/exports/index.ts b/packages/core/exports/index.ts
new file mode 100644
index 0000000000..c84bc61761
--- /dev/null
+++ b/packages/core/exports/index.ts
@@ -0,0 +1,81 @@
+// -- Controllers -------------------------------------------------------------
+export { ModalController } from '../src/controllers/ModalController.js'
+export type {
+ ModalControllerArguments,
+ ModalControllerState
+} from '../src/controllers/ModalController.js'
+
+export { RouterController } from '../src/controllers/RouterController.js'
+export type { RouterControllerState } from '../src/controllers/RouterController.js'
+
+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,
+ NetworkControllerState
+} from '../src/controllers/NetworkController.js'
+
+export { OnRampController } from '../src/controllers/OnRampController.js'
+export type { OnRampControllerState, OnRampProvider } from '../src/controllers/OnRampController.js'
+
+export { ConnectionController } from '../src/controllers/ConnectionController.js'
+export type {
+ ConnectionControllerClient,
+ ConnectionControllerState
+} from '../src/controllers/ConnectionController.js'
+
+export { ConnectorController } from '../src/controllers/ConnectorController.js'
+export type { ConnectorControllerState } from '../src/controllers/ConnectorController.js'
+
+export { SnackController } from '../src/controllers/SnackController.js'
+export type { SnackControllerState } from '../src/controllers/SnackController.js'
+
+export { ApiController } from '../src/controllers/ApiController.js'
+export type { ApiControllerState } from '../src/controllers/ApiController.js'
+
+export { AssetController } from '../src/controllers/AssetController.js'
+export type { AssetControllerState } from '../src/controllers/AssetController.js'
+
+export { ThemeController } from '../src/controllers/ThemeController.js'
+export type { ThemeControllerState } from '../src/controllers/ThemeController.js'
+
+export { OptionsController } from '../src/controllers/OptionsController.js'
+export type { OptionsControllerStatePublic as OptionsControllerState } from '../src/controllers/OptionsController.js'
+
+export { BlockchainApiController } from '../src/controllers/BlockchainApiController.js'
+
+export { PublicStateController } from '../src/controllers/PublicStateController.js'
+export type { PublicStateControllerState } from '../src/controllers/PublicStateController.js'
+
+export { EventsController } from '../src/controllers/EventsController.js'
+export type { EventsControllerState } from '../src/controllers/EventsController.js'
+
+export { TransactionsController } from '../src/controllers/TransactionsController.js'
+export type { TransactionsControllerState } from '../src/controllers/TransactionsController.js'
+
+export { SwapController } from '../src/controllers/SwapController.js'
+export type { SwapControllerState, SwapInputTarget } from '../src/controllers/SwapController.js'
+
+export { SendController } from '../src/controllers/SendController.js'
+export type { SendControllerState } from '../src/controllers/SendController.js'
+
+export { TooltipController } from '../src/controllers/TooltipController.js'
+export type { TooltipControllerState } from '../src/controllers/TooltipController.js'
+
+export { EnsController } from '../src/controllers/EnsController.js'
+export type { EnsControllerState } from '../src/controllers/EnsController.js'
+
+// -- Utils -------------------------------------------------------------------
+export { AssetUtil } from '../src/utils/AssetUtil.js'
+export { ConstantsUtil } from '../src/utils/ConstantsUtil.js'
+export { CoreHelperUtil } from '../src/utils/CoreHelperUtil.js'
+export { StorageUtil } from '../src/utils/StorageUtil.js'
+export { RouterUtil } from '../src/utils/RouterUtil.js'
+export { OptionsUtil } from '../src/utils/OptionsUtil.js'
+
+export type * from '../src/utils/TypeUtil.js'
diff --git a/packages/core/exports/react.ts b/packages/core/exports/react.ts
new file mode 100644
index 0000000000..f296fe543d
--- /dev/null
+++ b/packages/core/exports/react.ts
@@ -0,0 +1,24 @@
+import { useSnapshot } from 'valtio'
+import { AccountController } from '../src/controllers/AccountController.js'
+import { CoreHelperUtil } from '../src/utils/CoreHelperUtil.js'
+import { ChainController } from '../src/controllers/ChainController.js'
+
+// -- Hooks ------------------------------------------------------------
+export function useAppKitNetwork() {
+ const { activeCaipNetwork } = useSnapshot(ChainController.state)
+
+ return {
+ caipNetwork: activeCaipNetwork,
+ chainId: activeCaipNetwork?.chainId
+ }
+}
+export function useAppKitAccount() {
+ const { status } = useSnapshot(AccountController.state)
+ const { activeCaipAddress } = useSnapshot(ChainController.state)
+
+ return {
+ address: CoreHelperUtil.getPlainAddress(activeCaipAddress),
+ isConnected: Boolean(activeCaipAddress),
+ status
+ }
+}
diff --git a/packages/core/index.ts b/packages/core/index.ts
deleted file mode 100644
index 81d9c0671b..0000000000
--- a/packages/core/index.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-// -- Controllers -------------------------------------------------------------
-export { ModalController } from './src/controllers/ModalController.js'
-export type {
- ModalControllerArguments,
- ModalControllerState
-} from './src/controllers/ModalController.js'
-
-export { RouterController } from './src/controllers/RouterController.js'
-export type { RouterControllerState } from './src/controllers/RouterController.js'
-
-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,
- NetworkControllerState
-} from './src/controllers/NetworkController.js'
-
-export { OnRampController } from './src/controllers/OnRampController.js'
-export type { OnRampControllerState, OnRampProvider } from './src/controllers/OnRampController.js'
-
-export { ConnectionController } from './src/controllers/ConnectionController.js'
-export type {
- ConnectionControllerClient,
- ConnectionControllerState
-} from './src/controllers/ConnectionController.js'
-
-export { ConnectorController } from './src/controllers/ConnectorController.js'
-export type { ConnectorControllerState } from './src/controllers/ConnectorController.js'
-
-export { SnackController } from './src/controllers/SnackController.js'
-export type { SnackControllerState } from './src/controllers/SnackController.js'
-
-export { ApiController } from './src/controllers/ApiController.js'
-export type { ApiControllerState } from './src/controllers/ApiController.js'
-
-export { AssetController } from './src/controllers/AssetController.js'
-export type { AssetControllerState } from './src/controllers/AssetController.js'
-
-export { ThemeController } from './src/controllers/ThemeController.js'
-export type { ThemeControllerState } from './src/controllers/ThemeController.js'
-
-export { OptionsController } from './src/controllers/OptionsController.js'
-export type { OptionsControllerState } from './src/controllers/OptionsController.js'
-
-export { BlockchainApiController } from './src/controllers/BlockchainApiController.js'
-
-export { PublicStateController } from './src/controllers/PublicStateController.js'
-export type { PublicStateControllerState } from './src/controllers/PublicStateController.js'
-
-export { EventsController } from './src/controllers/EventsController.js'
-export type { EventsControllerState } from './src/controllers/EventsController.js'
-
-export { TransactionsController } from './src/controllers/TransactionsController.js'
-export type { TransactionsControllerState } from './src/controllers/TransactionsController.js'
-
-export { SwapController } from './src/controllers/SwapController.js'
-export type { SwapControllerState, SwapInputTarget } from './src/controllers/SwapController.js'
-
-export { SendController } from './src/controllers/SendController.js'
-export type { SendControllerState } from './src/controllers/SendController.js'
-
-export { TooltipController } from './src/controllers/TooltipController.js'
-export type { TooltipControllerState } from './src/controllers/TooltipController.js'
-
-export { EnsController } from './src/controllers/EnsController.js'
-export type { EnsControllerState } from './src/controllers/EnsController.js'
-
-// -- Utils -------------------------------------------------------------------
-export { AssetUtil } from './src/utils/AssetUtil.js'
-export { ConstantsUtil } from './src/utils/ConstantsUtil.js'
-export { CoreHelperUtil } from './src/utils/CoreHelperUtil.js'
-export { StorageUtil } from './src/utils/StorageUtil.js'
-export { RouterUtil } from './src/utils/RouterUtil.js'
-
-export type * from './src/utils/TypeUtil.js'
diff --git a/packages/core/package.json b/packages/core/package.json
index ad23e20a50..319dff5976 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,9 +1,9 @@
{
- "name": "@web3modal/core",
- "version": "5.1.8",
+ "name": "@reown/appkit-core",
+ "version": "1.0.1",
"type": "module",
- "main": "./dist/esm/index.js",
- "types": "./dist/types/index.d.ts",
+ "main": "./dist/esm/exports/index.js",
+ "types": "./dist/types/exports/index.d.ts",
"files": [
"dist",
"!tsconfig.tsbuildinfo"
@@ -16,33 +16,37 @@
"test": "vitest run --dir tests --coverage.enabled=true --coverage.reporter=json --coverage.reporter=json-summary --coverage.reportOnFailure=true",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
+ "exports": {
+ ".": {
+ "types": "./dist/types/exports/index.d.ts",
+ "import": "./dist/esm/exports/index.js",
+ "default": "./dist/esm/exports/index.js"
+ },
+ "./react": {
+ "types": "./dist/types/exports/react.d.ts",
+ "import": "./dist/esm/exports/react.js",
+ "default": "./dist/esm/exports/react.js"
+ }
+ },
"dependencies": {
- "@web3modal/common": "workspace:*",
- "@web3modal/wallet": "workspace:*",
+ "@reown/appkit-common": "workspace:*",
+ "@reown/appkit-wallet": "workspace:*",
+ "@walletconnect/universal-provider": "2.16.1",
"valtio": "1.11.2"
},
"devDependencies": {
- "vitest": "2.0.3",
+ "vitest": "2.0.5",
"@vitest/coverage-v8": "2.0.5",
"viem": "2.21.4"
},
- "keywords": [
- "web3",
- "crypto",
- "ethereum",
- "web3modal",
- "walletconnect",
- "lit",
- "webcomponents"
- ],
- "author": "WalletConnect ",
+ "author": "Reown (https://reown.com)",
"license": "Apache-2.0",
- "homepage": "https://github.com/web3modal/web3modal",
+ "homepage": "https://github.com/WalletConnect/web3modal",
"repository": {
"type": "git",
- "url": "git+https://github.com/web3modal/web3modal.git"
+ "url": "git+https://github.com/WalletConnect/web3modal.git"
},
"bugs": {
- "url": "https://github.com/web3modal/web3modal/issues"
+ "url": "https://github.com/WalletConnect/web3modal/issues"
}
}
diff --git a/packages/core/readme.md b/packages/core/readme.md
index a2b8551feb..a0afe8b4d9 100644
--- a/packages/core/readme.md
+++ b/packages/core/readme.md
@@ -1,10 +1,10 @@
-#### ๐ [Documentation](https://docs.walletconnect.com/2.0/web3modal/about)
+#### ๐ [Documentation](https://docs.reown.com/2.0/appkit/about)
-#### ๐ [Website](https://web3modal.com)
+#### ๐ [Website](https://reown.com/appkit)
-# Web3Modal
+# AppKit
-Your on-ramp to web3 multichain. Web3Modal is a versatile library that makes it super easy to connect users with your Dapp and start interacting with the blockchain.
+Your on-ramp to web3 multichain. AppKit is a versatile library that makes it super easy to connect users with your Dapp and start interacting with the blockchain.
diff --git a/packages/core/src/controllers/AccountController.ts b/packages/core/src/controllers/AccountController.ts
index a13299bc9c..4385ba89de 100644
--- a/packages/core/src/controllers/AccountController.ts
+++ b/packages/core/src/controllers/AccountController.ts
@@ -1,20 +1,21 @@
import { CoreHelperUtil } from '../utils/CoreHelperUtil.js'
import type {
AccountType,
- CaipAddress,
+ CombinedProvider,
ConnectedWalletInfo,
+ Provider,
SocialProvider
} from '../utils/TypeUtil.js'
-import type { Balance } from '@web3modal/common'
+import type { CaipAddress, ChainNamespace } from '@reown/appkit-common'
+import type { Balance } from '@reown/appkit-common'
import { BlockchainApiController } from './BlockchainApiController.js'
import { SnackController } from './SnackController.js'
import { SwapController } from './SwapController.js'
import { SwapApiUtil } from '../utils/SwapApiUtil.js'
-import type { W3mFrameTypes } from '@web3modal/wallet'
+import type { W3mFrameTypes } from '@reown/appkit-wallet'
import { ChainController } from './ChainController.js'
-import type { Chain } from '@web3modal/common'
-import { NetworkController } from './NetworkController.js'
import { proxy, ref } from 'valtio/vanilla'
+import type UniversalProvider from '@walletconnect/universal-provider'
// -- Types --------------------------------------------- //
export interface AccountControllerState {
@@ -37,6 +38,9 @@ export interface AccountControllerState {
preferredAccountType?: W3mFrameTypes.AccountType
socialWindow?: Window
farcasterUrl?: string
+ provider?: UniversalProvider | Provider | CombinedProvider
+ status?: 'reconnecting' | 'connected' | 'disconnected' | 'connecting'
+ siweStatus?: 'uninitialized' | 'ready' | 'loading' | 'success' | 'rejected' | 'error'
}
// -- State --------------------------------------------- //
@@ -73,61 +77,87 @@ export const AccountController = {
subscribeKey(
property: K,
- callback: (val: AccountControllerState[K]) => void
+ callback: (val: AccountControllerState[K]) => void,
+ chain?: ChainNamespace
) {
let prev: AccountControllerState[K] | undefined = undefined
- return ChainController.subscribeChainProp('accountState', accountState => {
- if (accountState) {
- const nextValue = accountState[property]
- if (prev !== nextValue) {
- prev = nextValue
- callback(nextValue)
+ return ChainController.subscribeChainProp(
+ 'accountState',
+ accountState => {
+ if (accountState) {
+ const nextValue = accountState[property]
+ if (prev !== nextValue) {
+ prev = nextValue
+ callback(nextValue)
+ }
}
- }
- })
+ },
+ chain
+ )
},
- setIsConnected(isConnected: AccountControllerState['isConnected'], chain: Chain | undefined) {
+ setIsConnected(
+ isConnected: AccountControllerState['isConnected'],
+ chain: ChainNamespace | undefined
+ ) {
ChainController.setAccountProp('isConnected', isConnected, chain)
},
- getChainIsConnected(chain: Chain) {
+ setStatus(status: AccountControllerState['status'], chain: ChainNamespace | undefined) {
+ ChainController.setAccountProp('status', status, chain)
+ },
+
+ getChainIsConnected(chain: ChainNamespace | undefined) {
return ChainController.getAccountProp('isConnected', chain)
},
- setCaipAddress(caipAddress: AccountControllerState['caipAddress'], chain: Chain | undefined) {
- const newCaipAddress = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined
+ getCaipAddress(chain: ChainNamespace | undefined) {
+ return ChainController.getAccountProp('caipAddress', chain)
+ },
+
+ setProvider(provider: AccountControllerState['provider'], chain: ChainNamespace | undefined) {
+ if (provider) {
+ ChainController.setAccountProp('provider', provider, chain)
+ }
+ },
+ setCaipAddress(
+ caipAddress: AccountControllerState['caipAddress'],
+ chain: ChainNamespace | undefined
+ ) {
+ const newAddress = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined
+
+ ChainController.state.activeCaipAddress = caipAddress
ChainController.setAccountProp('caipAddress', caipAddress, chain)
- ChainController.setAccountProp('address', newCaipAddress, chain)
+ ChainController.setAccountProp('address', newAddress, chain)
},
setBalance(
balance: AccountControllerState['balance'],
balanceSymbol: AccountControllerState['balanceSymbol'],
- chain: Chain
+ chain: ChainNamespace
) {
ChainController.setAccountProp('balance', balance, chain)
ChainController.setAccountProp('balanceSymbol', balanceSymbol, chain)
},
- setProfileName(profileName: AccountControllerState['profileName'], chain: Chain | undefined) {
+ setProfileName(profileName: AccountControllerState['profileName'], chain: ChainNamespace) {
ChainController.setAccountProp('profileName', profileName, chain)
},
- setProfileImage(profileImage: AccountControllerState['profileImage'], chain: Chain | undefined) {
+ setProfileImage(profileImage: AccountControllerState['profileImage'], chain?: ChainNamespace) {
ChainController.setAccountProp('profileImage', profileImage, chain)
},
setAddressExplorerUrl(
explorerUrl: AccountControllerState['addressExplorerUrl'],
- chain: Chain | undefined
+ chain: ChainNamespace | undefined
) {
ChainController.setAccountProp('addressExplorerUrl', explorerUrl, chain)
},
- setSmartAccountDeployed(isDeployed: boolean, chain: Chain | undefined) {
+ setSmartAccountDeployed(isDeployed: boolean, chain: ChainNamespace | undefined) {
ChainController.setAccountProp('smartAccountDeployed', isDeployed, chain)
},
@@ -135,70 +165,80 @@ export const AccountController = {
ChainController.setAccountProp('currentTab', currentTab, ChainController.state.activeChain)
},
- setTokenBalance(tokenBalance: AccountControllerState['tokenBalance'], chain: Chain | undefined) {
+ setTokenBalance(
+ tokenBalance: AccountControllerState['tokenBalance'],
+ chain: ChainNamespace | undefined
+ ) {
if (tokenBalance) {
ChainController.setAccountProp('tokenBalance', tokenBalance, chain)
}
},
- setShouldUpdateToAddress(address: string, chain: Chain | undefined) {
+ setShouldUpdateToAddress(address: string, chain: ChainNamespace | undefined) {
ChainController.setAccountProp('shouldUpdateToAddress', address, chain)
},
- setAllAccounts(accounts: AccountType[], chain: Chain | undefined) {
+ setAllAccounts(accounts: AccountType[], chain: ChainNamespace | undefined) {
ChainController.setAccountProp('allAccounts', accounts, chain)
},
- addAddressLabel(address: string, label: string, chain: Chain | undefined) {
+ addAddressLabel(address: string, label: string, chain: ChainNamespace | undefined) {
const map = ChainController.getAccountProp('addressLabels', chain) || new Map()
map.set(address, label)
- ChainController.setAccountProp('addressLabels', map, ChainController.state.activeChain)
+ ChainController.setAccountProp('addressLabels', map, chain)
},
- removeAddressLabel(address: string, chain: Chain | undefined) {
+ removeAddressLabel(address: string, chain: ChainNamespace | undefined) {
const map = ChainController.getAccountProp('addressLabels', chain) || new Map()
map.delete(address)
- ChainController.setAccountProp('addressLabels', map, ChainController.state.activeChain)
+ ChainController.setAccountProp('addressLabels', map, chain)
},
setConnectedWalletInfo(
connectedWalletInfo: AccountControllerState['connectedWalletInfo'],
- chain: Chain
+ chain: ChainNamespace
) {
- ChainController.setAccountProp('connectedWalletInfo', connectedWalletInfo, chain)
+ ChainController.setAccountProp('connectedWalletInfo', connectedWalletInfo, chain, false)
},
setPreferredAccountType(
preferredAccountType: AccountControllerState['preferredAccountType'],
- chain: Chain
+ chain: ChainNamespace
) {
ChainController.setAccountProp('preferredAccountType', preferredAccountType, chain)
},
setSocialProvider(
socialProvider: AccountControllerState['socialProvider'],
- chain: Chain | undefined
+ chain: ChainNamespace | undefined
) {
if (socialProvider) {
ChainController.setAccountProp('socialProvider', socialProvider, chain)
}
},
- setSocialWindow(socialWindow: AccountControllerState['socialWindow'], chain: Chain | undefined) {
+ setSocialWindow(
+ socialWindow: AccountControllerState['socialWindow'],
+ chain: ChainNamespace | undefined
+ ) {
if (socialWindow) {
ChainController.setAccountProp('socialWindow', ref(socialWindow), chain)
}
},
- setFarcasterUrl(farcasterUrl: AccountControllerState['farcasterUrl'], chain: Chain | undefined) {
+ setFarcasterUrl(
+ farcasterUrl: AccountControllerState['farcasterUrl'],
+ chain: ChainNamespace | undefined
+ ) {
if (farcasterUrl) {
ChainController.setAccountProp('farcasterUrl', farcasterUrl, chain)
}
},
async fetchTokenBalance() {
- const chainId = NetworkController.state.caipNetwork?.id
- const chain = NetworkController.state.caipNetwork?.chain
- const address = AccountController.state.address
+ const chainId = ChainController.state.activeCaipNetwork?.id
+ const chain = ChainController.state.activeCaipNetwork?.chainNamespace
+ const caipAddress = ChainController.state.activeCaipAddress
+ const address = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined
try {
if (address && chainId && chain) {
@@ -216,7 +256,11 @@ export const AccountController = {
}
},
- resetAccount(chain: Chain) {
+ resetAccount(chain: ChainNamespace) {
ChainController.resetAccount(chain)
+ },
+
+ setSiweStatus(status: AccountControllerState['siweStatus']) {
+ ChainController.setAccountProp('siweStatus', status, ChainController.state.activeChain)
}
}
diff --git a/packages/core/src/controllers/ApiController.ts b/packages/core/src/controllers/ApiController.ts
index 4ac2a17156..d57e69f432 100644
--- a/packages/core/src/controllers/ApiController.ts
+++ b/packages/core/src/controllers/ApiController.ts
@@ -13,6 +13,7 @@ import { AssetController } from './AssetController.js'
import { ConnectorController } from './ConnectorController.js'
import { NetworkController } from './NetworkController.js'
import { OptionsController } from './OptionsController.js'
+import { ChainController } from './ChainController.js'
// -- Helpers ------------------------------------------- //
const baseUrl = CoreHelperUtil.getApiUrl()
@@ -61,8 +62,8 @@ export const ApiController = {
return {
'x-project-id': projectId,
- 'x-sdk-type': sdkType,
- 'x-sdk-version': sdkVersion
+ 'x-sdk-type': sdkType || 'appkit',
+ 'x-sdk-version': sdkVersion || 'html-wagmi-4.2.2'
}
},
@@ -151,29 +152,33 @@ export const ApiController = {
},
async fetchRecommendedWallets() {
- const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state
- const exclude = [...(excludeWalletIds ?? []), ...(featuredWalletIds ?? [])].filter(Boolean)
- const { data, count } = await api.get({
- path: '/getWallets',
- headers: ApiController._getApiHeaders(),
- params: {
- page: '1',
- chains: NetworkController.state.caipNetwork?.id,
- entries: recommendedEntries,
- include: includeWalletIds?.join(','),
- exclude: exclude?.join(',')
- }
- })
- const recent = StorageUtil.getRecentWallets()
- const recommendedImages = data.map(d => d.image_id).filter(Boolean)
- const recentImages = recent.map(r => r.image_id).filter(Boolean)
- await Promise.allSettled(
- ([...recommendedImages, ...recentImages] as string[]).map(id =>
- ApiController._fetchWalletImage(id)
+ try {
+ const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state
+ const exclude = [...(excludeWalletIds ?? []), ...(featuredWalletIds ?? [])].filter(Boolean)
+ const { data, count } = await api.get({
+ path: '/getWallets',
+ headers: ApiController._getApiHeaders(),
+ params: {
+ page: '1',
+ chains: ChainController.state.activeCaipNetwork?.id,
+ entries: recommendedEntries,
+ include: includeWalletIds?.join(','),
+ exclude: exclude?.join(',')
+ }
+ })
+ const recent = StorageUtil.getRecentWallets()
+ const recommendedImages = data.map(d => d.image_id).filter(Boolean)
+ const recentImages = recent.map(r => r.image_id).filter(Boolean)
+ await Promise.allSettled(
+ ([...recommendedImages, ...recentImages] as string[]).map(id =>
+ ApiController._fetchWalletImage(id)
+ )
)
- )
- state.recommended = data
- state.count = count ?? 0
+ state.recommended = data
+ state.count = count ?? 0
+ } catch {
+ // Catch silently
+ }
},
async fetchWallets({ page }: Pick) {
@@ -190,7 +195,7 @@ export const ApiController = {
params: {
page: String(page),
entries,
- chains: NetworkController.state.caipNetwork?.id,
+ chains: ChainController.state.activeCaipNetwork?.id,
include: includeWalletIds?.join(','),
exclude: exclude.join(',')
}
@@ -216,7 +221,7 @@ export const ApiController = {
params: {
page: '1',
entries: String(ids.length),
- chains: NetworkController.state.caipNetwork?.id,
+ chains: ChainController.state.activeCaipNetwork?.id,
include: ids?.join(',')
}
})
@@ -240,7 +245,7 @@ export const ApiController = {
page: '1',
entries: '100',
search: search?.trim(),
- chains: NetworkController.state.caipNetwork?.id,
+ chains: ChainController.state.activeCaipNetwork?.id,
include: includeWalletIds?.join(','),
exclude: excludeWalletIds?.join(',')
}
@@ -267,7 +272,7 @@ export const ApiController = {
ApiController.fetchNetworkImages(),
ApiController.fetchConnectorImages()
]
- if (OptionsController.state.enableAnalytics === undefined) {
+ if (OptionsController.state.features?.analytics) {
promises.push(ApiController.fetchAnalyticsConfig())
}
state.prefetchPromise = Promise.race([Promise.allSettled(promises)])
@@ -278,6 +283,6 @@ export const ApiController = {
path: '/getAnalyticsConfig',
headers: ApiController._getApiHeaders()
})
- OptionsController.setEnableAnalytics(isAnalyticsEnabled)
+ OptionsController.setFeatures({ analytics: isAnalyticsEnabled })
}
}
diff --git a/packages/core/src/controllers/BlockchainApiController.ts b/packages/core/src/controllers/BlockchainApiController.ts
index ebb3cd062d..e6bba66457 100644
--- a/packages/core/src/controllers/BlockchainApiController.ts
+++ b/packages/core/src/controllers/BlockchainApiController.ts
@@ -1,7 +1,6 @@
import { ConstantsUtil } from '../utils/ConstantsUtil.js'
import { CoreHelperUtil } from '../utils/CoreHelperUtil.js'
import { FetchUtil } from '../utils/FetchUtil.js'
-import { ConstantsUtil as CommonConstantsUtil } from '@web3modal/common'
import type {
BlockchainApiTransactionsRequest,
BlockchainApiTransactionsResponse,
@@ -34,6 +33,7 @@ import type {
import { OptionsController } from './OptionsController.js'
import { proxy } from 'valtio/vanilla'
import { AccountController } from './AccountController.js'
+import { ChainController } from './ChainController.js'
const DEFAULT_OPTIONS = {
purchaseCurrencies: [
@@ -132,7 +132,9 @@ export const BlockchainApiController = {
path: `/v1/identity/${address}`,
params: {
projectId: OptionsController.state.projectId,
- sender: AccountController.state.address
+ sender: ChainController.state.activeCaipAddress
+ ? CoreHelperUtil.getPlainAddress(ChainController.state.activeCaipAddress)
+ : undefined
}
})
},
@@ -220,7 +222,7 @@ export const BlockchainApiController = {
headers: {
'Content-Type': 'application/json',
'x-sdk-type': sdkType,
- 'x-sdk-version': sdkVersion
+ 'x-sdk-version': sdkVersion || 'html-wagmi-4.2.2'
}
})
},
@@ -233,7 +235,7 @@ export const BlockchainApiController = {
headers: {
'Content-Type': 'application/json',
'x-sdk-type': sdkType,
- 'x-sdk-version': sdkVersion
+ 'x-sdk-version': sdkVersion || 'html-wagmi-4.2.2'
},
params: {
projectId,
@@ -280,7 +282,7 @@ export const BlockchainApiController = {
headers: {
'Content-Type': 'application/json',
'x-sdk-type': sdkType,
- 'x-sdk-version': sdkVersion
+ 'x-sdk-version': sdkVersion || 'html-wagmi-4.2.2'
},
params: {
projectId,
@@ -298,7 +300,7 @@ export const BlockchainApiController = {
path: `/v1/account/${address}/balance`,
headers: {
'x-sdk-type': sdkType,
- 'x-sdk-version': sdkVersion
+ 'x-sdk-version': sdkVersion || 'html-wagmi-4.2.2'
},
params: {
currency: 'usd',
@@ -311,7 +313,7 @@ export const BlockchainApiController = {
async lookupEnsName(name: string) {
return state.api.get({
- path: `/v1/profile/account/${name}${CommonConstantsUtil.WC_NAME_SUFFIX}`,
+ path: `/v1/profile/account/${name}`,
params: {
projectId: OptionsController.state.projectId,
apiVersion: '2'
diff --git a/packages/core/src/controllers/ChainController.ts b/packages/core/src/controllers/ChainController.ts
index f45ac18441..a344f7e241 100644
--- a/packages/core/src/controllers/ChainController.ts
+++ b/packages/core/src/controllers/ChainController.ts
@@ -1,25 +1,39 @@
import { proxyMap, subscribeKey as subKey } from 'valtio/vanilla/utils'
import { proxy, ref, subscribe as sub } from 'valtio/vanilla'
-import type { CaipNetwork, ChainAdapter, Connector } from '../utils/TypeUtil.js'
+import type { 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'
+import {
+ SafeLocalStorage,
+ SafeLocalStorageKeys,
+ type CaipAddress,
+ type CaipNetwork,
+ type ChainNamespace
+} from '@reown/appkit-common'
// -- Types --------------------------------------------- //
export interface ChainControllerState {
- activeChain: Chain | undefined
+ activeChain: ChainNamespace | undefined
+ activeCaipAddress: CaipAddress | undefined
activeCaipNetwork?: CaipNetwork
- chains: Map
+ chains: Map
activeConnector?: Connector
+ universalAdapter: Pick
+ noAdapters: boolean
}
type ChainControllerStateKey = keyof ChainControllerState
type ChainsInitializerAdapter = Pick<
ChainAdapter,
- 'connectionControllerClient' | 'networkControllerClient' | 'chain' | 'defaultChain'
+ | 'connectionControllerClient'
+ | 'networkControllerClient'
+ | 'defaultNetwork'
+ | 'chainNamespace'
+ | 'adapterType'
+ | 'caipNetworks'
>
// -- Constants ----------------------------------------- //
@@ -40,9 +54,15 @@ const networkState: NetworkControllerState = {
// -- State --------------------------------------------- //
const state = proxy({
- chains: proxyMap(),
+ chains: proxyMap(),
+ activeCaipAddress: undefined,
activeChain: undefined,
- activeCaipNetwork: undefined
+ activeCaipNetwork: undefined,
+ noAdapters: false,
+ universalAdapter: {
+ networkControllerClient: undefined,
+ connectionControllerClient: undefined
+ }
})
// -- Controller ---------------------------------------- //
@@ -56,30 +76,15 @@ export const ChainController = {
return subKey(state, key, callback)
},
- subscribeChain(callback: (value: ChainAdapter | undefined) => void) {
- let prev: ChainAdapter | undefined = undefined
-
- return sub(state.chains, () => {
- const activeChain = state.activeChain
-
- if (activeChain) {
- const nextValue = state.chains.get(activeChain)
- if (!prev || prev !== nextValue) {
- prev = nextValue
- callback(nextValue)
- }
- }
- })
- },
-
subscribeChainProp(
property: K,
- callback: (value: ChainAdapter[K] | undefined) => void
+ callback: (value: ChainAdapter[K] | undefined) => void,
+ chain?: ChainNamespace
) {
let prev: ChainAdapter[K] | undefined = undefined
return sub(state.chains, () => {
- const activeChain = state.activeChain
+ const activeChain = chain || state.activeChain
if (activeChain) {
const nextValue = state.chains.get(activeChain)?.[property]
@@ -94,27 +99,73 @@ export const ChainController = {
initialize(adapters: ChainsInitializerAdapter[]) {
const adapterToActivate = adapters?.[0]
- if (!adapterToActivate) {
- throw new Error('Adapter is required to initialize ChainController')
+ if (adapters?.length === 0) {
+ state.noAdapters = true
}
- state.activeChain = adapterToActivate.chain
- PublicStateController.set({ activeChain: adapterToActivate.chain })
- this.setActiveCaipNetwork(adapterToActivate.defaultChain)
+ if (!state.noAdapters) {
+ state.activeChain = adapterToActivate?.chainNamespace
+ PublicStateController.set({ activeChain: adapterToActivate?.chainNamespace })
+ this.setActiveCaipNetwork(adapterToActivate?.defaultNetwork)
+
+ adapters.forEach((adapter: ChainsInitializerAdapter) => {
+ state.chains.set(adapter.chainNamespace, {
+ chainNamespace: adapter.chainNamespace,
+ connectionControllerClient: adapter.connectionControllerClient,
+ networkControllerClient: adapter.networkControllerClient,
+ adapterType: adapter.adapterType,
+ accountState,
+ networkState,
+ caipNetworks: adapter.caipNetworks
+ })
+ })
+ }
+ },
- adapters.forEach((adapter: ChainsInitializerAdapter) => {
- state.chains.set(adapter.chain, {
- chain: adapter.chain,
- connectionControllerClient: adapter.connectionControllerClient,
- networkControllerClient: adapter.networkControllerClient,
+ initializeUniversalAdapter(
+ adapter: ChainsInitializerAdapter,
+ adapters: ChainsInitializerAdapter[]
+ ) {
+ state.universalAdapter = adapter
+
+ if (adapters.length === 0) {
+ const storedCaipNetwork = SafeLocalStorage.getItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK)
+
+ if (storedCaipNetwork) {
+ try {
+ const parsedCaipNetwork = JSON.parse(storedCaipNetwork) as CaipNetwork
+ if (parsedCaipNetwork) {
+ state.activeChain = parsedCaipNetwork.chainNamespace
+ this.setActiveCaipNetwork(parsedCaipNetwork)
+ }
+ } catch (error) {
+ console.warn('>>> Error setting active caip network', error)
+ }
+ } else {
+ state.activeChain =
+ adapter?.defaultNetwork?.chainNamespace ?? adapter.caipNetworks[0]?.chainNamespace
+ this.setActiveCaipNetwork(adapter?.defaultNetwork ?? adapter.caipNetworks[0])
+ }
+ }
+
+ const chains = [...new Set(adapter.caipNetworks.map(caipNetwork => caipNetwork.chainNamespace))]
+ chains.forEach((chain: ChainNamespace) => {
+ state.chains.set(chain, {
+ chainNamespace: chain,
+ connectionControllerClient: undefined,
+ networkControllerClient: undefined,
+ adapterType: adapter.adapterType,
accountState,
- networkState
+ networkState,
+ caipNetworks: adapter.caipNetworks
})
})
+
+ this.setActiveChain(adapter.chainNamespace)
},
setChainNetworkData(
- chain: Chain | undefined,
+ chain: ChainNamespace | undefined,
props: Partial