@dynamic-labs/ethereum-aa 4.29.3 → 4.29.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,22 @@
1
1
 
2
+ ### [4.29.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.4...v4.29.5) (2025-08-29)
3
+
4
+
5
+ ### Features
6
+
7
+ * add error component to connector when transaction fails ([#9418](https://github.com/dynamic-labs/dynamic-auth/issues/9418)) ([eba2ac4](https://github.com/dynamic-labs/dynamic-auth/commit/eba2ac4c5cc5d780da9eaf1505c27f5ea42770d7))
8
+ * export ChainEnum from sdk-react-core for better developer experience ([#9396](https://github.com/dynamic-labs/dynamic-auth/issues/9396)) ([f0f745a](https://github.com/dynamic-labs/dynamic-auth/commit/f0f745a6528be63b4a2ec9e6ef6fc775c42e2f3e))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * create new kernel clients when the signer changes ([#9422](https://github.com/dynamic-labs/dynamic-auth/issues/9422)) ([e2b1c82](https://github.com/dynamic-labs/dynamic-auth/commit/e2b1c823de4c3a847dc3d2c5b64a50522b9e777a))
14
+ * ensure waas wallet is correct when signing in react native ([#9423](https://github.com/dynamic-labs/dynamic-auth/issues/9423)) ([8dc35aa](https://github.com/dynamic-labs/dynamic-auth/commit/8dc35aac99d7ea5c01085a925ffaaaa154aa09fe))
15
+ * remove default chainName from useTokenBalances hook ([#9407](https://github.com/dynamic-labs/dynamic-auth/issues/9407)) ([dfd95de](https://github.com/dynamic-labs/dynamic-auth/commit/dfd95de44b0e83dd5fba2b1110cbf2e04a622690))
16
+ * upgrade smart accounts to MPC ([#9348](https://github.com/dynamic-labs/dynamic-auth/issues/9348)) ([3c33443](https://github.com/dynamic-labs/dynamic-auth/commit/3c33443f3dd97bf657eba80a555f6df11253867b))
17
+
18
+ ### [4.29.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.3...v4.29.4) (2025-08-26)
19
+
2
20
  ### [4.29.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.2...v4.29.3) (2025-08-26)
3
21
 
4
22
  ### [4.29.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.1...v4.29.2) (2025-08-25)
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.29.3";
6
+ var version = "4.29.5";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.29.3";
2
+ var version = "4.29.5";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "4.29.3",
3
+ "version": "4.29.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/sdk-api-core": "0.0.758",
21
+ "@dynamic-labs/sdk-api-core": "0.0.762",
22
22
  "@zerodev/ecdsa-validator": "5.4.9",
23
23
  "@zerodev/multi-chain-ecdsa-validator": "5.4.5",
24
24
  "@zerodev/sdk": "5.4.36",
25
- "@dynamic-labs/assert-package-version": "4.29.3",
26
- "@dynamic-labs/ethereum-aa-core": "4.29.3",
27
- "@dynamic-labs/ethereum-core": "4.29.3",
28
- "@dynamic-labs/logger": "4.29.3",
29
- "@dynamic-labs/types": "4.29.3",
30
- "@dynamic-labs/utils": "4.29.3",
31
- "@dynamic-labs/wallet-book": "4.29.3",
32
- "@dynamic-labs/wallet-connector-core": "4.29.3"
25
+ "@dynamic-labs/assert-package-version": "4.29.5",
26
+ "@dynamic-labs/ethereum-aa-core": "4.29.5",
27
+ "@dynamic-labs/ethereum-core": "4.29.5",
28
+ "@dynamic-labs/logger": "4.29.5",
29
+ "@dynamic-labs/types": "4.29.5",
30
+ "@dynamic-labs/utils": "4.29.5",
31
+ "@dynamic-labs/wallet-book": "4.29.5",
32
+ "@dynamic-labs/wallet-connector-core": "4.29.5"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "viem": "^2.28.4"
@@ -277,6 +277,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
277
277
  providerMap[chain] = {
278
278
  kernelClient,
279
279
  kernelClientWithSponsorship,
280
+ signerAddress: signer.account.address,
280
281
  };
281
282
  yield this.warnIfProjectChainNotEnabled(utils.parseChainId(chain));
282
283
  })));
@@ -327,7 +328,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
327
328
  }
328
329
  getOrCreateKernelClient(_a) {
329
330
  return _tslib.__awaiter(this, arguments, void 0, function* ({ chainId, projectId, signer, paymaster, }) {
330
- if (chainId && this.providerMap[chainId]) {
331
+ if (chainId &&
332
+ this.providerMap[chainId] &&
333
+ this.providerMap[chainId].signerAddress === signer.account.address) {
331
334
  return paymaster === createEcdsaKernelAccountClient.PaymasterTypeEnum.SPONSOR
332
335
  ? this.providerMap[chainId].kernelClientWithSponsorship
333
336
  : this.providerMap[chainId].kernelClient;
@@ -559,9 +562,11 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
559
562
  viem.toHex(params.paymasterPostOpGasLimit).slice(2).padStart(32, '0') + // Make sure it's 32 chars
560
563
  params.paymasterData.slice(2) // Include full paymaster data
561
564
  : '0x';
562
- return Object.assign({ accountGasLimits: accountGasLimits, callData: params.callData, gasFees: gasFees, initCode, nonce: viem.toHex(params.nonce), paymasterAndData: paymasterAndData.toLowerCase(), preVerificationGas: preVerificationGas, sender: params.sender, signature: '0x' }, (withAuthorization && {
563
- eip7702Auth: params.authorization,
565
+ const response = Object.assign({ accountGasLimits: accountGasLimits, callData: params.callData, gasFees: gasFees, initCode, nonce: viem.toHex(params.nonce), paymasterAndData: paymasterAndData.toLowerCase(), preVerificationGas: preVerificationGas, sender: params.sender, signature: '0x' }, (withAuthorization &&
566
+ params.authorization && {
567
+ eip7702Auth: Object.assign(Object.assign({}, params.authorization), { chainId: viem.toHex(params.authorization.chainId), nonce: viem.toHex(params.authorization.nonce), yParity: viem.toHex(params.authorization.yParity) }),
564
568
  }));
569
+ return response;
565
570
  });
566
571
  }
567
572
  signAndSendUserOperationWithWaas(provider, userOperation) {
@@ -571,16 +576,15 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
571
576
  chainId: chainId,
572
577
  entryPointAddress: this.entryPoint.address,
573
578
  entryPointVersion: this.entryPoint.version,
574
- userOperation: userOperation,
579
+ userOperation,
575
580
  });
576
- const formattedUserOperation = yield this.formatUserOperation(userOperation, true);
577
581
  // At this point we know eoaConnector is a WAAS connector
578
582
  const signature = yield this.eoaConnector.signMessageWithContext({
579
583
  context: {
580
584
  evmUserOperation: {
581
585
  chainId,
582
586
  entryPoint: this.entryPoint.address,
583
- operation: formattedUserOperation,
587
+ operation: userOperation,
584
588
  },
585
589
  },
586
590
  message: { raw: hash },
@@ -79,6 +79,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
79
79
  constructor(opts: ZeroDevConnectorProps);
80
80
  confirmTransactionStatus(): Promise<TransactionReceipt>;
81
81
  get currentNetworkProvider(): {
82
+ signerAddress: string;
82
83
  kernelClient: KernelClient;
83
84
  kernelClientWithSponsorship: KernelClient;
84
85
  } | undefined;
@@ -131,34 +132,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
131
132
  private getTransport;
132
133
  getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
133
134
  getPublicClient(): Promise<void | PublicClient<Transport, ViemChain> | undefined>;
134
- formatUserOperation(params: any, withAuthorization?: boolean): Promise<{
135
- callData: any;
136
- callGasLimit: `0x${string}`;
137
- initCode: string;
138
- maxFeePerGas: `0x${string}`;
139
- maxPriorityFeePerGas: `0x${string}`;
140
- nonce: `0x${string}`;
141
- paymasterAndData: any;
142
- preVerificationGas: `0x${string}`;
143
- sender: any;
144
- signature: string;
145
- verificationGasLimit: `0x${string}`;
146
- } | {
147
- eip7702Auth?: any;
148
- accountGasLimits: string;
149
- callData: any;
150
- gasFees: string;
151
- initCode: string;
152
- nonce: `0x${string}`;
153
- paymasterAndData: string;
154
- preVerificationGas: `0x${string}`;
155
- sender: any;
156
- signature: string;
157
- callGasLimit?: undefined;
158
- maxFeePerGas?: undefined;
159
- maxPriorityFeePerGas?: undefined;
160
- verificationGasLimit?: undefined;
161
- }>;
135
+ formatUserOperation(params: any, withAuthorization?: boolean): Promise<any>;
162
136
  private signAndSendUserOperationWithWaas;
163
137
  getCurrentUserOperation(transaction: {
164
138
  from: string;
@@ -273,6 +273,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
273
273
  providerMap[chain] = {
274
274
  kernelClient,
275
275
  kernelClientWithSponsorship,
276
+ signerAddress: signer.account.address,
276
277
  };
277
278
  yield this.warnIfProjectChainNotEnabled(parseChainId(chain));
278
279
  })));
@@ -323,7 +324,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
323
324
  }
324
325
  getOrCreateKernelClient(_a) {
325
326
  return __awaiter(this, arguments, void 0, function* ({ chainId, projectId, signer, paymaster, }) {
326
- if (chainId && this.providerMap[chainId]) {
327
+ if (chainId &&
328
+ this.providerMap[chainId] &&
329
+ this.providerMap[chainId].signerAddress === signer.account.address) {
327
330
  return paymaster === PaymasterTypeEnum.SPONSOR
328
331
  ? this.providerMap[chainId].kernelClientWithSponsorship
329
332
  : this.providerMap[chainId].kernelClient;
@@ -555,9 +558,11 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
555
558
  toHex(params.paymasterPostOpGasLimit).slice(2).padStart(32, '0') + // Make sure it's 32 chars
556
559
  params.paymasterData.slice(2) // Include full paymaster data
557
560
  : '0x';
558
- return Object.assign({ accountGasLimits: accountGasLimits, callData: params.callData, gasFees: gasFees, initCode, nonce: toHex(params.nonce), paymasterAndData: paymasterAndData.toLowerCase(), preVerificationGas: preVerificationGas, sender: params.sender, signature: '0x' }, (withAuthorization && {
559
- eip7702Auth: params.authorization,
561
+ const response = Object.assign({ accountGasLimits: accountGasLimits, callData: params.callData, gasFees: gasFees, initCode, nonce: toHex(params.nonce), paymasterAndData: paymasterAndData.toLowerCase(), preVerificationGas: preVerificationGas, sender: params.sender, signature: '0x' }, (withAuthorization &&
562
+ params.authorization && {
563
+ eip7702Auth: Object.assign(Object.assign({}, params.authorization), { chainId: toHex(params.authorization.chainId), nonce: toHex(params.authorization.nonce), yParity: toHex(params.authorization.yParity) }),
560
564
  }));
565
+ return response;
561
566
  });
562
567
  }
563
568
  signAndSendUserOperationWithWaas(provider, userOperation) {
@@ -567,16 +572,15 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
567
572
  chainId: chainId,
568
573
  entryPointAddress: this.entryPoint.address,
569
574
  entryPointVersion: this.entryPoint.version,
570
- userOperation: userOperation,
575
+ userOperation,
571
576
  });
572
- const formattedUserOperation = yield this.formatUserOperation(userOperation, true);
573
577
  // At this point we know eoaConnector is a WAAS connector
574
578
  const signature = yield this.eoaConnector.signMessageWithContext({
575
579
  context: {
576
580
  evmUserOperation: {
577
581
  chainId,
578
582
  entryPoint: this.entryPoint.address,
579
- operation: formattedUserOperation,
583
+ operation: userOperation,
580
584
  },
581
585
  },
582
586
  message: { raw: hash },