@dynamic-labs/waas-evm 4.20.9 → 4.20.11
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 +30 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/DynamicWaasEVMConnector.cjs +27 -8
- package/src/DynamicWaasEVMConnector.js +27 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.20.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.10...v4.20.11) (2025-07-01)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add signed typed data to waas ([#9050](https://github.com/dynamic-labs/dynamic-auth/issues/9050)) ([19c8fea](https://github.com/dynamic-labs/dynamic-auth/commit/19c8fea2e5448e027cbec2f6158d32247dfcd321))
|
|
8
|
+
* pass jwt to waas operations ([#8981](https://github.com/dynamic-labs/dynamic-auth/issues/8981)) ([6b63394](https://github.com/dynamic-labs/dynamic-auth/commit/6b63394a1a724c2a1499a3d1ff13078d2314b10e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* 7702 signature for undeployed contracts ([#9052](https://github.com/dynamic-labs/dynamic-auth/issues/9052)) ([7052149](https://github.com/dynamic-labs/dynamic-auth/commit/7052149aae53524a0ac2bdad0b7ddf68e3c86189))
|
|
14
|
+
|
|
15
|
+
### [4.20.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.9...v4.20.10) (2025-06-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add refresh user to react native ([#9019](https://github.com/dynamic-labs/dynamic-auth/issues/9019)) ([01adcda](https://github.com/dynamic-labs/dynamic-auth/commit/01adcda39994ba2955cad58bbd1d4e5063cc1122))
|
|
21
|
+
* support sui wallets on mobile ([#9038](https://github.com/dynamic-labs/dynamic-auth/issues/9038)) ([6f077da](https://github.com/dynamic-labs/dynamic-auth/commit/6f077da7deab525b0a3c5692a50a987c98f2b7e9))
|
|
22
|
+
* upgradetoDynamicWaas hook ([#9022](https://github.com/dynamic-labs/dynamic-auth/issues/9022)) ([3f1c42d](https://github.com/dynamic-labs/dynamic-auth/commit/3f1c42d71ab8b5a88d6b622f0b5fb41eb4ca9a4b))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* allow user to retry connecting with metamask on mobile deep link ([#9018](https://github.com/dynamic-labs/dynamic-auth/issues/9018)) ([09494c4](https://github.com/dynamic-labs/dynamic-auth/commit/09494c41680bb9949dc75df843e085c7743adc66))
|
|
28
|
+
* bump react 19 incompatible dependencies in sdk-react-core ([#9034](https://github.com/dynamic-labs/dynamic-auth/issues/9034)) ([e446f9c](https://github.com/dynamic-labs/dynamic-auth/commit/e446f9c26cf6d4566bf55be2e33dd540500d8fa5))
|
|
29
|
+
* filter out policies consent field from user profile view ([#9043](https://github.com/dynamic-labs/dynamic-auth/issues/9043)) ([e0e5003](https://github.com/dynamic-labs/dynamic-auth/commit/e0e500321719f1e1cfb8a67520641a6fb2f26cf8))
|
|
30
|
+
* use sui devnet for sui transactions ([#9042](https://github.com/dynamic-labs/dynamic-auth/issues/9042)) ([c61af4a](https://github.com/dynamic-labs/dynamic-auth/commit/c61af4a544ff35081b1286fc4b871a8ae031c3f3))
|
|
31
|
+
|
|
2
32
|
### [4.20.9](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.8...v4.20.9) (2025-06-24)
|
|
3
33
|
|
|
4
34
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-evm",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.11",
|
|
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,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.699",
|
|
22
22
|
"viem": "^2.28.4",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.20.
|
|
24
|
-
"@dynamic-labs/ethereum-core": "4.20.
|
|
25
|
-
"@dynamic-labs/logger": "4.20.
|
|
26
|
-
"@dynamic-labs/types": "4.20.
|
|
27
|
-
"@dynamic-labs/utils": "4.20.
|
|
28
|
-
"@dynamic-labs/waas": "4.20.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.20.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.20.11",
|
|
24
|
+
"@dynamic-labs/ethereum-core": "4.20.11",
|
|
25
|
+
"@dynamic-labs/logger": "4.20.11",
|
|
26
|
+
"@dynamic-labs/types": "4.20.11",
|
|
27
|
+
"@dynamic-labs/utils": "4.20.11",
|
|
28
|
+
"@dynamic-labs/waas": "4.20.11",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.20.11"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -10,8 +10,8 @@ var utils$1 = require('viem/utils');
|
|
|
10
10
|
var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
11
11
|
var logger$1 = require('@dynamic-labs/logger');
|
|
12
12
|
var utils = require('@dynamic-labs/utils');
|
|
13
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
14
13
|
var waas = require('@dynamic-labs/waas');
|
|
14
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
15
15
|
|
|
16
16
|
const logger = new logger$1.Logger('DynamicWaasConnector');
|
|
17
17
|
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
@@ -142,17 +142,18 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
142
142
|
}
|
|
143
143
|
validateActiveWallet(expectedAddress) {
|
|
144
144
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
var _a, _b;
|
|
145
|
+
var _a, _b, _c;
|
|
146
146
|
const walletClient = this.getWaasWalletClient();
|
|
147
147
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
148
148
|
const targetWallet = yield walletClient.getWallet({
|
|
149
149
|
accountAddress: expectedAddress,
|
|
150
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
150
151
|
signedSessionId,
|
|
151
152
|
});
|
|
152
153
|
if (!targetWallet) {
|
|
153
154
|
throw new utils.DynamicError('Account not found');
|
|
154
155
|
}
|
|
155
|
-
const isWalletActive = walletConnectorCore.isSameAddress(targetWallet.accountAddress, ((
|
|
156
|
+
const isWalletActive = walletConnectorCore.isSameAddress(targetWallet.accountAddress, ((_c = this.getActiveAccount()) === null || _c === void 0 ? void 0 : _c.address) || '', this.connectedChain);
|
|
156
157
|
if (!isWalletActive) {
|
|
157
158
|
this.setActiveAccount(targetWallet.accountAddress);
|
|
158
159
|
}
|
|
@@ -178,10 +179,10 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
178
179
|
transaction: viem.serializeTransaction(transaction),
|
|
179
180
|
})
|
|
180
181
|
.then((tx) => tx),
|
|
181
|
-
signTypedData: (typedData) => client.
|
|
182
|
+
signTypedData: (typedData) => client.signTypedData({
|
|
182
183
|
accountAddress,
|
|
183
|
-
message: typedData,
|
|
184
184
|
signedSessionId,
|
|
185
|
+
typedData: typedData,
|
|
185
186
|
}),
|
|
186
187
|
});
|
|
187
188
|
});
|
|
@@ -240,7 +241,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
240
241
|
}
|
|
241
242
|
exportPrivateKey() {
|
|
242
243
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
243
|
-
var _a;
|
|
244
|
+
var _a, _b;
|
|
244
245
|
const walletClient = this.getWaasWalletClient();
|
|
245
246
|
const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
|
|
246
247
|
if (!targetAccountAddress) {
|
|
@@ -252,6 +253,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
252
253
|
this.__exportHandler.setIframeStamper(displayContainer);
|
|
253
254
|
yield walletClient.exportPrivateKey({
|
|
254
255
|
accountAddress: targetAccountAddress,
|
|
256
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
255
257
|
displayContainer,
|
|
256
258
|
password,
|
|
257
259
|
});
|
|
@@ -262,16 +264,23 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
262
264
|
}
|
|
263
265
|
importPrivateKey(_a) {
|
|
264
266
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
267
|
+
var _b, _c;
|
|
265
268
|
const walletClient = this.getWaasWalletClient();
|
|
269
|
+
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
270
|
+
if (!signedSessionId) {
|
|
271
|
+
throw new Error('Signed session ID is required');
|
|
272
|
+
}
|
|
266
273
|
yield walletClient.importPrivateKey({
|
|
274
|
+
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
267
275
|
privateKey,
|
|
276
|
+
signedSessionId,
|
|
268
277
|
thresholdSignatureScheme: thresholdSignatureScheme,
|
|
269
278
|
});
|
|
270
279
|
});
|
|
271
280
|
}
|
|
272
281
|
exportClientKeyshares(_a) {
|
|
273
282
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
274
|
-
var _b;
|
|
283
|
+
var _b, _c;
|
|
275
284
|
if (!accountAddress) {
|
|
276
285
|
throw new Error('Account address is required');
|
|
277
286
|
}
|
|
@@ -280,6 +289,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
280
289
|
const walletClient = this.getWaasWalletClient();
|
|
281
290
|
yield walletClient.exportClientKeyshares({
|
|
282
291
|
accountAddress,
|
|
292
|
+
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
283
293
|
password,
|
|
284
294
|
signedSessionId,
|
|
285
295
|
});
|
|
@@ -287,6 +297,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
287
297
|
}
|
|
288
298
|
backupKeySharesToGoogleDrive(_a) {
|
|
289
299
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
300
|
+
var _b;
|
|
290
301
|
if (!accountAddress) {
|
|
291
302
|
throw new Error('Account address is required');
|
|
292
303
|
}
|
|
@@ -294,12 +305,14 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
294
305
|
const walletClient = this.getWaasWalletClient();
|
|
295
306
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
296
307
|
accountAddress,
|
|
308
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
297
309
|
password,
|
|
298
310
|
});
|
|
299
311
|
});
|
|
300
312
|
}
|
|
301
313
|
refreshWalletAccountShares(_a) {
|
|
302
314
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
315
|
+
var _b;
|
|
303
316
|
if (!accountAddress) {
|
|
304
317
|
throw new Error('Account address is required');
|
|
305
318
|
}
|
|
@@ -307,12 +320,14 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
307
320
|
const walletClient = this.getWaasWalletClient();
|
|
308
321
|
return walletClient.refreshWalletAccountShares({
|
|
309
322
|
accountAddress,
|
|
323
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
310
324
|
password,
|
|
311
325
|
});
|
|
312
326
|
});
|
|
313
327
|
}
|
|
314
328
|
updatePassword(_a) {
|
|
315
329
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
|
|
330
|
+
var _b;
|
|
316
331
|
if (!accountAddress) {
|
|
317
332
|
throw new Error('Account address is required');
|
|
318
333
|
}
|
|
@@ -320,6 +335,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
320
335
|
const walletClient = this.getWaasWalletClient();
|
|
321
336
|
return walletClient.updatePassword({
|
|
322
337
|
accountAddress,
|
|
338
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
323
339
|
existingPassword,
|
|
324
340
|
newPassword,
|
|
325
341
|
});
|
|
@@ -327,6 +343,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
327
343
|
}
|
|
328
344
|
signRawMessage(_a) {
|
|
329
345
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
|
|
346
|
+
var _b;
|
|
330
347
|
if (!accountAddress) {
|
|
331
348
|
throw new Error('Account address is required');
|
|
332
349
|
}
|
|
@@ -337,6 +354,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
337
354
|
const walletClient = this.getWaasWalletClient();
|
|
338
355
|
return walletClient.signRawMessage({
|
|
339
356
|
accountAddress,
|
|
357
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
340
358
|
message,
|
|
341
359
|
password,
|
|
342
360
|
});
|
|
@@ -411,7 +429,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
411
429
|
}
|
|
412
430
|
signAuthorization(parameters, password) {
|
|
413
431
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
414
|
-
var _a;
|
|
432
|
+
var _a, _b;
|
|
415
433
|
const { address: contractAddress, nonce, chainId } = parameters;
|
|
416
434
|
if (!contractAddress) {
|
|
417
435
|
throw new Error('Contract address not found');
|
|
@@ -428,6 +446,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
428
446
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
429
447
|
const signature = yield walletClient.signRawMessage({
|
|
430
448
|
accountAddress: address,
|
|
449
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
431
450
|
message: utils$1.hashAuthorization({
|
|
432
451
|
address: contractAddress,
|
|
433
452
|
chainId,
|
|
@@ -6,8 +6,8 @@ import { hashAuthorization } from 'viem/utils';
|
|
|
6
6
|
import { EthereumWalletConnector, createWalletClientWithUiConfirmation, getOrMapViemChain, ViemUiTransaction } from '@dynamic-labs/ethereum-core';
|
|
7
7
|
import { Logger } from '@dynamic-labs/logger';
|
|
8
8
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
9
|
-
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
10
9
|
import { withDynamicWaas } from '@dynamic-labs/waas';
|
|
10
|
+
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
11
11
|
|
|
12
12
|
const logger = new Logger('DynamicWaasConnector');
|
|
13
13
|
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
@@ -138,17 +138,18 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
138
138
|
}
|
|
139
139
|
validateActiveWallet(expectedAddress) {
|
|
140
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
var _a, _b;
|
|
141
|
+
var _a, _b, _c;
|
|
142
142
|
const walletClient = this.getWaasWalletClient();
|
|
143
143
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
144
144
|
const targetWallet = yield walletClient.getWallet({
|
|
145
145
|
accountAddress: expectedAddress,
|
|
146
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
146
147
|
signedSessionId,
|
|
147
148
|
});
|
|
148
149
|
if (!targetWallet) {
|
|
149
150
|
throw new DynamicError('Account not found');
|
|
150
151
|
}
|
|
151
|
-
const isWalletActive = isSameAddress(targetWallet.accountAddress, ((
|
|
152
|
+
const isWalletActive = isSameAddress(targetWallet.accountAddress, ((_c = this.getActiveAccount()) === null || _c === void 0 ? void 0 : _c.address) || '', this.connectedChain);
|
|
152
153
|
if (!isWalletActive) {
|
|
153
154
|
this.setActiveAccount(targetWallet.accountAddress);
|
|
154
155
|
}
|
|
@@ -174,10 +175,10 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
174
175
|
transaction: serializeTransaction(transaction),
|
|
175
176
|
})
|
|
176
177
|
.then((tx) => tx),
|
|
177
|
-
signTypedData: (typedData) => client.
|
|
178
|
+
signTypedData: (typedData) => client.signTypedData({
|
|
178
179
|
accountAddress,
|
|
179
|
-
message: typedData,
|
|
180
180
|
signedSessionId,
|
|
181
|
+
typedData: typedData,
|
|
181
182
|
}),
|
|
182
183
|
});
|
|
183
184
|
});
|
|
@@ -236,7 +237,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
236
237
|
}
|
|
237
238
|
exportPrivateKey() {
|
|
238
239
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
239
|
-
var _a;
|
|
240
|
+
var _a, _b;
|
|
240
241
|
const walletClient = this.getWaasWalletClient();
|
|
241
242
|
const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
|
|
242
243
|
if (!targetAccountAddress) {
|
|
@@ -248,6 +249,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
248
249
|
this.__exportHandler.setIframeStamper(displayContainer);
|
|
249
250
|
yield walletClient.exportPrivateKey({
|
|
250
251
|
accountAddress: targetAccountAddress,
|
|
252
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
251
253
|
displayContainer,
|
|
252
254
|
password,
|
|
253
255
|
});
|
|
@@ -258,16 +260,23 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
258
260
|
}
|
|
259
261
|
importPrivateKey(_a) {
|
|
260
262
|
return __awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
263
|
+
var _b, _c;
|
|
261
264
|
const walletClient = this.getWaasWalletClient();
|
|
265
|
+
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
266
|
+
if (!signedSessionId) {
|
|
267
|
+
throw new Error('Signed session ID is required');
|
|
268
|
+
}
|
|
262
269
|
yield walletClient.importPrivateKey({
|
|
270
|
+
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
263
271
|
privateKey,
|
|
272
|
+
signedSessionId,
|
|
264
273
|
thresholdSignatureScheme: thresholdSignatureScheme,
|
|
265
274
|
});
|
|
266
275
|
});
|
|
267
276
|
}
|
|
268
277
|
exportClientKeyshares(_a) {
|
|
269
278
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
270
|
-
var _b;
|
|
279
|
+
var _b, _c;
|
|
271
280
|
if (!accountAddress) {
|
|
272
281
|
throw new Error('Account address is required');
|
|
273
282
|
}
|
|
@@ -276,6 +285,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
276
285
|
const walletClient = this.getWaasWalletClient();
|
|
277
286
|
yield walletClient.exportClientKeyshares({
|
|
278
287
|
accountAddress,
|
|
288
|
+
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
279
289
|
password,
|
|
280
290
|
signedSessionId,
|
|
281
291
|
});
|
|
@@ -283,6 +293,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
283
293
|
}
|
|
284
294
|
backupKeySharesToGoogleDrive(_a) {
|
|
285
295
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
296
|
+
var _b;
|
|
286
297
|
if (!accountAddress) {
|
|
287
298
|
throw new Error('Account address is required');
|
|
288
299
|
}
|
|
@@ -290,12 +301,14 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
290
301
|
const walletClient = this.getWaasWalletClient();
|
|
291
302
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
292
303
|
accountAddress,
|
|
304
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
293
305
|
password,
|
|
294
306
|
});
|
|
295
307
|
});
|
|
296
308
|
}
|
|
297
309
|
refreshWalletAccountShares(_a) {
|
|
298
310
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
311
|
+
var _b;
|
|
299
312
|
if (!accountAddress) {
|
|
300
313
|
throw new Error('Account address is required');
|
|
301
314
|
}
|
|
@@ -303,12 +316,14 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
303
316
|
const walletClient = this.getWaasWalletClient();
|
|
304
317
|
return walletClient.refreshWalletAccountShares({
|
|
305
318
|
accountAddress,
|
|
319
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
306
320
|
password,
|
|
307
321
|
});
|
|
308
322
|
});
|
|
309
323
|
}
|
|
310
324
|
updatePassword(_a) {
|
|
311
325
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
|
|
326
|
+
var _b;
|
|
312
327
|
if (!accountAddress) {
|
|
313
328
|
throw new Error('Account address is required');
|
|
314
329
|
}
|
|
@@ -316,6 +331,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
316
331
|
const walletClient = this.getWaasWalletClient();
|
|
317
332
|
return walletClient.updatePassword({
|
|
318
333
|
accountAddress,
|
|
334
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
319
335
|
existingPassword,
|
|
320
336
|
newPassword,
|
|
321
337
|
});
|
|
@@ -323,6 +339,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
323
339
|
}
|
|
324
340
|
signRawMessage(_a) {
|
|
325
341
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
|
|
342
|
+
var _b;
|
|
326
343
|
if (!accountAddress) {
|
|
327
344
|
throw new Error('Account address is required');
|
|
328
345
|
}
|
|
@@ -333,6 +350,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
333
350
|
const walletClient = this.getWaasWalletClient();
|
|
334
351
|
return walletClient.signRawMessage({
|
|
335
352
|
accountAddress,
|
|
353
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
336
354
|
message,
|
|
337
355
|
password,
|
|
338
356
|
});
|
|
@@ -407,7 +425,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
407
425
|
}
|
|
408
426
|
signAuthorization(parameters, password) {
|
|
409
427
|
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
-
var _a;
|
|
428
|
+
var _a, _b;
|
|
411
429
|
const { address: contractAddress, nonce, chainId } = parameters;
|
|
412
430
|
if (!contractAddress) {
|
|
413
431
|
throw new Error('Contract address not found');
|
|
@@ -424,6 +442,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
424
442
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
425
443
|
const signature = yield walletClient.signRawMessage({
|
|
426
444
|
accountAddress: address,
|
|
445
|
+
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
427
446
|
message: hashAuthorization({
|
|
428
447
|
address: contractAddress,
|
|
429
448
|
chainId,
|