@dynamic-labs/global-wallet-client 4.20.3 → 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 +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -8
- package/src/lib/functions/createZksyncSession/createZksyncSession.cjs +9 -1
- package/src/lib/functions/createZksyncSession/createZksyncSession.d.ts +9 -1
- package/src/lib/functions/createZksyncSession/createZksyncSession.js +9 -1
- package/src/lib/functions/createZksyncSessionClient/createZksyncSessionClient.cjs +28 -0
- package/src/lib/functions/createZksyncSessionClient/createZksyncSessionClient.d.ts +3459 -0
- package/src/lib/functions/createZksyncSessionClient/createZksyncSessionClient.js +24 -0
- package/src/lib/functions/createZksyncSessionClient/index.d.ts +1 -0
- package/src/zksync.cjs +2 -0
- package/src/zksync.d.ts +1 -0
- package/src/zksync.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
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
|
+
|
|
2
9
|
### [4.20.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.2...v4.20.3) (2025-06-13)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/global-wallet-client",
|
|
3
|
-
"version": "4.20.
|
|
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.
|
|
67
|
-
"@dynamic-labs/
|
|
68
|
-
"@dynamic-labs/
|
|
69
|
-
"@dynamic-labs/
|
|
70
|
-
"@dynamic-labs/
|
|
71
|
-
"@dynamic-labs/
|
|
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.
|
|
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 {
|
|
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 }) {
|
|
@@ -28,7 +28,15 @@ type CreateZksyncSessionResponse = {
|
|
|
28
28
|
* ```ts
|
|
29
29
|
* import { Wallet } from 'wallet';
|
|
30
30
|
*
|
|
31
|
-
* const {
|
|
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
|
export declare const createZksyncSession: (wallet: BaseWallet, { sessionConfig, addModuleWithPaymaster }: createZksyncSessionParams) => Promise<CreateZksyncSessionResponse>;
|
|
@@ -24,7 +24,15 @@ import { getCurrentEthereumNetworkId } from '../getCurrentEthereumNetworkId/getC
|
|
|
24
24
|
* ```ts
|
|
25
25
|
* import { Wallet } from 'wallet';
|
|
26
26
|
*
|
|
27
|
-
* const {
|
|
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;
|