@dynamic-labs/ethereum 4.45.3 → 4.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## [4.46.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.45.3...v4.46.0) (2025-11-19)
3
+
4
+
5
+ ### Features
6
+
7
+ * **react-native:** add client.solana.simulateTransaction method ([#9910](https://github.com/dynamic-labs/dynamic-auth/issues/9910)) ([61bbe45](https://github.com/dynamic-labs/dynamic-auth/commit/61bbe453eeb2790dffc533aa57f6bc050c3c0461))
8
+ * **react-native:** add simulateEVMTransactionAA and simulateEVMTransaction methods ([#9907](https://github.com/dynamic-labs/dynamic-auth/issues/9907)) ([e54d63e](https://github.com/dynamic-labs/dynamic-auth/commit/e54d63eaa80c2bc865ef6199405b0ed7943d4b83))
9
+
2
10
  ### [4.45.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.45.2...v4.45.3) (2025-11-18)
3
11
 
4
12
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.45.3";
6
+ var version = "4.46.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.45.3";
2
+ var version = "4.46.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "4.45.3",
3
+ "version": "4.46.0",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -24,16 +24,16 @@
24
24
  "eventemitter3": "5.0.1",
25
25
  "buffer": "6.0.3",
26
26
  "@metamask/sdk": "0.33.0",
27
- "@dynamic-labs/assert-package-version": "4.45.3",
28
- "@dynamic-labs/embedded-wallet-evm": "4.45.3",
29
- "@dynamic-labs/ethereum-core": "4.45.3",
30
- "@dynamic-labs/logger": "4.45.3",
31
- "@dynamic-labs/rpc-providers": "4.45.3",
32
- "@dynamic-labs/types": "4.45.3",
33
- "@dynamic-labs/utils": "4.45.3",
34
- "@dynamic-labs/waas-evm": "4.45.3",
35
- "@dynamic-labs/wallet-book": "4.45.3",
36
- "@dynamic-labs/wallet-connector-core": "4.45.3"
27
+ "@dynamic-labs/assert-package-version": "4.46.0",
28
+ "@dynamic-labs/embedded-wallet-evm": "4.46.0",
29
+ "@dynamic-labs/ethereum-core": "4.46.0",
30
+ "@dynamic-labs/logger": "4.46.0",
31
+ "@dynamic-labs/rpc-providers": "4.46.0",
32
+ "@dynamic-labs/types": "4.46.0",
33
+ "@dynamic-labs/utils": "4.46.0",
34
+ "@dynamic-labs/waas-evm": "4.46.0",
35
+ "@dynamic-labs/wallet-book": "4.46.0",
36
+ "@dynamic-labs/wallet-connector-core": "4.46.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "viem": "^2.28.4"
package/src/index.cjs CHANGED
@@ -17,6 +17,13 @@ var constants = require('./constants.cjs');
17
17
  var createInjectedConnector = require('./utils/createInjectedConnector/createInjectedConnector.cjs');
18
18
  var EthereumWalletConnectors = require('./EthereumWalletConnectors.cjs');
19
19
  var EthereumWalletConnectorsWithConfig = require('./EthereumWalletConnectorsWithConfig.cjs');
20
+ require('../_virtual/_tslib.cjs');
21
+ require('viem');
22
+ require('viem/accounts');
23
+ require('@dynamic-labs/utils');
24
+ require('@dynamic-labs/wallet-connector-core');
25
+ require('./walletConnect/WalletConnectProvider/WalletConnectProvider.cjs');
26
+ var EvmWalletConnectConnectors = require('./walletConnect/EvmWalletConnectConnectors.cjs');
20
27
  var getConnectorConstructorForEip6963Wallet = require('./utils/getConnectorConstructorForEip6963Wallet/getConnectorConstructorForEip6963Wallet.cjs');
21
28
 
22
29
  assertPackageVersion.assertPackageVersion('@dynamic-labs/ethereum', _package.version);
@@ -44,4 +51,5 @@ exports.INFURA_ID = constants.INFURA_ID;
44
51
  exports.createInjectedConnector = createInjectedConnector.createInjectedConnector;
45
52
  exports.EthereumWalletConnectors = EthereumWalletConnectors.EthereumWalletConnectors;
46
53
  exports.EthereumWalletConnectorsWithConfig = EthereumWalletConnectorsWithConfig.EthereumWalletConnectorsWithConfig;
54
+ exports.EvmWalletConnectConnectors = EvmWalletConnectConnectors.EvmWalletConnectConnectors;
47
55
  exports.getConnectorConstructorForEip6963Wallet = getConnectorConstructorForEip6963Wallet.getConnectorConstructorForEip6963Wallet;
package/src/index.d.ts CHANGED
@@ -7,5 +7,6 @@ export * from './types';
7
7
  export { createInjectedConnector } from './utils/createInjectedConnector';
8
8
  export { EthereumWalletConnectors } from './EthereumWalletConnectors';
9
9
  export { EthereumWalletConnectorsWithConfig } from './EthereumWalletConnectorsWithConfig';
10
+ export { EvmWalletConnectConnectors } from './walletConnect';
10
11
  export { isEthereumWallet, EthereumWalletConnector, createConnector, } from '@dynamic-labs/ethereum-core';
11
12
  export { getConnectorConstructorForEip6963Wallet } from './utils/getConnectorConstructorForEip6963Wallet';
package/src/index.js CHANGED
@@ -13,6 +13,13 @@ export { INFURA_ID } from './constants.js';
13
13
  export { createInjectedConnector } from './utils/createInjectedConnector/createInjectedConnector.js';
14
14
  export { EthereumWalletConnectors } from './EthereumWalletConnectors.js';
15
15
  export { EthereumWalletConnectorsWithConfig } from './EthereumWalletConnectorsWithConfig.js';
16
+ import '../_virtual/_tslib.js';
17
+ import 'viem';
18
+ import 'viem/accounts';
19
+ import '@dynamic-labs/utils';
20
+ import '@dynamic-labs/wallet-connector-core';
21
+ import './walletConnect/WalletConnectProvider/WalletConnectProvider.js';
22
+ export { EvmWalletConnectConnectors } from './walletConnect/EvmWalletConnectConnectors.js';
16
23
  export { getConnectorConstructorForEip6963Wallet } from './utils/getConnectorConstructorForEip6963Wallet/getConnectorConstructorForEip6963Wallet.js';
17
24
 
18
25
  assertPackageVersion('@dynamic-labs/ethereum', version);
@@ -0,0 +1,24 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var fetchWalletConnectWallets = require('./utils/fetchWalletConnectWallets.cjs');
7
+
8
+ /**
9
+ * Returns ALL WalletConnect connectors from the wallet book.
10
+ *
11
+ * WARNING: You should not use this if you are also using fetchInjectedWalletConnector.
12
+ * fetchInjectedWalletConnector wallets will turn into WalletConnectConnector if the wallet is
13
+ * not installed and supports WalletConnect, which will result in two instances of the same wallet.
14
+ *
15
+ * See fetchWalletConnectWallets for more details and use it instead.
16
+ */
17
+ const EvmWalletConnectConnectors = (
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ props) => fetchWalletConnectWallets.fetchWalletConnectWallets({
20
+ applyFilterFromWalletConnect: false,
21
+ walletBook: props.walletBook,
22
+ });
23
+
24
+ exports.EvmWalletConnectConnectors = EvmWalletConnectConnectors;
@@ -0,0 +1,11 @@
1
+ import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
2
+ /**
3
+ * Returns ALL WalletConnect connectors from the wallet book.
4
+ *
5
+ * WARNING: You should not use this if you are also using fetchInjectedWalletConnector.
6
+ * fetchInjectedWalletConnector wallets will turn into WalletConnectConnector if the wallet is
7
+ * not installed and supports WalletConnect, which will result in two instances of the same wallet.
8
+ *
9
+ * See fetchWalletConnectWallets for more details and use it instead.
10
+ */
11
+ export declare const EvmWalletConnectConnectors: (props: any) => WalletConnectorConstructor[];
@@ -0,0 +1,20 @@
1
+ 'use client'
2
+ import { fetchWalletConnectWallets } from './utils/fetchWalletConnectWallets.js';
3
+
4
+ /**
5
+ * Returns ALL WalletConnect connectors from the wallet book.
6
+ *
7
+ * WARNING: You should not use this if you are also using fetchInjectedWalletConnector.
8
+ * fetchInjectedWalletConnector wallets will turn into WalletConnectConnector if the wallet is
9
+ * not installed and supports WalletConnect, which will result in two instances of the same wallet.
10
+ *
11
+ * See fetchWalletConnectWallets for more details and use it instead.
12
+ */
13
+ const EvmWalletConnectConnectors = (
14
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
+ props) => fetchWalletConnectWallets({
16
+ applyFilterFromWalletConnect: false,
17
+ walletBook: props.walletBook,
18
+ });
19
+
20
+ export { EvmWalletConnectConnectors };
@@ -40,11 +40,8 @@ class WalletConnectConnector extends ethereumCore.EthereumWalletConnector {
40
40
  isInitialized: WalletConnectProvider.WalletConnectProvider.isInitialized,
41
41
  isInitializing: WalletConnectProvider.WalletConnectProvider.isInitializing,
42
42
  });
43
- // we should only init the provider once as soon as possible
44
- // the connection is established when a wallet is selected (with getAddress)
45
43
  if (WalletConnectProvider.WalletConnectProvider.isInitialized ||
46
44
  WalletConnectProvider.WalletConnectProvider.isInitializing) {
47
- walletConnectorCore.logger.debug('[WalletConnect] init - already initialized or initializing - skipping');
48
45
  return;
49
46
  }
50
47
  walletConnectorCore.logger.debug('[WalletConnect] init');
@@ -36,11 +36,8 @@ class WalletConnectConnector extends EthereumWalletConnector {
36
36
  isInitialized: WalletConnectProvider.isInitialized,
37
37
  isInitializing: WalletConnectProvider.isInitializing,
38
38
  });
39
- // we should only init the provider once as soon as possible
40
- // the connection is established when a wallet is selected (with getAddress)
41
39
  if (WalletConnectProvider.isInitialized ||
42
40
  WalletConnectProvider.isInitializing) {
43
- logger.debug('[WalletConnect] init - already initialized or initializing - skipping');
44
41
  return;
45
42
  }
46
43
  logger.debug('[WalletConnect] init');
@@ -1,2 +1,3 @@
1
1
  export { WalletConnectConnector } from './WalletConnectConnector';
2
2
  export { fetchWalletConnectWallets, getWalletConnectConnector } from './utils';
3
+ export { EvmWalletConnectConnectors } from './EvmWalletConnectConnectors';
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var WalletConnectConnector = require('../WalletConnectConnector/WalletConnectConnector.cjs');
7
7
 
8
- const fetchWalletConnectWallets = ({ walletBook, }) => {
8
+ const fetchWalletConnectWallets = ({ walletBook, applyFilterFromWalletConnect = true, }) => {
9
9
  var _a;
10
10
  return Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
11
11
  .filter(([, wallet]) => {
12
12
  var _a;
13
13
  return wallet.walletConnect &&
14
- !wallet.filterFromWalletConnect &&
14
+ (!applyFilterFromWalletConnect || !wallet.filterFromWalletConnect) &&
15
15
  (
16
16
  // Exclude wallets that don't support Evm
17
17
  (_a = wallet.chains) === null || _a === void 0 ? void 0 : _a.some((chain) => chain.includes('eip155:')));
@@ -1,5 +1,18 @@
1
1
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
2
2
  import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
3
- export declare const fetchWalletConnectWallets: ({ walletBook, }: {
3
+ type FetchWalletConnectWalletsProps = {
4
4
  walletBook: WalletBookSchema;
5
- }) => Array<WalletConnectorConstructor>;
5
+ /**
6
+ * fetchInjectedWalletConnector will return InjectedWalletBase. Notice that for this class,
7
+ * under the getMobileOrInstalledWallet method, it will return a WalletConnectConnector if the
8
+ * wallet is not installed and supports WalletConnect.
9
+ *
10
+ * This means that if we include that wallet through both fetchInjectedWalletConnector and fetchWalletConnectWallets,
11
+ * we will end up with two instances of the same wallet.
12
+ *
13
+ * By default, we will apply the filter from WalletConnect to avoid this issue.
14
+ */
15
+ applyFilterFromWalletConnect: boolean;
16
+ };
17
+ export declare const fetchWalletConnectWallets: ({ walletBook, applyFilterFromWalletConnect, }: FetchWalletConnectWalletsProps) => Array<WalletConnectorConstructor>;
18
+ export {};
@@ -1,13 +1,13 @@
1
1
  'use client'
2
2
  import { WalletConnectConnector } from '../WalletConnectConnector/WalletConnectConnector.js';
3
3
 
4
- const fetchWalletConnectWallets = ({ walletBook, }) => {
4
+ const fetchWalletConnectWallets = ({ walletBook, applyFilterFromWalletConnect = true, }) => {
5
5
  var _a;
6
6
  return Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
7
7
  .filter(([, wallet]) => {
8
8
  var _a;
9
9
  return wallet.walletConnect &&
10
- !wallet.filterFromWalletConnect &&
10
+ (!applyFilterFromWalletConnect || !wallet.filterFromWalletConnect) &&
11
11
  (
12
12
  // Exclude wallets that don't support Evm
13
13
  (_a = wallet.chains) === null || _a === void 0 ? void 0 : _a.some((chain) => chain.includes('eip155:')));