@dynamic-labs/global-wallet-client 4.12.0 → 4.12.2-preview.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,23 @@
1
1
 
2
+ ### [4.12.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.1...v4.12.2-preview.0) (2025-04-15)
3
+
4
+
5
+ ### Features
6
+
7
+ * add zksync smart accounts to global wallets ([cbbdec1](https://github.com/dynamic-labs/dynamic-auth/commit/cbbdec1f74fb19dcf739e10fdff5c4cfde28cfc6))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **bridge:** wrong wallet/chain displaying when switching bridge chains ([#8541](https://github.com/dynamic-labs/dynamic-auth/issues/8541)) ([c9915d2](https://github.com/dynamic-labs/dynamic-auth/commit/c9915d2ede29aac0063ff89539a44e626285d8d0))
13
+
14
+ ### [4.12.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.0...v4.12.1) (2025-04-15)
15
+
16
+
17
+ ### Features
18
+
19
+ * add dedicated sui wallet client for waas to override transactions ([#8539](https://github.com/dynamic-labs/dynamic-auth/issues/8539)) ([b37b336](https://github.com/dynamic-labs/dynamic-auth/commit/b37b336060dbfd2ad621c86ae78bd07d44a5fe1e))
20
+
2
21
  ## [4.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.11.2...v4.12.0) (2025-04-14)
3
22
 
4
23
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.12.0";
6
+ var version = "4.12.2-preview.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.12.0";
2
+ var version = "4.12.2-preview.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/global-wallet-client",
3
- "version": "4.12.0",
3
+ "version": "4.12.2-preview.0",
4
4
  "description": "Core package for building Dynamic's Global Wallet",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -39,12 +39,12 @@
39
39
  },
40
40
  "homepage": "https://www.dynamic.xyz/",
41
41
  "dependencies": {
42
- "@dynamic-labs/assert-package-version": "4.12.0",
43
- "@dynamic-labs/logger": "4.12.0",
44
- "@dynamic-labs/message-transport": "4.12.0",
45
- "@dynamic-labs/store": "4.12.0",
46
- "@dynamic-labs/types": "4.12.0",
47
- "@dynamic-labs/utils": "4.12.0",
42
+ "@dynamic-labs/assert-package-version": "4.12.2-preview.0",
43
+ "@dynamic-labs/logger": "4.12.2-preview.0",
44
+ "@dynamic-labs/message-transport": "4.12.2-preview.0",
45
+ "@dynamic-labs/store": "4.12.2-preview.0",
46
+ "@dynamic-labs/types": "4.12.2-preview.0",
47
+ "@dynamic-labs/utils": "4.12.2-preview.0",
48
48
  "eventemitter3": "5.0.1"
49
49
  },
50
50
  "peerDependencies": {
@@ -11,6 +11,7 @@ export declare const createGlobalWalletClient: ({ environmentId, popup: popupInf
11
11
  readonly currentNetworkId: number | null;
12
12
  readonly supportedNetworks: {
13
13
  chainId: number;
14
+ rpcUrl?: string | undefined;
14
15
  }[];
15
16
  switchNetwork: (network: number) => void;
16
17
  readonly wallets: import("dist/packages/types/src").BaseWallet[];
@@ -38,6 +38,11 @@ const createEIP1193Provider = (client) => {
38
38
  method: 'eth_sendTransaction',
39
39
  params,
40
40
  }),
41
+ eth_signTypedData_v4: () => handleMethodInPopup({
42
+ client,
43
+ method: 'eth_signTypedData_v4',
44
+ params,
45
+ }),
41
46
  personal_sign: () => handleMethodInPopup({ client, method: 'personal_sign', params }),
42
47
  wallet_requestPermissions: () => handleEthRequestAccounts(client),
43
48
  wallet_revokePermissions: () => handleWalletRevokePermissions(client),
@@ -53,6 +58,21 @@ const createEIP1193Provider = (client) => {
53
58
  });
54
59
  return result;
55
60
  }
61
+ const currentNetwork = client.ethereum.supportedNetworks.find((network) => network.chainId === client.ethereum.currentNetworkId);
62
+ if (currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.rpcUrl) {
63
+ const result = yield viem.http(currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.rpcUrl)({}).request({
64
+ method,
65
+ params,
66
+ });
67
+ if (result) {
68
+ logger.logger.logVerboseTroubleshootingMessage('EIP1193Provider public client request', {
69
+ method,
70
+ params,
71
+ result,
72
+ });
73
+ return result;
74
+ }
75
+ }
56
76
  throw new viem.UnsupportedProviderMethodError(new Error('Method not implemented'), {
57
77
  method,
58
78
  });
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
- import { toHex, ProviderDisconnectedError, UnsupportedProviderMethodError, SwitchChainError, fromHex, UserRejectedRequestError } from 'viem';
3
+ import { toHex, ProviderDisconnectedError, http, UnsupportedProviderMethodError, SwitchChainError, fromHex, UserRejectedRequestError } from 'viem';
4
4
  import { EventEmitter } from 'eventemitter3';
5
5
  import { isNetworkSupported } from '../isNetworkSupported/isNetworkSupported.js';
6
6
  import { PopupClosedError } from '../../../errors/PopupClosedError.js';
@@ -34,6 +34,11 @@ const createEIP1193Provider = (client) => {
34
34
  method: 'eth_sendTransaction',
35
35
  params,
36
36
  }),
37
+ eth_signTypedData_v4: () => handleMethodInPopup({
38
+ client,
39
+ method: 'eth_signTypedData_v4',
40
+ params,
41
+ }),
37
42
  personal_sign: () => handleMethodInPopup({ client, method: 'personal_sign', params }),
38
43
  wallet_requestPermissions: () => handleEthRequestAccounts(client),
39
44
  wallet_revokePermissions: () => handleWalletRevokePermissions(client),
@@ -49,6 +54,21 @@ const createEIP1193Provider = (client) => {
49
54
  });
50
55
  return result;
51
56
  }
