@dynamic-labs/waas-sui 4.22.3 → 4.22.5
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,13 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.22.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.4...v4.22.5) (2025-07-08)
|
|
3
|
+
|
|
4
|
+
### [4.22.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.3...v4.22.4) (2025-07-08)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* intialize waas wallet client in react sdk ([#9125](https://github.com/dynamic-labs/dynamic-auth/issues/9125)) ([c59a3d6](https://github.com/dynamic-labs/dynamic-auth/commit/c59a3d6aeeb3cc001949354a218f1fafc08bd448))
|
|
10
|
+
|
|
2
11
|
### [4.22.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.2...v4.22.3) (2025-07-08)
|
|
3
12
|
|
|
4
13
|
### [4.22.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.1...v4.22.2) (2025-07-08)
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-sui",
|
|
3
|
-
"version": "4.22.
|
|
3
|
+
"version": "4.22.5",
|
|
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",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs-wallet/browser-wallet-client": "0.0.
|
|
21
|
+
"@dynamic-labs-wallet/browser-wallet-client": "0.0.114",
|
|
22
22
|
"@mysten/sui": "1.24.0",
|
|
23
23
|
"@mysten/wallet-standard": "0.13.29",
|
|
24
|
-
"@dynamic-labs/assert-package-version": "4.22.
|
|
25
|
-
"@dynamic-labs/logger": "4.22.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "4.22.
|
|
27
|
-
"@dynamic-labs/sui-core": "4.22.
|
|
28
|
-
"@dynamic-labs/types": "4.22.
|
|
29
|
-
"@dynamic-labs/utils": "4.22.
|
|
30
|
-
"@dynamic-labs/waas": "4.22.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.22.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.22.
|
|
24
|
+
"@dynamic-labs/assert-package-version": "4.22.5",
|
|
25
|
+
"@dynamic-labs/logger": "4.22.5",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "4.22.5",
|
|
27
|
+
"@dynamic-labs/sui-core": "4.22.5",
|
|
28
|
+
"@dynamic-labs/types": "4.22.5",
|
|
29
|
+
"@dynamic-labs/utils": "4.22.5",
|
|
30
|
+
"@dynamic-labs/waas": "4.22.5",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.22.5",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.22.5"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {}
|
|
35
35
|
}
|
|
@@ -7,8 +7,8 @@ var _tslib = require('../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var client = require('@mysten/sui/client');
|
|
8
8
|
var suiCore = require('@dynamic-labs/sui-core');
|
|
9
9
|
var utils = require('@dynamic-labs/utils');
|
|
10
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
11
10
|
var waas = require('@dynamic-labs/waas');
|
|
11
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
12
12
|
var WaasSuiWallet = require('../wallet/WaasSuiWallet.cjs');
|
|
13
13
|
|
|
14
14
|
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
@@ -39,7 +39,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
39
39
|
connect() {
|
|
40
40
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
var _a, _b, _c;
|
|
42
|
-
this.getWaasWalletClient();
|
|
42
|
+
yield this.getWaasWalletClient();
|
|
43
43
|
if (!this.activeNetworkId) {
|
|
44
44
|
this.activeNetworkId =
|
|
45
45
|
((_c = (_b = (_a = this.suiNetworks) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.networkId) === null || _c === void 0 ? void 0 : _c.toString()) || '501';
|
|
@@ -101,7 +101,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
101
101
|
validateActiveWallet(expectedAddress) {
|
|
102
102
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
103
103
|
var _a, _b;
|
|
104
|
-
const walletClient = this.getWaasWalletClient();
|
|
104
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
105
105
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
106
106
|
const targetWallet = yield walletClient.getWallet({
|
|
107
107
|
accountAddress: expectedAddress,
|
|
@@ -120,7 +120,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
120
120
|
createWalletAccount() {
|
|
121
121
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
122
122
|
var _a, _b;
|
|
123
|
-
const walletClient = this.getWaasWalletClient();
|
|
123
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
124
124
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
125
125
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
126
126
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -133,7 +133,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
133
133
|
importPrivateKey(_a) {
|
|
134
134
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
135
135
|
var _b, _c;
|
|
136
|
-
const walletClient = this.getWaasWalletClient();
|
|
136
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
137
137
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
138
138
|
if (!signedSessionId) {
|
|
139
139
|
throw new Error('Signed session ID is required');
|
|
@@ -149,7 +149,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
149
149
|
signMessage(message) {
|
|
150
150
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
151
151
|
var _a, _b;
|
|
152
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
152
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
153
153
|
if (!this.activeAccountAddress) {
|
|
154
154
|
throw new Error('Active account address is required');
|
|
155
155
|
}
|
|
@@ -170,7 +170,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
170
170
|
const client$1 = new client.SuiClient({ url: client.getFullnodeUrl(networkName) });
|
|
171
171
|
const txBytes = yield transaction.build({ client: client$1 });
|
|
172
172
|
const txString = Buffer.from(txBytes).toString('hex');
|
|
173
|
-
const walletClient = this.getWaasWalletClient();
|
|
173
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
174
174
|
if (!this.activeAccountAddress) {
|
|
175
175
|
throw new Error('Active account address is required');
|
|
176
176
|
}
|
|
@@ -225,17 +225,23 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
225
225
|
return new client.SuiClient({ url: client.getFullnodeUrl(networkName) });
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
getWalletClientByAddress(
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
getWalletClientByAddress(_a) {
|
|
229
|
+
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
|
|
230
|
+
this.setActiveAccountAddress(accountAddress);
|
|
231
|
+
const client = yield this.getWaasWalletClient();
|
|
232
|
+
return client;
|
|
233
|
+
});
|
|
231
234
|
}
|
|
232
235
|
getWalletClient() {
|
|
233
|
-
return
|
|
236
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const client = yield this.getWaasWalletClient();
|
|
238
|
+
return client;
|
|
239
|
+
});
|
|
234
240
|
}
|
|
235
241
|
exportPrivateKey() {
|
|
236
242
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
237
243
|
var _a, _b;
|
|
238
|
-
const walletClient = this.getWaasWalletClient();
|
|
244
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
239
245
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
240
246
|
if (!targetAccountAddress) {
|
|
241
247
|
throw new Error('Account address is required');
|
|
@@ -260,7 +266,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
260
266
|
exportClientKeyshares(_a) {
|
|
261
267
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
262
268
|
var _b, _c;
|
|
263
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
269
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
264
270
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
265
271
|
if (!targetAccountAddress) {
|
|
266
272
|
throw new Error('Account address is required');
|
|
@@ -280,7 +286,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
280
286
|
if (!accountAddress) {
|
|
281
287
|
throw new Error('Account address is required');
|
|
282
288
|
}
|
|
283
|
-
const walletClient = this.getWaasWalletClient();
|
|
289
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
284
290
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
285
291
|
accountAddress,
|
|
286
292
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -294,7 +300,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
294
300
|
if (!accountAddress) {
|
|
295
301
|
throw new Error('Account address is required');
|
|
296
302
|
}
|
|
297
|
-
const walletClient = this.getWaasWalletClient();
|
|
303
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
298
304
|
return walletClient.refreshWalletAccountShares({
|
|
299
305
|
accountAddress,
|
|
300
306
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -308,7 +314,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
308
314
|
if (!accountAddress) {
|
|
309
315
|
throw new Error('Account address is required');
|
|
310
316
|
}
|
|
311
|
-
const walletClient = this.getWaasWalletClient();
|
|
317
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
312
318
|
return walletClient.updatePassword({
|
|
313
319
|
accountAddress,
|
|
314
320
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -326,7 +332,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
326
332
|
if (message.length !== 64) {
|
|
327
333
|
throw new Error('Message must be 64 characters long');
|
|
328
334
|
}
|
|
329
|
-
const walletClient = this.getWaasWalletClient();
|
|
335
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
330
336
|
return walletClient.signRawMessage({
|
|
331
337
|
accountAddress,
|
|
332
338
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -358,7 +364,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
|
|
|
358
364
|
}
|
|
359
365
|
endSession() {
|
|
360
366
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
361
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
367
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
362
368
|
if (!waasSuiClient) {
|
|
363
369
|
return;
|
|
364
370
|
}
|
|
@@ -23,8 +23,8 @@ declare const DynamicWaasSuiConnector_base: (abstract new (...args: any[]) => {
|
|
|
23
23
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
24
24
|
setRelayUrl(relayUrl: string): void;
|
|
25
25
|
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
26
|
-
createDynamicWaasClient(): DynamicWalletClient
|
|
27
|
-
getWaasWalletClient(): DynamicWalletClient
|
|
26
|
+
createDynamicWaasClient(): Promise<DynamicWalletClient>;
|
|
27
|
+
getWaasWalletClient(): Promise<DynamicWalletClient>;
|
|
28
28
|
}) & typeof SuiWalletConnector;
|
|
29
29
|
export declare class DynamicWaasSuiConnector extends DynamicWaasSuiConnector_base implements IDynamicWaasConnector {
|
|
30
30
|
ChainWallet: typeof WaasSuiWallet;
|
|
@@ -64,8 +64,8 @@ export declare class DynamicWaasSuiConnector extends DynamicWaasSuiConnector_bas
|
|
|
64
64
|
getSuiClient(): Promise<SuiClient>;
|
|
65
65
|
getWalletClientByAddress({ accountAddress, }: {
|
|
66
66
|
accountAddress: string;
|
|
67
|
-
}): DynamicWalletClient
|
|
68
|
-
getWalletClient(): DynamicWalletClient | undefined
|
|
67
|
+
}): Promise<DynamicWalletClient>;
|
|
68
|
+
getWalletClient(): Promise<DynamicWalletClient | undefined>;
|
|
69
69
|
exportPrivateKey({ accountAddress, displayContainer, password, }?: {
|
|
70
70
|
accountAddress?: string;
|
|
71
71
|
displayContainer?: HTMLIFrameElement;
|
|
@@ -3,8 +3,8 @@ import { __awaiter } from '../../_virtual/_tslib.js';
|
|
|
3
3
|
import { SuiClient, getFullnodeUrl } from '@mysten/sui/client';
|
|
4
4
|
import { SuiWalletConnector, SuiUiTransaction } from '@dynamic-labs/sui-core';
|
|
5
5
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
-
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
7
6
|
import { withDynamicWaas } from '@dynamic-labs/waas';
|
|
7
|
+
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import { WaasSuiWallet } from '../wallet/WaasSuiWallet.js';
|
|
9
9
|
|
|
10
10
|
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
@@ -35,7 +35,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
35
35
|
connect() {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
var _a, _b, _c;
|
|
38
|
-
this.getWaasWalletClient();
|
|
38
|
+
yield this.getWaasWalletClient();
|
|
39
39
|
if (!this.activeNetworkId) {
|
|
40
40
|
this.activeNetworkId =
|
|
41
41
|
((_c = (_b = (_a = this.suiNetworks) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.networkId) === null || _c === void 0 ? void 0 : _c.toString()) || '501';
|
|
@@ -97,7 +97,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
97
97
|
validateActiveWallet(expectedAddress) {
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
var _a, _b;
|
|
100
|
-
const walletClient = this.getWaasWalletClient();
|
|
100
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
101
101
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
102
102
|
const targetWallet = yield walletClient.getWallet({
|
|
103
103
|
accountAddress: expectedAddress,
|
|
@@ -116,7 +116,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
116
116
|
createWalletAccount() {
|
|
117
117
|
return __awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
118
118
|
var _a, _b;
|
|
119
|
-
const walletClient = this.getWaasWalletClient();
|
|
119
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
120
120
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
121
121
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
122
122
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -129,7 +129,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
129
129
|
importPrivateKey(_a) {
|
|
130
130
|
return __awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
131
131
|
var _b, _c;
|
|
132
|
-
const walletClient = this.getWaasWalletClient();
|
|
132
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
133
133
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
134
134
|
if (!signedSessionId) {
|
|
135
135
|
throw new Error('Signed session ID is required');
|
|
@@ -145,7 +145,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
145
145
|
signMessage(message) {
|
|
146
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
147
|
var _a, _b;
|
|
148
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
148
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
149
149
|
if (!this.activeAccountAddress) {
|
|
150
150
|
throw new Error('Active account address is required');
|
|
151
151
|
}
|
|
@@ -166,7 +166,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
166
166
|
const client = new SuiClient({ url: getFullnodeUrl(networkName) });
|
|
167
167
|
const txBytes = yield transaction.build({ client });
|
|
168
168
|
const txString = Buffer.from(txBytes).toString('hex');
|
|
169
|
-
const walletClient = this.getWaasWalletClient();
|
|
169
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
170
170
|
if (!this.activeAccountAddress) {
|
|
171
171
|
throw new Error('Active account address is required');
|
|
172
172
|
}
|
|
@@ -221,17 +221,23 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
221
221
|
return new SuiClient({ url: getFullnodeUrl(networkName) });
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
getWalletClientByAddress(
|
|
225
|
-
this
|
|
226
|
-
|
|
224
|
+
getWalletClientByAddress(_a) {
|
|
225
|
+
return __awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
|
|
226
|
+
this.setActiveAccountAddress(accountAddress);
|
|
227
|
+
const client = yield this.getWaasWalletClient();
|
|
228
|
+
return client;
|
|
229
|
+
});
|
|
227
230
|
}
|
|
228
231
|
getWalletClient() {
|
|
229
|
-
return this
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const client = yield this.getWaasWalletClient();
|
|
234
|
+
return client;
|
|
235
|
+
});
|
|
230
236
|
}
|
|
231
237
|
exportPrivateKey() {
|
|
232
238
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
233
239
|
var _a, _b;
|
|
234
|
-
const walletClient = this.getWaasWalletClient();
|
|
240
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
235
241
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
236
242
|
if (!targetAccountAddress) {
|
|
237
243
|
throw new Error('Account address is required');
|
|
@@ -256,7 +262,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
256
262
|
exportClientKeyshares(_a) {
|
|
257
263
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
258
264
|
var _b, _c;
|
|
259
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
265
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
260
266
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
261
267
|
if (!targetAccountAddress) {
|
|
262
268
|
throw new Error('Account address is required');
|
|
@@ -276,7 +282,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
276
282
|
if (!accountAddress) {
|
|
277
283
|
throw new Error('Account address is required');
|
|
278
284
|
}
|
|
279
|
-
const walletClient = this.getWaasWalletClient();
|
|
285
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
280
286
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
281
287
|
accountAddress,
|
|
282
288
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -290,7 +296,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
290
296
|
if (!accountAddress) {
|
|
291
297
|
throw new Error('Account address is required');
|
|
292
298
|
}
|
|
293
|
-
const walletClient = this.getWaasWalletClient();
|
|
299
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
294
300
|
return walletClient.refreshWalletAccountShares({
|
|
295
301
|
accountAddress,
|
|
296
302
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -304,7 +310,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
304
310
|
if (!accountAddress) {
|
|
305
311
|
throw new Error('Account address is required');
|
|
306
312
|
}
|
|
307
|
-
const walletClient = this.getWaasWalletClient();
|
|
313
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
308
314
|
return walletClient.updatePassword({
|
|
309
315
|
accountAddress,
|
|
310
316
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -322,7 +328,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
322
328
|
if (message.length !== 64) {
|
|
323
329
|
throw new Error('Message must be 64 characters long');
|
|
324
330
|
}
|
|
325
|
-
const walletClient = this.getWaasWalletClient();
|
|
331
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
326
332
|
return walletClient.signRawMessage({
|
|
327
333
|
accountAddress,
|
|
328
334
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -354,7 +360,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
|
|
|
354
360
|
}
|
|
355
361
|
endSession() {
|
|
356
362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
357
|
-
const waasSuiClient = this.getWaasWalletClient();
|
|
363
|
+
const waasSuiClient = yield this.getWaasWalletClient();
|
|
358
364
|
if (!waasSuiClient) {
|
|
359
365
|
return;
|
|
360
366
|
}
|