@dynamic-labs/waas-evm 4.19.5 → 4.19.7

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,31 @@
1
1
 
2
+ ### [4.19.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.6...v4.19.7) (2025-06-06)
3
+
4
+
5
+ ### Features
6
+
7
+ * add util to find waas wallets ([#8871](https://github.com/dynamic-labs/dynamic-auth/issues/8871)) ([2d7114e](https://github.com/dynamic-labs/dynamic-auth/commit/2d7114e51f5badf1d04600597f1fd9433fabf3d0))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * make sure smart account is deployed before creating sessions ([#8894](https://github.com/dynamic-labs/dynamic-auth/issues/8894)) ([5ba3d23](https://github.com/dynamic-labs/dynamic-auth/commit/5ba3d23bb8ef7c7438809128c8ef74c390ba1d48))
13
+ * only deploy zksync smart account if not deployed ([#8840](https://github.com/dynamic-labs/dynamic-auth/issues/8840)) ([66a306a](https://github.com/dynamic-labs/dynamic-auth/commit/66a306aaee25c58f685fa050a5d6aea79b196fce))
14
+ * primary wallet loading time when using React 19 ([#8896](https://github.com/dynamic-labs/dynamic-auth/issues/8896)) ([f5690f3](https://github.com/dynamic-labs/dynamic-auth/commit/f5690f31012e8fc6a5650423d4ece6c04f7c1811))
15
+
16
+ ### [4.19.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.5...v4.19.6) (2025-06-04)
17
+
18
+
19
+ ### Features
20
+
21
+ * backup unsuccessful popup when create wallet fails ([#8872](https://github.com/dynamic-labs/dynamic-auth/issues/8872)) ([c8f88f2](https://github.com/dynamic-labs/dynamic-auth/commit/c8f88f2cafdb7856764305764a230e159f09dadf))
22
+ * **global-wallet:** new native api method to return the eoa wallet for a connected smart wallet ([#8864](https://github.com/dynamic-labs/dynamic-auth/issues/8864)) ([5d0e200](https://github.com/dynamic-labs/dynamic-auth/commit/5d0e2002caefb658f6120b102abe145d6caafaf4))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * dont call select endpoint when signing in with 7702 wallet ([#8854](https://github.com/dynamic-labs/dynamic-auth/issues/8854)) ([9828a8f](https://github.com/dynamic-labs/dynamic-auth/commit/9828a8fb758b07dd4dc51cb9eadee483b884defe))
28
+
2
29
  ### [4.19.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.4...v4.19.5) (2025-06-02)
3
30
 
4
31
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.19.5";
6
+ var version = "4.19.7";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.19.5";
2
+ var version = "4.19.7";
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.19.5",
3
+ "version": "4.19.7",
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-wallet/browser-wallet-client": "0.0.80",
22
- "@dynamic-labs/sdk-api-core": "0.0.672",
21
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.84",
22
+ "@dynamic-labs/sdk-api-core": "0.0.681",
23
23
  "viem": "^2.28.4",
24
- "@dynamic-labs/assert-package-version": "4.19.5",
25
- "@dynamic-labs/ethereum-core": "4.19.5",
26
- "@dynamic-labs/logger": "4.19.5",
27
- "@dynamic-labs/types": "4.19.5",
28
- "@dynamic-labs/utils": "4.19.5",
29
- "@dynamic-labs/wallet-connector-core": "4.19.5"
24
+ "@dynamic-labs/assert-package-version": "4.19.7",
25
+ "@dynamic-labs/ethereum-core": "4.19.7",
26
+ "@dynamic-labs/logger": "4.19.7",
27
+ "@dynamic-labs/types": "4.19.7",
28
+ "@dynamic-labs/utils": "4.19.7",
29
+ "@dynamic-labs/wallet-connector-core": "4.19.7"
30
30
  },
31
31
  "peerDependencies": {}
32
32
  }
@@ -4,14 +4,14 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../_virtual/_tslib.cjs');
7
+ var browserWalletClient = require('@dynamic-labs-wallet/browser-wallet-client');
7
8
  var viem = require('viem');
8
9
  var accounts = require('viem/accounts');
9
- var browserWalletClient = require('@dynamic-labs-wallet/browser-wallet-client');
10
10
  var utils$1 = require('viem/utils');
11
- var logger$1 = require('@dynamic-labs/logger');
12
- var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
13
11
  var ethereumCore = require('@dynamic-labs/ethereum-core');
12
+ var logger$1 = require('@dynamic-labs/logger');
14
13
  var utils = require('@dynamic-labs/utils');
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
@@ -262,7 +262,7 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
262
262
  return this.getWalletClient();
263
263
  }
264
264
  exportPrivateKey() {
265
- return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, } = {}) {
265
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
266
266
  var _a;
267
267
  const walletClient = this.getWaasWalletClient();
268
268
  const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
@@ -276,6 +276,7 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
276
276
  yield walletClient.exportPrivateKey({
277
277
  accountAddress: targetAccountAddress,
278
278
  displayContainer,
279
+ password,
279
280
  });
280
281
  });
281
282
  }
@@ -292,7 +293,7 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
292
293
  });
293
294
  }
294
295
  exportClientKeyshares(_a) {
295
- return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
296
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
296
297
  if (!accountAddress) {
297
298
  throw new Error('Account address is required');
298
299
  }
@@ -300,6 +301,64 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
300
301
  const walletClient = this.getWaasWalletClient();
301
302
  yield walletClient.exportClientKeyshares({
302
303
  accountAddress,
304
+ password,
305
+ });
306
+ });
307
+ }
308
+ backupKeySharesToGoogleDrive(_a) {
309
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
310
+ if (!accountAddress) {
311
+ throw new Error('Account address is required');
312
+ }
313
+ this.setActiveAccount(accountAddress);
314
+ const walletClient = this.getWaasWalletClient();
315
+ return walletClient.backupKeySharesToGoogleDrive({
316
+ accountAddress,
317
+ password,
318
+ });
319
+ });
320
+ }
321
+ refreshWalletAccountShares(_a) {
322
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
323
+ if (!accountAddress) {
324
+ throw new Error('Account address is required');
325
+ }
326
+ this.setActiveAccount(accountAddress);
327
+ const walletClient = this.getWaasWalletClient();
328
+ return walletClient.refreshWalletAccountShares({
329
+ accountAddress,
330
+ password,
331
+ });
332
+ });
333
+ }
334
+ updatePassword(_a) {
335
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
336
+ if (!accountAddress) {
337
+ throw new Error('Account address is required');
338
+ }
339
+ this.setActiveAccount(accountAddress);
340
+ const walletClient = this.getWaasWalletClient();
341
+ return walletClient.updatePassword({
342
+ accountAddress,
343
+ existingPassword,
344
+ newPassword,
345
+ });
346
+ });
347
+ }
348
+ signRawMessage(_a) {
349
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
350
+ if (!accountAddress) {
351
+ throw new Error('Account address is required');
352
+ }
353
+ if (message.length !== 64) {
354
+ throw new Error('Message must be 64 characters long');
355
+ }
356
+ this.setActiveAccount(accountAddress);
357
+ const walletClient = this.getWaasWalletClient();
358
+ return walletClient.signRawMessage({
359
+ accountAddress,
360
+ message,
361
+ password,
303
362
  });
304
363
  });