57
+ const currentNetwork = client.ethereum.supportedNetworks.find((network) => network.chainId === client.ethereum.currentNetworkId);
58
+ if (currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.rpcUrl) {
59
+ const result = yield http(currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.rpcUrl)({}).request({
60
+ method,
61
+ params,
62
+ });
63
+ if (result) {
64
+ logger.logVerboseTroubleshootingMessage('EIP1193Provider public client request', {
65
+ method,
66
+ params,
67
+ result,
68
+ });
69
+ return result;
70
+ }
71
+ }
52
72
  throw new UnsupportedProviderMethodError(new Error('Method not implemented'), {
53
73
  method,
54
74
  });
@@ -1,3 +1,4 @@
1
1
  export declare const isNetworkSupported: (chainId: number, supportedNetworks: {
2
2
  chainId: number;
3
+ rpcUrl?: string;
3
4
  }[]) => boolean;
@@ -5,6 +5,7 @@ export declare const createEthereumModule: ({ store }: {
5
5
  readonly currentNetworkId: number | null;
6
6
  readonly supportedNetworks: {
7
7
  chainId: number;
8
+ rpcUrl?: string | undefined;
8
9
  }[];
9
10
  switchNetwork: (network: number) => void;
10
11
  readonly wallets: import("dist/packages/types/src").BaseWallet[];
@@ -18,6 +18,7 @@ type ClientStoreState = {
18
18
  ethereum: {
19
19
  supportedNetworks: {
20
20
  chainId: number;
21
+ rpcUrl?: string;
21
22
  }[];
22
23
  currentNetworkId: number;
23
24
  } | null;
@@ -39,6 +40,7 @@ export declare const createClientStore: ({ environmentId, storage, }: CreateClie
39
40
  readonly ethereum: {
40
41
  supportedNetworks: {
41
42
  chainId: number;
43
+ rpcUrl?: string;
42
44
  }[];
43
45
  currentNetworkId: number;
44
46
  } | null;