@dynamic-labs/global-wallet-client 4.20.2 → 4.20.4

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,18 @@
1
1
 
2
+ ### [4.20.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.3...v4.20.4) (2025-06-13)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * expose sign authorization on react native ([#8954](https://github.com/dynamic-labs/dynamic-auth/issues/8954)) ([dbc2f44](https://github.com/dynamic-labs/dynamic-auth/commit/dbc2f4447efe61fc100146662bc76ed72bcb0fd2))
8
+
9
+ ### [4.20.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.2...v4.20.3) (2025-06-13)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * use minified jwt for waas wallet client auth ([#8938](https://github.com/dynamic-labs/dynamic-auth/issues/8938)) ([f7b9e14](https://github.com/dynamic-labs/dynamic-auth/commit/f7b9e1435e397a64fdf4f42f9b3ad354314e0191))
15
+
2
16
  ### [4.20.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.1...v4.20.2) (2025-06-11)
3
17
 
4
18
 
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.2";
6
+ var version = "4.20.4";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.20.2";
2
+ var version = "4.20.4";
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.20.2",
3
+ "version": "4.20.4",
4
4
  "description": "Core package for building Dynamic's Global Wallet",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -63,12 +63,13 @@
63
63
  },
64
64
  "homepage": "https://www.dynamic.xyz/",
65
65
  "dependencies": {
66
- "@dynamic-labs/assert-package-version": "4.20.2",
67
- "@dynamic-labs/logger": "4.20.2",
68
- "@dynamic-labs/message-transport": "4.20.2",
69
- "@dynamic-labs/store": "4.20.2",
70
- "@dynamic-labs/types": "4.20.2",
71
- "@dynamic-labs/utils": "4.20.2",
66
+ "@dynamic-labs/assert-package-version": "4.20.4",
67
+ "@dynamic-labs/ethereum-aa-zksync": "4.20.4",
68
+ "@dynamic-labs/logger": "4.20.4",
69
+ "@dynamic-labs/message-transport": "4.20.4",
70
+ "@dynamic-labs/store": "4.20.4",
71
+ "@dynamic-labs/types": "4.20.4",
72
+ "@dynamic-labs/utils": "4.20.4",
72
73
  "eventemitter3": "5.0.1"
73
74
  },
74
75
  "peerDependencies": {
@@ -80,7 +81,7 @@
80
81
  "zksync-sso": "0.2.0",
81
82
  "@wallet-standard/wallet": "^1.1.0",
82
83
  "@zerodev/sdk": "5.4.36",
83
- "@dynamic-labs/ethereum-aa": "4.20.2"
84
+ "@dynamic-labs/ethereum-aa": "4.20.4"
84
85
  },
