@dynamic-labs/waas-evm 4.20.10 → 4.20.12

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,26 @@
1
1
 
2
+ ### [4.20.12](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.11...v4.20.12) (2025-07-01)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * bring back braavos mobile deeplink support ([#9041](https://github.com/dynamic-labs/dynamic-auth/issues/9041)) ([90a7eb6](https://github.com/dynamic-labs/dynamic-auth/commit/90a7eb620f6bd27d4560e88fe5542a121e586bed))
8
+ * start exchange funding errors should be logged as error ([#9056](https://github.com/dynamic-labs/dynamic-auth/issues/9056)) ([ba122af](https://github.com/dynamic-labs/dynamic-auth/commit/ba122afb68c462fe8627828bd20f9cc5f92803ff))
9
+ * WC redirect on mobile ([#9063](https://github.com/dynamic-labs/dynamic-auth/issues/9063)) ([f43aa4a](https://github.com/dynamic-labs/dynamic-auth/commit/f43aa4aedea20e3baf012f4778f5e6a47c27515c))
10
+
11
+ ### [4.20.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.10...v4.20.11) (2025-07-01)
12
+
13
+
14
+ ### Features
15
+
16
+ * 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))
17
+ * 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))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * 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))
23
+
2
24
  ### [4.20.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.9...v4.20.10) (2025-06-30)
3
25
 
4
26
 
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.10";
6
+ var version = "4.20.12";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.20.10";
2
+ var version = "4.20.12";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/waas-evm",
3
- "version": "4.20.10",
3
+ "version": "4.20.12",
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",
@@ -20,13 +20,13 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.699",
22
22
  "viem": "^2.28.4",
23
- "@dynamic-labs/assert-package-version": "4.20.10",
24
- "@dynamic-labs/ethereum-core": "4.20.10",
25
- "@dynamic-labs/logger": "4.20.10",
26
- "@dynamic-labs/types": "4.20.10",
27
- "@dynamic-labs/utils": "4.20.10",
28
- "@dynamic-labs/waas": "4.20.10",
29
- "@dynamic-labs/wallet-connector-core": "4.20.10"
23
+ "@dynamic-labs/assert-package-version": "4.20.12",
24
+ "@dynamic-labs/ethereum-core": "4.20.12",
25
+ "@dynamic-labs/logger": "4.20.12",
26
+ "@dynamic-labs/types": "4.20.12",
27
+ "@dynamic-labs/utils": "4.20.12",
28
+ "@dynamic-labs/waas": "4.20.12",
29
+ "@dynamic-labs/wallet-connector-core": "4.20.12"
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, ((_b = this.getActiveAccount()) === null || _b === void 0 ? void 0 : _b.address) || '', this.connectedChain);
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.signMessage({
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,13 +264,14 @@ 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', }) {
265
- var _b;
267
+ var _b, _c;
266
268
  const walletClient = this.getWaasWalletClient();
267
269
  const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
268
270
  if (!signedSessionId) {
269
271
  throw new Error('Signed session ID is required');
270
272
  }
271
273
  yield walletClient.importPrivateKey({
274
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
272
275
  privateKey,
273
276
  signedSessionId,
274
277
  thresholdSignatureScheme: thresholdSignatureScheme,
@@ -277,7 +280,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
277
280
  }
278
281
  exportClientKeyshares(_a) {
279
282
  return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
280
- var _b;
283
+ var _b, _c;
281
284
  if (!accountAddress) {
282
285
  throw new Error('Account address is required');
283
286
  }
@@ -286,6 +289,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
286
289
  const walletClient = this.getWaasWalletClient();
287
290
  yield walletClient.exportClientKeyshares({
288
291
  accountAddress,
292
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
289
293
  password,
290
294
  signedSessionId,
291
295
  });
@@ -293,6 +297,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
293
297
  }
294
298
  backupKeySharesToGoogleDrive(_a) {
295
299
  return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
300
+ var _b;
296
301
  if (!accountAddress) {
297
302
  throw new Error('Account address is required');
298
303
  }
@@ -300,12 +305,14 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
300
305
  const walletClient = this.getWaasWalletClient();
301
306
  return walletClient.backupKeySharesToGoogleDrive({
302
307
  accountAddress,
308
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
303
309
  password,
304
310
  });
305
311
  });
306
312
  }
307
313
  refreshWalletAccountShares(_a) {
308
314
  return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
315
+ var _b;
309
316
  if (!accountAddress) {
310
317
  throw new Error('Account address is required');
311
318
  }
@@ -313,12 +320,14 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
313
320
  const walletClient = this.getWaasWalletClient();
314
321
  return walletClient.refreshWalletAccountShares({
315
322
  accountAddress,
323
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
316
324
  password,
317
325
  });
318
326
  });
319
327
  }
320
328
  updatePassword(_a) {
321
329
  return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
330
+ var _b;
322
331
  if (!accountAddress) {
323
332
  throw new Error('Account address is required');
324
333
  }
@@ -326,6 +335,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
326
335
  const walletClient = this.getWaasWalletClient();
327
336
  return walletClient.updatePassword({
328
337
  accountAddress,
338
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
329
339
  existingPassword,
330
340
  newPassword,
331
341
  });
@@ -333,6 +343,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
333
343
  }
