@dynamic-labs/ethereum-aa 2.0.0-alpha.2 → 2.0.0-alpha.21

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,240 @@
1
1
 
2
+ ## [2.0.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.20...v2.0.0-alpha.21) (2024-03-20)
3
+
4
+
5
+ ### Features
6
+
7
+ * implement barebones signer in PhantomRedirect connector ([#5043](https://github.com/dynamic-labs/DynamicAuth/issues/5043)) ([4d7ff79](https://github.com/dynamic-labs/DynamicAuth/commit/4d7ff79acfe554d651791139b5e1d23ebafe712c))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * find embedded wallets when no chain is specified ([#5036](https://github.com/dynamic-labs/DynamicAuth/issues/5036)) ([ac50742](https://github.com/dynamic-labs/DynamicAuth/commit/ac50742c6002f48aae7b60c9ec094eb12df8dcca))
13
+ * ignore walletconnect chainChange event when it's the same chain ([#5029](https://github.com/dynamic-labs/DynamicAuth/issues/5029)) ([115311a](https://github.com/dynamic-labs/DynamicAuth/commit/115311a4a64ae35317b8864f93c38203566714fc))
14
+
15
+ ## [2.0.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2024-03-19)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * prevent solflare connect popping up on page refresh when connected ([#5032](https://github.com/dynamic-labs/DynamicAuth/issues/5032)) ([28175a9](https://github.com/dynamic-labs/DynamicAuth/commit/28175a9af43f3e7f2cab30148563eaf5573477d1))
21
+ * show correct user identifier in onboarding view ([#5021](https://github.com/dynamic-labs/DynamicAuth/issues/5021)) ([c84747f](https://github.com/dynamic-labs/DynamicAuth/commit/c84747f01eb2a0a827ca48e62f03739d4e6df136))
22
+ * use address as the wallet client account ([#5037](https://github.com/dynamic-labs/DynamicAuth/issues/5037)) ([287631e](https://github.com/dynamic-labs/DynamicAuth/commit/287631e9a027e3a39ee2ad6b45ca404febd03929))
23
+
24
+ ## [2.0.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2024-03-19)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * add localization to email form ([#5009](https://github.com/dynamic-labs/DynamicAuth/issues/5009)) ([f3c100c](https://github.com/dynamic-labs/DynamicAuth/commit/f3c100cb0b815880d11c6b619d94bfaa7330a115))
30
+ * include domain on signTypedData for ZeroDev connector ([#5017](https://github.com/dynamic-labs/DynamicAuth/issues/5017)) ([71c9131](https://github.com/dynamic-labs/DynamicAuth/commit/71c91311a75309810bc497c8f82981553ddc57fd))
31
+ * Remove Copy Address button if there is no wallet ([#4994](https://github.com/dynamic-labs/DynamicAuth/issues/4994)) ([fe1e641](https://github.com/dynamic-labs/DynamicAuth/commit/fe1e6417be2299e65ba4bcbc3347dfc27f021853))
32
+
33
+ ## [2.0.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2024-03-15)
34
+
35
+ ## [2.0.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2024-03-15)
36
+
37
+
38
+ ### ⚠ BREAKING CHANGES
39
+
40
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp (#4991)
41
+
42
+ ### Features
43
+
44
+ * allow creating embedded wallet with phone number without email ([#4953](https://github.com/dynamic-labs/DynamicAuth/issues/4953)) ([39d31cb](https://github.com/dynamic-labs/DynamicAuth/commit/39d31cbc969fff7acf53c0b6c5e5093ff846f3ea))
45
+
46
+
47
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp ([#4991](https://github.com/dynamic-labs/DynamicAuth/issues/4991)) ([e83a365](https://github.com/dynamic-labs/DynamicAuth/commit/e83a3658d4f5cf0630fc8f15be66f2d3db84ab98))
48
+
49
+ ## [2.0.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2024-03-15)
50
+
51
+
52
+ ### Features
53
+
54
+ * add bundlerProvider prop to allow AA customers to select a provider ([#4975](https://github.com/dynamic-labs/DynamicAuth/issues/4975)) ([1870cef](https://github.com/dynamic-labs/DynamicAuth/commit/1870cef4f50944a86226d10f09ef7bf6595f3c95))
55
+
56
+ ## [2.0.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2024-03-15)
57
+
58
+
59
+ ### Features
60
+
61
+ * Add support for mobile farcaster signin ([#4973](https://github.com/dynamic-labs/DynamicAuth/issues/4973)) ([98261a4](https://github.com/dynamic-labs/DynamicAuth/commit/98261a47bd319cd93b36f5cdd6a9be0064887686))
62
+
63
+ ## [2.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2024-03-14)
64
+
65
+
66
+ ### Bug Fixes
67
+
68
+ * convert empty value when checking for gas sponsorship ([#4970](https://github.com/dynamic-labs/DynamicAuth/issues/4970)) ([8439a20](https://github.com/dynamic-labs/DynamicAuth/commit/8439a2035729150f33507b22c2678b16ae47976b))
69
+ * omit wallet connect on mobile ([#4954](https://github.com/dynamic-labs/DynamicAuth/issues/4954)) ([6ac29a8](https://github.com/dynamic-labs/DynamicAuth/commit/6ac29a8961dc010688425fb67a4fb621ca9f80b2))
70
+
71
+ ## [2.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2024-03-14)
72
+
73
+ ## [2.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-03-13)
74
+
75
+
76
+ ### Features
77
+
78
+ * add sign-in with farcaster ([#4947](https://github.com/dynamic-labs/DynamicAuth/issues/4947)) ([3927d24](https://github.com/dynamic-labs/DynamicAuth/commit/3927d24392a8944997ca05431c6ab54757be62d9))
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * wallet connect links with query params ([#4948](https://github.com/dynamic-labs/DynamicAuth/issues/4948)) ([0738130](https://github.com/dynamic-labs/DynamicAuth/commit/0738130f82473a197e035b8dd74d996bdbb24c11))
84
+
85
+ ## [2.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2024-03-12)
86
+
87
+
88
+ ### ⚠ BREAKING CHANGES
89
+
90
+ * rename FetchPublicAddressOpts to GetAddressOpts (#4910)
91
+ * remove use effect in useWalletEventListeners (#4843)
92
+ * rename fetchPublicAddress to getAddress (#4851)
93
+
94
+ ### Features
95
+
96
+ * Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
97
+ * use transaction confirmation ui on signAndSendTransaction for solana embedded wallets ([#4909](https://github.com/dynamic-labs/DynamicAuth/issues/4909)) ([d77e89e](https://github.com/dynamic-labs/DynamicAuth/commit/d77e89ecff9dfc67ed48537f541a9995b2662e1e))
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
103
+ * keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
104
+ * pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
105
+ * update walletbook to fix zerion in-app browser detection issue ([#4917](https://github.com/dynamic-labs/DynamicAuth/issues/4917)) ([48b05d7](https://github.com/dynamic-labs/DynamicAuth/commit/48b05d78e4f7add09787b64505723d4eca34d3e0))
106
+
107
+
108
+ * remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
109
+ * rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
110
+ * rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
111
+
112
+ ## [2.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2024-03-08)
113
+
114
+
115
+ ### ⚠ BREAKING CHANGES
116
+
117
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… (#4892)
118
+ * refactor send transaction for multi chain (#4831)
119
+
120
+ ### Features
121
+
122
+ * add sandbox indicator to sdk ([62fd821](https://github.com/dynamic-labs/DynamicAuth/commit/62fd821a895bb54cec4cae3d153aa0056a7e6638))
123
+
124
+
125
+ ### Bug Fixes
126
+
127
+ * coinbase connector and auth fetcher no being set properly ([#4891](https://github.com/dynamic-labs/DynamicAuth/issues/4891)) ([328566f](https://github.com/dynamic-labs/DynamicAuth/commit/328566ff39c38d5b5761ddc655de3a5d08bb567a))
128
+ * fix server side rendering ([#4811](https://github.com/dynamic-labs/DynamicAuth/issues/4811)) ([063dfae](https://github.com/dynamic-labs/DynamicAuth/commit/063dfae8b6750875d2f35dd9709a1f675495f4fb))
129
+ * hide network ([#4885](https://github.com/dynamic-labs/DynamicAuth/issues/4885)) ([ec10c58](https://github.com/dynamic-labs/DynamicAuth/commit/ec10c588218f067e991d5830fc06ec081e4e1d18))
130
+ * network picker on mobile ([#4887](https://github.com/dynamic-labs/DynamicAuth/issues/4887)) ([6e0ab1b](https://github.com/dynamic-labs/DynamicAuth/commit/6e0ab1bc7d138b73373741960a501ff7cf20e3f9))
131
+
132
+
133
+ * refactor send transaction for multi chain ([#4831](https://github.com/dynamic-labs/DynamicAuth/issues/4831)) ([c98444b](https://github.com/dynamic-labs/DynamicAuth/commit/c98444be7935420dda3d8216d03946f5893eb82f))
134
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… ([#4892](https://github.com/dynamic-labs/DynamicAuth/issues/4892)) ([7cdf519](https://github.com/dynamic-labs/DynamicAuth/commit/7cdf5196b1cd8516de2d456163fe9071956d40d3))
135
+
136
+ ## [2.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2024-03-06)
137
+
138
+
139
+ ### Features
140
+
141
+ * solana connector new sendTransaction method ([#4842](https://github.com/dynamic-labs/DynamicAuth/issues/4842)) ([0b198e3](https://github.com/dynamic-labs/DynamicAuth/commit/0b198e30d83fbbc8d506654d87cbfad403fda289))
142
+ * specify solana network when using phantom redirect deeplinking ([#4863](https://github.com/dynamic-labs/DynamicAuth/issues/4863)) ([fb4ee7c](https://github.com/dynamic-labs/DynamicAuth/commit/fb4ee7cfc0493c9c85b6ccb31954842556c58aa4))
143
+
144
+
145
+ ### Bug Fixes
146
+
147
+ * isLoggedIn should return true even when there is no primary wallet ([#4875](https://github.com/dynamic-labs/DynamicAuth/issues/4875)) ([f396e22](https://github.com/dynamic-labs/DynamicAuth/commit/f396e22b9d809b05ac52194ffa4346f3591d17fe))
148
+ * update btckit network conversion for signPsbt ([a6009e1](https://github.com/dynamic-labs/DynamicAuth/commit/a6009e18c453b4e65545455fea0e52ed7a983b4d))
149
+ * user getting logged out when signing in with email linked to a unavailable wallet ([#4858](https://github.com/dynamic-labs/DynamicAuth/issues/4858)) ([8653e13](https://github.com/dynamic-labs/DynamicAuth/commit/8653e13d2067dd0161e660b4374c08a9fe0bc203))
150
+
151
+ ## [2.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2024-03-04)
152
+
153
+ ## [2.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2024-02-28)
154
+
155
+
156
+ ### ⚠ BREAKING CHANGES
157
+
158
+ * add networkValidationMode and remove enableForcedNetworkValidation (#4778)
159
+
160
+ ### Features
161
+
162
+ * add bitget and okx wallets ([51fab41](https://github.com/dynamic-labs/DynamicAuth/commit/51fab413096fd89ce99c6c617cf4f3f5db9bf44d))
163
+ * add networkValidationMode and remove enableForcedNetworkValidation ([#4778](https://github.com/dynamic-labs/DynamicAuth/issues/4778)) ([ccb9576](https://github.com/dynamic-labs/DynamicAuth/commit/ccb9576c81b2c570185f5126d6d1fcfcbb5ac9e3))
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * **GVTY-1243:** non evm onramp urls ([#4791](https://github.com/dynamic-labs/DynamicAuth/issues/4791)) ([fea602e](https://github.com/dynamic-labs/DynamicAuth/commit/fea602e2835b4bb9bc096b96375fa97297bf35f1))
169
+ * revert use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([#4772](https://github.com/dynamic-labs/DynamicAuth/issues/4772)) ([b871c22](https://github.com/dynamic-labs/DynamicAuth/commit/b871c2295f39230bc34ae1fca5f8817cd9251a17))
170
+ * use correct chromeId for okx and bitget wallets and remove group from coin98 ([#4795](https://github.com/dynamic-labs/DynamicAuth/issues/4795)) ([e63bad7](https://github.com/dynamic-labs/DynamicAuth/commit/e63bad76ed06636151212c915a102359a03b4218))
171
+
172
+ ## [2.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-02-26)
173
+
174
+
175
+ ### ⚠ BREAKING CHANGES
176
+
177
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states
178
+
179
+ ### Features
180
+
181
+ * allow passing prop to hide embedded wallet action confirmation UIs ([#4775](https://github.com/dynamic-labs/DynamicAuth/issues/4775)) ([d7c6a46](https://github.com/dynamic-labs/DynamicAuth/commit/d7c6a4699e41f6a62d31880c3bd0346ebfa0e3ba))
182
+ * make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
183
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
184
+
185
+
186
+ ### Bug Fixes
187
+
188
+ * demo one-time codes for solana wallets fix ([#4760](https://github.com/dynamic-labs/DynamicAuth/issues/4760)) ([a5ab2a8](https://github.com/dynamic-labs/DynamicAuth/commit/a5ab2a8bc348a35a898e03db0900bfab88184c17))
189
+ * only store passcode in backend when auto-generated by dynamic ([#4764](https://github.com/dynamic-labs/DynamicAuth/issues/4764)) ([528bedc](https://github.com/dynamic-labs/DynamicAuth/commit/528bedce5cbd3022ddafe4242954a04f5b70ae74))
190
+ * use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
191
+
192
+ ## [2.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-02-22)
193
+
194
+
195
+ ### ⚠ BREAKING CHANGES
196
+
197
+ * wagmi v2 (#4660)
198
+
199
+ ### Features
200
+
201
+ * wagmi v2 ([#4660](https://github.com/dynamic-labs/DynamicAuth/issues/4660)) ([d8894e6](https://github.com/dynamic-labs/DynamicAuth/commit/d8894e61393b90ccf44904c33394b54286f0f9e9))
202
+
203
+ ## [2.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-02-22)
204
+
205
+
206
+ ### ⚠ BREAKING CHANGES
207
+
208
+ * remove wallet connector from callback types (#4730)
209
+ * drop support for walletconnect v1 (#4666)
210
+
211
+ ### Features
212
+
213
+ * add coin98 evm ([1d64f5f](https://github.com/dynamic-labs/DynamicAuth/commit/1d64f5f00885ff671358651fd0251b77a2e05739))
214
+ * add support for solana versioned transactions ([#4721](https://github.com/dynamic-labs/DynamicAuth/issues/4721)) ([25b1643](https://github.com/dynamic-labs/DynamicAuth/commit/25b1643f8addbada09fff5d22e988bdf22038170))
215
+
216
+
217
+ ### Bug Fixes
218
+
219
+ * allow rpc-providers package to use exports based on usage ([#4539](https://github.com/dynamic-labs/DynamicAuth/issues/4539)) ([abdc196](https://github.com/dynamic-labs/DynamicAuth/commit/abdc19641580cbcfe8f9e357c645f8291bc9ed66))
220
+ * coinbasesocial should display coinbase in profile linking section ([#4680](https://github.com/dynamic-labs/DynamicAuth/issues/4680)) ([21cbe2e](https://github.com/dynamic-labs/DynamicAuth/commit/21cbe2e24345a33bc927428c01cc7b5c724e40e5))
221
+ * improve on transaction confirmation step ([#4704](https://github.com/dynamic-labs/DynamicAuth/issues/4704)) ([f2b27cf](https://github.com/dynamic-labs/DynamicAuth/commit/f2b27cfd94452be2eb7e88a298f61ef56985931f))
222
+ * prevent the DynamicMultiWalletPromptsWidget from opening if useris not logged in ([#4701](https://github.com/dynamic-labs/DynamicAuth/issues/4701)) ([2bb35fd](https://github.com/dynamic-labs/DynamicAuth/commit/2bb35fd29b60677e893390f7d47857cd76c73adc))
223
+ * reduce isPreauthorized calls when starknet wallet is connected ([#4710](https://github.com/dynamic-labs/DynamicAuth/issues/4710)) ([ca6a630](https://github.com/dynamic-labs/DynamicAuth/commit/ca6a630dd47a1c116afcd63fe7256ffc745532ab))
224
+ * update sepolia currency symbol ([#4728](https://github.com/dynamic-labs/DynamicAuth/issues/4728)) ([3c228a0](https://github.com/dynamic-labs/DynamicAuth/commit/3c228a03ccc962374ad1dac3ab45af92732ba61a))
225
+ * use overflow clip when available, use hidden by default ([#4696](https://github.com/dynamic-labs/DynamicAuth/issues/4696)) ([29fb2a1](https://github.com/dynamic-labs/DynamicAuth/commit/29fb2a1e48b010c6c1d525403fbdcf7ded068466))
226
+
227
+
228
+ * drop support for walletconnect v1 ([#4666](https://github.com/dynamic-labs/DynamicAuth/issues/4666)) ([4af93e4](https://github.com/dynamic-labs/DynamicAuth/commit/4af93e4f9b95fa4c49bbfda0c1144da1a4a43991))
229
+ * remove wallet connector from callback types ([#4730](https://github.com/dynamic-labs/DynamicAuth/issues/4730)) ([08cb200](https://github.com/dynamic-labs/DynamicAuth/commit/08cb200a09c0fd78d2093d1a60b17089b3b2c2b1))
230
+
231
+ ## [2.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-02-13)
232
+
233
+
234
+ ### Bug Fixes
235
+
236
+ * allow any icon to be used in wallet list tabs ([#4678](https://github.com/dynamic-labs/DynamicAuth/issues/4678)) ([eb03603](https://github.com/dynamic-labs/DynamicAuth/commit/eb036031725a91cb28c144b3bdcb5b20b3314038))
237
+
2
238
  ## [2.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-13)
3
239
 
4
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,16 +26,18 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@zerodev/sdk": "^4.1.5",
30
- "@dynamic-labs/sdk-api": "0.0.363",
31
- "@dynamic-labs/logger": "2.0.0-alpha.2",
32
- "@dynamic-labs/types": "2.0.0-alpha.2",
33
- "@dynamic-labs/utils": "2.0.0-alpha.2",
34
- "@dynamic-labs/viem-utils": "2.0.0-alpha.2",
35
- "@dynamic-labs/wallet-book": "2.0.0-alpha.2",
36
- "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.2"
29
+ "@dynamic-labs/sdk-api": "0.0.389",
30
+ "@dynamic-labs/logger": "2.0.0-alpha.21",
31
+ "@dynamic-labs/types": "2.0.0-alpha.21",
32
+ "@dynamic-labs/utils": "2.0.0-alpha.21",
33
+ "@dynamic-labs/viem-utils": "2.0.0-alpha.21",
34
+ "@dynamic-labs/wallet-book": "2.0.0-alpha.21",
35
+ "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.21"
37
36
  },
38
37
  "peerDependencies": {
39
- "viem": "^1.19.13 || ^2.2.0"
38
+ "@zerodev/presets": "^5.1.4",
39
+ "@zerodev/sdk": "^5.1.7",
40
+ "permissionless": "^0.0.34",
41
+ "viem": "^2.7.6"
40
42
  }
41
43
  }
@@ -3,17 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../_virtual/_tslib.cjs');
6
- var sdk = require('@zerodev/sdk');
6
+ var presets = require('@zerodev/presets');
7
7
  var viem = require('viem');
8
+ var permissionless = require('permissionless');
8
9
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
10
  var viemUtils = require('@dynamic-labs/viem-utils');
10
11
  var utils = require('@dynamic-labs/utils');
12
+ var fetchChain = require('./utils/fetchChain.cjs');
11
13
  var logger = require('./utils/logger.cjs');
12
14
 
13
15
  class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
14
- get key() {
15
- return 'zerodev';
16
- }
17
16
  constructor(opts) {
18
17
  var _a;
19
18
  super(opts);
@@ -22,6 +21,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
22
21
  this.isGasSponsorshipDisabled = false;
23
22
  this.isEmbeddedWallet = true;
24
23
  this.name = 'ZeroDev';
24
+ this.overrideKey = 'zerodev';
25
25
  const zeroDevProjectId = (_a = opts.apiProviders.zerodev) === null || _a === void 0 ? void 0 : _a.clientId;
26
26
  if (!zeroDevProjectId) {
27
27
  throw new Error('Missing ZeroDev project ID provided. Add your ZeroDev project id to your project configuration via the Dynamic Labs dashboard.');
@@ -34,28 +34,35 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
34
34
  return this.eoaConnector;
35
35
  }
36
36
  getAccountAbstractionProvider() {
37
- return this.zeroDevProvider;
37
+ return this.kernelClient;
38
+ }
39
+ endSession() {
40
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
41
+ localStorage.removeItem(fetchChain.cachedChainIdKey);
42
+ });
38
43
  }
39
44
  setEoaConnector(connector) {
40
45
  return _tslib.__awaiter(this, void 0, void 0, function* () {
41
- this.zeroDevProviderDeferredPromise = new utils.DeferredPromise();
46
+ this.kernelClientDeferredPromise = new utils.DeferredPromise();
42
47
  this.eoaConnector = connector;
43
48
  const signer = yield this.eoaConnector.getSigner();
44
- if (!signer) {
49
+ if (!(signer === null || signer === void 0 ? void 0 : signer.account)) {
45
50
  return;
46
51
  }
47
- const zeroDevProvider = yield sdk.ECDSAProvider.init({
48
- bundlerProvider: 'STACKUP',
49
- owner: sdk.convertWalletClientToAccountSigner(signer),
52
+ const kernelClient = yield presets.createEcdsaKernelAccountClient({
53
+ chain: yield fetchChain.fetchChain(this.projectId),
54
+ paymaster: 'NONE',
50
55
  projectId: this.projectId,
56
+ provider: ZeroDevConnector.bundlerProvider,
57
+ signer: permissionless.walletClientToSmartAccountSigner(signer),
51
58
  });
52
- utils.wrapMethodWithCallback(zeroDevProvider, 'sendUserOperation', (original, ...args) => {
59
+ utils.wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
53
60
  this._walletUiUtils.disabledConfirmationOnce();
54
61
  return original(...args);
55
62
  });
56
- this.zeroDevProvider = zeroDevProvider;
63
+ this.kernelClient = kernelClient;
57
64
  yield this.checkIsProjectChainEnabled();
58
- this.zeroDevProviderDeferredPromise.resolve();
65
+ this.kernelClientDeferredPromise.resolve();
59
66
  });
60
67
  }
61
68
  checkIsProjectChainEnabled() {
@@ -70,69 +77,67 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
70
77
  }
71
78
  });
72
79
  }
73
- getProviderWithSponsorshipValidation() {
80
+ getKernelClientWithSponsorshipValidation() {
74
81
  return _tslib.__awaiter(this, void 0, void 0, function* () {
75
- if (this.providerWithSponsorship) {
76
- return this.providerWithSponsorship;
82
+ if (this.kernelClientWithSponsorship) {
83
+ return this.kernelClientWithSponsorship;
77
84
  }
78
85
  const { eoaConnector } = this;
79
86
  if (!eoaConnector)
80
87
  throw new utils.DynamicError('No EOA connector');
81
88
  const signer = yield eoaConnector.getSigner();
82
- this.providerWithSponsorship = yield sdk.ECDSAProvider.init({
83
- bundlerProvider: 'STACKUP',
84
- opts: {
85
- paymasterConfig: {
86
- onlySendSponsoredTransaction: true,
87
- policy: 'VERIFYING_PAYMASTER',
88
- },
89
- },
90
- owner: sdk.convertWalletClientToAccountSigner(signer),
89
+ this.kernelClientWithSponsorship = yield presets.createEcdsaKernelAccountClient({
90
+ chain: yield fetchChain.fetchChain(this.projectId),
91
+ paymaster: 'SPONSOR',
91
92
  projectId: this.projectId,
93
+ provider: ZeroDevConnector.bundlerProvider,
94
+ signer: permissionless.walletClientToSmartAccountSigner(signer),
92
95
  });
93
- utils.wrapMethodWithCallback(this.providerWithSponsorship, 'sendUserOperation', (original, ...args) => {
96
+ utils.wrapMethodWithCallback(this.kernelClientWithSponsorship, 'sendUserOperation', (original, ...args) => {
94
97
  this._walletUiUtils.disabledConfirmationOnce();
95
98
  return original(...args);
96
99
  });
97
- return this.providerWithSponsorship;
100
+ return this.kernelClientWithSponsorship;
98
101
  });
99
102
  }
100
- fetchPublicAddress() {
101
- var _a, _b;
103
+ getAddress() {
104
+ var _a, _b, _c;
102
105
  return _tslib.__awaiter(this, void 0, void 0, function* () {
103
- yield ((_a = this.zeroDevProviderDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
104
- return (_b = this.zeroDevProvider) === null || _b === void 0 ? void 0 : _b.getAddress();
106
+ yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
107
+ return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address;
105
108
  });
106
109
  }
107
110
  getConnectedAccounts() {
108
- var _a;
111
+ var _a, _b, _c;
109
112
  return _tslib.__awaiter(this, void 0, void 0, function* () {
110
- yield ((_a = this.zeroDevProviderDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
111
- return this.zeroDevProvider
112
- ? [yield this.zeroDevProvider.getAddress()]
113
+ yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
114
+ return ((_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address)
115
+ ? [yield this.kernelClient.account.address]
113
116
  : [];
114
117
  });
115
118
  }
116
119
  getNetwork() {
117
- var _a, _b;
120
+ var _a, _b, _c;
118
121
  return _tslib.__awaiter(this, void 0, void 0, function* () {
119
- yield ((_a = this.zeroDevProviderDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
120
- return (_b = this.zeroDevProvider) === null || _b === void 0 ? void 0 : _b.rpcClient.chain.id;
122
+ yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
123
+ return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.chain) === null || _c === void 0 ? void 0 : _c.id;
121
124
  });
122
125
  }
123
126
  getTransport(provider) {
124
127
  const transport = viemUtils.confirmationTransport({
125
- connector: this,
126
128
  onPersonalSign: ({ message }) => _tslib.__awaiter(this, void 0, void 0, function* () {
127
129
  this._walletUiUtils.disabledConfirmationOnce();
128
- return provider.signMessage(message);
130
+ return provider.signMessage({
131
+ account: provider.account,
132
+ message,
133
+ });
129
134
  }),
130
135
  onSendTransaction: ({ transaction }) => _tslib.__awaiter(this, void 0, void 0, function* () {
131
136
  try {
132
137
  this._walletUiUtils.disabledConfirmationOnce();
133
138
  const effectiveProvider = this.isGasSponsorshipDisabled
134
139
  ? provider
135
- : yield this.getProviderWithSponsorshipValidation();
140
+ : yield this.getKernelClientWithSponsorshipValidation();
136
141
  const response = yield effectiveProvider.sendTransaction(viemUtils.unFormatTransaction(transaction));
137
142
  return response;
138
143
  }
@@ -150,58 +155,69 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
150
155
  onSignTypedData: ({ message }) => _tslib.__awaiter(this, void 0, void 0, function* () {
151
156
  this._walletUiUtils.disabledConfirmationOnce();
152
157
  const signTypedData = JSON.parse(message);
153
- return provider.signTypedData(signTypedData);
158
+ return provider.signTypedData({
159
+ account: provider.account,
160
+ domain: signTypedData.domain,
161
+ message: signTypedData.message,
162
+ primaryType: signTypedData.primaryType,
163
+ types: signTypedData.types,
164
+ });
154
165
  }),
155
- provider: provider.rpcClient,
166
+ provider: provider.extend(viem.publicActions),
156
167
  transport: viem.custom(provider),
168
+ walletConnector: this,
157
169
  walletUiUtils: this._walletUiUtils,
158
170
  });
159
171
  return transport;
160
172
  }
161
- getWalletClient() {
162
- const provider = this.zeroDevProvider;
173
+ getWalletClient(chainId) {
174
+ var _a;
175
+ const provider = this.kernelClient;
163
176
  if (!provider)
164
177
  throw new utils.DynamicError('No provider');
165
178
  const transport = this.getTransport(provider);
179
+ const address = (_a = provider.account) === null || _a === void 0 ? void 0 : _a.address;
166
180
  const walletClient = viem.createWalletClient({
181
+ account: address,
182
+ chain: chainId ? viemUtils.chainsMap[chainId] : provider.chain,
167
183
  transport,
168
184
  });
169
185
  return walletClient;
170
186
  }
171
187
  getPublicClient() {
172
188
  return _tslib.__awaiter(this, void 0, void 0, function* () {
173
- const provider = this.zeroDevProvider;
189
+ const provider = this.kernelClient.extend(viem.publicActions);
174
190
  if (!provider)
175
191
  throw new utils.DynamicError('No provider');
176
- return provider.rpcClient;
192
+ return provider;
177
193
  });
178
194
  }
179
195
  getSigner() {
180
196
  return _tslib.__awaiter(this, void 0, void 0, function* () {
181
- const provider = this.zeroDevProvider;
182
- if (!provider)
183
- throw new utils.DynamicError('No provider');
184
- const transport = this.getTransport(provider);
185
- const address = yield provider.getAddress();
186
- const walletClient = viem.createWalletClient({
187
- account: address,
188
- transport,
189
- });
190
- return walletClient;
197
+ return this.getWalletClient();
191
198
  });
192
199
  }
193
200
  canSponsorTransactionGas(transaction) {
194
- var _a;
195
201
  return _tslib.__awaiter(this, void 0, void 0, function* () {
196
202
  try {
203
+ yield this.getKernelClientWithSponsorshipValidation();
197
204
  const userOperation = {
198
- data: transaction.data ? transaction.data : '0x',
199
- target: transaction.to,
200
- value: viem.isHex(transaction.value)
201
- ? viem.fromHex(transaction.value, 'bigint')
202
- : transaction.value,
205
+ callData: yield this.kernelClientWithSponsorship.account.encodeCallData({
206
+ data: transaction.data ? transaction.data : '0x',
207
+ to: transaction.to,
208
+ /**
209
+ * if value is undefined, it will be set to 0x0 so the sponsorship
210
+ * check does not fail
211
+ */
212
+ value: transaction.value && viem.isHex(transaction.value)
213
+ ? viem.fromHex(transaction.value, 'bigint')
214
+ : '0x0',
215
+ }),
203
216
  };
204
- const result = yield ((_a = this.zeroDevProvider) === null || _a === void 0 ? void 0 : _a.buildUserOperation(userOperation));
217
+ const result = yield this.kernelClientWithSponsorship.prepareUserOperationRequest({
218
+ account: this.kernelClientWithSponsorship.account,
219
+ userOperation,
220
+ });
205
221
  if (!result)
206
222
  return false;
207
223
  return result.paymasterAndData !== '0x';
@@ -216,12 +232,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
216
232
  this.isGasSponsorshipDisabled = true;
217
233
  }
218
234
  getBalance() {
219
- var _a;
220
235
  return _tslib.__awaiter(this, void 0, void 0, function* () {
221
- const rpcClient = yield ((_a = this.zeroDevProvider) === null || _a === void 0 ? void 0 : _a.rpcClient);
236
+ const rpcClient = this.kernelClient.extend(viem.publicActions);
222
237
  if (!rpcClient)
223
238
  throw new utils.DynamicError('No RPC client');
224
- const address = yield this.fetchPublicAddress();
239
+ const address = yield this.getAddress();
225
240
  if (!address)
226
241
  return;
227
242
  return viem.formatEther(yield rpcClient.getBalance({ address: address }));
@@ -230,7 +245,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
230
245
  signMessage(messageToSign) {
231
246
  return _tslib.__awaiter(this, void 0, void 0, function* () {
232
247
  const client = yield this.getSigner();
233
- const account = yield this.fetchPublicAddress();
248
+ const account = yield this.getAddress();
234
249
  if (!account || !client)
235
250
  return;
236
251
  return client.signMessage({
@@ -239,6 +254,16 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
239
254
  });
240
255
  });
241
256
  }
257
+ createUiTransaction(from) {
258
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
259
+ const walletClient = this.getWalletClient();
260
+ const publicClient = yield this.getPublicClient();
261
+ if (!publicClient || !walletClient) {
262
+ throw new utils.DynamicError('No public client available');
263
+ }
264
+ return viemUtils.createViemUiTransaction({ from, publicClient, walletClient });
265
+ });
266
+ }
242
267
  }
243
268
 
244
269
  exports.ZeroDevConnector = ZeroDevConnector;