@dynamic-labs/ethereum-aa 4.10.3 → 4.10.4-preview.1

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +15 -4
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -9
  5. package/src/AccountAbstractionConnector.cjs +75 -0
  6. package/src/AccountAbstractionConnector.d.ts +56 -0
  7. package/src/AccountAbstractionConnector.js +71 -0
  8. package/src/ZKsync/client.cjs +31 -0
  9. package/src/ZKsync/client.d.ts +25 -0
  10. package/src/ZKsync/client.js +27 -0
  11. package/src/ZKsync/ecdsaAccount.cjs +32 -0
  12. package/src/ZKsync/ecdsaAccount.d.ts +13 -0
  13. package/src/ZKsync/ecdsaAccount.js +28 -0
  14. package/src/ZKsync/getEip712Domain.cjs +62 -0
  15. package/src/ZKsync/getEip712Domain.d.ts +2 -0
  16. package/src/ZKsync/getEip712Domain.js +58 -0
  17. package/src/ZKsync/session.cjs +1218 -0
  18. package/src/ZKsync/session.d.ts +904 -0
  19. package/src/ZKsync/session.js +1211 -0
  20. package/src/ZKsync/types.cjs +52 -0
  21. package/src/ZKsync/types.d.ts +9 -0
  22. package/src/ZKsync/types.js +48 -0
  23. package/src/ZKsync/walletActions.cjs +93 -0
  24. package/src/ZKsync/walletActions.d.ts +15 -0
  25. package/src/ZKsync/walletActions.js +87 -0
  26. package/src/ZKsyncConnector.cjs +536 -0
  27. package/src/ZKsyncConnector.d.ts +24923 -0
  28. package/src/ZKsyncConnector.js +532 -0
  29. package/src/ZeroDevConnector.cjs +17 -13
  30. package/src/ZeroDevConnector.d.ts +17 -16
  31. package/src/ZeroDevConnector.js +18 -14
  32. package/src/index.cjs +11 -0
  33. package/src/index.d.ts +2 -0
  34. package/src/index.js +10 -1
  35. package/src/utils/abi.cjs +88 -0
  36. package/src/utils/abi.d.ts +102 -0
  37. package/src/utils/abi.js +84 -0
  38. package/src/utils/isZKsyncConnector.cjs +8 -0
  39. package/src/utils/isZKsyncConnector.d.ts +3 -0
  40. package/src/utils/isZKsyncConnector.js +4 -0
@@ -5,12 +5,13 @@ 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';
7
7
  import { EthereumWallet, RegisterEvmProvidersConfig } from '@dynamic-labs/ethereum-core';
