@dynamic-labs/ethereum-aa 4.15.0 → 4.16.0

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.16.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.15.0...v4.16.0) (2025-05-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * (GVTY-3020) add send balance to waas sui connector ([#8638](https://github.com/dynamic-labs/dynamic-auth/issues/8638)) ([97f0af0](https://github.com/dynamic-labs/dynamic-auth/commit/97f0af0504a0079ebf0958fde1f8edc34c035927))
8
+ * add isAtomicSupported and isPaymasterServiceSupported methods to EthereumWallet ([#8627](https://github.com/dynamic-labs/dynamic-auth/issues/8627)) ([df82b9e](https://github.com/dynamic-labs/dynamic-auth/commit/df82b9e86eafea9dd6c505227722450bc56d7c57))
9
+ * add solana mpc to global wallets ([#8605](https://github.com/dynamic-labs/dynamic-auth/issues/8605)) ([6261bf9](https://github.com/dynamic-labs/dynamic-auth/commit/6261bf9bec45b1d1afa13869cf5d10cda215783e))
10
+
2
11
  ## [4.15.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.14.0...v4.15.0) (2025-04-30)
3
12
 
4
13
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.15.0";
6
+ var version = "4.16.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.15.0";
2
+ var version = "4.16.0";
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.15.0",
3
+ "version": "4.16.0",
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",
@@ -22,14 +22,14 @@
22
22
  "@zerodev/ecdsa-validator": "5.4.4",
23
23
  "@zerodev/multi-chain-ecdsa-validator": "5.4.3",
24
24
  "@zerodev/sdk": "5.4.26",
25
- "@dynamic-labs/assert-package-version": "4.15.0",
26
- "@dynamic-labs/ethereum-aa-core": "4.15.0",
27
- "@dynamic-labs/ethereum-core": "4.15.0",
28
- "@dynamic-labs/logger": "4.15.0",
29
- "@dynamic-labs/types": "4.15.0",
30
- "@dynamic-labs/utils": "4.15.0",
31
- "@dynamic-labs/wallet-book": "4.15.0",
32
- "@dynamic-labs/wallet-connector-core": "4.15.0"
25
+ "@dynamic-labs/assert-package-version": "4.16.0",
26
+ "@dynamic-labs/ethereum-aa-core": "4.16.0",
27
+ "@dynamic-labs/ethereum-core": "4.16.0",
28
+ "@dynamic-labs/logger": "4.16.0",
29
+ "@dynamic-labs/types": "4.16.0",
30
+ "@dynamic-labs/utils": "4.16.0",
31
+ "@dynamic-labs/wallet-book": "4.16.0",
32
+ "@dynamic-labs/wallet-connector-core": "4.16.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "viem": "^2.21.60"
@@ -296,6 +296,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
296
296
  }
297
297
  createKernelClient(_a) {
298
298
  return _tslib.__awaiter(this, arguments, void 0, function* ({ chainId, projectId, signer, paymaster, authorization, }) {
299
+ var _b;
299
300
  if (chainId && this.providerMap[chainId]) {
300
301
  return paymaster === 'SPONSOR'
301
302
  ? this.providerMap[chainId].kernelClientWithSponsorship
@@ -305,6 +306,8 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
305
306
  if (!eoaConnector)
306
307
  throw new utils.DynamicError('No EOA connector');
307
308
  const chain = ethereumCore.chainsMap[chainId];
309
+ const network = this.evmNetworks.find((network) => network.chainId === utils.parseChainId(chainId));
310
+ const publicClientRpc = (_b = network === null || network === void 0 ? void 0 : network.privateCustomerRpcUrls) === null || _b === void 0 ? void 0 : _b[0];
308
311
  let kernelClient;
309
312
  if (this.enableEIP7702Mode) {
310
313
  kernelClient = yield createEcdsaKernelAccountClient.createEcdsaKernelAccountClientWith7702({
@@ -319,6 +322,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
319
322
  paymasterRpc: ZeroDevConnector.paymasterRpc,
320
323
  projectId,
321
324
  provider: ZeroDevConnector.bundlerProvider,
325
+ publicClientRpc,
322
326
  signer,
323
327
  });
324
328
  }
@@ -334,6 +338,7 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
334
338
  paymasterRpc: ZeroDevConnector.paymasterRpc,
335
339
  projectId,
336
340
  provider: ZeroDevConnector.bundlerProvider,
341
+ publicClientRpc,
337
342
  signer,
338
343
  });
339
344
  }
@@ -1,6 +1,6 @@
1
1
  import { KernelAccountClient } from '@zerodev/sdk/clients';
2
2
  import { SmartAccount, EntryPointVersion } from 'viem/account-abstraction';
3
- import { Client, PublicClient, RpcSchema, Transport, WalletClient } from 'viem';
3
+ import { Account, Client, PublicClient, RpcSchema, Transport, WalletClient } from 'viem';
4
4
  import { SignAuthorizationReturnType } from 'viem/accounts';
5
5
  import { type Chain as ViemChain } from 'viem/chains';
6
6
  import { EntryPointType, KERNEL_VERSION_TYPE } from '@zerodev/sdk/types';
@@ -110,7 +110,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
110
110
  getConnectedAccounts(): Promise<string[]>;
111
111
  getNetwork(): Promise<number | undefined>;
112
112
  private getTransport;
113
- getWalletClient(chainId?: string): WalletClient<Transport, ViemChain> | undefined;
113
+ getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
114
114
  getPublicClient(): Promise<void | PublicClient<Transport, ViemChain> | undefined>;
115
115
  formatUserOperation(params: any): Promise<{
116
116
  callData: any;
@@ -292,6 +292,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
292
292
  }
293
293
  createKernelClient(_a) {
294
294
  return __awaiter(this, arguments, void 0, function* ({ chainId, projectId, signer, paymaster, authorization, }) {
295
+ var _b;
295
296
  if (chainId && this.providerMap[chainId]) {
296
297
  return paymaster === 'SPONSOR'
297
298
  ? this.providerMap[chainId].kernelClientWithSponsorship
@@ -301,6 +302,8 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
301
302
  if (!eoaConnector)
302
303
  throw new DynamicError('No EOA connector');
303
304
  const chain = chainsMap[chainId];
305
+ const network = this.evmNetworks.find((network) => network.chainId === parseChainId(chainId));
306
+ const publicClientRpc = (_b = network === null || network === void 0 ? void 0 : network.privateCustomerRpcUrls) === null || _b === void 0 ? void 0 : _b[0];
304
307
  let kernelClient;
305
308
  if (this.enableEIP7702Mode) {
306
309
  kernelClient = yield createEcdsaKernelAccountClientWith7702({
@@ -315,6 +318,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
315
318
  paymasterRpc: ZeroDevConnector.paymasterRpc,
316
319
  projectId,
317
320
  provider: ZeroDevConnector.bundlerProvider,
321
+ publicClientRpc,
318
322
  signer,
319
323
  });
320
324
  }
@@ -330,6 +334,7 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
330
334
  paymasterRpc: ZeroDevConnector.paymasterRpc,
331
335
  projectId,
332
336
  provider: ZeroDevConnector.bundlerProvider,
337
+ publicClientRpc,
333
338
  signer,
334
339
  });
335
340
  }
@@ -26,10 +26,10 @@ const getZeroDevPaymasterRPC = (projectId, provider) => {
26
26
  return rpc;
27
27
  };
28
28
  const isERC20 = (value) => viem.isAddress(value);
29
- const createPublicAndPaymasterClients = (bundlerRpc, paymasterRpc, chain) => {
29
+ const createPublicAndPaymasterClients = (bundlerRpc, paymasterRpc, chain, publicClientRpc) => {
30
30
  const publicClient = viem.createPublicClient({
31
31
  chain,
32
- transport: viem.http(bundlerRpc),
32
+ transport: publicClientRpc ? viem.http(publicClientRpc) : viem.http(bundlerRpc),
33
33
  });
34
34
  const zerodevPaymaster = clients.createZeroDevPaymasterClient({
35
35
  chain,
@@ -65,10 +65,10 @@ const createKernelClientConfig = (account, bundlerRpc, chain, publicClient, paym
65
65
  estimateFeesPerGas: (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ bundlerClient }) { return actions.getUserOperationGasPrice(bundlerClient); }),
66
66
  },
67
67
  });
68
- const createEcdsaKernelAccountClient = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator: ecdsaValidator$1, enableKernelV3Migration, }) {
68
+ const createEcdsaKernelAccountClient = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator: ecdsaValidator$1, enableKernelV3Migration, publicClientRpc, }) {
69
69
  const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
70
70
  const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
71
- const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain);
71
+ const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain, publicClientRpc);
72
72
  const validator = yield ecdsaValidator$1(publicClient, {
73
73
  entryPoint,
74
74
  kernelVersion,
@@ -97,10 +97,10 @@ const createEcdsaKernelAccountClient = (_b) => _tslib.__awaiter(void 0, [_b], vo
97
97
  const clientConfig = createKernelClientConfig(selectedAccount, resolvedBundlerRpc, chain, publicClient, paymasterHandler);
98
98
  return clients.createKernelAccountClient(clientConfig);
99
99
  });
100
- const createEcdsaKernelAccountClientWith7702 = (_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, }) {
100
+ const createEcdsaKernelAccountClientWith7702 = (_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, publicClientRpc, }) {
101
101
  const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
102
102
  const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
103
- const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain);
103
+ const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain, publicClientRpc);
104
104
  const validator = yield ecdsaValidator(publicClient, {
105
105
  entryPoint,
106
106
  kernelVersion,
@@ -21,9 +21,10 @@ type CommonClientParams<TChain extends Chain | undefined = Chain | undefined> =
21
21
  kernelVersion: GetKernelVersion<EntryPointVersion>;
22
22
  ecdsaValidator: any;
23
23
  enableKernelV3Migration: boolean;
24
+ publicClientRpc?: string;
24
25
  };
25
- export declare const createEcdsaKernelAccountClient: <entryPoint extends EntryPointVersion, TChain extends ViemChain | undefined = ViemChain | undefined>({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster, entryPoint, kernelVersion, ecdsaValidator, enableKernelV3Migration, }: CommonClientParams<TChain>) => Promise<KernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>>;
26
- export declare const createEcdsaKernelAccountClientWith7702: <TChain extends ViemChain | undefined = ViemChain | undefined>({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster, entryPoint, kernelVersion, ecdsaValidator, }: CommonClientParams<TChain> & {
26
+ export declare const createEcdsaKernelAccountClient: <entryPoint extends EntryPointVersion, TChain extends ViemChain | undefined = ViemChain | undefined>({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster, entryPoint, kernelVersion, ecdsaValidator, enableKernelV3Migration, publicClientRpc, }: CommonClientParams<TChain>) => Promise<KernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>>;
27
+ export declare const createEcdsaKernelAccountClientWith7702: <TChain extends ViemChain | undefined = ViemChain | undefined>({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster, entryPoint, kernelVersion, ecdsaValidator, publicClientRpc, }: CommonClientParams<TChain> & {
27
28
  authorization?: SignAuthorizationReturnType;
28
29
  }) => Promise<KernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>>;
29
30
  export {};
@@ -22,10 +22,10 @@ const getZeroDevPaymasterRPC = (projectId, provider) => {
22
22
  return rpc;
23
23
  };
24
24
  const isERC20 = (value) => isAddress(value);
25
- const createPublicAndPaymasterClients = (bundlerRpc, paymasterRpc, chain) => {
25
+ const createPublicAndPaymasterClients = (bundlerRpc, paymasterRpc, chain, publicClientRpc) => {
26
26
  const publicClient = createPublicClient({
27
27
  chain,
28
- transport: http(bundlerRpc),
28
+ transport: publicClientRpc ? http(publicClientRpc) : http(bundlerRpc),
29
29
  });
30
30
  const zerodevPaymaster = createZeroDevPaymasterClient({
31
31
  chain,
@@ -61,10 +61,10 @@ const createKernelClientConfig = (account, bundlerRpc, chain, publicClient, paym
61
61
  estimateFeesPerGas: (_a) => __awaiter(void 0, [_a], void 0, function* ({ bundlerClient }) { return getUserOperationGasPrice(bundlerClient); }),
62
62
  },
63
63
  });
64
- const createEcdsaKernelAccountClient = (_b) => __awaiter(void 0, [_b], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, enableKernelV3Migration, }) {
64
+ const createEcdsaKernelAccountClient = (_b) => __awaiter(void 0, [_b], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, enableKernelV3Migration, publicClientRpc, }) {
65
65
  const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
66
66
  const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
67
- const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain);
67
+ const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain, publicClientRpc);
68
68
  const validator = yield ecdsaValidator(publicClient, {
69
69
  entryPoint,
70
70
  kernelVersion,
@@ -93,10 +93,10 @@ const createEcdsaKernelAccountClient = (_b) => __awaiter(void 0, [_b], void 0, f
93
93
  const clientConfig = createKernelClientConfig(selectedAccount, resolvedBundlerRpc, chain, publicClient, paymasterHandler);
94
94
  return createKernelAccountClient(clientConfig);
95
95
  });
96
- const createEcdsaKernelAccountClientWith7702 = (_c) => __awaiter(void 0, [_c], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, }) {
96
+ const createEcdsaKernelAccountClientWith7702 = (_c) => __awaiter(void 0, [_c], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, authorization, paymaster = 'SPONSOR', entryPoint, kernelVersion, ecdsaValidator, publicClientRpc, }) {
97
97
  const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
98
98
  const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
99
- const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain);
99
+ const { publicClient, zerodevPaymaster } = createPublicAndPaymasterClients(resolvedBundlerRpc, resolvedPaymasterRpc, chain, publicClientRpc);
100
100
  const validator = yield ecdsaValidator(publicClient, {
101
101
  entryPoint,
102
102
  kernelVersion,