@dynamic-labs/ethereum-aa 3.0.0-alpha.2 → 3.0.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 +231 -0
- package/package.json +9 -9
- package/src/ZeroDevConnector.cjs +11 -5
- package/src/ZeroDevConnector.d.ts +7 -3
- package/src/ZeroDevConnector.js +11 -5
- package/src/index.cjs +4 -4
- package/src/index.d.ts +3 -1
- package/src/index.js +4 -4
- package/src/utils/createEcsdaKernelAccountClient.cjs +6 -4
- package/src/utils/createEcsdaKernelAccountClient.d.ts +3 -1
- package/src/utils/createEcsdaKernelAccountClient.js +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,235 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.19...v3.0.0-alpha.20) (2024-07-15)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* show/hide confirmation ui for aa session key wallets ([#6334](https://github.com/dynamic-labs/DynamicAuth/issues/6334)) ([6e17162](https://github.com/dynamic-labs/DynamicAuth/commit/6e17162e31915620b622f3ec5b4f8b7087f1728c))
|
|
8
|
+
|
|
9
|
+
## [3.0.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.18...v3.0.0-alpha.19) (2024-07-13)
|
|
10
|
+
|
|
11
|
+
## [3.0.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.17...v3.0.0-alpha.18) (2024-07-12)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* hide confirmation ui triggers passkey creation ([#6322](https://github.com/dynamic-labs/DynamicAuth/issues/6322)) ([c66f282](https://github.com/dynamic-labs/DynamicAuth/commit/c66f282cf8d64f19d7f5a7355aaaec980afbe245))
|
|
17
|
+
|
|
18
|
+
## [3.0.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.16...v3.0.0-alpha.17) (2024-07-11)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* add new hook to select wallet option to connect ([#6301](https://github.com/dynamic-labs/DynamicAuth/issues/6301)) ([833d71d](https://github.com/dynamic-labs/DynamicAuth/commit/833d71de164c57bfa22898c3425641a83a12e135))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* refresh session keys correctly for solana embedded wallets ([#6309](https://github.com/dynamic-labs/DynamicAuth/issues/6309)) ([4b28e8a](https://github.com/dynamic-labs/DynamicAuth/commit/4b28e8ae231567754b6cfd07a7d41e86f1c73daa))
|
|
29
|
+
|
|
30
|
+
## [3.0.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.15...v3.0.0-alpha.16) (2024-07-11)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### ⚠ BREAKING CHANGES
|
|
34
|
+
|
|
35
|
+
* remove isConnected prop from wallets and have it as a method instead (#6265)
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* add bundlerRpc and paymasterRpc parameters to zerodev ([#6304](https://github.com/dynamic-labs/DynamicAuth/issues/6304)) ([156469b](https://github.com/dynamic-labs/DynamicAuth/commit/156469bf703f0c7fa455a24b8e4e328d3a0c58fc))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* headless embedded wallet export session refresh ([#6307](https://github.com/dynamic-labs/DynamicAuth/issues/6307)) ([5423cc1](https://github.com/dynamic-labs/DynamicAuth/commit/5423cc14c370968acf718b7deff6ea8df9228189))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
* remove isConnected prop from wallets and have it as a method instead ([#6265](https://github.com/dynamic-labs/DynamicAuth/issues/6265)) ([652dcc2](https://github.com/dynamic-labs/DynamicAuth/commit/652dcc2d34c9a9719238606c67f600e40621183b))
|
|
48
|
+
|
|
49
|
+
## [3.0.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.14...v3.0.0-alpha.15) (2024-07-11)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* catch third party wallet construction errors ([#6268](https://github.com/dynamic-labs/DynamicAuth/issues/6268)) ([badef39](https://github.com/dynamic-labs/DynamicAuth/commit/badef39d753c7d29925c6c8680053027bd99b69b))
|
|
55
|
+
* decode all solana transactions ([#6294](https://github.com/dynamic-labs/DynamicAuth/issues/6294)) ([5220ab2](https://github.com/dynamic-labs/DynamicAuth/commit/5220ab29381f3a7f1afc7043332b5a018b47eb0a))
|
|
56
|
+
* passkey cta ([#6255](https://github.com/dynamic-labs/DynamicAuth/issues/6255)) ([1b1b152](https://github.com/dynamic-labs/DynamicAuth/commit/1b1b152a24b409c5d941a9c92a003daf0bbe48a1))
|
|
57
|
+
|
|
58
|
+
## [3.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.13...v3.0.0-alpha.14) (2024-07-09)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### ⚠ BREAKING CHANGES
|
|
62
|
+
|
|
63
|
+
* remove setPrimaryWallet in favor of useSwitchWallet (#6212)
|
|
64
|
+
* move getBalance method to wallet so it can be fetched for any wallet not just the active one (#6200)
|
|
65
|
+
* make Wallet a class instead of just a type (#6094)
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* add @dynamic-labs/solana-extension ([#6140](https://github.com/dynamic-labs/DynamicAuth/issues/6140)) ([c0e2a06](https://github.com/dynamic-labs/DynamicAuth/commit/c0e2a067dd83163094b58a15696df8654da47c65))
|
|
70
|
+
* add solana support for multi-asset ([#6222](https://github.com/dynamic-labs/DynamicAuth/issues/6222)) ([9660d79](https://github.com/dynamic-labs/DynamicAuth/commit/9660d7962f1fb01011d68397bb367fdfc5335ca9))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* allow closing re-connect wallet modal ([#6250](https://github.com/dynamic-labs/DynamicAuth/issues/6250)) ([55ba25b](https://github.com/dynamic-labs/DynamicAuth/commit/55ba25bd3e907629aaa26e788885bfa38f8fe350))
|
|
76
|
+
* move getBalance method to wallet so it can be fetched for any wallet not just the active one ([#6200](https://github.com/dynamic-labs/DynamicAuth/issues/6200)) ([ee94773](https://github.com/dynamic-labs/DynamicAuth/commit/ee94773df9b31462a325666760fcf1fc70dec68a))
|
|
77
|
+
* move getNameService method to wallet so name service data can be fetched for any wallet ([#6205](https://github.com/dynamic-labs/DynamicAuth/issues/6205)) ([6671ae9](https://github.com/dynamic-labs/DynamicAuth/commit/6671ae92532ffc1889e24519e75f47d336ac0da6))
|
|
78
|
+
* relax phone number length validation ([#6226](https://github.com/dynamic-labs/DynamicAuth/issues/6226)) ([f0969b4](https://github.com/dynamic-labs/DynamicAuth/commit/f0969b4fbdafde07125cddecb16b4bfd011ea65e))
|
|
79
|
+
* sdkHasLoaded flipping back to false with otp ([#6242](https://github.com/dynamic-labs/DynamicAuth/issues/6242)) ([32ad9dd](https://github.com/dynamic-labs/DynamicAuth/commit/32ad9dd2dae7775f494506773fb343fe1a249c65))
|
|
80
|
+
* send transaction demo undefined address/value ([#6248](https://github.com/dynamic-labs/DynamicAuth/issues/6248)) ([036a511](https://github.com/dynamic-labs/DynamicAuth/commit/036a511fb848ef461edd9b7a5d79d478b0f1cf23))
|
|
81
|
+
* set last active account on accountChange request ([#6218](https://github.com/dynamic-labs/DynamicAuth/issues/6218)) ([05797d2](https://github.com/dynamic-labs/DynamicAuth/commit/05797d292aab8b4de02555594d4d1bbd4c9543eb))
|
|
82
|
+
* show ledger toggle when linking wallet ([#6202](https://github.com/dynamic-labs/DynamicAuth/issues/6202)) ([a449c0b](https://github.com/dynamic-labs/DynamicAuth/commit/a449c0bfc4e3a75ccd7084b930c48fbd6c14f691))
|
|
83
|
+
* show user wallet in profile view on single wallet mode even if it's not primary ([#6187](https://github.com/dynamic-labs/DynamicAuth/issues/6187)) ([ffaaeb2](https://github.com/dynamic-labs/DynamicAuth/commit/ffaaeb2c6cbb2868a381d85451ae5574024156bb))
|
|
84
|
+
* stop auto-switching to connected secondary wallet if primary wallet is not connected ([#6196](https://github.com/dynamic-labs/DynamicAuth/issues/6196)) ([4e8bcd2](https://github.com/dynamic-labs/DynamicAuth/commit/4e8bcd2d02d3fca54a0ed29c45b386ae99266b84))
|
|
85
|
+
* stop coinbase and solflare popups when secondary ([#6225](https://github.com/dynamic-labs/DynamicAuth/issues/6225)) ([7e9c104](https://github.com/dynamic-labs/DynamicAuth/commit/7e9c1049a09c9fd513c9a2a746d6baac916f1bf4))
|
|
86
|
+
* stop sending double sign request on network switch ([e325709](https://github.com/dynamic-labs/DynamicAuth/commit/e325709bb5d2d1331fe16cc705398fc7b1cc292a))
|
|
87
|
+
* tunrkey solana signer accept uint8array message ([#6137](https://github.com/dynamic-labs/DynamicAuth/issues/6137)) ([70f89ce](https://github.com/dynamic-labs/DynamicAuth/commit/70f89ce0dafa4c99b318c9c5adce59083cd6d284))
|
|
88
|
+
* update formatting of phantom bitcoin publickey ([#6210](https://github.com/dynamic-labs/DynamicAuth/issues/6210)) ([f58cea9](https://github.com/dynamic-labs/DynamicAuth/commit/f58cea99333fd7c6af8f56f637ee32f1f7ce8d76))
|
|
89
|
+
* use white color in farcaster qr code when in dark mode ([#6245](https://github.com/dynamic-labs/DynamicAuth/issues/6245)) ([a91958d](https://github.com/dynamic-labs/DynamicAuth/commit/a91958d8773be138da8f54791c4c67866257bbad))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
* make Wallet a class instead of just a type ([#6094](https://github.com/dynamic-labs/DynamicAuth/issues/6094)) ([6dc4672](https://github.com/dynamic-labs/DynamicAuth/commit/6dc4672951cfadc22a6c569e74eae3485bd472f3))
|
|
93
|
+
* remove setPrimaryWallet in favor of useSwitchWallet ([#6212](https://github.com/dynamic-labs/DynamicAuth/issues/6212)) ([de125e1](https://github.com/dynamic-labs/DynamicAuth/commit/de125e1ebbc20507e4ec07f337f5f5fd13aabcbe))
|
|
94
|
+
|
|
95
|
+
## [3.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.12...v3.0.0-alpha.13) (2024-06-27)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
* coinbase smart wallet better handling in iframes ([#6184](https://github.com/dynamic-labs/DynamicAuth/issues/6184)) ([2c4befe](https://github.com/dynamic-labs/DynamicAuth/commit/2c4befedd09e6a432139cb3d08ea61004c3896d5))
|
|
101
|
+
* show connected network name when icon url is missing ([#6191](https://github.com/dynamic-labs/DynamicAuth/issues/6191)) ([dafd9e3](https://github.com/dynamic-labs/DynamicAuth/commit/dafd9e323f47ca3d61556e9a8c84ba3bfd27af8f))
|
|
102
|
+
* use correct account when creating wallet client ([#6179](https://github.com/dynamic-labs/DynamicAuth/issues/6179)) ([4e45a15](https://github.com/dynamic-labs/DynamicAuth/commit/4e45a15b2d7221ec80df919aa93468a75a94bed3))
|
|
103
|
+
|
|
104
|
+
## [3.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.11...v3.0.0-alpha.12) (2024-06-27)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### ⚠ BREAKING CHANGES
|
|
108
|
+
|
|
109
|
+
* return Transaction type from signTransaction and update solana … (#6180)
|
|
110
|
+
|
|
111
|
+
### Bug Fixes
|
|
112
|
+
|
|
113
|
+
* return Transaction type from signTransaction and update solana … ([#6180](https://github.com/dynamic-labs/DynamicAuth/issues/6180)) ([07798b2](https://github.com/dynamic-labs/DynamicAuth/commit/07798b241a13f35a62e4ca0172a57a8d0cd98cf9))
|
|
114
|
+
|
|
115
|
+
## [3.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.10...v3.0.0-alpha.11) (2024-06-26)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Bug Fixes
|
|
119
|
+
|
|
120
|
+
* prevent unwanted magiceden solana popups ([#6158](https://github.com/dynamic-labs/DynamicAuth/issues/6158)) ([b3c8208](https://github.com/dynamic-labs/DynamicAuth/commit/b3c820887eb5ec2badcfce3b19ec4dd874e90811))
|
|
121
|
+
* status icon for embedded wallets ([#6149](https://github.com/dynamic-labs/DynamicAuth/issues/6149)) ([135fd72](https://github.com/dynamic-labs/DynamicAuth/commit/135fd7274f4a6b2dcab98248f7bfe34a09e79f01))
|
|
122
|
+
|
|
123
|
+
## [3.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2024-06-24)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* clear expiresAt from local storage on logout ([#6110](https://github.com/dynamic-labs/DynamicAuth/issues/6110)) ([cbda893](https://github.com/dynamic-labs/DynamicAuth/commit/cbda893441154b6880a5419ce62a353b80f05e55))
|
|
129
|
+
* show SOL amount for complex transactions and better error display ([#6068](https://github.com/dynamic-labs/DynamicAuth/issues/6068)) ([454a3a0](https://github.com/dynamic-labs/DynamicAuth/commit/454a3a0a50805b3d63f44c2ef8c1dc766617eb2b))
|
|
130
|
+
|
|
131
|
+
## [3.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2024-06-21)
|
|
132
|
+
|
|
133
|
+
## [3.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.7...v3.0.0-alpha.8) (2024-06-21)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### ⚠ BREAKING CHANGES
|
|
137
|
+
|
|
138
|
+
* break out turnkey package into 3 separate packages (#6015)
|
|
139
|
+
|
|
140
|
+
### Features
|
|
141
|
+
|
|
142
|
+
* add reinitialize hook ([#6098](https://github.com/dynamic-labs/DynamicAuth/issues/6098)) ([d978baa](https://github.com/dynamic-labs/DynamicAuth/commit/d978baa404d34064c36cc549229b1fcea1f20df0))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
* always reconnect the wallet provider when calling getAddress ([#6097](https://github.com/dynamic-labs/DynamicAuth/issues/6097)) ([0f3d497](https://github.com/dynamic-labs/DynamicAuth/commit/0f3d497cedb38239fa9ada2bb25c6b4eaa72d7b1))
|
|
148
|
+
* break out turnkey package into 3 separate packages ([#6015](https://github.com/dynamic-labs/DynamicAuth/issues/6015)) ([a86fbef](https://github.com/dynamic-labs/DynamicAuth/commit/a86fbefe97558363b085e6f752af32d2943f91fa)), closes [#6017](https://github.com/dynamic-labs/DynamicAuth/issues/6017) [#6059](https://github.com/dynamic-labs/DynamicAuth/issues/6059)
|
|
149
|
+
* set latest blockhash on solana transactions if tx confirmation ui is disabled ([#6102](https://github.com/dynamic-labs/DynamicAuth/issues/6102)) ([b8035a3](https://github.com/dynamic-labs/DynamicAuth/commit/b8035a328e47409bf0416d3a01b2f17914488748))
|
|
150
|
+
* silently query unisat accounts ([#6101](https://github.com/dynamic-labs/DynamicAuth/issues/6101)) ([#6104](https://github.com/dynamic-labs/DynamicAuth/issues/6104)) ([643e704](https://github.com/dynamic-labs/DynamicAuth/commit/643e7048ff8610b31e6397e10b160ad456a45d11))
|
|
151
|
+
* stop querying magiceden solana accounts ([#6103](https://github.com/dynamic-labs/DynamicAuth/issues/6103)) ([#6108](https://github.com/dynamic-labs/DynamicAuth/issues/6108)) ([3cfdbc3](https://github.com/dynamic-labs/DynamicAuth/commit/3cfdbc3bc82bfe9bf53bf4236f7892a5440fcb86))
|
|
152
|
+
* trigger sign when linking an already linked unknown wallet ([#6105](https://github.com/dynamic-labs/DynamicAuth/issues/6105)) ([9e9c03b](https://github.com/dynamic-labs/DynamicAuth/commit/9e9c03bf615991c4f1183bf85c4d75c9a7773c85))
|
|
153
|
+
|
|
154
|
+
## [3.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2024-06-19)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### ⚠ BREAKING CHANGES
|
|
158
|
+
|
|
159
|
+
* add selectedTabIndex and helpers (#6040)
|
|
160
|
+
|
|
161
|
+
### Features
|
|
162
|
+
|
|
163
|
+
* add selectedTabIndex and helpers ([#6040](https://github.com/dynamic-labs/DynamicAuth/issues/6040)) ([ae20b80](https://github.com/dynamic-labs/DynamicAuth/commit/ae20b8081376dce97b18fa69c81c9ab73c1ff317))
|
|
164
|
+
* add useRefreshUser to trigger a user state refresh ([#6079](https://github.com/dynamic-labs/DynamicAuth/issues/6079)) ([1236d35](https://github.com/dynamic-labs/DynamicAuth/commit/1236d35fe9fab44ed2114ad9f3c8c6dca7ec27be))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Bug Fixes
|
|
168
|
+
|
|
169
|
+
* always return userWallets when available ([#6080](https://github.com/dynamic-labs/DynamicAuth/issues/6080)) ([#6083](https://github.com/dynamic-labs/DynamicAuth/issues/6083)) ([11992d2](https://github.com/dynamic-labs/DynamicAuth/commit/11992d2af5a401ba4ff1dc6904e2a9f8ef5904ca))
|
|
170
|
+
* less solana rpc calls and improve fee fetching ([#6019](https://github.com/dynamic-labs/DynamicAuth/issues/6019)) ([e2609db](https://github.com/dynamic-labs/DynamicAuth/commit/e2609db962c7708ff5b127cb23260a25bc5032e3))
|
|
171
|
+
* make account change idemopotent ([#6061](https://github.com/dynamic-labs/DynamicAuth/issues/6061)) ([8c87513](https://github.com/dynamic-labs/DynamicAuth/commit/8c8751390ea14888c4889679895e2f06d75717b9))
|
|
172
|
+
* only run multi wallet prompt when user profile or auth flow are open ([#6073](https://github.com/dynamic-labs/DynamicAuth/issues/6073)) ([d48ca10](https://github.com/dynamic-labs/DynamicAuth/commit/d48ca105359018457a78588fd8d9aa8a91583a02))
|
|
173
|
+
* recompute multiwallet state after merging accounts ([#6078](https://github.com/dynamic-labs/DynamicAuth/issues/6078)) ([e08a274](https://github.com/dynamic-labs/DynamicAuth/commit/e08a274c4d848f2a8360be7106cfbfa00b9a8f9b))
|
|
174
|
+
* stop querying okx for accounts while locked ([#6081](https://github.com/dynamic-labs/DynamicAuth/issues/6081)) ([#6084](https://github.com/dynamic-labs/DynamicAuth/issues/6084)) ([34365ac](https://github.com/dynamic-labs/DynamicAuth/commit/34365ac1981fe020b03e666c24535a247645d2ad))
|
|
175
|
+
* update copy for primary wallet not connected modal ([#6069](https://github.com/dynamic-labs/DynamicAuth/issues/6069)) ([4a3f43c](https://github.com/dynamic-labs/DynamicAuth/commit/4a3f43ce5585983f7fea0c5b97e812c0ade80e2c))
|
|
176
|
+
|
|
177
|
+
## [3.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.5...v3.0.0-alpha.6) (2024-06-18)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Features
|
|
181
|
+
|
|
182
|
+
* implement useExternalAuth hook to signin using external jwt auth ([#6039](https://github.com/dynamic-labs/DynamicAuth/issues/6039)) ([ba90908](https://github.com/dynamic-labs/DynamicAuth/commit/ba90908509ec21f708a4a0782a7f94861fc3b484))
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### Bug Fixes
|
|
186
|
+
|
|
187
|
+
* allow sign-in with different ME BTC wallet after initial connection ([a527b46](https://github.com/dynamic-labs/DynamicAuth/commit/a527b464f321b4fc27730f57c3812e996b5ed878))
|
|
188
|
+
* close sign modal when signing in with a wallet when embedded wallet is enabled ([#6013](https://github.com/dynamic-labs/DynamicAuth/issues/6013)) ([0f4f3c8](https://github.com/dynamic-labs/DynamicAuth/commit/0f4f3c83db162f7a1794a3549b60bbad6b03e2c0))
|
|
189
|
+
* custom network without a valid icon should still display its name in network picker ([#6018](https://github.com/dynamic-labs/DynamicAuth/issues/6018)) ([0b10df6](https://github.com/dynamic-labs/DynamicAuth/commit/0b10df68950bfc9b8492443158a6bb030dc1122c))
|
|
190
|
+
* e2e: remove page pause ([#6045](https://github.com/dynamic-labs/DynamicAuth/issues/6045)) ([55bba00](https://github.com/dynamic-labs/DynamicAuth/commit/55bba0034255055d6ae266b1296542f47ed48e2b))
|
|
191
|
+
* more fixes for connect starknet button ([#6046](https://github.com/dynamic-labs/DynamicAuth/issues/6046)) ([0fb570a](https://github.com/dynamic-labs/DynamicAuth/commit/0fb570a44e65f8dd6d4d2bf5edb2ee54985ec9d4))
|
|
192
|
+
* set verified credentials on embedded wallet creation ([#6044](https://github.com/dynamic-labs/DynamicAuth/issues/6044)) ([b52a96d](https://github.com/dynamic-labs/DynamicAuth/commit/b52a96d321e7efdb30dce9cdb3f6f176c24ceb81))
|
|
193
|
+
|
|
194
|
+
## [3.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.4...v3.0.0-alpha.5) (2024-06-14)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### ⚠ BREAKING CHANGES
|
|
198
|
+
|
|
199
|
+
* remove viem dependency from non-evm packages (#5508)
|
|
200
|
+
* move rpc providers into their own packages (#5981)
|
|
201
|
+
|
|
202
|
+
### Features
|
|
203
|
+
|
|
204
|
+
* add in-app browser navigation support for sats-connect ([#5988](https://github.com/dynamic-labs/DynamicAuth/issues/5988)) ([be27d2d](https://github.com/dynamic-labs/DynamicAuth/commit/be27d2d4030bbe2157e879497d8e6a00b4a3e404))
|
|
205
|
+
* move rpc providers into their own packages ([#5981](https://github.com/dynamic-labs/DynamicAuth/issues/5981)) ([d7a62d6](https://github.com/dynamic-labs/DynamicAuth/commit/d7a62d60e79dfa6d6651b0fa103e90b6f8a9ccf3))
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Bug Fixes
|
|
209
|
+
|
|
210
|
+
* embedded solana wallets can send SPL tokens and estimate gas ([#5982](https://github.com/dynamic-labs/DynamicAuth/issues/5982)) ([36623eb](https://github.com/dynamic-labs/DynamicAuth/commit/36623eb99d1d1dfebfd8b6f3194eeff31e7de2bf))
|
|
211
|
+
* improve logic related to turnkey and emailVerifcation ([#5946](https://github.com/dynamic-labs/DynamicAuth/issues/5946)) ([dd0b2dc](https://github.com/dynamic-labs/DynamicAuth/commit/dd0b2dc6d93a8bbbcb6eef88732e62b747005bb3))
|
|
212
|
+
* show linked wallets with unavailable providers in user wallets list ([#5992](https://github.com/dynamic-labs/DynamicAuth/issues/5992)) ([996079c](https://github.com/dynamic-labs/DynamicAuth/commit/996079ced360651c7b1eb5273548e0548f6f9f3a))
|
|
213
|
+
* switch network modal not closing after switching to a supported network ([#5979](https://github.com/dynamic-labs/DynamicAuth/issues/5979)) ([f239952](https://github.com/dynamic-labs/DynamicAuth/commit/f2399523dd82bb28046992cac4582688b688bdc0))
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
* remove viem dependency from non-evm packages ([#5508](https://github.com/dynamic-labs/DynamicAuth/issues/5508)) ([0299dc3](https://github.com/dynamic-labs/DynamicAuth/commit/0299dc3cbb611182d763e9a89d1270c2e2f32df5))
|
|
217
|
+
|
|
218
|
+
## [3.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) (2024-06-12)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### Bug Fixes
|
|
222
|
+
|
|
223
|
+
* cache getGenesisHash call to prevent over calling ([#5966](https://github.com/dynamic-labs/DynamicAuth/issues/5966)) ([b4d542f](https://github.com/dynamic-labs/DynamicAuth/commit/b4d542f0a85f5ba8c5b8f02f287caee45b4b6feb))
|
|
224
|
+
* handle raw messages in embedded wallet sign message modal ([#5815](https://github.com/dynamic-labs/DynamicAuth/issues/5815)) ([9adc289](https://github.com/dynamic-labs/DynamicAuth/commit/9adc28993b57c1c7f03c4ce6d500288dcf60881e))
|
|
225
|
+
|
|
226
|
+
## [3.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2024-06-11)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
### Bug Fixes
|
|
230
|
+
|
|
231
|
+
* only navigate to mfa backup codes when needed ([#5965](https://github.com/dynamic-labs/DynamicAuth/issues/5965)) ([edc462f](https://github.com/dynamic-labs/DynamicAuth/commit/edc462f20768885db1883a2c8d005e07044092d5))
|
|
232
|
+
|
|
2
233
|
## [3.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.1...v3.0.0-alpha.2) (2024-06-11)
|
|
3
234
|
|
|
4
235
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.20",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.470",
|
|
30
30
|
"@zerodev/ecdsa-validator": "5.2.3",
|
|
31
31
|
"@zerodev/sdk": "5.2.8",
|
|
32
32
|
"permissionless": "0.1.20",
|
|
33
|
-
"@dynamic-labs/ethereum": "3.0.0-alpha.
|
|
34
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/viem-utils": "3.0.0-alpha.
|
|
38
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
33
|
+
"@dynamic-labs/ethereum": "3.0.0-alpha.20",
|
|
34
|
+
"@dynamic-labs/logger": "3.0.0-alpha.20",
|
|
35
|
+
"@dynamic-labs/types": "3.0.0-alpha.20",
|
|
36
|
+
"@dynamic-labs/utils": "3.0.0-alpha.20",
|
|
37
|
+
"@dynamic-labs/viem-utils": "3.0.0-alpha.20",
|
|
38
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.20",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.20"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"viem": "^2.7.6"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -48,7 +48,10 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
48
48
|
getEOAConnector() {
|
|
49
49
|
return this.eoaConnector;
|
|
50
50
|
}
|
|
51
|
-
getAccountAbstractionProvider() {
|
|
51
|
+
getAccountAbstractionProvider({ withSponsorship, } = {}) {
|
|
52
|
+
if (withSponsorship && this.kernelClientWithSponsorship) {
|
|
53
|
+
return this.kernelClientWithSponsorship;
|
|
54
|
+
}
|
|
52
55
|
return this.kernelClient;
|
|
53
56
|
}
|
|
54
57
|
endSession() {
|
|
@@ -74,9 +77,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
74
77
|
return;
|
|
75
78
|
}
|
|
76
79
|
const kernelClient = yield createEcsdaKernelAccountClient.createEcdsaKernelAccountClient({
|
|
80
|
+
bundlerRpc: ZeroDevConnector.bundlerRpc,
|
|
77
81
|
chain: yield fetchChain.fetchChain(this.projectId),
|
|
78
82
|
entryPointAddress: this.entryPoint,
|
|
79
83
|
paymaster: 'NONE',
|
|
84
|
+
paymasterRpc: ZeroDevConnector.paymasterRpc,
|
|
80
85
|
projectId: this.projectId,
|
|
81
86
|
provider: ZeroDevConnector.bundlerProvider,
|
|
82
87
|
signer: utils$1.walletClientToSmartAccountSigner(signer),
|
|
@@ -86,6 +91,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
86
91
|
return original(...args);
|
|
87
92
|
});
|
|
88
93
|
this.kernelClient = kernelClient;
|
|
94
|
+
// set the provider with sponsorship enabled
|
|
95
|
+
yield this.getKernelClientWithSponsorshipValidation();
|
|
89
96
|
yield this.checkIsProjectChainEnabled();
|
|
90
97
|
this.kernelClientDeferredPromise.resolve();
|
|
91
98
|
});
|
|
@@ -112,9 +119,11 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
112
119
|
throw new utils.DynamicError('No EOA connector');
|
|
113
120
|
const signer = yield eoaConnector.getSigner();
|
|
114
121
|
this.kernelClientWithSponsorship = yield createEcsdaKernelAccountClient.createEcdsaKernelAccountClient({
|
|
122
|
+
bundlerRpc: ZeroDevConnector.bundlerRpc,
|
|
115
123
|
chain: yield fetchChain.fetchChain(this.projectId),
|
|
116
124
|
entryPointAddress: this.entryPoint,
|
|
117
125
|
paymaster: 'SPONSOR',
|
|
126
|
+
paymasterRpc: ZeroDevConnector.paymasterRpc,
|
|
118
127
|
projectId: this.projectId,
|
|
119
128
|
provider: ZeroDevConnector.bundlerProvider,
|
|
120
129
|
signer: utils$1.walletClientToSmartAccountSigner(signer),
|
|
@@ -259,15 +268,12 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
259
268
|
disableGasSponsorshipOnce() {
|
|
260
269
|
this.isGasSponsorshipDisabled = true;
|
|
261
270
|
}
|
|
262
|
-
getBalance() {
|
|
271
|
+
getBalance(address) {
|
|
263
272
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
264
273
|
var _a;
|
|
265
274
|
const rpcClient = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(viem.publicActions);
|
|
266
275
|
if (!rpcClient)
|
|
267
276
|
throw new utils.DynamicError('No RPC client');
|
|
268
|
-
const address = yield this.getAddress();
|
|
269
|
-
if (!address)
|
|
270
|
-
return;
|
|
271
277
|
return viem.formatEther(yield rpcClient.getBalance({ address: address }));
|
|
272
278
|
});
|
|
273
279
|
}
|
|
@@ -22,7 +22,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
22
22
|
projectId: string;
|
|
23
23
|
kernelClient: KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint>> | undefined;
|
|
24
24
|
eoaConnector: WalletConnector | undefined;
|
|
25
|
-
|
|
25
|
+
kernelClientWithSponsorship: KernelAccountClient<EntryPoint, Transport, ViemChain, KernelSmartAccount<EntryPoint>> | undefined;
|
|
26
26
|
connectedChain: Chain;
|
|
27
27
|
supportedChains: Chain[];
|
|
28
28
|
evmNetworks: EvmNetwork[];
|
|
@@ -30,6 +30,8 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
30
30
|
isEmbeddedWallet: boolean;
|
|
31
31
|
private entryPoint;
|
|
32
32
|
static bundlerProvider: BundlerProvider | undefined;
|
|
33
|
+
static bundlerRpc: string | undefined;
|
|
34
|
+
static paymasterRpc: string | undefined;
|
|
33
35
|
/**
|
|
34
36
|
* Deferred promise that resolves when the ZeroDev provider is set.
|
|
35
37
|
* This is used to make sure that the provider is set before any other method is called.
|
|
@@ -48,7 +50,9 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
48
50
|
private _walletUiUtils;
|
|
49
51
|
constructor(opts: ZeroDevConnectorProps);
|
|
50
52
|
getEOAConnector(): WalletConnector | undefined;
|
|
51
|
-
getAccountAbstractionProvider(
|
|
53
|
+
getAccountAbstractionProvider({ withSponsorship, }?: {
|
|
54
|
+
withSponsorship?: boolean;
|
|
55
|
+
}): KernelAccountClient<EntryPoint> | undefined;
|
|
52
56
|
endSession(): Promise<void>;
|
|
53
57
|
setEoaConnector(connector: WalletConnector): Promise<void>;
|
|
54
58
|
private checkIsProjectChainEnabled;
|
|
@@ -3099,7 +3103,7 @@ export declare class ZeroDevConnector extends WalletConnectorBase implements IZe
|
|
|
3099
3103
|
} | undefined>;
|
|
3100
3104
|
canSponsorTransactionGas(transaction: IUITransaction): Promise<boolean>;
|
|
3101
3105
|
disableGasSponsorshipOnce(): void;
|
|
3102
|
-
getBalance(): Promise<string | undefined>;
|
|
3106
|
+
getBalance(address: string): Promise<string | undefined>;
|
|
3103
3107
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
3104
3108
|
createUiTransaction(from: string): Promise<IUITransaction>;
|
|
3105
3109
|
}
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -44,7 +44,10 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
44
44
|
getEOAConnector() {
|
|
45
45
|
return this.eoaConnector;
|
|
46
46
|
}
|
|
47
|
-
getAccountAbstractionProvider() {
|
|
47
|
+
getAccountAbstractionProvider({ withSponsorship, } = {}) {
|
|
48
|
+
if (withSponsorship && this.kernelClientWithSponsorship) {
|
|
49
|
+
return this.kernelClientWithSponsorship;
|
|
50
|
+
}
|
|
48
51
|
return this.kernelClient;
|
|
49
52
|
}
|
|
50
53
|
endSession() {
|
|
@@ -70,9 +73,11 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
70
73
|
return;
|
|
71
74
|
}
|
|
72
75
|
const kernelClient = yield createEcdsaKernelAccountClient({
|
|
76
|
+
bundlerRpc: ZeroDevConnector.bundlerRpc,
|
|
73
77
|
chain: yield fetchChain(this.projectId),
|
|
74
78
|
entryPointAddress: this.entryPoint,
|
|
75
79
|
paymaster: 'NONE',
|
|
80
|
+
paymasterRpc: ZeroDevConnector.paymasterRpc,
|
|
76
81
|
projectId: this.projectId,
|
|
77
82
|
provider: ZeroDevConnector.bundlerProvider,
|
|
78
83
|
signer: walletClientToSmartAccountSigner(signer),
|
|
@@ -82,6 +87,8 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
82
87
|
return original(...args);
|
|
83
88
|
});
|
|
84
89
|
this.kernelClient = kernelClient;
|
|
90
|
+
// set the provider with sponsorship enabled
|
|
91
|
+
yield this.getKernelClientWithSponsorshipValidation();
|
|
85
92
|
yield this.checkIsProjectChainEnabled();
|
|
86
93
|
this.kernelClientDeferredPromise.resolve();
|
|
87
94
|
});
|
|
@@ -108,9 +115,11 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
108
115
|
throw new DynamicError('No EOA connector');
|
|
109
116
|
const signer = yield eoaConnector.getSigner();
|
|
110
117
|
this.kernelClientWithSponsorship = yield createEcdsaKernelAccountClient({
|
|
118
|
+
bundlerRpc: ZeroDevConnector.bundlerRpc,
|
|
111
119
|
chain: yield fetchChain(this.projectId),
|
|
112
120
|
entryPointAddress: this.entryPoint,
|
|
113
121
|
paymaster: 'SPONSOR',
|
|
122
|
+
paymasterRpc: ZeroDevConnector.paymasterRpc,
|
|
114
123
|
projectId: this.projectId,
|
|
115
124
|
provider: ZeroDevConnector.bundlerProvider,
|
|
116
125
|
signer: walletClientToSmartAccountSigner(signer),
|
|
@@ -255,15 +264,12 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
255
264
|
disableGasSponsorshipOnce() {
|
|
256
265
|
this.isGasSponsorshipDisabled = true;
|
|
257
266
|
}
|
|
258
|
-
getBalance() {
|
|
267
|
+
getBalance(address) {
|
|
259
268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
260
269
|
var _a;
|
|
261
270
|
const rpcClient = (_a = this.kernelClient) === null || _a === void 0 ? void 0 : _a.extend(publicActions);
|
|
262
271
|
if (!rpcClient)
|
|
263
272
|
throw new DynamicError('No RPC client');
|
|
264
|
-
const address = yield this.getAddress();
|
|
265
|
-
if (!address)
|
|
266
|
-
return;
|
|
267
273
|
return formatEther(yield rpcClient.getBalance({ address: address }));
|
|
268
274
|
});
|
|
269
275
|
}
|
package/src/index.cjs
CHANGED
|
@@ -7,10 +7,10 @@ var ZeroDevConnector = require('./ZeroDevConnector.cjs');
|
|
|
7
7
|
var ethereumAa = require('./ethereum-aa.cjs');
|
|
8
8
|
var isZeroDevConnector = require('./utils/isZeroDevConnector.cjs');
|
|
9
9
|
|
|
10
|
-
const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, } = {}) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, bundlerRpc, paymasterRpc, } = {}) => {
|
|
11
|
+
ZeroDevConnector.ZeroDevConnector.bundlerProvider = bundlerProvider;
|
|
12
|
+
ZeroDevConnector.ZeroDevConnector.bundlerRpc = bundlerRpc;
|
|
13
|
+
ZeroDevConnector.ZeroDevConnector.paymasterRpc = paymasterRpc;
|
|
14
14
|
return ZeroDevSmartWalletConnectors;
|
|
15
15
|
};
|
|
16
16
|
const ZeroDevSmartWalletConnectors = (props) => {
|
package/src/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core'
|
|
|
2
2
|
import { BundlerProvider } from './utils';
|
|
3
3
|
export * from './ethereum-aa';
|
|
4
4
|
export { isZeroDevConnector } from './utils/isZeroDevConnector';
|
|
5
|
-
export declare const ZeroDevSmartWalletConnectorsWithConfig: ({ bundlerProvider, }?: {
|
|
5
|
+
export declare const ZeroDevSmartWalletConnectorsWithConfig: ({ bundlerProvider, bundlerRpc, paymasterRpc, }?: {
|
|
6
6
|
bundlerProvider?: BundlerProvider;
|
|
7
|
+
bundlerRpc?: string;
|
|
8
|
+
paymasterRpc?: string;
|
|
7
9
|
}) => (props: any) => WalletConnectorConstructor[];
|
|
8
10
|
export declare const ZeroDevSmartWalletConnectors: (props: any) => WalletConnectorConstructor[];
|
package/src/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { ZeroDevConnector } from './ZeroDevConnector.js';
|
|
|
3
3
|
export { EthereumAaConnector } from './ethereum-aa.js';
|
|
4
4
|
export { isZeroDevConnector } from './utils/isZeroDevConnector.js';
|
|
5
5
|
|
|
6
|
-
const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, } = {}) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const ZeroDevSmartWalletConnectorsWithConfig = ({ bundlerProvider, bundlerRpc, paymasterRpc, } = {}) => {
|
|
7
|
+
ZeroDevConnector.bundlerProvider = bundlerProvider;
|
|
8
|
+
ZeroDevConnector.bundlerRpc = bundlerRpc;
|
|
9
|
+
ZeroDevConnector.paymasterRpc = paymasterRpc;
|
|
10
10
|
return ZeroDevSmartWalletConnectors;
|
|
11
11
|
};
|
|
12
12
|
const ZeroDevSmartWalletConnectors = (props) => {
|
|
@@ -24,9 +24,11 @@ const getZeroDevPaymasterRPC = (projectId, provider) => {
|
|
|
24
24
|
return rpc;
|
|
25
25
|
};
|
|
26
26
|
const isERC20 = (value) => viem.isAddress(value);
|
|
27
|
-
const createEcdsaKernelAccountClient = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ chain, projectId, signer, provider, index, paymaster = 'SPONSOR', entryPointAddress, }) {
|
|
27
|
+
const createEcdsaKernelAccountClient = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, index, paymaster = 'SPONSOR', entryPointAddress, }) {
|
|
28
|
+
const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
|
|
29
|
+
const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
|
|
28
30
|
const publicClient = viem.createPublicClient({
|
|
29
|
-
transport: viem.http(
|
|
31
|
+
transport: viem.http(resolvedBundlerRpc),
|
|
30
32
|
});
|
|
31
33
|
const ecdsaValidator$1 = yield ecdsaValidator.signerToEcdsaValidator(publicClient, {
|
|
32
34
|
entryPoint: entryPointAddress,
|
|
@@ -42,11 +44,11 @@ const createEcdsaKernelAccountClient = (_a) => _tslib.__awaiter(void 0, [_a], vo
|
|
|
42
44
|
const zerodevPaymaster = clients.createZeroDevPaymasterClient({
|
|
43
45
|
chain: chain,
|
|
44
46
|
entryPoint: entryPointAddress,
|
|
45
|
-
transport: viem.http(
|
|
47
|
+
transport: viem.http(resolvedPaymasterRpc),
|
|
46
48
|
});
|
|
47
49
|
const kernelClient = clients.createKernelAccountClient({
|
|
48
50
|
account,
|
|
49
|
-
bundlerTransport: viem.http(
|
|
51
|
+
bundlerTransport: viem.http(resolvedBundlerRpc),
|
|
50
52
|
chain,
|
|
51
53
|
entryPoint: entryPointAddress,
|
|
52
54
|
middleware: paymaster !== 'NONE'
|
|
@@ -8,11 +8,13 @@ export type ERC20Paymaster = Address;
|
|
|
8
8
|
export type PaymasterType = 'NONE' | 'SPONSOR' | ERC20Paymaster;
|
|
9
9
|
export declare const getZeroDevBundlerRPC: (projectId: string, provider?: BundlerProvider) => string;
|
|
10
10
|
export declare const getZeroDevPaymasterRPC: (projectId: string, provider?: BundlerProvider) => string;
|
|
11
|
-
export declare const createEcdsaKernelAccountClient: <entryPoint extends EntryPoint, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends `0x${string}` = `0x${string}`>({ chain, projectId, signer, provider, index, paymaster, entryPointAddress, }: {
|
|
11
|
+
export declare const createEcdsaKernelAccountClient: <entryPoint extends EntryPoint, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends `0x${string}` = `0x${string}`>({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, index, paymaster, entryPointAddress, }: {
|
|
12
|
+
bundlerRpc?: string;
|
|
12
13
|
chain: TChain;
|
|
13
14
|
projectId: string;
|
|
14
15
|
signer: SmartAccountSigner<TSource, TAddress>;
|
|
15
16
|
paymaster: PaymasterType;
|
|
17
|
+
paymasterRpc?: string;
|
|
16
18
|
entryPointAddress: entryPoint;
|
|
17
19
|
provider?: BundlerProvider;
|
|
18
20
|
index?: bigint;
|
|
@@ -20,9 +20,11 @@ const getZeroDevPaymasterRPC = (projectId, provider) => {
|
|
|
20
20
|
return rpc;
|
|
21
21
|
};
|
|
22
22
|
const isERC20 = (value) => isAddress(value);
|
|
23
|
-
const createEcdsaKernelAccountClient = (_a) => __awaiter(void 0, [_a], void 0, function* ({ chain, projectId, signer, provider, index, paymaster = 'SPONSOR', entryPointAddress, }) {
|
|
23
|
+
const createEcdsaKernelAccountClient = (_a) => __awaiter(void 0, [_a], void 0, function* ({ bundlerRpc, chain, paymasterRpc, projectId, signer, provider, index, paymaster = 'SPONSOR', entryPointAddress, }) {
|
|
24
|
+
const resolvedBundlerRpc = bundlerRpc !== null && bundlerRpc !== void 0 ? bundlerRpc : getZeroDevBundlerRPC(projectId, provider);
|
|
25
|
+
const resolvedPaymasterRpc = paymasterRpc !== null && paymasterRpc !== void 0 ? paymasterRpc : getZeroDevPaymasterRPC(projectId, provider);
|
|
24
26
|
const publicClient = createPublicClient({
|
|
25
|
-
transport: http(
|
|
27
|
+
transport: http(resolvedBundlerRpc),
|
|
26
28
|
});
|
|
27
29
|
const ecdsaValidator = yield signerToEcdsaValidator(publicClient, {
|
|
28
30
|
entryPoint: entryPointAddress,
|
|
@@ -38,11 +40,11 @@ const createEcdsaKernelAccountClient = (_a) => __awaiter(void 0, [_a], void 0, f
|
|
|
38
40
|
const zerodevPaymaster = createZeroDevPaymasterClient({
|
|
39
41
|
chain: chain,
|
|
40
42
|
entryPoint: entryPointAddress,
|
|
41
|
-
transport: http(
|
|
43
|
+
transport: http(resolvedPaymasterRpc),
|
|
42
44
|
});
|
|
43
45
|
const kernelClient = createKernelAccountClient({
|
|
44
46
|
account,
|
|
45
|
-
bundlerTransport: http(
|
|
47
|
+
bundlerTransport: http(resolvedBundlerRpc),
|
|
46
48
|
chain,
|
|
47
49
|
entryPoint: entryPointAddress,
|
|
48
50
|
middleware: paymaster !== 'NONE'
|