85
86
  "peerDependenciesMeta": {
86
87
  "viem": {
@@ -28,7 +28,15 @@ var getCurrentEthereumNetworkId = require('../getCurrentEthereumNetworkId/getCur
28
28
  * ```ts
29
29
  * import { Wallet } from 'wallet';
30
30
  *
31
- * const { sessionId, expiresAt } = await createZksyncSession(Wallet, { sessionConfig });
31
+ * const {
32
+ * sessionId,
33
+ * expiresAt,
34
+ * session: {
35
+ * sessionKeyValidator,
36
+ * sessionConfiguration,
37
+ * sessionKey,
38
+ * }
39
+ * } = await createZksyncSession(Wallet, { sessionConfig });
32
40
  * ```
33
41
  */
34
42
  const createZksyncSession = (wallet_1, _a) => _tslib.__awaiter(void 0, [wallet_1, _a], void 0, function* (wallet, { sessionConfig, addModuleWithPaymaster }) {
@@ -1,9 +1,20 @@
1
1
  import { SessionConfig } from 'zksync-sso/utils';
2
2
  import { BaseWallet, ConvertBigIntToString } from '@dynamic-labs/types';
3
- type SessionConfigAsString = Omit<ConvertBigIntToString<SessionConfig>, 'signer'>;
3
+ type SessionConfigWithoutSigner = Omit<SessionConfig, 'signer'>;
4
+ type SessionConfigWithouSignerAsString = ConvertBigIntToString<SessionConfigWithoutSigner>;
5
+ type SessionConfigWithSignerAsString = ConvertBigIntToString<SessionConfig>;
4
6
  type createZksyncSessionParams = {
5
7
  addModuleWithPaymaster?: boolean;
6
- sessionConfig: SessionConfigAsString;
8
+ sessionConfig: SessionConfigWithouSignerAsString;
9
+ };
10
+ type CreateZksyncSessionResponse = {
11
+ sessionId: string;
12
+ expiresAt: string;
13
+ session: {
14
+ sessionKeyValidator: `0x${string}`;
15
+ sessionConfiguration: SessionConfigWithSignerAsString;
16
+ sessionKey: `0x${string}`;
17
+ };
7
18
  };
8
19
  /**
9
20
  * Creates a session with the wallet.
@@ -17,11 +28,16 @@ type createZksyncSessionParams = {
17
28
  * ```ts
18
29
  * import { Wallet } from 'wallet';
19
30
  *
20
- * const { sessionId, expiresAt } = await createZksyncSession(Wallet, { sessionConfig });
31
+ * const {
32
+ * sessionId,
33
+ * expiresAt,
34
+ * session: {
35
+ * sessionKeyValidator,
36
+ * sessionConfiguration,
37
+ * sessionKey,
38
+ * }
39
+ * } = await createZksyncSession(Wallet, { sessionConfig });
21
40
  * ```
22
41
  */
23
- export declare const createZksyncSession: (wallet: BaseWallet, { sessionConfig, addModuleWithPaymaster }: createZksyncSessionParams) => Promise<{
24
- sessionId: string;
25
- expiresAt: string;
26
- }>;
42
+ export declare const createZksyncSession: (wallet: BaseWallet, { sessionConfig, addModuleWithPaymaster }: createZksyncSessionParams) => Promise<CreateZksyncSessionResponse>;
27
43
  export {};
@@ -24,7 +24,15 @@ import { getCurrentEthereumNetworkId } from '../getCurrentEthereumNetworkId/getC
24
24
  * ```ts
25
25
  * import { Wallet } from 'wallet';
26
26
  *
27
- * const { sessionId, expiresAt } = await createZksyncSession(Wallet, { sessionConfig });
27
+ * const {
28
+ * sessionId,
29
+ * expiresAt,
30
+ * session: {
31
+ * sessionKeyValidator,
32
+ * sessionConfiguration,
33
+ * sessionKey,
34
+ * }
35
+ * } = await createZksyncSession(Wallet, { sessionConfig });
28
36
  * ```
29
37
  */
30
38
  const createZksyncSession = (wallet_1, _a) => __awaiter(void 0, [wallet_1, _a], void 0, function* (wallet, { sessionConfig, addModuleWithPaymaster }) {
@@ -0,0 +1,28 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var ethereumAaZksync = require('@dynamic-labs/ethereum-aa-zksync');
7
+ var getWalletNetwork = require('../getWalletNetwork/getWalletNetwork.cjs');
8
+ var isEthereumWallet = require('../isEthereumWallet/isEthereumWallet.cjs');
9
+
10
+ const isStringified = (config) => typeof config.expiresAt === 'string';
11
+ const createZksyncSessionClient = (wallet, { sessionKey, sessionKeyValidator, sessionConfig, }) => {
12
+ if (!isEthereumWallet.isEthereumWallet(wallet)) {
13
+ throw new Error('Wallet is not an Ethereum wallet');
14
+ }
15
+ const config = isStringified(sessionConfig)
16
+ ? ethereumAaZksync.parseSessionConfigJSON(sessionConfig)
17
+ : sessionConfig;
18
+ const chainId = getWalletNetwork.getWalletNetwork(wallet);
19
+ return ethereumAaZksync.createSessionClient({
20
+ chainId,
21
+ sessionConfig: config,
22
+ sessionKey,
23
+ sessionKeyValidator,
24
+ smartAccountAddress: wallet.address,
25
+ });
26
+ };
27
+
28
+ exports.createZksyncSessionClient = createZksyncSessionClient;