@dynamic-labs/sui 4.10.4-preview.0 → 4.10.4-preview.2
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 +22 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/SuiWalletConnector.cjs +4 -4
- package/src/SuiWalletConnector.d.ts +1 -1
- package/src/SuiWalletConnector.js +4 -4
- package/src/wallet/SuiWallet.cjs +9 -1
- package/src/wallet/SuiWallet.d.ts +4 -0
- package/src/wallet/SuiWallet.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.10.4-preview.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.4...v4.10.4-preview.2) (2025-04-09)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add session key client ([#8463](https://github.com/dynamic-labs/dynamic-auth/issues/8463)) ([d08019c](https://github.com/dynamic-labs/dynamic-auth/commit/d08019ccf82bfc75b26a24170bfa6086d80df69a))
|
|
8
|
+
* add zk sync aa connector ([baf6241](https://github.com/dynamic-labs/dynamic-auth/commit/baf6241119dde2c3ce6c4ae3ac5467d50e1b3953))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **QNTM-3113:** fix network switcher fallback logic ([#8478](https://github.com/dynamic-labs/dynamic-auth/issues/8478)) ([173c4f7](https://github.com/dynamic-labs/dynamic-auth/commit/173c4f7a66e130dd8d5f9726596807489609bf14))
|
|
14
|
+
* retrieval of walletclient for zksync connector ([0707bc3](https://github.com/dynamic-labs/dynamic-auth/commit/0707bc39049c54bf5fe10953faf5486bcf317f20))
|
|
15
|
+
|
|
16
|
+
### [4.10.4-preview.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.4...v4.10.4-preview.1) (2025-04-08)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add session key client ([#8463](https://github.com/dynamic-labs/dynamic-auth/issues/8463)) ([6ed4ebd](https://github.com/dynamic-labs/dynamic-auth/commit/6ed4ebde3f7a8c48fc3461760690e9915e14e5b0))
|
|
22
|
+
* add zk sync aa connector ([c280038](https://github.com/dynamic-labs/dynamic-auth/commit/c280038a9d5e26c1dd1d2a5b71c6a7762a43d042))
|
|
23
|
+
|
|
2
24
|
### [4.10.4-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.3...v4.10.4-preview.0) (2025-04-04)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sui",
|
|
3
|
-
"version": "4.10.4-preview.
|
|
3
|
+
"version": "4.10.4-preview.2",
|
|
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",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@mysten/sui": "1.24.0",
|
|
23
23
|
"@dynamic-labs/sdk-api-core": "0.0.656",
|
|
24
24
|
"text-encoding": "0.7.0",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.10.4-preview.
|
|
26
|
-
"@dynamic-labs/logger": "4.10.4-preview.
|
|
27
|
-
"@dynamic-labs/rpc-providers": "4.10.4-preview.
|
|
28
|
-
"@dynamic-labs/types": "4.10.4-preview.
|
|
29
|
-
"@dynamic-labs/utils": "4.10.4-preview.
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.10.4-preview.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.10.4-preview.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.10.4-preview.2",
|
|
26
|
+
"@dynamic-labs/logger": "4.10.4-preview.2",
|
|
27
|
+
"@dynamic-labs/rpc-providers": "4.10.4-preview.2",
|
|
28
|
+
"@dynamic-labs/types": "4.10.4-preview.2",
|
|
29
|
+
"@dynamic-labs/utils": "4.10.4-preview.2",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.10.4-preview.2",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.10.4-preview.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
|
@@ -162,11 +162,11 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
162
162
|
*
|
|
163
163
|
* The client will prefer the private customer rpc url if available.
|
|
164
164
|
*/
|
|
165
|
-
|
|
165
|
+
getSuiClient(networkId) {
|
|
166
166
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
167
167
|
const clientNetworkId = networkId !== null && networkId !== void 0 ? networkId : (yield this.getNetwork());
|
|
168
168
|
if (!clientNetworkId) {
|
|
169
|
-
this.logger.error('[
|
|
169
|
+
this.logger.error('[getSuiClient] Failed to get network id');
|
|
170
170
|
return undefined;
|
|
171
171
|
}
|
|
172
172
|
// Default to an existing client if available
|
|
@@ -176,7 +176,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
176
176
|
const network = this.getEnabledNetworks().find((network) => network.networkId === clientNetworkId);
|
|
177
177
|
const url = network ? networkHelpers.getPreferredRpcUrl(network) : undefined;
|
|
178
178
|
if (!url) {
|
|
179
|
-
this.logger.error('[
|
|
179
|
+
this.logger.error('[getSuiClient] Failed to get network url');
|
|
180
180
|
return undefined;
|
|
181
181
|
}
|
|
182
182
|
this.suiClients[clientNetworkId] = new client.SuiClient({
|
|
@@ -187,7 +187,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
187
187
|
}
|
|
188
188
|
getBalance(address) {
|
|
189
189
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
const client = yield this.
|
|
190
|
+
const client = yield this.getSuiClient();
|
|
191
191
|
if (!client) {
|
|
192
192
|
this.logger.error('[getBalance] Failed to get Sui client');
|
|
193
193
|
return undefined;
|
|
@@ -60,7 +60,7 @@ export declare abstract class SuiWalletConnector extends WalletConnectorBase<typ
|
|
|
60
60
|
*
|
|
61
61
|
* The client will prefer the private customer rpc url if available.
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
getSuiClient(networkId?: string): Promise<SuiClient | undefined>;
|
|
64
64
|
getBalance(address: string): Promise<string | undefined>;
|
|
65
65
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
66
66
|
getWalletAccount(): Promise<WalletAccount | undefined>;
|
|
@@ -158,11 +158,11 @@ class SuiWalletConnector extends WalletConnectorBase {
|
|
|
158
158
|
*
|
|
159
159
|
* The client will prefer the private customer rpc url if available.
|
|
160
160
|
*/
|
|
161
|
-
|
|
161
|
+
getSuiClient(networkId) {
|
|
162
162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
163
163
|
const clientNetworkId = networkId !== null && networkId !== void 0 ? networkId : (yield this.getNetwork());
|
|
164
164
|
if (!clientNetworkId) {
|
|
165
|
-
this.logger.error('[
|
|
165
|
+
this.logger.error('[getSuiClient] Failed to get network id');
|
|
166
166
|
return undefined;
|
|
167
167
|
}
|
|
168
168
|
// Default to an existing client if available
|
|
@@ -172,7 +172,7 @@ class SuiWalletConnector extends WalletConnectorBase {
|
|
|
172
172
|
const network = this.getEnabledNetworks().find((network) => network.networkId === clientNetworkId);
|
|
173
173
|
const url = network ? getPreferredRpcUrl(network) : undefined;
|
|
174
174
|
if (!url) {
|
|
175
|
-
this.logger.error('[
|
|
175
|
+
this.logger.error('[getSuiClient] Failed to get network url');
|
|
176
176
|
return undefined;
|
|
177
177
|
}
|
|
178
178
|
this.suiClients[clientNetworkId] = new SuiClient({
|
|
@@ -183,7 +183,7 @@ class SuiWalletConnector extends WalletConnectorBase {
|
|
|
183
183
|
}
|
|
184
184
|
getBalance(address) {
|
|
185
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
-
const client = yield this.
|
|
186
|
+
const client = yield this.getSuiClient();
|
|
187
187
|
if (!client) {
|
|
188
188
|
this.logger.error('[getBalance] Failed to get Sui client');
|
|
189
189
|
return undefined;
|
package/src/wallet/SuiWallet.cjs
CHANGED
|
@@ -50,9 +50,17 @@ class SuiWallet extends walletConnectorCore.Wallet {
|
|
|
50
50
|
* Returns the Sui Client object initialized for the wallet's current network.
|
|
51
51
|
* @returns The [SuiClient] object.
|
|
52
52
|
*/
|
|
53
|
+
getSuiClient() {
|
|
54
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return this._connector.getSuiClient();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use `getSuiClient` instead
|
|
60
|
+
*/
|
|
53
61
|
getWalletClient() {
|
|
54
62
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
return this._connector.
|
|
63
|
+
return this._connector.getSuiClient();
|
|
56
64
|
});
|
|
57
65
|
}
|
|
58
66
|
/**
|
|
@@ -16,6 +16,10 @@ export declare class SuiWallet extends Wallet<SuiWalletConnector> {
|
|
|
16
16
|
* Returns the Sui Client object initialized for the wallet's current network.
|
|
17
17
|
* @returns The [SuiClient] object.
|
|
18
18
|
*/
|
|
19
|
+
getSuiClient(): Promise<SuiClient | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `getSuiClient` instead
|
|
22
|
+
*/
|
|
19
23
|
getWalletClient(): Promise<SuiClient | undefined>;
|
|
20
24
|
/**
|
|
21
25
|
* Returns the wallet's current active account.
|
package/src/wallet/SuiWallet.js
CHANGED
|
@@ -46,9 +46,17 @@ class SuiWallet extends Wallet {
|
|
|
46
46
|
* Returns the Sui Client object initialized for the wallet's current network.
|
|
47
47
|
* @returns The [SuiClient] object.
|
|
48
48
|
*/
|
|
49
|
+
getSuiClient() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return this._connector.getSuiClient();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use `getSuiClient` instead
|
|
56
|
+
*/
|
|
49
57
|
getWalletClient() {
|
|
50
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
return this._connector.
|
|
59
|
+
return this._connector.getSuiClient();
|
|
52
60
|
});
|
|
53
61
|
}
|
|
54
62
|
/**
|