334
344
  signRawMessage(_a) {
335
345
  return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
346
+ var _b;
336
347
  if (!accountAddress) {
337
348
  throw new Error('Account address is required');
338
349
  }
@@ -343,6 +354,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
343
354
  const walletClient = this.getWaasWalletClient();
344
355
  return walletClient.signRawMessage({
345
356
  accountAddress,
357
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
346
358
  message,
347
359
  password,
348
360
  });
@@ -417,7 +429,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
417
429
  }
418
430
  signAuthorization(parameters, password) {
419
431
  return _tslib.__awaiter(this, void 0, void 0, function* () {
420
- var _a;
432
+ var _a, _b;
421
433
  const { address: contractAddress, nonce, chainId } = parameters;
422
434
  if (!contractAddress) {
423
435
  throw new Error('Contract address not found');
@@ -434,6 +446,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
434
446
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
435
447
  const signature = yield walletClient.signRawMessage({
436
448
  accountAddress: address,
449
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
437
450
  message: utils$1.hashAuthorization({
438
451
  address: contractAddress,
439
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, ((_b = this.getActiveAccount()) === null || _b === void 0 ? void 0 : _b.address) || '', this.connectedChain);
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.signMessage({
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,13 +260,14 @@ 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', }) {
261
- var _b;
263
+ var _b, _c;
262
264
  const walletClient = this.getWaasWalletClient();
263
265
  const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
264
266
  if (!signedSessionId) {
265
267
  throw new Error('Signed session ID is required');
266
268
  }
267
269
  yield walletClient.importPrivateKey({
270
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
268
271
  privateKey,
269
272
  signedSessionId,
270
273
  thresholdSignatureScheme: thresholdSignatureScheme,
@@ -273,7 +276,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
273
276
  }
274
277
  exportClientKeyshares(_a) {
275
278
  return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
276
- var _b;
279
+ var _b, _c;
277
280
  if (!accountAddress) {
278
281
  throw new Error('Account address is required');
279
282
  }
@@ -282,6 +285,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
282
285
  const walletClient = this.getWaasWalletClient();
283
286
  yield walletClient.exportClientKeyshares({
284
287
  accountAddress,
288
+ authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
285
289
  password,
286
290
  signedSessionId,
287
291
  });
@@ -289,6 +293,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
289
293
  }
290
294
  backupKeySharesToGoogleDrive(_a) {
291
295
  return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
296
+ var _b;
292
297
  if (!accountAddress) {
293
298
  throw new Error('Account address is required');
294
299
  }
@@ -296,12 +301,14 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
296
301
  const walletClient = this.getWaasWalletClient();
297
302
  return walletClient.backupKeySharesToGoogleDrive({
298
303
  accountAddress,
304
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
299
305
  password,
300
306
  });
301
307
  });
302
308
  }
303
309
  refreshWalletAccountShares(_a) {
304
310
  return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
311
+ var _b;
305
312
  if (!accountAddress) {
306
313
  throw new Error('Account address is required');
307
314
  }
@@ -309,12 +316,14 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
309
316
  const walletClient = this.getWaasWalletClient();
310
317
  return walletClient.refreshWalletAccountShares({
311
318
  accountAddress,
319
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
312
320
  password,
313
321
  });
314
322
  });
315
323
  }
316
324
  updatePassword(_a) {
317
325
  return __awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
326
+ var _b;
318
327
  if (!accountAddress) {
319
328
  throw new Error('Account address is required');
320
329
  }
@@ -322,6 +331,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
322
331
  const walletClient = this.getWaasWalletClient();
323
332
  return walletClient.updatePassword({
324
333
  accountAddress,
334
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
325
335
  existingPassword,
326
336
  newPassword,
327
337
  });
@@ -329,6 +339,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
329
339
  }
330
340
  signRawMessage(_a) {
331
341
  return __awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
342
+ var _b;
332
343
  if (!accountAddress) {
333
344
  throw new Error('Account address is required');
334
345
  }
@@ -339,6 +350,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
339
350
  const walletClient = this.getWaasWalletClient();
340
351
  return walletClient.signRawMessage({
341
352
  accountAddress,
353
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
342
354
  message,
343
355
  password,
344
356
  });
@@ -413,7 +425,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
413
425
  }
414
426
  signAuthorization(parameters, password) {
415
427
  return __awaiter(this, void 0, void 0, function* () {
416
- var _a;
428
+ var _a, _b;
417
429
  const { address: contractAddress, nonce, chainId } = parameters;
418
430
  if (!contractAddress) {
419
431
  throw new Error('Contract address not found');
@@ -430,6 +442,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
430
442
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
431
443
  const signature = yield walletClient.signRawMessage({
432
444
  accountAddress: address,
445
+ authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
433
446
  message: hashAuthorization({
434
447
  address: contractAddress,
435
448
  chainId,