@dynamic-labs/ethereum 4.20.10 → 4.20.11

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,17 @@
1
1
 
2
+ ### [4.20.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.10...v4.20.11) (2025-07-01)
3
+
4
+
5
+ ### Features
6
+
7
+ * add signed typed data to waas ([#9050](https://github.com/dynamic-labs/dynamic-auth/issues/9050)) ([19c8fea](https://github.com/dynamic-labs/dynamic-auth/commit/19c8fea2e5448e027cbec2f6158d32247dfcd321))
8
+ * pass jwt to waas operations ([#8981](https://github.com/dynamic-labs/dynamic-auth/issues/8981)) ([6b63394](https://github.com/dynamic-labs/dynamic-auth/commit/6b63394a1a724c2a1499a3d1ff13078d2314b10e))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * 7702 signature for undeployed contracts ([#9052](https://github.com/dynamic-labs/dynamic-auth/issues/9052)) ([7052149](https://github.com/dynamic-labs/dynamic-auth/commit/7052149aae53524a0ac2bdad0b7ddf68e3c86189))
14
+
2
15
  ### [4.20.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.9...v4.20.10) (2025-06-30)
3
16
 
4
17
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.20.10";
6
+ var version = "4.20.11";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.20.10";
2
+ var version = "4.20.11";
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.20.10",
3
+ "version": "4.20.11",
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",
@@ -23,16 +23,16 @@
23
23
  "eventemitter3": "5.0.1",
24
24
  "buffer": "6.0.3",
25
25
  "@metamask/sdk": "0.33.0",
26
- "@dynamic-labs/assert-package-version": "4.20.10",
27
- "@dynamic-labs/embedded-wallet-evm": "4.20.10",
28
- "@dynamic-labs/ethereum-core": "4.20.10",
29
- "@dynamic-labs/logger": "4.20.10",
30
- "@dynamic-labs/rpc-providers": "4.20.10",
31
- "@dynamic-labs/types": "4.20.10",
32
- "@dynamic-labs/utils": "4.20.10",
33
- "@dynamic-labs/waas-evm": "4.20.10",
34
- "@dynamic-labs/wallet-book": "4.20.10",
35
- "@dynamic-labs/wallet-connector-core": "4.20.10"
26
+ "@dynamic-labs/assert-package-version": "4.20.11",
27
+ "@dynamic-labs/embedded-wallet-evm": "4.20.11",
28
+ "@dynamic-labs/ethereum-core": "4.20.11",
29
+ "@dynamic-labs/logger": "4.20.11",
30
+ "@dynamic-labs/rpc-providers": "4.20.11",
31
+ "@dynamic-labs/types": "4.20.11",
32
+ "@dynamic-labs/utils": "4.20.11",
33
+ "@dynamic-labs/waas-evm": "4.20.11",
34
+ "@dynamic-labs/wallet-book": "4.20.11",
35
+ "@dynamic-labs/wallet-connector-core": "4.20.11"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "viem": "^2.28.4"
@@ -11,11 +11,11 @@ require('@dynamic-labs/ethereum-core');
11
11
  require('viem');
12
12
  require('@dynamic-labs/wallet-connector-core');
13
13
  require('@dynamic-labs/wallet-book');
14
+ require('./utils/logger.cjs');
14
15
  require('viem/accounts');
15
16
  require('./walletConnect/WalletConnectProvider/WalletConnectProvider.cjs');
16
17
  var fetchWalletConnectWallets = require('./walletConnect/utils/fetchWalletConnectWallets.cjs');
17
18
  var getWalletConnectConnector = require('./walletConnect/utils/getWalletConnectConnector.cjs');
18
- require('./utils/logger.cjs');
19
19
  var FallbackEvmConnector = require('./injected/FallbackEvmConnector.cjs');
20
20
  var fetchInjectedWalletConnectors = require('./injected/fetchInjectedWalletConnectors.cjs');
21
21
  var coinbase = require('./coinbase/coinbase.cjs');
@@ -7,11 +7,11 @@ import '@dynamic-labs/ethereum-core';
7
7
  import 'viem';
8
8
  import '@dynamic-labs/wallet-connector-core';
9
9
  import '@dynamic-labs/wallet-book';
10
+ import './utils/logger.js';
10
11
  import 'viem/accounts';
11
12
  import './walletConnect/WalletConnectProvider/WalletConnectProvider.js';
12
13
  import { fetchWalletConnectWallets } from './walletConnect/utils/fetchWalletConnectWallets.js';
13
14
  import { getWalletConnectConnector } from './walletConnect/utils/getWalletConnectConnector.js';
14
- import './utils/logger.js';
15
15
  import { FallbackEvmConnector } from './injected/FallbackEvmConnector.js';
16
16
  import { injectedWalletOverrides, fetchInjectedWalletConnector } from './injected/fetchInjectedWalletConnectors.js';
17
17
  import { Coinbase } from './coinbase/coinbase.js';
@@ -4,11 +4,11 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../_virtual/_tslib.cjs');
7
- var utils = require('@dynamic-labs/utils');
8
7
  var ethereumCore = require('@dynamic-labs/ethereum-core');
8
+ var utils = require('@dynamic-labs/utils');
9
9
  var ethProviderHelper = require('../ethProviderHelper.cjs');
10
- var WalletConnectConnector = require('../walletConnect/WalletConnectConnector/WalletConnectConnector.cjs');
11
10
  var logger = require('../utils/logger.cjs');
11
+ var WalletConnectConnector = require('../walletConnect/WalletConnectConnector/WalletConnectConnector.cjs');
12
12
 
13
13
  class InjectedWalletBase extends ethereumCore.EthereumWalletConnector {
14
14
  constructor() {
@@ -70,8 +70,21 @@ class InjectedWalletBase extends ethereumCore.EthereumWalletConnector {
70
70
  }
71
71
  getAddress() {
72
72
  return _tslib.__awaiter(this, void 0, void 0, function* () {
73
- var _a;
74
- return (_a = this.ethProviderHelper) === null || _a === void 0 ? void 0 : _a.getAddress();
73
+ var _a, _b;
74
+ if (this.isInstalledOnBrowser()) {
75
+ return (_a = this.ethProviderHelper) === null || _a === void 0 ? void 0 : _a.getAddress();
76
+ }
77
+ if (utils.isMobile() &&
78
+ ((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.inAppBrowserUrl) &&
79
+ this.mobileExperience === 'in-app-browser') {
80
+ const inAppBrowserCompiledTemplate = utils.template(this.metadata.inAppBrowserUrl);
81
+ const { href } = utils.PlatformService.getUrl();
82
+ const deepLink = inAppBrowserCompiledTemplate({
83
+ encodedDappURI: encodeURIComponent(href),
84
+ });
85
+ utils.PlatformService.openURL(deepLink);
86
+ }
87
+ return undefined;
75
88
  });
76
89
  }
77
90
  connect() {
@@ -1,6 +1,6 @@
1
- import { WalletClient, Transport, Account, Chain as ViemChain } from 'viem';
2
- import { EvmNetwork } from '@dynamic-labs/types';
1
+ import { Account, Transport, Chain as ViemChain, WalletClient } from 'viem';
3
2
  import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
3
+ import { EvmNetwork } from '@dynamic-labs/types';
4
4
  import { EthProviderHelper } from '../ethProviderHelper';
5
5
  import { IEthereum } from '../types';
6
6
  export declare abstract class InjectedWalletBase extends EthereumWalletConnector {
@@ -1,10 +1,10 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../_virtual/_tslib.js';
3
- import { isMobile } from '@dynamic-labs/utils';
4
3
  import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
4
+ import { isMobile, template, PlatformService } from '@dynamic-labs/utils';
5
5
  import { EthProviderHelper } from '../ethProviderHelper.js';
6
- import { WalletConnectConnector } from '../walletConnect/WalletConnectConnector/WalletConnectConnector.js';
7
6
  import { logger } from '../utils/logger.js';
7
+ import { WalletConnectConnector } from '../walletConnect/WalletConnectConnector/WalletConnectConnector.js';
8
8
 
9
9
  class InjectedWalletBase extends EthereumWalletConnector {
10
10
  constructor() {
@@ -66,8 +66,21 @@ class InjectedWalletBase extends EthereumWalletConnector {
66
66
  }
67
67
  getAddress() {
68
68
  return __awaiter(this, void 0, void 0, function* () {
69
- var _a;
70
- return (_a = this.ethProviderHelper) === null || _a === void 0 ? void 0 : _a.getAddress();
69
+ var _a, _b;
70
+ if (this.isInstalledOnBrowser()) {
71
+ return (_a = this.ethProviderHelper) === null || _a === void 0 ? void 0 : _a.getAddress();
72
+ }
73
+ if (isMobile() &&
74
+ ((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.inAppBrowserUrl) &&
75
+ this.mobileExperience === 'in-app-browser') {
76
+ const inAppBrowserCompiledTemplate = template(this.metadata.inAppBrowserUrl);
77
+ const { href } = PlatformService.getUrl();
78
+ const deepLink = inAppBrowserCompiledTemplate({
79
+ encodedDappURI: encodeURIComponent(href),
80
+ });
81
+ PlatformService.openURL(deepLink);
82
+ }
83
+ return undefined;
71
84
  });
72
85
  }
73
86
  connect() {
@@ -7,12 +7,12 @@ var _tslib = require('../../_virtual/_tslib.cjs');
7
7
  var sdk = require('@metamask/sdk');
8
8
  var viem = require('viem');
9
9
  var ethereumCore = require('@dynamic-labs/ethereum-core');
10
- var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
11
10
  var utils = require('@dynamic-labs/utils');
12
- var logger = require('../utils/logger.cjs');
11
+ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
13
12
  var InjectedWalletBase = require('../injected/InjectedWalletBase.cjs');
14
- var waitForConnection = require('./utils/waitForConnection.cjs');
13
+ var logger = require('../utils/logger.cjs');
15
14
  var isPendingWalletRequestPermissionError = require('./utils/isPendingWalletRequestPermissionError.cjs');
15
+ var waitForConnection = require('./utils/waitForConnection.cjs');
16
16
 
17
17
  /**
18
18
  * The MetaMask SDK must be initialized only once, so we store the instance
@@ -141,8 +141,13 @@ class MetaMaskConnector extends InjectedWalletBase.InjectedWalletBase {
141
141
  // Deep link to MetaMask app in-app browser
142
142
  if (this.shouldDeepLinkToMetaMaskInAppBrowser() &&
143
143
  this.metadata.inAppBrowserUrl) {
144
+ const inAppBrowserCompiledTemplate = utils.template(this.metadata.inAppBrowserUrl);
145
+ const { href } = utils.PlatformService.getUrl();
146
+ const deepLink = inAppBrowserCompiledTemplate({
147
+ dappURI: href,
148
+ });
144
149
  // Redirect to the in-app browser and append the current url
145
- utils.PlatformService.openURL(`${this.metadata.inAppBrowserUrl}/${window.location.href}`);
150
+ utils.PlatformService.openURL(deepLink);
146
151
  return;
147
152
  }
148
153
  logger.logger.logVerboseTroubleshootingMessage('[MetaMaskConnector] getAddress - getting initial connected accounts');
@@ -1,5 +1,5 @@
1
1
  import { MetaMaskSDK } from '@metamask/sdk';
2
- import { Account, Transport, WalletClient, Chain as ViemChain } from 'viem';
2
+ import { Account, Transport, Chain as ViemChain, WalletClient } from 'viem';
3
3
  import { EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
4
4
  import { GetAddressOpts, IWalletConnectConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import { InjectedWalletBase } from '../injected/InjectedWalletBase';
@@ -3,12 +3,12 @@ import { __awaiter } from '../../_virtual/_tslib.js';
3
3
  import { MetaMaskSDK } from '@metamask/sdk';
4
4
  import { createWalletClient, custom, isHex, toHex } from 'viem';
5
5
  import { getOrMapViemChain } from '@dynamic-labs/ethereum-core';
6
+ import { createEventTimeline, PlatformService, isMobile, template, GetAddressCancelledError, MetaMaskError, retryableFn, PlatformEventsService } from '@dynamic-labs/utils';
6
7
  import { eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
7
- import { createEventTimeline, PlatformService, isMobile, GetAddressCancelledError, MetaMaskError, retryableFn, PlatformEventsService } from '@dynamic-labs/utils';
8
- import { logger } from '../utils/logger.js';
9
8
  import { InjectedWalletBase } from '../injected/InjectedWalletBase.js';
10
- import { waitForConnection } from './utils/waitForConnection.js';
9
+ import { logger } from '../utils/logger.js';
11
10
  import { isPendingWalletRequestPermissionError } from './utils/isPendingWalletRequestPermissionError.js';
11
+ import { waitForConnection } from './utils/waitForConnection.js';
12
12
 
13
13
  /**
14
14
  * The MetaMask SDK must be initialized only once, so we store the instance
@@ -137,8 +137,13 @@ class MetaMaskConnector extends InjectedWalletBase {
137
137
  // Deep link to MetaMask app in-app browser
138
138
  if (this.shouldDeepLinkToMetaMaskInAppBrowser() &&
139
139
  this.metadata.inAppBrowserUrl) {
140
+ const inAppBrowserCompiledTemplate = template(this.metadata.inAppBrowserUrl);
141
+ const { href } = PlatformService.getUrl();
142
+ const deepLink = inAppBrowserCompiledTemplate({
143
+ dappURI: href,
144
+ });
140
145
  // Redirect to the in-app browser and append the current url
141
- PlatformService.openURL(`${this.metadata.inAppBrowserUrl}/${window.location.href}`);
146
+ PlatformService.openURL(deepLink);
142
147
  return;
143
148
  }
144
149
  logger.logVerboseTroubleshootingMessage('[MetaMaskConnector] getAddress - getting initial connected accounts');
@@ -7,7 +7,6 @@ var _tslib = require('../../../_virtual/_tslib.cjs');
7
7
  require('@dynamic-labs/utils');
8
8
  var InjectedWalletBase = require('../../injected/InjectedWalletBase.cjs');
9
9
  require('@dynamic-labs/wallet-connector-core');
10
- require('../logger.cjs');
11
10
 
12
11
  const createInjectedConnector = (customConnectorFn) => (props) => {
13
12
  const delegate = customConnectorFn(props);
@@ -3,7 +3,6 @@ import { __awaiter } from '../../../_virtual/_tslib.js';
3
3
  import '@dynamic-labs/utils';
4
4
  import { InjectedWalletBase } from '../../injected/InjectedWalletBase.js';
5
5
  import '@dynamic-labs/wallet-connector-core';
6
- import '../logger.js';
7
6
 
8
7
  const createInjectedConnector = (customConnectorFn) => (props) => {
9
8
  const delegate = customConnectorFn(props);
@@ -3,10 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var _tslib = require('../../../_virtual/_tslib.cjs');
7
- var utils = require('@dynamic-labs/utils');
8
6
  var InjectedWalletBase = require('../../injected/InjectedWalletBase.cjs');
9
- var logger = require('../logger.cjs');
10
7
 
11
8
  const getConnectorConstructorInjectedWallet = (key, wallet) => {
12
9
  const { shortName } = wallet;
@@ -20,26 +17,6 @@ const getConnectorConstructorInjectedWallet = (key, wallet) => {
20
17
  // this is the key from the wallet book entry so that we don't purely rely on the normalized name
21
18
  this.overrideKey = key;
22
19
  }
23
- getAddress() {
24
- const _super = Object.create(null, {
25
- getAddress: { get: () => super.getAddress }
26
- });
27
- return _tslib.__awaiter(this, void 0, void 0, function* () {
28
- var _a;
29
- if (this.isInstalledOnBrowser()) {
30
- return _super.getAddress.call(this);
31
- }
32
- const inAppBrowserBase = (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
33
- if (!inAppBrowserBase) {
34
- const error = new Error(`No inAppBrowserBase found for ${this.name}.`);
35
- logger.logger.error(error.message);
36
- throw error;
37
- }
38
- // TODO: use PlatformService
39
- utils.PlatformService.openURL(`${inAppBrowserBase}/${window.location.href}`);
40
- return undefined;
41
- });
42
- }
43
20
  };
44
21
  };
45
22
 
@@ -1,8 +1,5 @@
1
1
  'use client'
2
- import { __awaiter } from '../../../_virtual/_tslib.js';
3
- import { PlatformService } from '@dynamic-labs/utils';
4
2
  import { InjectedWalletBase } from '../../injected/InjectedWalletBase.js';
5
- import { logger } from '../logger.js';
6
3
 
7
4
  const getConnectorConstructorInjectedWallet = (key, wallet) => {
8
5
  const { shortName } = wallet;
@@ -16,26 +13,6 @@ const getConnectorConstructorInjectedWallet = (key, wallet) => {
16
13
  // this is the key from the wallet book entry so that we don't purely rely on the normalized name
17
14
  this.overrideKey = key;
18
15
  }
19
- getAddress() {
20
- const _super = Object.create(null, {
21
- getAddress: { get: () => super.getAddress }
22
- });
23
- return __awaiter(this, void 0, void 0, function* () {
24
- var _a;
25
- if (this.isInstalledOnBrowser()) {
26
- return _super.getAddress.call(this);
27
- }
28
- const inAppBrowserBase = (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
29
- if (!inAppBrowserBase) {
30
- const error = new Error(`No inAppBrowserBase found for ${this.name}.`);
31
- logger.error(error.message);
32
- throw error;
33
- }
34
- // TODO: use PlatformService
35
- PlatformService.openURL(`${inAppBrowserBase}/${window.location.href}`);
36
- return undefined;
37
- });
38
- }
39
16
  };
40
17
  };
41
18