@dynamic-labs/ethereum-aa 2.1.0-alpha.2 → 2.1.0-alpha.20

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,172 @@
1
1
 
2
+ ## [2.1.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2024-05-21)
3
+
4
+
5
+ ### Features
6
+
7
+ * adds client.networks module ([#5650](https://github.com/dynamic-labs/DynamicAuth/issues/5650)) ([70f7fe5](https://github.com/dynamic-labs/DynamicAuth/commit/70f7fe5f437756c51e787ac12183be0a23c51b89))
8
+ * user fields supports custom fields ([#5639](https://github.com/dynamic-labs/DynamicAuth/issues/5639)) ([8eb5788](https://github.com/dynamic-labs/DynamicAuth/commit/8eb5788fc3e1286929f5949ecb57736b21b13fb5))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add webcredentials to expo ([#5640](https://github.com/dynamic-labs/DynamicAuth/issues/5640)) ([9026fbf](https://github.com/dynamic-labs/DynamicAuth/commit/9026fbf0108537e884588f3adcdb9f0db04a159b))
14
+ * init ethers web3provider without a network if selected network is unsupported ([#5651](https://github.com/dynamic-labs/DynamicAuth/issues/5651)) ([e82040f](https://github.com/dynamic-labs/DynamicAuth/commit/e82040f424b17a70fac4400ab5b85a0dc6c0e35a))
15
+
16
+ ## [2.1.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.18...v2.1.0-alpha.19) (2024-05-17)
17
+
18
+
19
+ ### Features
20
+
21
+ * add createUserProfileFromSDKUser ([#5596](https://github.com/dynamic-labs/DynamicAuth/issues/5596)) ([d37a1b4](https://github.com/dynamic-labs/DynamicAuth/commit/d37a1b4119f5ff4fff1e987d157f6d5abf105a8b))
22
+ * add headless social sign-in ([#5439](https://github.com/dynamic-labs/DynamicAuth/issues/5439)) ([e32fdf8](https://github.com/dynamic-labs/DynamicAuth/commit/e32fdf863718d661b90b592c8df734e92386ddf3))
23
+ * fetch custom fields in profile and update user ([#5627](https://github.com/dynamic-labs/DynamicAuth/issues/5627)) ([3940c25](https://github.com/dynamic-labs/DynamicAuth/commit/3940c2542bb330f3ed9a8eb98eed9d05c8fcb03a))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * include applinks details to AASA ([#5635](https://github.com/dynamic-labs/DynamicAuth/issues/5635)) ([ce94fec](https://github.com/dynamic-labs/DynamicAuth/commit/ce94fec80adbb3eb4efcb79d1aa2cc6eb35eab6f))
29
+ * include the appOrigin to every api call to create correct passkey ([#5636](https://github.com/dynamic-labs/DynamicAuth/issues/5636)) ([ee64df3](https://github.com/dynamic-labs/DynamicAuth/commit/ee64df3b90037bd29cca161e601973ef202c58f0))
30
+ * use PromptModal when using the DynamicMultiWalletPromptsWidget for pending connection views ([#5594](https://github.com/dynamic-labs/DynamicAuth/issues/5594)) ([c095b6e](https://github.com/dynamic-labs/DynamicAuth/commit/c095b6e4c974f02cfe632963be92d16bb201dfa5))
31
+
32
+ ## [2.1.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.17...v2.1.0-alpha.18) (2024-05-15)
33
+
34
+ ## [2.1.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.16...v2.1.0-alpha.17) (2024-05-15)
35
+
36
+
37
+ ### Features
38
+
39
+ * add coinbaseWalletPreference prop ([#5607](https://github.com/dynamic-labs/DynamicAuth/issues/5607)) ([1ac3b2c](https://github.com/dynamic-labs/DynamicAuth/commit/1ac3b2ce7abb136465f4aa88b045dfb70d99aad7))
40
+
41
+ ## [2.1.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.15...v2.1.0-alpha.16) (2024-05-14)
42
+
43
+
44
+ ### Features
45
+
46
+ * add client.sdk.error with errors from the webview ([#5520](https://github.com/dynamic-labs/DynamicAuth/issues/5520)) ([a886927](https://github.com/dynamic-labs/DynamicAuth/commit/a8869273bf361c870d6e3cb82a28d9ccec65905b))
47
+ * add setDefaultTabIndex to default the selected wallets tab ([#5593](https://github.com/dynamic-labs/DynamicAuth/issues/5593)) ([6e8ce05](https://github.com/dynamic-labs/DynamicAuth/commit/6e8ce053c4f6f009acc57dac55a8e9c74fbcc73b))
48
+ * add visibility/auth-flow/user-profile to react-native ([#5564](https://github.com/dynamic-labs/DynamicAuth/issues/5564)) ([d93cea8](https://github.com/dynamic-labs/DynamicAuth/commit/d93cea82a123c6ec4d3d594a7dc064f4db2981c2))
49
+
50
+ ## [2.1.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.14...v2.1.0-alpha.15) (2024-05-13)
51
+
52
+
53
+ ### Bug Fixes
54
+
55
+ * when a pregen is created, primaryWallet is not being setup ([#5584](https://github.com/dynamic-labs/DynamicAuth/issues/5584)) ([de08721](https://github.com/dynamic-labs/DynamicAuth/commit/de0872151e09f91dcbfaf1d043cf830f9df8d799))
56
+
57
+ ## [2.1.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.13...v2.1.0-alpha.14) (2024-05-09)
58
+
59
+
60
+ ### Features
61
+
62
+ * add useSwitchWallet ([#5575](https://github.com/dynamic-labs/DynamicAuth/issues/5575)) ([d3053d9](https://github.com/dynamic-labs/DynamicAuth/commit/d3053d920110c26ef8052e77bf59e07dedc7c683))
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * linking phantom wallets in mobile ([#5524](https://github.com/dynamic-labs/DynamicAuth/issues/5524)) ([28d90f5](https://github.com/dynamic-labs/DynamicAuth/commit/28d90f5126b9c22535b63a3797cc060ef089fc63))
68
+ * only show farcaster QR code if Social Login is enabled ([#5559](https://github.com/dynamic-labs/DynamicAuth/issues/5559)) ([fa71aaf](https://github.com/dynamic-labs/DynamicAuth/commit/fa71aaf0f80da31d397600b2fd0cbea99b3689a4))
69
+ * remove goerli testnets and add sepolia ([#5565](https://github.com/dynamic-labs/DynamicAuth/issues/5565)) ([888eb03](https://github.com/dynamic-labs/DynamicAuth/commit/888eb031ef6f4dbbdc3015265cce8647d2c720b0))
70
+
71
+ ## [2.1.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.12...v2.1.0-alpha.13) (2024-05-03)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * ensure Farcaster QR uses useSocialAuth hook ([#5550](https://github.com/dynamic-labs/DynamicAuth/issues/5550)) ([57fcd97](https://github.com/dynamic-labs/DynamicAuth/commit/57fcd97c44e3f52065dcf856acf7bca7b24fabc7))
77
+
78
+ ## [2.1.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.11...v2.1.0-alpha.12) (2024-05-02)
79
+
80
+
81
+ ### Features
82
+
83
+ * display Farcaster QR code when it is the only login option ([#5514](https://github.com/dynamic-labs/DynamicAuth/issues/5514)) ([7b166d9](https://github.com/dynamic-labs/DynamicAuth/commit/7b166d9a30c581746f0e2edb71c44fc015dc128e))
84
+
85
+ ## [2.1.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.10...v2.1.0-alpha.11) (2024-05-02)
86
+
87
+
88
+ ### Features
89
+
90
+ * **GVTY-1050:** add account token balances hook ([#5521](https://github.com/dynamic-labs/DynamicAuth/issues/5521)) ([5a6f937](https://github.com/dynamic-labs/DynamicAuth/commit/5a6f93733019f3b8d5c7a2c7a5537172a1e7eba4))
91
+ * headless reveal embedded wallet key ([#5518](https://github.com/dynamic-labs/DynamicAuth/issues/5518)) ([77c1536](https://github.com/dynamic-labs/DynamicAuth/commit/77c15360b2b28c52cbdeafb3ce8ca7e80dbecf57))
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * fallback to walletconnect for zerion on mobile ([#5536](https://github.com/dynamic-labs/DynamicAuth/issues/5536)) ([f0e5bfe](https://github.com/dynamic-labs/DynamicAuth/commit/f0e5bfea0b2ab271fd4c1475c8ce708ecb1a5926))
97
+
98
+ ## [2.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2024-04-30)
99
+
100
+
101
+ ### Features
102
+
103
+ * bump @coinbase/wallet-sdk to latest beta ([#5388](https://github.com/dynamic-labs/DynamicAuth/issues/5388)) ([9225546](https://github.com/dynamic-labs/DynamicAuth/commit/922554630ccf2ef98bc297521309918f922bc671))
104
+
105
+ ## [2.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2024-04-30)
106
+
107
+
108
+ ### Features
109
+
110
+ * headless create embedded wallet with optional passkey data parameter ([#5487](https://github.com/dynamic-labs/DynamicAuth/issues/5487)) ([891c3d7](https://github.com/dynamic-labs/DynamicAuth/commit/891c3d77a02a019140bcb8dd03b62b1afd69710e))
111
+
112
+ ## [2.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2024-04-26)
113
+
114
+
115
+ ### Bug Fixes
116
+
117
+ * display wallet tabs when linking a wallet ([#5491](https://github.com/dynamic-labs/DynamicAuth/issues/5491)) ([10fd6b4](https://github.com/dynamic-labs/DynamicAuth/commit/10fd6b4d9aec7596338c50e17f79f6be534cf2c1))
118
+ * ensure zerodev viem client handles eth_accounts call ([#5477](https://github.com/dynamic-labs/DynamicAuth/issues/5477)) ([1132e1e](https://github.com/dynamic-labs/DynamicAuth/commit/1132e1e8655b58e81cb56789453ba56a059f52ec))
119
+ * network with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([b86f2fc](https://github.com/dynamic-labs/DynamicAuth/commit/b86f2fce491f9752e80a86643916da9ac7fb9276))
120
+ * refetch nameservice data and display properly ([#5476](https://github.com/dynamic-labs/DynamicAuth/issues/5476)) ([2aee798](https://github.com/dynamic-labs/DynamicAuth/commit/2aee798846f69496201bec7aa52e7ec1f370b7c3))
121
+ * use embeddedWallet create response authToken in embeddedWalletCreated ([#5478](https://github.com/dynamic-labs/DynamicAuth/issues/5478)) ([51772da](https://github.com/dynamic-labs/DynamicAuth/commit/51772daf557a72984c757efd8301e2b510dc37f1))
122
+
123
+ ## [2.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.6...v2.1.0-alpha.7) (2024-04-25)
124
+
125
+
126
+ ### Bug Fixes
127
+
128
+ * restore embedded wallet session iframe element conflict ([#5474](https://github.com/dynamic-labs/DynamicAuth/issues/5474)) ([c157477](https://github.com/dynamic-labs/DynamicAuth/commit/c157477ea126b3130b13b711796bdd06215e7af1))
129
+
130
+ ## [2.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2024-04-24)
131
+
132
+
133
+ ### Bug Fixes
134
+
135
+ * embedded wallets headless session control fixes ([#5469](https://github.com/dynamic-labs/DynamicAuth/issues/5469)) ([92e6c35](https://github.com/dynamic-labs/DynamicAuth/commit/92e6c359d2710fd4f5f5a6fedc4acf6c4bab78ba))
136
+
137
+ ## [2.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2024-04-23)
138
+
139
+
140
+ ### Bug Fixes
141
+
142
+ * get embedded wallet checking the wrong chain enum ([#5458](https://github.com/dynamic-labs/DynamicAuth/issues/5458)) ([ed1c523](https://github.com/dynamic-labs/DynamicAuth/commit/ed1c523ca14cd4d21c00181ab40802f876c02b80))
143
+
144
+ ## [2.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.3...v2.1.0-alpha.4) (2024-04-23)
145
+
146
+
147
+ ### Features
148
+
149
+ * add email and sms to client auth module ([#5436](https://github.com/dynamic-labs/DynamicAuth/issues/5436)) ([5420476](https://github.com/dynamic-labs/DynamicAuth/commit/5420476d1ba38fd4f987f28e9aefbfb3e61ea2bf))
150
+ * headless create passkeys for embedded wallets ([#5395](https://github.com/dynamic-labs/DynamicAuth/issues/5395)) ([0b64099](https://github.com/dynamic-labs/DynamicAuth/commit/0b6409968457f65886248f0a0879e39ec3803fd0))
151
+
152
+
153
+ ### Bug Fixes
154
+
155
+ * prevent wagmi from reconnect when DynamicContextProvider rerender ([#5446](https://github.com/dynamic-labs/DynamicAuth/issues/5446)) ([33337af](https://github.com/dynamic-labs/DynamicAuth/commit/33337af76786963cb3db7fa7c58c1292c529d0ac))
156
+
157
+ ## [2.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.2...v2.1.0-alpha.3) (2024-04-23)
158
+
159
+
160
+ ### Features
161
+
162
+ * add merge user accounts flow ([#5429](https://github.com/dynamic-labs/DynamicAuth/issues/5429)) ([41d4239](https://github.com/dynamic-labs/DynamicAuth/commit/41d423906625e28004ba8f20baf57847ed8bf5d0))
163
+
164
+
165
+ ### Bug Fixes
166
+
167
+ * disconnect wallet on lock in connect-only ([#5422](https://github.com/dynamic-labs/DynamicAuth/issues/5422)) ([a26f9fe](https://github.com/dynamic-labs/DynamicAuth/commit/a26f9fe93cf8568f1482e10b831de98c77fb2a2d))
168
+ * useReactiveProxy to stop proxing when it finds a reactive value ([#5428](https://github.com/dynamic-labs/DynamicAuth/issues/5428)) ([838dce9](https://github.com/dynamic-labs/DynamicAuth/commit/838dce9ee953361e41772239a91adb1dd8d40234))
169
+
2
170
  ## [2.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2024-04-19)
3
171
 
4
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "2.1.0-alpha.2",
3
+ "version": "2.1.0-alpha.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,19 +26,19 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.423",
30
- "@dynamic-labs/ethereum": "2.1.0-alpha.2",
31
- "@dynamic-labs/logger": "2.1.0-alpha.2",
32
- "@dynamic-labs/types": "2.1.0-alpha.2",
33
- "@dynamic-labs/utils": "2.1.0-alpha.2",
34
- "@dynamic-labs/viem-utils": "2.1.0-alpha.2",
35
- "@dynamic-labs/wallet-book": "2.1.0-alpha.2",
36
- "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.2"
29
+ "@dynamic-labs/sdk-api-core": "0.0.447",
30
+ "@zerodev/ecdsa-validator": "5.2.3",
31
+ "@zerodev/sdk": "5.2.8",
32
+ "permissionless": "0.1.20",
33
+ "@dynamic-labs/ethereum": "2.1.0-alpha.20",
34
+ "@dynamic-labs/logger": "2.1.0-alpha.20",
35
+ "@dynamic-labs/types": "2.1.0-alpha.20",
36
+ "@dynamic-labs/utils": "2.1.0-alpha.20",
37
+ "@dynamic-labs/viem-utils": "2.1.0-alpha.20",
38
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.20",
39
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.20"
37
40
  },
38
41
  "peerDependencies": {
39
- "@zerodev/presets": "^5.1.4",
40
- "@zerodev/sdk": "^5.2.0",
41
- "permissionless": "^0.0.34",
42
42
  "viem": "^2.7.6"
43
43
  }
44
44
  }
@@ -4,19 +4,20 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../_virtual/_tslib.cjs');
7
- var presets = require('@zerodev/presets');
8
7
  var viem = require('viem');
9
- var permissionless = require('permissionless');
8
+ var utils$1 = require('permissionless/utils');
9
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
10
10
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
11
11
  var viemUtils = require('@dynamic-labs/viem-utils');
12
12
  var utils = require('@dynamic-labs/utils');
13
13
  var ethereum = require('@dynamic-labs/ethereum');
14
14
  var fetchChain = require('./utils/fetchChain.cjs');
15
15
  var logger = require('./utils/logger.cjs');
16
+ var createEcsdaKernelAccountClient = require('./utils/createEcsdaKernelAccountClient.cjs');
16
17
 
17
18
  class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
18
19
  constructor(opts) {
19
- var _a;
20
+ var _a, _b;
20
21
  super(opts);
21
22
  this.connectedChain = 'EVM';
22
23
  this.supportedChains = ['ETH', 'EVM'];
@@ -38,6 +39,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
38
39
  this.projectId = zeroDevProjectId;
39
40
  this._walletUiUtils = opts.walletUiUtils;
40
41
  this.evmNetworks = utils.parseEvmNetworks(opts.evmNetworks);
42
+ this.entryPoint =
43
+ ((_b = opts.apiProviders.zerodev) === null || _b === void 0 ? void 0 : _b.entryPointVersion) ===
44
+ sdkApiCore.ProviderEntryPointVersionEnum.V6
45
+ ? utils$1.ENTRYPOINT_ADDRESS_V06
46
+ : utils$1.ENTRYPOINT_ADDRESS_V07;
41
47
  }
42
48
  getEOAConnector() {
43
49
  return this.eoaConnector;
@@ -67,12 +73,13 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
67
73
  logger.logger.error('No signer account found');
68
74
  return;
69
75
  }
70
- const kernelClient = yield presets.createEcdsaKernelAccountClient({
76
+ const kernelClient = yield createEcsdaKernelAccountClient.createEcdsaKernelAccountClient({
71
77
  chain: yield fetchChain.fetchChain(this.projectId),
78
+ entryPointAddress: this.entryPoint,
72
79
  paymaster: 'NONE',
73
80
  projectId: this.projectId,
74
81
  provider: ZeroDevConnector.bundlerProvider,
75
- signer: permissionless.walletClientToSmartAccountSigner(signer),
82
+ signer: utils$1.walletClientToSmartAccountSigner(signer),
76
83
  });
77
84
  utils.wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
78
85
  this._walletUiUtils.disabledConfirmationOnce();
@@ -104,12 +111,13 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
104
111
  if (!eoaConnector)
105
112
  throw new utils.DynamicError('No EOA connector');
106
113
  const signer = yield eoaConnector.getSigner();
107
- this.kernelClientWithSponsorship = yield presets.createEcdsaKernelAccountClient({
114
+ this.kernelClientWithSponsorship = yield createEcsdaKernelAccountClient.createEcdsaKernelAccountClient({
108
115
  chain: yield fetchChain.fetchChain(this.projectId),
116
+ entryPointAddress: this.entryPoint,
109
117
  paymaster: 'SPONSOR',
110
118
  projectId: this.projectId,
111
119
  provider: ZeroDevConnector.bundlerProvider,
112
- signer: permissionless.walletClientToSmartAccountSigner(signer),
120
+ signer: utils$1.walletClientToSmartAccountSigner(signer),
113
121
  });
114
122
  utils.wrapMethodWithCallback(this.kernelClientWithSponsorship, 'sendUserOperation', (original, ...args) => {
115
123
  this._walletUiUtils.disabledConfirmationOnce();
@@ -143,6 +151,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
143
151
  }
144
152
  getTransport(provider) {
145
153
  const transport = viemUtils.confirmationTransport({
154
+ getAccounts: () => _tslib.__awaiter(this, void 0, void 0, function* () { return [provider.account.address]; }),
146
155
  onPersonalSign: (_a) => _tslib.__awaiter(this, [_a], void 0, function* ({ message }) {
147
156
  this._walletUiUtils.disabledConfirmationOnce();
148
157
  return provider.signMessage({
@@ -204,7 +213,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
204
213
  }
205
214
  getPublicClient() {
206
215
  return _tslib.__awaiter(this, void 0, void 0, function* () {
207
- const provider = this.kernelClient.extend(viem.publicActions);
216
+ var _a;
217
+ const provider = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(viem.publicActions);
208
218
  if (!provider)
209
219
  throw new utils.DynamicError('No provider');
210
220
  return provider;
@@ -218,9 +228,9 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
218
228
  canSponsorTransactionGas(transaction) {
219
229
  return _tslib.__awaiter(this, void 0, void 0, function* () {
220
230
  try {
221
- yield this.getKernelClientWithSponsorshipValidation();
231
+ const kernelClientWithSponsorship = yield this.getKernelClientWithSponsorshipValidation();
222
232
  const userOperation = {
223
- callData: yield this.kernelClientWithSponsorship.account.encodeCallData({
233
+ callData: yield kernelClientWithSponsorship.account.encodeCallData({
224
234
  data: transaction.data ? transaction.data : '0x',
225
235
  to: transaction.to,
226
236
  /**
@@ -229,11 +239,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
229
239
  */
230
240
  value: transaction.value && viem.isHex(transaction.value)
231
241
  ? viem.fromHex(transaction.value, 'bigint')
232
- : '0x0',
242
+ : viem.fromHex('0x0', 'bigint'),
233
243
  }),
234
244
  };
235
- const result = yield this.kernelClientWithSponsorship.prepareUserOperationRequest({
236
- account: this.kernelClientWithSponsorship.account,
245
+ const result = yield kernelClientWithSponsorship.prepareUserOperationRequest({
246
+ account: kernelClientWithSponsorship.account,
237
247
  userOperation,
238
248
  });
239
249
  if (!result)
@@ -251,7 +261,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
251
261
  }
252
262
  getBalance() {
253
263
  return _tslib.__awaiter(this, void 0, void 0, function* () {
254
- const rpcClient = this.kernelClient.extend(viem.publicActions);
264
+ var _a;
265
+ const rpcClient = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(viem.publicActions);
255
266
  if (!rpcClient)
256
267
  throw new utils.DynamicError('No RPC client');
257
268
  const address = yield this.getAddress();