305
364
  }
@@ -370,7 +429,7 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
370
429
  return activeAccount.address;
371
430
  });
372
431
  }
373
- signAuthorization(parameters) {
432
+ signAuthorization(parameters, password) {
374
433
  return _tslib.__awaiter(this, void 0, void 0, function* () {
375
434
  const { address: contractAddress, nonce, chainId } = parameters;
376
435
  if (!contractAddress) {
@@ -392,6 +451,7 @@ class DynamicWaasEVMConnector extends ethereumCore.EthereumWalletConnector {
392
451
  chainId,
393
452
  nonce,
394
453
  }).slice(2),
454
+ password,
395
455
  });
396
456
  const parsedSignature = viem.parseSignature(signature);
397
457
  return {
@@ -1,10 +1,10 @@
1
- import { Account, Hex, Transport, WalletClient, Chain as ViemChain } from 'viem';
2
- import { LocalAccount, SignAuthorizationParameters, SignAuthorizationReturnType } from 'viem/accounts';
3
1
  import { DynamicWalletClient } from '@dynamic-labs-wallet/browser-wallet-client';
4
- import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
5
- import { EthereumWalletConnector, SwitchNetworkOps, EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
6
- import { IUITransaction } from '@dynamic-labs/types';
2
+ import { Account, Hex, Transport, Chain as ViemChain, WalletClient } from 'viem';
3
+ import { LocalAccount, SignAuthorizationParameters, SignAuthorizationReturnType } from 'viem/accounts';
4
+ import { EthereumWalletConnector, EthereumWalletConnectorOpts, SwitchNetworkOps } from '@dynamic-labs/ethereum-core';
7
5
  import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';
6
+ import { IUITransaction } from '@dynamic-labs/types';
7
+ import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
8
8
  interface JwtVerifiedCredentialWithSmartWalletRef extends JwtVerifiedCredential {
9
9
  smartWalletRefId?: string;
10
10
  smartWalletRefAddress?: string;
@@ -49,7 +49,7 @@ export declare class DynamicWaasEVMConnector extends EthereumWalletConnector imp
49
49
  switchNetwork({ networkChainId, }: SwitchNetworkOps): Promise<void>;
50
50
  private getRpcUrl;
51
51
  createDynamicWaasClient(): DynamicWalletClient;
52
- getWaasWalletClient(): DynamicWalletClient;
52
+ private getWaasWalletClient;
53
53
  validateActiveWallet(expectedAddress: string): Promise<void>;
54
54
  getViemAccount({ accountAddress }: {
55
55
  accountAddress: string;
@@ -68,9 +68,10 @@ export declare class DynamicWaasEVMConnector extends EthereumWalletConnector imp
68
68
  getWalletClientByAddress({ accountAddress, }: {
69
69
  accountAddress: string;
70
70
  }): WalletClient<Transport, ViemChain, Account> | undefined;
71
- exportPrivateKey({ accountAddress, displayContainer, }?: {
71
+ exportPrivateKey({ accountAddress, displayContainer, password, }?: {
72
72
  accountAddress?: string;
73
73
  displayContainer?: HTMLIFrameElement;
74
+ password?: string;
74
75
  }): Promise<void>;
75
76
  getExportHandler(): {
76
77
  clear: () => void;
@@ -79,13 +80,32 @@ export declare class DynamicWaasEVMConnector extends EthereumWalletConnector imp
79
80
  privateKey: string;
80
81
  thresholdSignatureScheme?: string;
81
82
  }): Promise<void>;
82
- exportClientKeyshares({ accountAddress, }: {
83
+ exportClientKeyshares({ accountAddress, password, }: {
83
84
  accountAddress: string;
85
+ password?: string;
84
86
  }): Promise<void>;
87
+ backupKeySharesToGoogleDrive({ accountAddress, password, }: {
88
+ accountAddress: string;
89
+ password?: string;
90
+ }): Promise<void>;
91
+ refreshWalletAccountShares({ accountAddress, password, }: {
92
+ accountAddress: string;
93
+ password?: string;
94
+ }): Promise<void>;
95
+ updatePassword({ accountAddress, existingPassword, newPassword, }: {
96
+ accountAddress: string;
97
+ existingPassword: string;
98
+ newPassword: string;
99
+ }): Promise<void>;
100
+ signRawMessage({ accountAddress, message, password, }: {
101
+ accountAddress: string;
102
+ message: string;
103
+ password?: string;
104
+ }): Promise<string>;
85
105
  createUiTransaction(from: string): Promise<IUITransaction>;
86
106
  getConnectedAccounts(): Promise<string[]>;
87
107
  getAddress(): Promise<string>;
88
- signAuthorization(parameters: SignAuthorizationParametersWithoutPrivateKey): Promise<SignAuthorizationReturnType>;
108
+ signAuthorization(parameters: SignAuthorizationParametersWithoutPrivateKey, password?: string): Promise<SignAuthorizationReturnType>;
89
109
  isAtomicSupported(chainId?: number): Promise<boolean>;
90
110
  isPaymasterServiceSupported(chainId?: number): Promise<boolean>;
91
111
  isSignAuthorizationSupported(): boolean;
@@ -1,13 +1,13 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../_virtual/_tslib.js';
3
+ import { DynamicWalletClient } from '@dynamic-labs-wallet/browser-wallet-client';
3
4
  import { serializeTransaction, http, erc20Abi, parseSignature } from 'viem';
4
5
  import { toAccount } from 'viem/accounts';
5
- import { DynamicWalletClient } from '@dynamic-labs-wallet/browser-wallet-client';
6
6
  import { hashAuthorization } from 'viem/utils';
7
- import { Logger } from '@dynamic-labs/logger';
8
- import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
9
7
  import { EthereumWalletConnector, createWalletClientWithUiConfirmation, getOrMapViemChain, ViemUiTransaction } from '@dynamic-labs/ethereum-core';
8
+ import { Logger } from '@dynamic-labs/logger';
10
9
  import { DynamicError } from '@dynamic-labs/utils';
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
@@ -258,7 +258,7 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
258
258
  return this.getWalletClient();
259
259
  }
260
260
  exportPrivateKey() {
261
- return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, } = {}) {
261
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
262
262
  var _a;
263
263
  const walletClient = this.getWaasWalletClient();
264
264
  const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
@@ -272,6 +272,7 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
272
272
  yield walletClient.exportPrivateKey({
273
273
  accountAddress: targetAccountAddress,
274
274
  displayContainer,
275
+ password,
275
276
  });
276
277
  });
277
278
  }
@@ -288,7 +289,7 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
288
289
  });
289
290
  }
290
291
  exportClientKeyshares(_a) {
291
- return __awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
292
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
292
293
  if (!accountAddress) {
293
294
  throw new Error('Account address is required');
294
295
  }
@@ -296,6 +297,64 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
296
297
  const walletClient = this.getWaasWalletClient();
297
298
  yield walletClient.exportClientKeyshares({
298
299
  accountAddress,
300
+ password,
301
+ });
302
+ });
303
+ }
304
+ backupKeySharesToGoogleDrive(_a) {
305
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
306
+ if (!accountAddress) {
307
+ throw new Error('Account address is required');
308
+ }
309
+ this.setActiveAccount(accountAddress);
310
+ const walletClient = this.getWaasWalletClient();
311
+ return walletClient.backupKeySharesToGoogleDrive({
312
+ accountAddress,
313
+ password,
314
+ });
315
+ });
316
+ }
317
+ refreshWalletAccountShares(_a) {
318
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
319
+ if (!accountAddress) {
320
+ throw new Error('Account address is required');
321
+ }
322
+ this.setActiveAccount(accountAddress);
323
+ const walletClient = this.getWaasWalletClient();
324
+ return walletClient.refreshWalletAccountShares({
325
+ accountAddress,
326
+ password,
327
+ });
328
+ });
329
+ }
330
+ updatePassword(_a) {
331
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, existingPassword, newPassword, }) {
332
+ if (!accountAddress) {
333
+ throw new Error('Account address is required');
334
+ }
335
+ this.setActiveAccount(accountAddress);
336
+ const walletClient = this.getWaasWalletClient();
337
+ return walletClient.updatePassword({
338
+ accountAddress,
339
+ existingPassword,
340
+ newPassword,
341
+ });
342
+ });
343
+ }
344
+ signRawMessage(_a) {
345
+ return __awaiter(this, arguments, void 0, function* ({ accountAddress, message, password, }) {
346
+ if (!accountAddress) {
347
+ throw new Error('Account address is required');
348
+ }
349
+ if (message.length !== 64) {
350
+ throw new Error('Message must be 64 characters long');
351
+ }
352
+ this.setActiveAccount(accountAddress);
353
+ const walletClient = this.getWaasWalletClient();
354
+ return walletClient.signRawMessage({
355
+ accountAddress,
356
+ message,
357
+ password,
299
358
  });
300
359
  });
301
360
  }
@@ -366,7 +425,7 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
366
425
  return activeAccount.address;
367
426
  });
368
427
  }
369
- signAuthorization(parameters) {
428
+ signAuthorization(parameters, password) {
370
429
  return __awaiter(this, void 0, void 0, function* () {
371
430
  const { address: contractAddress, nonce, chainId } = parameters;
372
431
  if (!contractAddress) {
@@ -388,6 +447,7 @@ class DynamicWaasEVMConnector extends EthereumWalletConnector {
388
447
  chainId,
389
448
  nonce,
390
449
  }).slice(2),
450
+ password,
391
451
  });
392
452
  const parsedSignature = parseSignature(signature);
393
453
  return {