@dynamic-labs/ethereum-aa 2.1.0-alpha.9 → 2.1.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.
- package/CHANGELOG.md +259 -0
- package/package.json +13 -13
- package/src/ZeroDevConnector.cjs +24 -14
- package/src/ZeroDevConnector.d.ts +2793 -10
- package/src/ZeroDevConnector.js +20 -10
- package/src/index.d.ts +1 -1
- package/src/utils/createEcsdaKernelAccountClient.cjs +76 -0
- package/src/utils/createEcsdaKernelAccountClient.d.ts +19 -0
- package/src/utils/createEcsdaKernelAccountClient.js +70 -0
- package/src/utils/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,263 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.1.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0...v2.1.1) (2024-06-04)
|
|
3
|
+
|
|
4
|
+
## [2.1.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.32...v2.1.0) (2024-06-04)
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
### General Availability
|
|
9
|
+
|
|
10
|
+
- Support for Coinbase Smart Wallet comes as a default with V2.1, check out [the configuration guide and overview](https://docs.dynamic.xyz/wallets/advanced-wallets/coinbase-smart-wallet)
|
|
11
|
+
|
|
12
|
+
### New closed betas ([talk to us](https://dynamic.xyz/slack) for access)
|
|
13
|
+
|
|
14
|
+
- React Native - You can now build mobile-first onboarding experiences with the same Dynamic magic but for React Native, get started [here](https://docs.dynamic.xyz/react-native/introduction)
|
|
15
|
+
|
|
16
|
+
- Cookie Authentication - Dynamic can now be configured to set a secure, HttpOnly cookie that can be used for authenticating with Dynamic’s backend. This will contain a minified version of our JWT token.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Improvements
|
|
20
|
+
|
|
21
|
+
### General Wallets
|
|
22
|
+
- Phantom integration now supports Bitcoin out of the box
|
|
23
|
+
|
|
24
|
+
### Headless
|
|
25
|
+
- Social Sign-in is now available, learn more in the [guide here](https://docs.dynamic.xyz/headless/headless-social)
|
|
26
|
+
|
|
27
|
+
### Hooks
|
|
28
|
+
- [useSwitchWallet](https://docs.dynamic.xyz/react-sdk/hooks/useswitchwallet) now means you can easily switch between wallets for an authenticated user.
|
|
29
|
+
|
|
30
|
+
### Signup UI
|
|
31
|
+
- Farcaster QR code shows by default if the only login option, learn more [here](https://docs.dynamic.xyz/guides/integrations/farcaster/sign-in-with-farcaster)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [2.1.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.31...v2.1.0-alpha.32) (2024-06-04)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* favor base mainnet when using coinbase sdk ([#5834](https://github.com/dynamic-labs/DynamicAuth/issues/5834)) ([fee5294](https://github.com/dynamic-labs/DynamicAuth/commit/fee529461e6b033938d3ec044c139f5efcb24f6d))
|
|
40
|
+
* open OKX deep link for Bitcoin ([#5818](https://github.com/dynamic-labs/DynamicAuth/issues/5818)) ([c33e93c](https://github.com/dynamic-labs/DynamicAuth/commit/c33e93c81b384d8cd91b3bd0414dd9ea669405c4))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* change Bitget Wallet to Bitget ([#5824](https://github.com/dynamic-labs/DynamicAuth/issues/5824)) ([23b8813](https://github.com/dynamic-labs/DynamicAuth/commit/23b8813e233be07392f5a3e283226b238b9fd99b))
|
|
46
|
+
* coinbase isInstalled ([#5821](https://github.com/dynamic-labs/DynamicAuth/issues/5821)) ([d0e5a37](https://github.com/dynamic-labs/DynamicAuth/commit/d0e5a37c6dd0cb6b85a5704767c93d495aa22854))
|
|
47
|
+
* filter window.solana in solProviderHelper if no extensionLocators are set ([#5819](https://github.com/dynamic-labs/DynamicAuth/issues/5819)) ([ca098ad](https://github.com/dynamic-labs/DynamicAuth/commit/ca098adb787365f9969c1a1f853d3c65ddd40d54))
|
|
48
|
+
* only send ordinal address if only one address retrieved from btc wallet ([#5817](https://github.com/dynamic-labs/DynamicAuth/issues/5817)) ([d54cef4](https://github.com/dynamic-labs/DynamicAuth/commit/d54cef424368b804fde0a4e607fefce22877a304))
|
|
49
|
+
|
|
50
|
+
## [2.1.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.30...v2.1.0-alpha.31) (2024-05-31)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
* export solana private keys in the correct format ([#5809](https://github.com/dynamic-labs/DynamicAuth/issues/5809)) ([08ac1f8](https://github.com/dynamic-labs/DynamicAuth/commit/08ac1f87bb02ad07fd1fc1f544fdcc64ebe635b8))
|
|
56
|
+
* magiceden evm network switching ([#5800](https://github.com/dynamic-labs/DynamicAuth/issues/5800)) ([9b86797](https://github.com/dynamic-labs/DynamicAuth/commit/9b8679735f3db4b33bb57409c3a69adf2beb82aa))
|
|
57
|
+
* pass all signing inputs to createPsbtOptions ([#5798](https://github.com/dynamic-labs/DynamicAuth/issues/5798)) ([628ad4f](https://github.com/dynamic-labs/DynamicAuth/commit/628ad4f8c161496a0610ecbc3052735f8ceae98d))
|
|
58
|
+
* trigger onboarding async ([#5805](https://github.com/dynamic-labs/DynamicAuth/issues/5805)) ([2c1f98c](https://github.com/dynamic-labs/DynamicAuth/commit/2c1f98c0d91422f75e2d6d32ea4a27c2bc8d8376))
|
|
59
|
+
|
|
60
|
+
## [2.1.0-alpha.30](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.29...v2.1.0-alpha.30) (2024-05-31)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
* ensure initExpirationTime is called automatically after authenticating ([#5797](https://github.com/dynamic-labs/DynamicAuth/issues/5797)) ([87eb802](https://github.com/dynamic-labs/DynamicAuth/commit/87eb802e0c2d3af2ca116e07099bfef426d30a1f))
|
|
66
|
+
* initExpirationTime should use expiresAt from storage ([#5799](https://github.com/dynamic-labs/DynamicAuth/issues/5799)) ([384ed17](https://github.com/dynamic-labs/DynamicAuth/commit/384ed1747d9b813ac0d34aaee36eb6480cb256d3))
|
|
67
|
+
* only run useValidateSession once on rerender ([#5795](https://github.com/dynamic-labs/DynamicAuth/issues/5795)) ([ba4446d](https://github.com/dynamic-labs/DynamicAuth/commit/ba4446df95726248b877a84def959cabe81ad9b6))
|
|
68
|
+
* store expiresAt timestamp from VerifyResponse in local storage for use in initExpirationTime ([#5796](https://github.com/dynamic-labs/DynamicAuth/issues/5796)) ([5f8aaeb](https://github.com/dynamic-labs/DynamicAuth/commit/5f8aaeb1cd45b10cb007f9eac25d18f50f142d8f))
|
|
69
|
+
|
|
70
|
+
## [2.1.0-alpha.29](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.28...v2.1.0-alpha.29) (2024-05-30)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Features
|
|
74
|
+
|
|
75
|
+
* add account and chain to coinbase walletClient ([#5776](https://github.com/dynamic-labs/DynamicAuth/issues/5776)) ([557091c](https://github.com/dynamic-labs/DynamicAuth/commit/557091c0efaec11273bd40b53c8bcd633c1bf48d))
|
|
76
|
+
* add support for phantom btc ([#5717](https://github.com/dynamic-labs/DynamicAuth/issues/5717)) ([c61ca4f](https://github.com/dynamic-labs/DynamicAuth/commit/c61ca4f437796be2b420902de7e7de730725d122))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
* add phantom btc mobile redirect ([#5789](https://github.com/dynamic-labs/DynamicAuth/issues/5789)) ([aaa2654](https://github.com/dynamic-labs/DynamicAuth/commit/aaa26548668b0733e7930c1d7f5cc3937b3dfb50))
|
|
82
|
+
* clear settings and configurations when logged out on page load ([#5787](https://github.com/dynamic-labs/DynamicAuth/issues/5787)) ([53c4d0b](https://github.com/dynamic-labs/DynamicAuth/commit/53c4d0b4686debdb43b1ab1b8b9e296ed4dd74b6))
|
|
83
|
+
* lookup projectSettings from store to check if cookie enabled ([#5790](https://github.com/dynamic-labs/DynamicAuth/issues/5790)) ([6f2314b](https://github.com/dynamic-labs/DynamicAuth/commit/6f2314b0afef984e6caea79ead73d12c5c6d83f0))
|
|
84
|
+
|
|
85
|
+
## [2.1.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2024-05-29)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
|
|
90
|
+
* adds solana standard wallet connector ([#5752](https://github.com/dynamic-labs/DynamicAuth/issues/5752)) ([0040940](https://github.com/dynamic-labs/DynamicAuth/commit/0040940fd1adb37ab3106bb0e4dfe79403bc41f2))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Bug Fixes
|
|
94
|
+
|
|
95
|
+
* farcaster fetch url fix ([#5767](https://github.com/dynamic-labs/DynamicAuth/issues/5767)) ([1408ba9](https://github.com/dynamic-labs/DynamicAuth/commit/1408ba92680363b9db7820a63d5e3d15dc26ad22))
|
|
96
|
+
|
|
97
|
+
## [2.1.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2024-05-29)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* coinbase connection ([#5764](https://github.com/dynamic-labs/DynamicAuth/issues/5764)) ([aeacd1c](https://github.com/dynamic-labs/DynamicAuth/commit/aeacd1c55dc471fbf8c14eb05ab356b0a90aa239))
|
|
103
|
+
|
|
104
|
+
## [2.1.0-alpha.26](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2024-05-29)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Features
|
|
108
|
+
|
|
109
|
+
* add farcaster login to react native ([#5713](https://github.com/dynamic-labs/DynamicAuth/issues/5713)) ([08f4473](https://github.com/dynamic-labs/DynamicAuth/commit/08f4473eec9b32b82b6f703fa4d5136514a61b25))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Bug Fixes
|
|
113
|
+
|
|
114
|
+
* better error handling of invalid mfa otp ([#5759](https://github.com/dynamic-labs/DynamicAuth/issues/5759)) ([72ab01f](https://github.com/dynamic-labs/DynamicAuth/commit/72ab01f8f919f147eeedfabf8b4838802abf308a))
|
|
115
|
+
* show correct status for magic eden btc wallets after ([#5748](https://github.com/dynamic-labs/DynamicAuth/issues/5748)) ([b8f20bb](https://github.com/dynamic-labs/DynamicAuth/commit/b8f20bb796b9a2e88817ef3b0da6ac32e9012b18))
|
|
116
|
+
|
|
117
|
+
## [2.1.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.24...v2.1.0-alpha.25) (2024-05-27)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
* btc balance calculation ([#5737](https://github.com/dynamic-labs/DynamicAuth/issues/5737)) ([9b5ceb3](https://github.com/dynamic-labs/DynamicAuth/commit/9b5ceb32d543037f60d7104f0b81b3abc86ebd10))
|
|
123
|
+
|
|
124
|
+
## [2.1.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2024-05-26)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Features
|
|
128
|
+
|
|
129
|
+
* add onMfaCompleteOnce to useMfa ([#5702](https://github.com/dynamic-labs/DynamicAuth/issues/5702)) ([6451e33](https://github.com/dynamic-labs/DynamicAuth/commit/6451e3369ef1b4ba116378f0dd3fe4e82007e670))
|
|
130
|
+
* prompt custom fields during onboarding ([#5302](https://github.com/dynamic-labs/DynamicAuth/issues/5302)) ([8664223](https://github.com/dynamic-labs/DynamicAuth/commit/86642232cf2b490a820169f48ba8dc093010e1a0))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* correct text on pending signature screen to match the embedded widget modal text ([#5707](https://github.com/dynamic-labs/DynamicAuth/issues/5707)) ([44a6a06](https://github.com/dynamic-labs/DynamicAuth/commit/44a6a0664e08d4b9fc25dd86c0e30f8d585558e0))
|
|
136
|
+
* pass captcha token for farcaster login ([#5706](https://github.com/dynamic-labs/DynamicAuth/issues/5706)) ([32bcb6e](https://github.com/dynamic-labs/DynamicAuth/commit/32bcb6e0e06c6e273c07f32893dfd550deeb6a19))
|
|
137
|
+
* use coinbase provider to get connected accounts for consistency ([#5711](https://github.com/dynamic-labs/DynamicAuth/issues/5711)) ([b9e9170](https://github.com/dynamic-labs/DynamicAuth/commit/b9e9170dad1ac27a85a44a7177b82055ce0035cb))
|
|
138
|
+
|
|
139
|
+
## [2.1.0-alpha.23](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.22...v2.1.0-alpha.23) (2024-05-23)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Features
|
|
143
|
+
|
|
144
|
+
* add authFailure and authInit events ([#5659](https://github.com/dynamic-labs/DynamicAuth/issues/5659)) ([f4f592a](https://github.com/dynamic-labs/DynamicAuth/commit/f4f592aaacd96fae9333b803c235c5f1fea0e20e))
|
|
145
|
+
* prompt mfa on signup and signin ([#5599](https://github.com/dynamic-labs/DynamicAuth/issues/5599)) ([8d4ecf4](https://github.com/dynamic-labs/DynamicAuth/commit/8d4ecf4c69c59c1fb14e79511fb2f9b33a7e3d89))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Bug Fixes
|
|
149
|
+
|
|
150
|
+
* close auth modal if create embedded wallet throws ([#5683](https://github.com/dynamic-labs/DynamicAuth/issues/5683)) ([5331d73](https://github.com/dynamic-labs/DynamicAuth/commit/5331d731a171bb52a598eb5b25f7ba80cef7a64c))
|
|
151
|
+
* prevent state update when the webview is unmounted ([#5688](https://github.com/dynamic-labs/DynamicAuth/issues/5688)) ([8e4ecbd](https://github.com/dynamic-labs/DynamicAuth/commit/8e4ecbdcdb5f48c57ecaad90d663c66529013192))
|
|
152
|
+
* show phone number in use error message ([#5681](https://github.com/dynamic-labs/DynamicAuth/issues/5681)) ([e62f7b7](https://github.com/dynamic-labs/DynamicAuth/commit/e62f7b7b6a5e217944346faf2410028433cecad4))
|
|
153
|
+
|
|
154
|
+
## [2.1.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.21...v2.1.0-alpha.22) (2024-05-21)
|
|
155
|
+
|
|
156
|
+
## [2.1.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.20...v2.1.0-alpha.21) (2024-05-21)
|
|
157
|
+
|
|
158
|
+
## [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)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Features
|
|
162
|
+
|
|
163
|
+
* adds client.networks module ([#5650](https://github.com/dynamic-labs/DynamicAuth/issues/5650)) ([70f7fe5](https://github.com/dynamic-labs/DynamicAuth/commit/70f7fe5f437756c51e787ac12183be0a23c51b89))
|
|
164
|
+
* user fields supports custom fields ([#5639](https://github.com/dynamic-labs/DynamicAuth/issues/5639)) ([8eb5788](https://github.com/dynamic-labs/DynamicAuth/commit/8eb5788fc3e1286929f5949ecb57736b21b13fb5))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Bug Fixes
|
|
168
|
+
|
|
169
|
+
* add webcredentials to expo ([#5640](https://github.com/dynamic-labs/DynamicAuth/issues/5640)) ([9026fbf](https://github.com/dynamic-labs/DynamicAuth/commit/9026fbf0108537e884588f3adcdb9f0db04a159b))
|
|
170
|
+
* 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))
|
|
171
|
+
|
|
172
|
+
## [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)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* add createUserProfileFromSDKUser ([#5596](https://github.com/dynamic-labs/DynamicAuth/issues/5596)) ([d37a1b4](https://github.com/dynamic-labs/DynamicAuth/commit/d37a1b4119f5ff4fff1e987d157f6d5abf105a8b))
|
|
178
|
+
* add headless social sign-in ([#5439](https://github.com/dynamic-labs/DynamicAuth/issues/5439)) ([e32fdf8](https://github.com/dynamic-labs/DynamicAuth/commit/e32fdf863718d661b90b592c8df734e92386ddf3))
|
|
179
|
+
* 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))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Bug Fixes
|
|
183
|
+
|
|
184
|
+
* include applinks details to AASA ([#5635](https://github.com/dynamic-labs/DynamicAuth/issues/5635)) ([ce94fec](https://github.com/dynamic-labs/DynamicAuth/commit/ce94fec80adbb3eb4efcb79d1aa2cc6eb35eab6f))
|
|
185
|
+
* 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))
|
|
186
|
+
* 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))
|
|
187
|
+
|
|
188
|
+
## [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)
|
|
189
|
+
|
|
190
|
+
## [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)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
### Features
|
|
194
|
+
|
|
195
|
+
* add coinbaseWalletPreference prop ([#5607](https://github.com/dynamic-labs/DynamicAuth/issues/5607)) ([1ac3b2c](https://github.com/dynamic-labs/DynamicAuth/commit/1ac3b2ce7abb136465f4aa88b045dfb70d99aad7))
|
|
196
|
+
|
|
197
|
+
## [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)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
### Features
|
|
201
|
+
|
|
202
|
+
* 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))
|
|
203
|
+
* 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))
|
|
204
|
+
* 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))
|
|
205
|
+
|
|
206
|
+
## [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)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Bug Fixes
|
|
210
|
+
|
|
211
|
+
* 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))
|
|
212
|
+
|
|
213
|
+
## [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)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
### Features
|
|
217
|
+
|
|
218
|
+
* add useSwitchWallet ([#5575](https://github.com/dynamic-labs/DynamicAuth/issues/5575)) ([d3053d9](https://github.com/dynamic-labs/DynamicAuth/commit/d3053d920110c26ef8052e77bf59e07dedc7c683))
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### Bug Fixes
|
|
222
|
+
|
|
223
|
+
* linking phantom wallets in mobile ([#5524](https://github.com/dynamic-labs/DynamicAuth/issues/5524)) ([28d90f5](https://github.com/dynamic-labs/DynamicAuth/commit/28d90f5126b9c22535b63a3797cc060ef089fc63))
|
|
224
|
+
* 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))
|
|
225
|
+
* remove goerli testnets and add sepolia ([#5565](https://github.com/dynamic-labs/DynamicAuth/issues/5565)) ([888eb03](https://github.com/dynamic-labs/DynamicAuth/commit/888eb031ef6f4dbbdc3015265cce8647d2c720b0))
|
|
226
|
+
|
|
227
|
+
## [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)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### Bug Fixes
|
|
231
|
+
|
|
232
|
+
* ensure Farcaster QR uses useSocialAuth hook ([#5550](https://github.com/dynamic-labs/DynamicAuth/issues/5550)) ([57fcd97](https://github.com/dynamic-labs/DynamicAuth/commit/57fcd97c44e3f52065dcf856acf7bca7b24fabc7))
|
|
233
|
+
|
|
234
|
+
## [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)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Features
|
|
238
|
+
|
|
239
|
+
* 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))
|
|
240
|
+
|
|
241
|
+
## [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)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Features
|
|
245
|
+
|
|
246
|
+
* **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))
|
|
247
|
+
* headless reveal embedded wallet key ([#5518](https://github.com/dynamic-labs/DynamicAuth/issues/5518)) ([77c1536](https://github.com/dynamic-labs/DynamicAuth/commit/77c15360b2b28c52cbdeafb3ce8ca7e80dbecf57))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
### Bug Fixes
|
|
251
|
+
|
|
252
|
+
* 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))
|
|
253
|
+
|
|
254
|
+
## [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)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
### Features
|
|
258
|
+
|
|
259
|
+
* 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))
|
|
260
|
+
|
|
2
261
|
## [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)
|
|
3
262
|
|
|
4
263
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
|
-
"url": "https://github.com/dynamic-labs/
|
|
6
|
+
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
7
7
|
"directory": "packages/ethereum-aa"
|
|
8
8
|
},
|
|
9
9
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"@dynamic-labs/
|
|
34
|
-
"@dynamic-labs/
|
|
35
|
-
"@dynamic-labs/
|
|
36
|
-
"@dynamic-labs/
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.453",
|
|
30
|
+
"@zerodev/ecdsa-validator": "5.2.3",
|
|
31
|
+
"@zerodev/sdk": "5.2.8",
|
|
32
|
+
"permissionless": "0.1.20",
|
|
33
|
+
"@dynamic-labs/ethereum": "2.1.1",
|
|
34
|
+
"@dynamic-labs/logger": "2.1.1",
|
|
35
|
+
"@dynamic-labs/types": "2.1.1",
|
|
36
|
+
"@dynamic-labs/utils": "2.1.1",
|
|
37
|
+
"@dynamic-labs/viem-utils": "2.1.1",
|
|
38
|
+
"@dynamic-labs/wallet-book": "2.1.1",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "2.1.1"
|
|
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
|
}
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -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
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
120
|
+
signer: utils$1.walletClientToSmartAccountSigner(signer),
|
|
113
121
|
});
|
|
114
122
|
utils.wrapMethodWithCallback(this.kernelClientWithSponsorship, 'sendUserOperation', (original, ...args) => {
|
|
115
123
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
@@ -205,7 +213,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
205
213
|
}
|
|
206
214
|
getPublicClient() {
|
|
207
215
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
|
|
216
|
+
var _a;
|
|
217
|
+
const provider = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(viem.publicActions);
|
|
209
218
|
if (!provider)
|
|
210
219
|
throw new utils.DynamicError('No provider');
|
|
211
220
|
return provider;
|
|
@@ -219,9 +228,9 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
219
228
|
canSponsorTransactionGas(transaction) {
|
|
220
229
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
221
230
|
try {
|
|
222
|
-
yield this.getKernelClientWithSponsorshipValidation();
|
|
231
|
+
const kernelClientWithSponsorship = yield this.getKernelClientWithSponsorshipValidation();
|
|
223
232
|
const userOperation = {
|
|
224
|
-
callData: yield
|
|
233
|
+
callData: yield kernelClientWithSponsorship.account.encodeCallData({
|
|
225
234
|
data: transaction.data ? transaction.data : '0x',
|
|
226
235
|
to: transaction.to,
|
|
227
236
|
/**
|
|
@@ -230,11 +239,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
230
239
|
*/
|
|
231
240
|
value: transaction.value && viem.isHex(transaction.value)
|
|
232
241
|
? viem.fromHex(transaction.value, 'bigint')
|
|
233
|
-
: '0x0',
|
|
242
|
+
: viem.fromHex('0x0', 'bigint'),
|
|
234
243
|
}),
|
|
235
244
|
};
|
|
236
|
-
const result = yield
|
|
237
|
-
account:
|
|
245
|
+
const result = yield kernelClientWithSponsorship.prepareUserOperationRequest({
|
|
246
|
+
account: kernelClientWithSponsorship.account,
|
|
238
247
|
userOperation,
|
|
239
248
|
});
|
|
240
249
|
if (!result)
|
|
@@ -252,7 +261,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
252
261
|
}
|
|
253
262
|
getBalance() {
|
|
254
263
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
|
|
264
|
+
var _a;
|
|
265
|
+
const rpcClient = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(viem.publicActions);
|
|
256
266
|
if (!rpcClient)
|
|
257
267
|
throw new utils.DynamicError('No RPC client');
|
|
258
268
|
const address = yield this.getAddress();
|