8
- import { EcdsaValidatorOptions, Provider, ProviderEntryPointVersionEnum, ProviderEnum, ProviderKernelVersionEnum, ProviderMultichainAccountAbstractionProviders } from '@dynamic-labs/sdk-api-core';
9
- import { Chain, IZeroDevConnector, InternalWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
8
+ import { EcdsaValidatorOptions, Provider, ProviderEntryPointVersionEnum, ProviderEnum, ProviderKernelVersionEnum, ProviderMultichainAccountAbstractionProviders, SmartWalletProperties } from '@dynamic-labs/sdk-api-core';
9
+ import { Chain, InternalWalletConnector, IZeroDevConnector } from '@dynamic-labs/wallet-connector-core';
10
10
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
11
- import { EvmNetwork, GenericNetwork, IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
11
+ import { GenericNetwork, IUITransaction, TransactionReceipt, WalletUiUtils } from '@dynamic-labs/types';
12
12
  import { BundlerProvider } from './utils';
13
- type ZeroDevConnectorProps = {
13
+ import { AccountAbstractionConnector, AccountAbstractionConnectorProps } from './AccountAbstractionConnector';
14
+ type ZeroDevConnectorProps = AccountAbstractionConnectorProps & {
14
15
  apiProviders: {
15
16
  [key in ProviderEnum]?: Provider;
16
17
  };
@@ -23,7 +24,7 @@ type ZeroDevConnectorProps = {
23
24
  providersConfig?: RegisterEvmProvidersConfig;
24
25
  };
25
26
  type KernelClient = KernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>;
26
- export declare class ZeroDevConnector extends WalletConnectorBase<typeof EthereumWallet> implements IZeroDevConnector {
27
+ export declare class ZeroDevConnector extends AccountAbstractionConnector implements IZeroDevConnector {
27
28
  clientId: string;
28
29
  eoaConnector: InternalWalletConnector | undefined;
29
30
  eoaAddress: string | undefined;
@@ -32,9 +33,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
32
33
  ChainWallet: typeof EthereumWallet;
33
34
  connectedChain: Chain;
34
35
  supportedChains: Chain[];
35
- evmNetworks: EvmNetwork[];
36
36
  providersConfig: RegisterEvmProvidersConfig;
37
- private isGasSponsorshipDisabled;
38
37
  isEmbeddedWallet: boolean;
39
38
  entryPoint: EntryPointType<EntryPointVersion>;
40
39
  kernelVersion: KERNEL_VERSION_TYPE;
@@ -62,9 +61,9 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
62
61
  name: string;
63
62
  };
64
63
  enableEIP7702Mode: boolean;
65
- private _walletUiUtils;
66
64
  private authorization?;
67
65
  constructor(opts: ZeroDevConnectorProps);
66
+ confirmTransactionStatus(): Promise<TransactionReceipt>;
68
67
  get currentNetworkProvider(): {
69
68
  kernelClient: KernelClient;
70
69
  kernelClientWithSponsorship: KernelClient;
@@ -76,15 +75,17 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
76
75
  switchNetwork({ networkChainId, }: {
77
76
  networkChainId?: number | string;
78
77
  }): Promise<void>;
79
- /**
80
- * @deprecated You should get the EOA connector by passing the SCW to getEOAConnector,
81
- * from the useSmartWallet hook
82
- */
83
- getEOAConnector(): InternalWalletConnector | undefined;
84
- getAccountAbstractionProvider({ withSponsorship, }?: {
78
+ getAccountAbstractionProvider<T = KernelClient | undefined>({ withSponsorship, }?: {
85
79
  withSponsorship?: boolean;
86
- }): KernelClient | undefined;
80
+ }): T;
87
81
  endSession(): Promise<void>;
82
+ initialize({ smartWalletAddress, eoaAddress, eoaConnector, properties, shouldSetEoaConnector, }: {
83
+ smartWalletAddress: string;
84
+ eoaAddress: string;
85
+ eoaConnector: InternalWalletConnector;
86
+ shouldSetEoaConnector: boolean;
87
+ properties?: SmartWalletProperties;
88
+ }): Promise<void>;
88
89
  registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, ...properties }: {
89
90
  smartWalletAddress: string;
90
91
  eoaAddress: string;
@@ -7812,12 +7813,12 @@ export declare class ZeroDevConnector extends WalletConnectorBase<typeof Ethereu
7812
7813
  value?: bigint;
7813
7814
  data?: string;
7814
7815
  }): Promise<boolean>;
7815
- disableGasSponsorshipOnce(): void;
7816
7816
  getBalance(address: string): Promise<string | undefined>;
7817
7817
  signMessage(messageToSign: string): Promise<string | undefined>;
7818
7818
  createUiTransaction(from: string): Promise<IUITransaction>;
7819
7819
  validateActiveWallet(expectedAddress: string): Promise<void>;
7820
7820
  getBlockExplorerUrlsForCurrentNetwork(): Promise<string[]>;
7821
7821
  getEnabledNetworks(): GenericNetwork[];
7822
+ initializeZksyncConnector(): Promise<void>;
7822
7823
  }
7823
7824
  export {};
@@ -4,7 +4,7 @@ import { publicActions, custom, createWalletClient, toHex, formatEther } from 'v
4
4
  import { toAccount } from 'viem/accounts';
5
5
  import { KERNEL_V3_3_BETA, KernelVersionToAddressesMap, getEntryPoint as getEntryPoint$1 } from '@zerodev/sdk/constants';
6
6
  import { EthereumWallet, isEthWalletConnector, chainsMap, confirmationTransport, unFormatTransaction, createViemUiTransaction } from '@dynamic-labs/ethereum-core';
7
- import { WalletConnectorBase, eventListenerHandlers, isTurnkeyWalletConnector } from '@dynamic-labs/wallet-connector-core';
7
+ import { eventListenerHandlers, isTurnkeyWalletConnector } from '@dynamic-labs/wallet-connector-core';
8
8
  import { parseEvmNetworks, StorageService, DynamicError, DeferredPromise, parseChainId, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError, InsufficientFundsError } from '@dynamic-labs/utils';
9
9
  import { ZERO_DEV_LAST_USED_CHAIN_ID_KEY } from './constants.js';
10
10
  import { logger } from './utils/logger.js';
@@ -12,8 +12,9 @@ import { createEcdsaKernelAccountClientWith7702, createEcdsaKernelAccountClient
12
12
  import { getEcdsaValidator } from './utils/getEcdsaValidator.js';
13
13
  import { getEntryPoint } from './utils/getEntryPoint.js';
14
14
  import { getKernelVersion } from './utils/getKernelVersion.js';
15
+ import { AccountAbstractionConnector } from './AccountAbstractionConnector.js';
15
16
 
16
- class ZeroDevConnector extends WalletConnectorBase {
17
+ class ZeroDevConnector extends AccountAbstractionConnector {
17
18
  constructor(opts) {
18
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19
20
  super(opts);
@@ -24,7 +25,6 @@ class ZeroDevConnector extends WalletConnectorBase {
24
25
  this.ChainWallet = EthereumWallet;
25
26
  this.connectedChain = 'EVM';
26
27
  this.supportedChains = ['ETH', 'EVM'];
27
- this.isGasSponsorshipDisabled = false;
28
28
  this.isEmbeddedWallet = true;
29
29
  this.providersFromApi = [];
30
30
  this.name = 'ZeroDev';
@@ -56,6 +56,9 @@ class ZeroDevConnector extends WalletConnectorBase {
56
56
  this.defaultChainId = defaultProvider === null || defaultProvider === void 0 ? void 0 : defaultProvider.chain;
57
57
  this.ecdsaProviderType = (_j = opts.apiProviders.zerodev) === null || _j === void 0 ? void 0 : _j.ecdsaProviderType;
58
58
  }
59
+ confirmTransactionStatus() {
60
+ throw new Error('confirmTransactionStatus not implemented in ZeroDevConnector');
61
+ }
59
62
  get currentNetworkProvider() {
60
63
  // check if the last used chain id is in the provider map
61
64
  if (this.providerMap[this.lastUsedChainId]) {
@@ -100,13 +103,6 @@ class ZeroDevConnector extends WalletConnectorBase {
100
103
  handleChainChange(chainId);
101
104
  });
102
105
  }
103
- /**
104
- * @deprecated You should get the EOA connector by passing the SCW to getEOAConnector,
105
- * from the useSmartWallet hook
106
- */
107
- getEOAConnector() {
108
- return this.eoaConnector;
109
- }
110
106
  getAccountAbstractionProvider({ withSponsorship, } = {}) {
111
107
  if (withSponsorship && this.kernelClientWithSponsorship) {
112
108
  return this.kernelClientWithSponsorship;
@@ -118,6 +114,14 @@ class ZeroDevConnector extends WalletConnectorBase {
118
114
  StorageService.removeItem(ZERO_DEV_LAST_USED_CHAIN_ID_KEY);
119
115
  });
120
116
  }
117
+ initialize(_a) {
118
+ return __awaiter(this, arguments, void 0, function* ({ smartWalletAddress, eoaAddress, eoaConnector, properties, shouldSetEoaConnector, }) {
119
+ yield this.registerEoa(Object.assign({ eoaAddress,
120
+ eoaConnector,
121
+ shouldSetEoaConnector,
122
+ smartWalletAddress }, properties));
123
+ });
124
+ }
121
125
  registerEoa(_a) {
122
126
  return __awaiter(this, void 0, void 0, function* () {
123
127
  var { smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector = false } = _a, properties = __rest(_a, ["smartWalletAddress", "eoaAddress", "eoaConnector", "shouldSetEoaConnector"]);
@@ -365,7 +369,7 @@ class ZeroDevConnector extends WalletConnectorBase {
365
369
  onSendTransaction: (_b) => __awaiter(this, [_b], void 0, function* ({ transaction }) {
366
370
  try {
367
371
  this._walletUiUtils.disabledConfirmationOnce();
368
- const effectiveProvider = this.isGasSponsorshipDisabled
372
+ const effectiveProvider = this.isGasSponsorshipDisabled()
369
373
  ? provider
370
374
  : this.kernelClientWithSponsorship;
371
375
  if (!effectiveProvider) {
@@ -536,9 +540,6 @@ class ZeroDevConnector extends WalletConnectorBase {
536
540
  return sponsored;
537
541
  });
538
542
  }
539
- disableGasSponsorshipOnce() {
540
- this.isGasSponsorshipDisabled = true;
541
- }
542
543
  getBalance(address) {
543
544
  return __awaiter(this, void 0, void 0, function* () {
544
545
  var _a;
@@ -600,6 +601,9 @@ class ZeroDevConnector extends WalletConnectorBase {
600
601
  getEnabledNetworks() {
601
602
  return this.evmNetworks;
602
603
  }
604
+ initializeZksyncConnector() {
605
+ throw new Error('Not implemented');
606
+ }
603
607
  }
604
608
 
605
609
  export { ZeroDevConnector };
package/src/index.cjs CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var assertPackageVersion = require('@dynamic-labs/assert-package-version');
7
7
  var _package = require('../package.cjs');
8
8
  var ZeroDevConnector = require('./ZeroDevConnector.cjs');
9
+ var ZKsyncConnector = require('./ZKsyncConnector.cjs');
9
10
  var createEcsdaKernelAccountClient = require('./utils/createEcsdaKernelAccountClient.cjs');
10
11
  var fetchZeroDevChain = require('./utils/fetchZeroDevChain.cjs');
11
12
  var getEcdsaValidator = require('./utils/getEcdsaValidator.cjs');
@@ -13,6 +14,7 @@ var getEntryPoint = require('./utils/getEntryPoint.cjs');
13
14
  var getKernelVersion = require('./utils/getKernelVersion.cjs');
14
15
  var ethereumAa = require('./ethereum-aa.cjs');
15
16
  var isZeroDevConnector = require('./utils/isZeroDevConnector.cjs');
17
+ var isZKsyncConnector = require('./utils/isZKsyncConnector.cjs');
16
18
 
17
19
  assertPackageVersion.assertPackageVersion('@dynamic-labs/ethereum-aa', _package.version);
18
20
  const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, bundlerRpc, paymasterRpc, kernelDelegationAddress, } = {}) => {
@@ -29,6 +31,13 @@ const ZeroDevSmartWalletConnectors = (props) => {
29
31
  }
30
32
  return [];
31
33
  };
34
+ const ZKsyncSmartWalletConnectors = (props) => {
35
+ var _a;
36
+ if ((_a = props.apiProviders) === null || _a === void 0 ? void 0 : _a.zksync) {
37
+ return [ZKsyncConnector.ZKsyncConnector];
38
+ }
39
+ return [];
40
+ };
32
41
 
33
42
  exports.createEcdsaKernelAccountClient = createEcsdaKernelAccountClient.createEcdsaKernelAccountClient;
34
43
  exports.fetchZeroDevChain = fetchZeroDevChain.fetchZeroDevChain;
@@ -37,5 +46,7 @@ exports.getEntryPoint = getEntryPoint.getEntryPoint;
37
46
  exports.getKernelVersion = getKernelVersion.getKernelVersion;
38
47
  exports.EthereumAaConnector = ethereumAa.EthereumAaConnector;
39
48
  exports.isZeroDevConnector = isZeroDevConnector.isZeroDevConnector;
49
+ exports.isZKsyncConnector = isZKsyncConnector.isZKsyncConnector;
50
+ exports.ZKsyncSmartWalletConnectors = ZKsyncSmartWalletConnectors;
40
51
  exports.ZeroDevSmartWalletConnectors = ZeroDevSmartWalletConnectors;
41
52
  exports.ZeroDevSmartWalletConnectorsWithConfig = ZeroDevSmartWalletConnectorsWithConfig;
package/src/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { getEntryPoint } from './utils/getEntryPoint';
7
7
  export { getKernelVersion } from './utils/getKernelVersion';
8
8
  export * from './ethereum-aa';
9
9
  export { isZeroDevConnector } from './utils/isZeroDevConnector';
10
+ export { isZKsyncConnector } from './utils/isZKsyncConnector';
10
11
  export declare const ZeroDevSmartWalletConnectorsWithConfig: ({ bundlerProvider, bundlerRpc, paymasterRpc, kernelDelegationAddress, }?: {
11
12
  bundlerProvider?: BundlerProvider;
12
13
  bundlerRpc?: string;
@@ -14,3 +15,4 @@ export declare const ZeroDevSmartWalletConnectorsWithConfig: ({ bundlerProvider,
14
15
  kernelDelegationAddress?: `0x${string}`;
15
16
  }) => (props: any) => WalletConnectorConstructor[];
16
17
  export declare const ZeroDevSmartWalletConnectors: (props: any) => WalletConnectorConstructor[];
18
+ export declare const ZKsyncSmartWalletConnectors: (props: any) => WalletConnectorConstructor[];
package/src/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
3
3
  import { version } from '../package.js';
4
4
  import { ZeroDevConnector } from './ZeroDevConnector.js';
5
+ import { ZKsyncConnector } from './ZKsyncConnector.js';
5
6
  export { createEcdsaKernelAccountClient } from './utils/createEcsdaKernelAccountClient.js';
6
7
  export { fetchZeroDevChain } from './utils/fetchZeroDevChain.js';
7
8
  export { getEcdsaValidator } from './utils/getEcdsaValidator.js';
@@ -9,6 +10,7 @@ export { getEntryPoint } from './utils/getEntryPoint.js';
9
10
  export { getKernelVersion } from './utils/getKernelVersion.js';
10
11
  export { EthereumAaConnector } from './ethereum-aa.js';
11
12
  export { isZeroDevConnector } from './utils/isZeroDevConnector.js';
13
+ export { isZKsyncConnector } from './utils/isZKsyncConnector.js';
12
14
 
13
15
  assertPackageVersion('@dynamic-labs/ethereum-aa', version);
14
16
  const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, bundlerRpc, paymasterRpc, kernelDelegationAddress, } = {}) => {
@@ -25,5 +27,12 @@ const ZeroDevSmartWalletConnectors = (props) => {
25
27
  }
26
28
  return [];
27
29
  };
30
+ const ZKsyncSmartWalletConnectors = (props) => {
31
+ var _a;
32
+ if ((_a = props.apiProviders) === null || _a === void 0 ? void 0 : _a.zksync) {
33
+ return [ZKsyncConnector];
34
+ }
35
+ return [];
36
+ };
28
37
 
29
- export { ZeroDevSmartWalletConnectors, ZeroDevSmartWalletConnectorsWithConfig };
38
+ export { ZKsyncSmartWalletConnectors, ZeroDevSmartWalletConnectors, ZeroDevSmartWalletConnectorsWithConfig };
@@ -0,0 +1,88 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const AAFactoryABI = [
7
+ {
8
+ inputs: [
9
+ {
10
+ internalType: 'bytes32',
11
+ name: '_beaconProxyBytecodeHash',
12
+ type: 'bytes32',
13
+ },
14
+ { internalType: 'address', name: '_beacon', type: 'address' },
15
+ ],
16
+ stateMutability: 'nonpayable',
17
+ type: 'constructor',
18
+ },
19
+ {
20
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
21
+ name: 'ACCOUNT_ALREADY_EXISTS',
22
+ type: 'error',
23
+ },
24
+ {
25
+ anonymous: false,
26
+ inputs: [
27
+ {
28
+ indexed: true,
29
+ internalType: 'address',
30
+ name: 'accountAddress',
31
+ type: 'address',
32
+ },
33
+ {
34
+ indexed: false,
35
+ internalType: 'bytes32',
36
+ name: 'uniqueAccountId',
37
+ type: 'bytes32',
38
+ },
39
+ ],
40
+ name: 'AccountCreated',
41
+ type: 'event',
42
+ },
43
+ {
44
+ inputs: [{ internalType: 'bytes32', name: 'accountId', type: 'bytes32' }],
45
+ name: 'accountMappings',
46
+ outputs: [
47
+ { internalType: 'address', name: 'deployedAccount', type: 'address' },
48
+ ],
49
+ stateMutability: 'view',
50
+ type: 'function',
51
+ },
52
+ {
53
+ inputs: [],
54
+ name: 'beacon',
55
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
56
+ stateMutability: 'view',
57
+ type: 'function',
58
+ },
59
+ {
60
+ inputs: [],
61
+ name: 'beaconProxyBytecodeHash',
62
+ outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
63
+ stateMutability: 'view',
64
+ type: 'function',
65
+ },
66
+ {
67
+ inputs: [
68
+ { internalType: 'bytes32', name: 'uniqueId', type: 'bytes32' },
69
+ { internalType: 'bytes[]', name: 'initialValidators', type: 'bytes[]' },
70
+ { internalType: 'address[]', name: 'initialK1Owners', type: 'address[]' },
71
+ ],
72
+ name: 'deployProxySsoAccount',
73
+ outputs: [
74
+ { internalType: 'address', name: 'accountAddress', type: 'address' },
75
+ ],
76
+ stateMutability: 'nonpayable',
77
+ type: 'function',
78
+ },
79
+ {
80
+ inputs: [],
81
+ name: 'getEncodedBeacon',
82
+ outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
83
+ stateMutability: 'view',
84
+ type: 'function',
85
+ },
86
+ ];
87
+
88
+ exports.AAFactoryABI = AAFactoryABI;
@@ -0,0 +1,102 @@
1
+ export declare const AAFactoryABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "bytes32";
4
+ readonly name: "_beaconProxyBytecodeHash";
5
+ readonly type: "bytes32";
6
+ }, {
7
+ readonly internalType: "address";
8
+ readonly name: "_beacon";
9
+ readonly type: "address";
10
+ }];
11
+ readonly stateMutability: "nonpayable";
12
+ readonly type: "constructor";
13
+ }, {
14
+ readonly inputs: readonly [{
15
+ readonly internalType: "address";
16
+ readonly name: "account";
17
+ readonly type: "address";
18
+ }];
19
+ readonly name: "ACCOUNT_ALREADY_EXISTS";
20
+ readonly type: "error";
21
+ }, {
22
+ readonly anonymous: false;
23
+ readonly inputs: readonly [{
24
+ readonly indexed: true;
25
+ readonly internalType: "address";
26
+ readonly name: "accountAddress";
27
+ readonly type: "address";
28
+ }, {
29
+ readonly indexed: false;
30
+ readonly internalType: "bytes32";
31
+ readonly name: "uniqueAccountId";
32
+ readonly type: "bytes32";
33
+ }];
34
+ readonly name: "AccountCreated";
35
+ readonly type: "event";
36
+ }, {
37
+ readonly inputs: readonly [{
38
+ readonly internalType: "bytes32";
39
+ readonly name: "accountId";
40
+ readonly type: "bytes32";
41
+ }];
42
+ readonly name: "accountMappings";
43
+ readonly outputs: readonly [{
44
+ readonly internalType: "address";
45
+ readonly name: "deployedAccount";
46
+ readonly type: "address";
47
+ }];
48
+ readonly stateMutability: "view";
49
+ readonly type: "function";
50
+ }, {
51
+ readonly inputs: readonly [];
52
+ readonly name: "beacon";
53
+ readonly outputs: readonly [{
54
+ readonly internalType: "address";
55
+ readonly name: "";
56
+ readonly type: "address";
57
+ }];
58
+ readonly stateMutability: "view";
59
+ readonly type: "function";
60
+ }, {
61
+ readonly inputs: readonly [];
62
+ readonly name: "beaconProxyBytecodeHash";
63
+ readonly outputs: readonly [{
64
+ readonly internalType: "bytes32";
65
+ readonly name: "";
66
+ readonly type: "bytes32";
67
+ }];
68
+ readonly stateMutability: "view";
69
+ readonly type: "function";
70
+ }, {
71
+ readonly inputs: readonly [{
72
+ readonly internalType: "bytes32";
73
+ readonly name: "uniqueId";
74
+ readonly type: "bytes32";
75
+ }, {
76
+ readonly internalType: "bytes[]";
77
+ readonly name: "initialValidators";
78
+ readonly type: "bytes[]";
79
+ }, {
80
+ readonly internalType: "address[]";
81
+ readonly name: "initialK1Owners";
82
+ readonly type: "address[]";
83
+ }];
84
+ readonly name: "deployProxySsoAccount";
85
+ readonly outputs: readonly [{
86
+ readonly internalType: "address";
87
+ readonly name: "accountAddress";
88
+ readonly type: "address";
89
+ }];
90
+ readonly stateMutability: "nonpayable";
91
+ readonly type: "function";
92
+ }, {
93
+ readonly inputs: readonly [];
94
+ readonly name: "getEncodedBeacon";
95
+ readonly outputs: readonly [{
96
+ readonly internalType: "bytes";
97
+ readonly name: "";
98
+ readonly type: "bytes";
99
+ }];
100
+ readonly stateMutability: "view";
101
+ readonly type: "function";
102
+ }];
@@ -0,0 +1,84 @@
1
+ 'use client'
2
+ const AAFactoryABI = [
3
+ {
4
+ inputs: [
5
+ {
6
+ internalType: 'bytes32',
7
+ name: '_beaconProxyBytecodeHash',
8
+ type: 'bytes32',
9
+ },
10
+ { internalType: 'address', name: '_beacon', type: 'address' },
11
+ ],
12
+ stateMutability: 'nonpayable',
13
+ type: 'constructor',
14
+ },
15
+ {
16
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
17
+ name: 'ACCOUNT_ALREADY_EXISTS',
18
+ type: 'error',
19
+ },
20
+ {
21
+ anonymous: false,
22
+ inputs: [
23
+ {
24
+ indexed: true,
25
+ internalType: 'address',
26
+ name: 'accountAddress',
27
+ type: 'address',
28
+ },
29
+ {
30
+ indexed: false,
31
+ internalType: 'bytes32',
32
+ name: 'uniqueAccountId',
33
+ type: 'bytes32',
34
+ },
35
+ ],
36
+ name: 'AccountCreated',
37
+ type: 'event',
38
+ },
39
+ {
40
+ inputs: [{ internalType: 'bytes32', name: 'accountId', type: 'bytes32' }],
41
+ name: 'accountMappings',
42
+ outputs: [
43
+ { internalType: 'address', name: 'deployedAccount', type: 'address' },
44
+ ],
45
+ stateMutability: 'view',
46
+ type: 'function',
47
+ },
48
+ {
49
+ inputs: [],
50
+ name: 'beacon',
51
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
52
+ stateMutability: 'view',
53
+ type: 'function',
54
+ },
55
+ {
56
+ inputs: [],
57
+ name: 'beaconProxyBytecodeHash',
58
+ outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
59
+ stateMutability: 'view',
60
+ type: 'function',
61
+ },
62
+ {
63
+ inputs: [
64
+ { internalType: 'bytes32', name: 'uniqueId', type: 'bytes32' },
65
+ { internalType: 'bytes[]', name: 'initialValidators', type: 'bytes[]' },
66
+ { internalType: 'address[]', name: 'initialK1Owners', type: 'address[]' },
67
+ ],
68
+ name: 'deployProxySsoAccount',
69
+ outputs: [
70
+ { internalType: 'address', name: 'accountAddress', type: 'address' },
71
+ ],
72
+ stateMutability: 'nonpayable',
73
+ type: 'function',
74
+ },
75
+ {
76
+ inputs: [],
77
+ name: 'getEncodedBeacon',
78
+ outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
79
+ stateMutability: 'view',
80
+ type: 'function',
81
+ },
82
+ ];
83
+
84
+ export { AAFactoryABI };
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const isZKsyncConnector = (connector) => (connector === null || connector === void 0 ? void 0 : connector.key) === 'zksync';
7
+
8
+ exports.isZKsyncConnector = isZKsyncConnector;
@@ -0,0 +1,3 @@
1
+ import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
+ import { ZKsyncConnector } from '../ZKsyncConnector';
3
+ export declare const isZKsyncConnector: (connector: ZKsyncConnector | WalletConnector) => connector is ZKsyncConnector;
@@ -0,0 +1,4 @@
1
+ 'use client'
2
+ const isZKsyncConnector = (connector) => (connector === null || connector === void 0 ? void 0 : connector.key) === 'zksync';
3
+
4
+ export { isZKsyncConnector };