@dynamic-labs/bitcoin 2.0.0-alpha.8 → 2.0.0

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,333 @@
1
1
 
2
+ ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
3
+
4
+ ## [2.0.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-04-11)
5
+
6
+
7
+ ### Features
8
+
9
+ * support adding email for recovery to existing embedded wallet ([#5128](https://github.com/dynamic-labs/DynamicAuth/issues/5128)) ([477fd81](https://github.com/dynamic-labs/DynamicAuth/commit/477fd81ac00864284d9d2183c0b8c078a0a23a2b))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * issue where customer also tries to use i18n.init ([#5267](https://github.com/dynamic-labs/DynamicAuth/issues/5267)) ([7f81f1e](https://github.com/dynamic-labs/DynamicAuth/commit/7f81f1e010fbc6408f6a5d6a37608235e947befa))
15
+ * smart wallet not loading correctly upon refresh when using non-embedded eoa wallet ([#5301](https://github.com/dynamic-labs/DynamicAuth/issues/5301)) ([e957317](https://github.com/dynamic-labs/DynamicAuth/commit/e9573173f6209773a0be5f4af37323f2be8d7906))
16
+
17
+ ## [2.0.0-alpha.30](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2024-04-11)
18
+
19
+
20
+ ### ⚠ BREAKING CHANGES
21
+
22
+ * add headless sms sign-in (#5274)
23
+
24
+ ### Features
25
+
26
+ * add headless sms sign-in ([#5274](https://github.com/dynamic-labs/DynamicAuth/issues/5274)) ([fffc293](https://github.com/dynamic-labs/DynamicAuth/commit/fffc293f85447a784e8c728d1586f3555ab1fbfa))
27
+
28
+ ## [2.0.0-alpha.29](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.28...v2.0.0-alpha.29) (2024-04-10)
29
+
30
+
31
+ ### ⚠ BREAKING CHANGES
32
+
33
+ * replace sdk-api with sdk-api-core (#5280)
34
+
35
+ ### Features
36
+
37
+ * add dynamic client context ([#5250](https://github.com/dynamic-labs/DynamicAuth/issues/5250)) ([778ebe6](https://github.com/dynamic-labs/DynamicAuth/commit/778ebe6313e0bf3c9876feb6eff5bf152c15c55e))
38
+ * **webview-controller:** fetch manifest and render Dynamic SDK ([#5287](https://github.com/dynamic-labs/DynamicAuth/issues/5287)) ([00e84ac](https://github.com/dynamic-labs/DynamicAuth/commit/00e84acc4bdda92bad91108788f8d7882d0790d6))
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * don't render modal header component if there's no content ([#5269](https://github.com/dynamic-labs/DynamicAuth/issues/5269)) ([f4d7266](https://github.com/dynamic-labs/DynamicAuth/commit/f4d72668a5243108649774c6581733655f385cab))
44
+ * don't show get extension button when there are no download links ([#5276](https://github.com/dynamic-labs/DynamicAuth/issues/5276)) ([e8cf660](https://github.com/dynamic-labs/DynamicAuth/commit/e8cf66076a9914881a8edda69feb2fb192ac63a3))
45
+
46
+
47
+ * replace sdk-api with sdk-api-core ([#5280](https://github.com/dynamic-labs/DynamicAuth/issues/5280)) ([da4b695](https://github.com/dynamic-labs/DynamicAuth/commit/da4b6955a81d6bfb5c994cd62e21e9ae11a4f454))
48
+
49
+ ## [2.0.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2024-04-10)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * improve bridge connect experience on mobile ([#5283](https://github.com/dynamic-labs/DynamicAuth/issues/5283)) ([155e4a9](https://github.com/dynamic-labs/DynamicAuth/commit/155e4a99e2cf5f78a1a5e91e774acbf170d6b083))
55
+
56
+ ## [2.0.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.26...v2.0.0-alpha.27) (2024-04-09)
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * coinbase improvements ([#5268](https://github.com/dynamic-labs/DynamicAuth/issues/5268)) ([c10a6de](https://github.com/dynamic-labs/DynamicAuth/commit/c10a6debcacff6cd97f2436fbde387f85faa5682))
62
+ * show qr code for metamask on desktop when not installed ([#5262](https://github.com/dynamic-labs/DynamicAuth/issues/5262)) ([1dcb4d9](https://github.com/dynamic-labs/DynamicAuth/commit/1dcb4d98de8a95f6b11d7bad90b9059110087385))
63
+ * update title of hardware wallet select screen ([#5270](https://github.com/dynamic-labs/DynamicAuth/issues/5270)) ([6e8fe17](https://github.com/dynamic-labs/DynamicAuth/commit/6e8fe17306677786ccf528b97ab673b9ae6b57b9))
64
+
65
+ ## [2.0.0-alpha.26](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.25...v2.0.0-alpha.26) (2024-04-08)
66
+
67
+
68
+ ### ⚠ BREAKING CHANGES
69
+
70
+ * add onWalletAdded/onWalletRemoved callbacks and removed onConnect/onDisconnect/onLinkSuccess/onUnlinkSuccess (#5194)
71
+ * note:
72
+ - use "events" in favour of "eventsCallbacks"
73
+ - use "handlers.handleConnectedWallet" in favour of "eventsCallbacks.onBeforeConnectSuccessConfirmation"
74
+
75
+ ### Bug Fixes
76
+
77
+ * coinbase wallet settings ([#5233](https://github.com/dynamic-labs/DynamicAuth/issues/5233)) ([1b04411](https://github.com/dynamic-labs/DynamicAuth/commit/1b04411eb90db438f3eacf622d9c28db4c7cf532))
78
+ * remove local storage settings on logout ([#5212](https://github.com/dynamic-labs/DynamicAuth/issues/5212)) ([e686628](https://github.com/dynamic-labs/DynamicAuth/commit/e686628f602a44cd13083e7bb9afb4f50304390e))
79
+ * show app name or logo in sign message modal ([#5225](https://github.com/dynamic-labs/DynamicAuth/issues/5225)) ([a77b6ba](https://github.com/dynamic-labs/DynamicAuth/commit/a77b6ba9b5646b400ebf933949dabe06a35d1c81))
80
+ * user wallets not being cleared immediately when logout is called ([#5211](https://github.com/dynamic-labs/DynamicAuth/issues/5211)) ([a649c46](https://github.com/dynamic-labs/DynamicAuth/commit/a649c462d171cf6f8d67159df9f5f2144f315e5c))
81
+
82
+
83
+ * add onWalletAdded/onWalletRemoved callbacks and removed onConnect/onDisconnect/onLinkSuccess/onUnlinkSuccess ([#5194](https://github.com/dynamic-labs/DynamicAuth/issues/5194)) ([fdec78c](https://github.com/dynamic-labs/DynamicAuth/commit/fdec78c1c32c58c8f7dc7ffd9b877320aa4d90e0))
84
+ * rename eventsCallbacks to events ([#5196](https://github.com/dynamic-labs/DynamicAuth/issues/5196)) ([5797185](https://github.com/dynamic-labs/DynamicAuth/commit/5797185c18fa091032ef27043b63a1d5201b5e23))
85
+
86
+ ## [2.0.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2024-04-04)
87
+
88
+
89
+ ### Features
90
+
91
+ * add in-app browser deeplink for metamask ([#5176](https://github.com/dynamic-labs/DynamicAuth/issues/5176)) ([02ce607](https://github.com/dynamic-labs/DynamicAuth/commit/02ce6077ed0deeaefc7a62ee91ff72f5bce2b327)), closes [#5123](https://github.com/dynamic-labs/DynamicAuth/issues/5123)
92
+
93
+ ## [2.0.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2024-04-03)
94
+
95
+
96
+ ### ⚠ BREAKING CHANGES
97
+
98
+ * rename otp verification callbacks (#5180)
99
+ * remove deprecated isVerificationInProgress flag and setter (#5089)
100
+
101
+ ### Features
102
+
103
+ * allow creating embedded wallets even if user signs in with a wallet ([#5093](https://github.com/dynamic-labs/DynamicAuth/issues/5093)) ([ba2dd62](https://github.com/dynamic-labs/DynamicAuth/commit/ba2dd625e0a7bf35018cf8aac8e80bd23b4e3b0f))
104
+
105
+
106
+ ### Bug Fixes
107
+
108
+ * api unit test by removing api and sdk versions for assertion ([#5168](https://github.com/dynamic-labs/DynamicAuth/issues/5168)) ([6d3b8ad](https://github.com/dynamic-labs/DynamicAuth/commit/6d3b8adebe62a4f2a7878630384348b2c491d779))
109
+ * bug when phone input is empty ([#5139](https://github.com/dynamic-labs/DynamicAuth/issues/5139)) ([7155b63](https://github.com/dynamic-labs/DynamicAuth/commit/7155b63518d00ba807bc321c6740b341d0a8b82f))
110
+ * clear error message on otp resend for sms ([#5182](https://github.com/dynamic-labs/DynamicAuth/issues/5182)) ([f40b48c](https://github.com/dynamic-labs/DynamicAuth/commit/f40b48c7f58c8e3dfe73fb124d642c3b8f193cee))
111
+ * link farcaster account ([#5170](https://github.com/dynamic-labs/DynamicAuth/issues/5170)) ([10fe272](https://github.com/dynamic-labs/DynamicAuth/commit/10fe272247605b5f09385f063231e2c881399cc8))
112
+ * show correct otp message for sms verification failure ([#5177](https://github.com/dynamic-labs/DynamicAuth/issues/5177)) ([b3bcd76](https://github.com/dynamic-labs/DynamicAuth/commit/b3bcd7694047dac55ce37babb71684a418633f95))
113
+ * update wagmi connector id when wallet connector changes ([#5185](https://github.com/dynamic-labs/DynamicAuth/issues/5185)) ([14fb83a](https://github.com/dynamic-labs/DynamicAuth/commit/14fb83a22c8e39095b79cc9951cae3f00f4fca2f))
114
+
115
+
116
+ * remove deprecated isVerificationInProgress flag and setter ([#5089](https://github.com/dynamic-labs/DynamicAuth/issues/5089)) ([060fef7](https://github.com/dynamic-labs/DynamicAuth/commit/060fef70df0c497e7a9b6e67ad0bfafef52c2bbb))
117
+ * rename otp verification callbacks ([#5180](https://github.com/dynamic-labs/DynamicAuth/issues/5180)) ([a580eec](https://github.com/dynamic-labs/DynamicAuth/commit/a580eec02d15b46a25c01d5473e4db2db89937e2))
118
+
119
+ ## [2.0.0-alpha.23](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2024-04-01)
120
+
121
+
122
+ ### ⚠ BREAKING CHANGES
123
+
124
+ * implement proper solana embedded wallet signer (#5092)
125
+ * prevent adding temporary wallet connection to userWallets (#5104)
126
+
127
+ ### Bug Fixes
128
+
129
+ * Multiple WC bug fixes ([#5142](https://github.com/dynamic-labs/DynamicAuth/issues/5142)) ([92236e6](https://github.com/dynamic-labs/DynamicAuth/commit/92236e6d74c28516403f6df79c539406ece3d6d0)) ([#5132](https://github.com/dynamic-labs/DynamicAuth/issues/5132)) ([99f564a](https://github.com/dynamic-labs/DynamicAuth/commit/99f564a39e35e28af0be2a03617f12aa19cbeb7f))
130
+
131
+ * Better handling of empty callback queue([#5147](https://github.com/dynamic-labs/DynamicAuth/issues/5147)) ([e2d6bf2](https://github.com/dynamic-labs/DynamicAuth/commit/e2d6bf2444ca01199796ead4136f34b81b6c9b61))
132
+
133
+ * multiple improvements to the wallet list ([#5112](https://github.com/dynamic-labs/DynamicAuth/issues/5112)) ([00eec5f](https://github.com/dynamic-labs/DynamicAuth/commit/00eec5fde70548c3d771260f3d86e5365e73878d))
134
+
135
+ * Improved scroll experience on ios ([#5152](https://github.com/dynamic-labs/DynamicAuth/issues/5152)) ([341704f](https://github.com/dynamic-labs/DynamicAuth/commit/341704f99cb6e06f253309f3a8afb1684bb8ae2a))
136
+
137
+ * better handling of multiwallet state([#5146](https://github.com/dynamic-labs/DynamicAuth/issues/5146)) ([403267b](https://github.com/dynamic-labs/DynamicAuth/commit/403267b3c268d648aba155e0b6fea31d7fdc1b56))
138
+
139
+ * show correct OTP error message ([#5135](https://github.com/dynamic-labs/DynamicAuth/issues/5135)) ([e7494ce](https://github.com/dynamic-labs/DynamicAuth/commit/e7494cee4a1b5132af91058cbcb2dae0b7eac44b))
140
+
141
+ * implement proper solana embedded wallet signer ([#5092](https://github.com/dynamic-labs/DynamicAuth/issues/5092)) ([7749b97](https://github.com/dynamic-labs/DynamicAuth/commit/7749b97db49fb9af8ae0668172f478e1f0c29665))
142
+
143
+ * prevent adding temporary wallet connection to userWallets ([#5104](https://github.com/dynamic-labs/DynamicAuth/issues/5104)) ([3c02b78](https://github.com/dynamic-labs/DynamicAuth/commit/3c02b781c997c63ff11a7f1c255b92d10962327f))
144
+
145
+
146
+ ## [2.0.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2024-03-27)
147
+
148
+
149
+ ### ⚠ BREAKING CHANGES
150
+
151
+ * remove isFullyConnected (#5066)
152
+ * remove and deprecated exported methods (#5065)
153
+ * remove emailOnly provider
154
+
155
+ ### Features
156
+
157
+ * add method property to track which phantom connector function was called ([#5044](https://github.com/dynamic-labs/DynamicAuth/issues/5044)) ([f820cd4](https://github.com/dynamic-labs/DynamicAuth/commit/f820cd4c7e047fd5181115b4d388e54df682e5c8))
158
+ * add signAndSendTransaction to phantom redirect connector ([#5054](https://github.com/dynamic-labs/DynamicAuth/issues/5054)) ([694a300](https://github.com/dynamic-labs/DynamicAuth/commit/694a3003c8765098878a5c95174be5eba4509fc2))
159
+ * implement remaining signer methods on phantom redirect connector ([#5060](https://github.com/dynamic-labs/DynamicAuth/issues/5060)) ([29db446](https://github.com/dynamic-labs/DynamicAuth/commit/29db4464de6eea11c92a8080fed1eb3e7588b2b8))
160
+
161
+
162
+ ### Bug Fixes
163
+
164
+ * add recommended wallet tags to the WalletSimpleSignIn component ([#5041](https://github.com/dynamic-labs/DynamicAuth/issues/5041)) ([aefde4d](https://github.com/dynamic-labs/DynamicAuth/commit/aefde4d927427c131dce4402eb3c705527c64e8f))
165
+ * display invalid phone number error ([#5103](https://github.com/dynamic-labs/DynamicAuth/issues/5103)) ([842c0ba](https://github.com/dynamic-labs/DynamicAuth/commit/842c0ba3cfe1120c166f12410efbc346d8e30ed0))
166
+ * ensure the user field modals uses the base widget context ([#5105](https://github.com/dynamic-labs/DynamicAuth/issues/5105)) ([aa2a545](https://github.com/dynamic-labs/DynamicAuth/commit/aa2a545bdbf6f38f4131ccdde61142389dbf5480))
167
+ * force aspect ratio for social icon pfps ([#5072](https://github.com/dynamic-labs/DynamicAuth/issues/5072)) ([6f611a7](https://github.com/dynamic-labs/DynamicAuth/commit/6f611a7cbe41d66796449b28af919bc93a7bae42))
168
+ * handle too many email verifications error ([#5051](https://github.com/dynamic-labs/DynamicAuth/issues/5051)) ([7af96df](https://github.com/dynamic-labs/DynamicAuth/commit/7af96dfb85cdc68577fdb8cc880e2fd09bcff5af))
169
+ * hardcode zerion provider and update walletbook to prevent showing up as metamask when not installed ([#5071](https://github.com/dynamic-labs/DynamicAuth/issues/5071)) ([3ab6c37](https://github.com/dynamic-labs/DynamicAuth/commit/3ab6c3772efe2c2e3259ca7a9dbb92e924314029))
170
+ * issue where ethereum is tree shaken ([#5028](https://github.com/dynamic-labs/DynamicAuth/issues/5028)) ([fda542d](https://github.com/dynamic-labs/DynamicAuth/commit/fda542db2b65a437004fe809a0ea9f90fde47b13))
171
+ * not clearing the loading when creating an embedded wallet ([323086f](https://github.com/dynamic-labs/DynamicAuth/commit/323086f673fb8a2108b8262181511987d0bc1d09))
172
+ * solflare double connection on page refresh ([#5083](https://github.com/dynamic-labs/DynamicAuth/issues/5083)) ([ef76005](https://github.com/dynamic-labs/DynamicAuth/commit/ef7600564b646cf45396287a0d6b6f1420473b04))
173
+ * swap out findProvider for getSigner on solflare ([#5057](https://github.com/dynamic-labs/DynamicAuth/issues/5057)) ([b78827f](https://github.com/dynamic-labs/DynamicAuth/commit/b78827f8fd87a594114908d890f58b8771123383))
174
+ * validate user session whenever user is connected/authenticated ([#5082](https://github.com/dynamic-labs/DynamicAuth/issues/5082)) ([432faa0](https://github.com/dynamic-labs/DynamicAuth/commit/432faa0a69b43cb7324a252a2450db3cbd3b4b12))
175
+ * walletconnect improvements and fixes ([#5085](https://github.com/dynamic-labs/DynamicAuth/issues/5085)) ([bb42566](https://github.com/dynamic-labs/DynamicAuth/commit/bb425666aef5071b7827ef0aa167a328493f1ae7))
176
+
177
+
178
+ * remove and deprecated exported methods ([#5065](https://github.com/dynamic-labs/DynamicAuth/issues/5065)) ([63af7ea](https://github.com/dynamic-labs/DynamicAuth/commit/63af7ea691b2112032de332f2b3558ac6260a38d))
179
+ * remove emailOnly provider ([60a30bc](https://github.com/dynamic-labs/DynamicAuth/commit/60a30bc2f242de19d9c6167279fc44b7f9395ac8))
180
+ * remove isFullyConnected ([#5066](https://github.com/dynamic-labs/DynamicAuth/issues/5066)) ([0a662d9](https://github.com/dynamic-labs/DynamicAuth/commit/0a662d9eda19045f13c21ad1b5238ca11594fde5))
181
+
182
+ ## [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)
183
+
184
+
185
+ ### Features
186
+
187
+ * implement barebones signer in PhantomRedirect connector ([#5043](https://github.com/dynamic-labs/DynamicAuth/issues/5043)) ([4d7ff79](https://github.com/dynamic-labs/DynamicAuth/commit/4d7ff79acfe554d651791139b5e1d23ebafe712c))
188
+
189
+
190
+ ### Bug Fixes
191
+
192
+ * 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))
193
+ * 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))
194
+
195
+ ## [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)
196
+
197
+
198
+ ### Bug Fixes
199
+
200
+ * 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))
201
+ * 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))
202
+ * 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))
203
+
204
+ ## [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)
205
+
206
+
207
+ ### Bug Fixes
208
+
209
+ * add localization to email form ([#5009](https://github.com/dynamic-labs/DynamicAuth/issues/5009)) ([f3c100c](https://github.com/dynamic-labs/DynamicAuth/commit/f3c100cb0b815880d11c6b619d94bfaa7330a115))
210
+ * 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))
211
+ * 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))
212
+
213
+ ## [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)
214
+
215
+ ## [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)
216
+
217
+
218
+ ### ⚠ BREAKING CHANGES
219
+
220
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp (#4991)
221
+
222
+ ### Features
223
+
224
+ * 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))
225
+
226
+
227
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp ([#4991](https://github.com/dynamic-labs/DynamicAuth/issues/4991)) ([e83a365](https://github.com/dynamic-labs/DynamicAuth/commit/e83a3658d4f5cf0630fc8f15be66f2d3db84ab98))
228
+
229
+ ## [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)
230
+
231
+
232
+ ### Features
233
+
234
+ * 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))
235
+
236
+ ## [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)
237
+
238
+
239
+ ### Features
240
+
241
+ * Add support for mobile farcaster signin ([#4973](https://github.com/dynamic-labs/DynamicAuth/issues/4973)) ([98261a4](https://github.com/dynamic-labs/DynamicAuth/commit/98261a47bd319cd93b36f5cdd6a9be0064887686))
242
+
243
+ ## [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)
244
+
245
+
246
+ ### Bug Fixes
247
+
248
+ * 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))
249
+ * omit wallet connect on mobile ([#4954](https://github.com/dynamic-labs/DynamicAuth/issues/4954)) ([6ac29a8](https://github.com/dynamic-labs/DynamicAuth/commit/6ac29a8961dc010688425fb67a4fb621ca9f80b2))
250
+
251
+ ## [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)
252
+
253
+ ## [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)
254
+
255
+
256
+ ### Features
257
+
258
+ * add sign-in with farcaster ([#4947](https://github.com/dynamic-labs/DynamicAuth/issues/4947)) ([3927d24](https://github.com/dynamic-labs/DynamicAuth/commit/3927d24392a8944997ca05431c6ab54757be62d9))
259
+
260
+
261
+ ### Bug Fixes
262
+
263
+ * wallet connect links with query params ([#4948](https://github.com/dynamic-labs/DynamicAuth/issues/4948)) ([0738130](https://github.com/dynamic-labs/DynamicAuth/commit/0738130f82473a197e035b8dd74d996bdbb24c11))
264
+
265
+ ## [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)
266
+
267
+
268
+ ### ⚠ BREAKING CHANGES
269
+
270
+ * rename FetchPublicAddressOpts to GetAddressOpts (#4910)
271
+ * remove use effect in useWalletEventListeners (#4843)
272
+ * rename fetchPublicAddress to getAddress (#4851)
273
+
274
+ ### Features
275
+
276
+ * Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
277
+ * 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))
278
+
279
+
280
+ ### Bug Fixes
281
+
282
+ * add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
283
+ * keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
284
+ * pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
285
+ * 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))
286
+
287
+
288
+ * remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
289
+ * rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
290
+ * rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
291
+
292
+ ## [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)
293
+
294
+
295
+ ### ⚠ BREAKING CHANGES
296
+
297
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… (#4892)
298
+ * refactor send transaction for multi chain (#4831)
299
+
300
+ ### Features
301
+
302
+ * add sandbox indicator to sdk ([62fd821](https://github.com/dynamic-labs/DynamicAuth/commit/62fd821a895bb54cec4cae3d153aa0056a7e6638))
303
+
304
+
305
+ ### Bug Fixes
306
+
307
+ * 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))
308
+ * fix server side rendering ([#4811](https://github.com/dynamic-labs/DynamicAuth/issues/4811)) ([063dfae](https://github.com/dynamic-labs/DynamicAuth/commit/063dfae8b6750875d2f35dd9709a1f675495f4fb))
309
+ * hide network ([#4885](https://github.com/dynamic-labs/DynamicAuth/issues/4885)) ([ec10c58](https://github.com/dynamic-labs/DynamicAuth/commit/ec10c588218f067e991d5830fc06ec081e4e1d18))
310
+ * network picker on mobile ([#4887](https://github.com/dynamic-labs/DynamicAuth/issues/4887)) ([6e0ab1b](https://github.com/dynamic-labs/DynamicAuth/commit/6e0ab1bc7d138b73373741960a501ff7cf20e3f9))
311
+
312
+
313
+ * refactor send transaction for multi chain ([#4831](https://github.com/dynamic-labs/DynamicAuth/issues/4831)) ([c98444b](https://github.com/dynamic-labs/DynamicAuth/commit/c98444be7935420dda3d8216d03946f5893eb82f))
314
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… ([#4892](https://github.com/dynamic-labs/DynamicAuth/issues/4892)) ([7cdf519](https://github.com/dynamic-labs/DynamicAuth/commit/7cdf5196b1cd8516de2d456163fe9071956d40d3))
315
+
316
+ ## [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)
317
+
318
+
319
+ ### Features
320
+
321
+ * solana connector new sendTransaction method ([#4842](https://github.com/dynamic-labs/DynamicAuth/issues/4842)) ([0b198e3](https://github.com/dynamic-labs/DynamicAuth/commit/0b198e30d83fbbc8d506654d87cbfad403fda289))
322
+ * 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))
323
+
324
+
325
+ ### Bug Fixes
326
+
327
+ * 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))
328
+ * update btckit network conversion for signPsbt ([a6009e1](https://github.com/dynamic-labs/DynamicAuth/commit/a6009e18c453b4e65545455fea0e52ed7a983b4d))
329
+ * 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))
330
+
2
331
  ## [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)
3
332
 
4
333
  ## [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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/bitcoin",
3
- "version": "2.0.0-alpha.8",
3
+ "version": "2.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,14 +27,14 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@btckit/types": "0.0.19",
30
- "@dynamic-labs/sdk-api": "0.0.376",
30
+ "@dynamic-labs/sdk-api-core": "0.0.418",
31
31
  "@wallet-standard/app": "1.0.1",
32
32
  "@wallet-standard/base": "1.0.1",
33
33
  "bitcoinjs-lib": "6.1.5",
34
34
  "sats-connect": "1.1.2",
35
- "@dynamic-labs/utils": "2.0.0-alpha.8",
36
- "@dynamic-labs/wallet-book": "2.0.0-alpha.8",
37
- "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.8",
35
+ "@dynamic-labs/utils": "2.0.0",
36
+ "@dynamic-labs/wallet-book": "2.0.0",
37
+ "@dynamic-labs/wallet-connector-core": "2.0.0",
38
38
  "stream": "0.0.2"
39
39
  },
40
40
  "peerDependencies": {}
@@ -16,7 +16,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
16
16
  this.currentNetwork = satsConnect.BitcoinNetworkType.Mainnet;
17
17
  this.btcKit = btcKit;
18
18
  }
19
- fetchPublicAddress() {
19
+ getAddress() {
20
20
  var _a;
21
21
  return _tslib.__awaiter(this, void 0, void 0, function* () {
22
22
  const [connectedAccount] = yield this.getConnectedAccounts();
@@ -59,7 +59,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
59
59
  }
60
60
  sendBitcoin(transaction) {
61
61
  return _tslib.__awaiter(this, void 0, void 0, function* () {
62
- const connectedAddress = yield this.fetchPublicAddress();
62
+ const connectedAddress = yield this.getAddress();
63
63
  if (!connectedAddress || !this.btcKit) {
64
64
  return;
65
65
  }
@@ -74,10 +74,15 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
74
74
  return response.result.txid;
75
75
  });
76
76
  }
77
+ convertNetworkTypeToNetworkMode() {
78
+ return this.currentNetwork === satsConnect.BitcoinNetworkType.Mainnet
79
+ ? 'mainnet'
80
+ : 'testnet';
81
+ }
77
82
  signPsbt(request) {
78
83
  var _a, _b;
79
84
  return _tslib.__awaiter(this, void 0, void 0, function* () {
80
- const connectedAddress = yield this.fetchPublicAddress();
85
+ const connectedAddress = yield this.getAddress();
81
86
  if (!connectedAddress || !this.btcKit) {
82
87
  return;
83
88
  }
@@ -93,7 +98,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
93
98
  hex: psbtFromBase64.toHex(),
94
99
  signAtIndex: (_b = request.signature) === null || _b === void 0 ? void 0 : _b.flatMap((sig) => sig.signingIndexes).filter(Number.isInteger),
95
100
  };
96
- const signedPsbtResponse = (yield this.btcKit.request('signPsbt', Object.assign({ broadcast: false, network }, signPsbtRequestParams)));
101
+ const signedPsbtResponse = (yield this.btcKit.request('signPsbt', Object.assign({ broadcast: false, network: this.convertNetworkTypeToNetworkMode() }, signPsbtRequestParams)));
97
102
  if (!signedPsbtResponse ||
98
103
  !('result' in signedPsbtResponse) ||
99
104
  !('hex' in signedPsbtResponse.result)) {
@@ -10,8 +10,9 @@ export declare abstract class BitcoinBtcKitConnector extends BitcoinWalletConnec
10
10
  currentNetwork: BitcoinNetworkType;
11
11
  private btcKit;
12
12
  constructor(opts: BitcoinWalletConnectorOpts, btcKit: BtcKitProvider);
13
- fetchPublicAddress(): Promise<string | undefined>;
13
+ getAddress(): Promise<string | undefined>;
14
14
  signMessage(messageToSign: string): Promise<string | undefined>;
15
15
  sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
16
+ convertNetworkTypeToNetworkMode(): "mainnet" | "testnet";
16
17
  signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
17
18
  }
@@ -12,7 +12,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
12
12
  this.currentNetwork = BitcoinNetworkType.Mainnet;
13
13
  this.btcKit = btcKit;
14
14
  }
15
- fetchPublicAddress() {
15
+ getAddress() {
16
16
  var _a;
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
18
  const [connectedAccount] = yield this.getConnectedAccounts();
@@ -55,7 +55,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
55
55
  }
56
56
  sendBitcoin(transaction) {
57
57
  return __awaiter(this, void 0, void 0, function* () {
58
- const connectedAddress = yield this.fetchPublicAddress();
58
+ const connectedAddress = yield this.getAddress();
59
59
  if (!connectedAddress || !this.btcKit) {
60
60
  return;
61
61
  }
@@ -70,10 +70,15 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
70
70
  return response.result.txid;
71
71
  });
72
72
  }
73
+ convertNetworkTypeToNetworkMode() {
74
+ return this.currentNetwork === BitcoinNetworkType.Mainnet
75
+ ? 'mainnet'
76
+ : 'testnet';
77
+ }
73
78
  signPsbt(request) {
74
79
  var _a, _b;
75
80
  return __awaiter(this, void 0, void 0, function* () {
76
- const connectedAddress = yield this.fetchPublicAddress();
81
+ const connectedAddress = yield this.getAddress();
77
82
  if (!connectedAddress || !this.btcKit) {
78
83
  return;
79
84
  }
@@ -89,7 +94,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
89
94
  hex: psbtFromBase64.toHex(),
90
95
  signAtIndex: (_b = request.signature) === null || _b === void 0 ? void 0 : _b.flatMap((sig) => sig.signingIndexes).filter(Number.isInteger),
91
96
  };
92
- const signedPsbtResponse = (yield this.btcKit.request('signPsbt', Object.assign({ broadcast: false, network }, signPsbtRequestParams)));
97
+ const signedPsbtResponse = (yield this.btcKit.request('signPsbt', Object.assign({ broadcast: false, network: this.convertNetworkTypeToNetworkMode() }, signPsbtRequestParams)));
93
98
  if (!signedPsbtResponse ||
94
99
  !('result' in signedPsbtResponse) ||
95
100
  !('hex' in signedPsbtResponse.result)) {
@@ -1,4 +1,4 @@
1
- import { WalletAdditionalAddress } from '@dynamic-labs/sdk-api';
1
+ import { WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
2
2
  import { BitcoinConnectedAccount } from './types';
3
3
  type BitcoinConnectedAccounts = {
4
4
  [key: string]: BitcoinConnectedAccount;
@@ -19,7 +19,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
19
19
  super(opts);
20
20
  this.currentNetwork = satsConnect.BitcoinNetworkType.Mainnet;
21
21
  }
22
- fetchPublicAddress() {
22
+ getAddress() {
23
23
  return _tslib.__awaiter(this, void 0, void 0, function* () {
24
24
  // xverse doesn't support wallet standard, so we won't have a wallet object,
25
25
  // but it's already the default provider for sats-connect, so it's ok
@@ -98,7 +98,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
98
98
  sendBitcoin(transaction) {
99
99
  var _a;
100
100
  return _tslib.__awaiter(this, void 0, void 0, function* () {
101
- const mainAddress = yield this.fetchPublicAddress();
101
+ const mainAddress = yield this.getAddress();
102
102
  const senderAddress = (_a = (yield this.getAdditionalAddresses(mainAddress)).find((address) => address.type === 'payment')) === null || _a === void 0 ? void 0 : _a.address;
103
103
  if (!senderAddress || !supportsSatsConnect.supportsSatsConnect(this)) {
104
104
  return;
@@ -4,7 +4,7 @@ import { BitcoinTransaction, SatsConnectSignTransactionInput, BitcoinSignPsbtReq
4
4
  export declare abstract class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
5
5
  currentNetwork: BitcoinNetworkType;
6
6
  constructor(opts: BitcoinWalletConnectorOpts);
7
- fetchPublicAddress(): Promise<string | undefined>;
7
+ getAddress(): Promise<string | undefined>;
8
8
  signMessage(messageToSign: string): Promise<string | undefined>;
9
9
  sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
10
10
  signTransaction(params: SatsConnectSignTransactionInput): Promise<SignTransactionResponse | undefined>;
@@ -15,7 +15,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
15
15
  super(opts);
16
16
  this.currentNetwork = BitcoinNetworkType.Mainnet;
17
17
  }
18
- fetchPublicAddress() {
18
+ getAddress() {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  // xverse doesn't support wallet standard, so we won't have a wallet object,
21
21
  // but it's already the default provider for sats-connect, so it's ok
@@ -94,7 +94,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
94
94
  sendBitcoin(transaction) {
95
95
  var _a;
96
96
  return __awaiter(this, void 0, void 0, function* () {
97
- const mainAddress = yield this.fetchPublicAddress();
97
+ const mainAddress = yield this.getAddress();
98
98
  const senderAddress = (_a = (yield this.getAdditionalAddresses(mainAddress)).find((address) => address.type === 'payment')) === null || _a === void 0 ? void 0 : _a.address;
99
99
  if (!senderAddress || !supportsSatsConnect(this)) {
100
100
  return;
@@ -6,7 +6,7 @@ var _tslib = require('../_virtual/_tslib.cjs');
6
6
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
7
7
  var walletBook = require('@dynamic-labs/wallet-book');
8
8
  var utils = require('@dynamic-labs/utils');
9
- var sdkApi = require('@dynamic-labs/sdk-api');
9
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
10
10
  var bitcoinProviderHelper = require('./bitcoinProviderHelper.cjs');
11
11
  var BitcoinLocalStorageCache = require('./BitcoinLocalStorageCache.cjs');
12
12
  var getMempoolApiUrl = require('./utils/getMempoolApiUrl.cjs');
@@ -42,13 +42,19 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
42
42
  });
43
43
  }
44
44
  getBalance() {
45
+ var _a;
45
46
  return _tslib.__awaiter(this, void 0, void 0, function* () {
46
47
  const [connectedAddress] = yield this.getConnectedAccounts();
47
48
  if (!connectedAddress) {
48
49
  throw new utils.DynamicError('getBalance - No connected address found!');
49
50
  }
50
- const API_URL = getMempoolApiUrl.getMempoolApiUrl(connectedAddress);
51
- const response = yield fetch(`${API_URL}/address/${connectedAddress}`);
51
+ const additionalAddresses = yield this.getAdditionalAddresses(connectedAddress);
52
+ const paymentAddress = (_a = additionalAddresses.find((address) => address.type === sdkApiCore.WalletAddressType.Payment)) === null || _a === void 0 ? void 0 : _a.address;
53
+ if (!paymentAddress) {
54
+ throw new utils.DynamicError('getBalance - No payment address found!');
55
+ }
56
+ const API_URL = getMempoolApiUrl.getMempoolApiUrl(paymentAddress);
57
+ const response = yield fetch(`${API_URL}/address/${paymentAddress}`);
52
58
  if (!response.ok) {
53
59
  // if the request fails due to rate limits, return cached value
54
60
  if (response.status === _const.HTTP_STATUS_TOO_MANY_REQUESTS) {
@@ -92,7 +98,7 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
92
98
  if (!this.canFetchConnectedAccounts) {
93
99
  return this.getConnectedAccountsFromCache();
94
100
  }
95
- const connectedAccounts = yield this.fetchPublicAddress();
101
+ const connectedAccounts = yield this.getAddress();
96
102
  if (!connectedAccounts) {
97
103
  return [];
98
104
  }
@@ -157,14 +163,14 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
157
163
  additionalAddresses.push({
158
164
  address: ordinalsAddress.address,
159
165
  publicKey: ordinalsAddress.publicKey,
160
- type: sdkApi.WalletAddressType.Ordinals,
166
+ type: sdkApiCore.WalletAddressType.Ordinals,
161
167
  });
162
168
  }
163
169
  if (paymentAddress) {
164
170
  additionalAddresses.push({
165
171
  address: paymentAddress.address,
166
172
  publicKey: paymentAddress.publicKey,
167
- type: sdkApi.WalletAddressType.Payment,
173
+ type: sdkApiCore.WalletAddressType.Payment,
168
174
  });
169
175
  }
170
176
  this.cache.setConnectedAccount(mainAddress, {
@@ -3,7 +3,7 @@ import { EventEmitter } from 'stream';
3
3
  import type { Wallet } from '@wallet-standard/base';
4
4
  import { Chain, IBitcoinWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
5
5
  import { WalletBookSchema, WalletSchema } from '@dynamic-labs/wallet-book';
6
- import { WalletAdditionalAddress } from '@dynamic-labs/sdk-api';
6
+ import { WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
7
7
  import { IBitcoinSessionCache } from './BitcoinLocalStorageCache';
8
8
  import { BitcoinAddress, BitcoinTransaction, BitcoinSignPsbtRequest, BitcoinSignPsbtResponse } from './types';
9
9
  export type BitcoinWalletConnectorOpts = {
@@ -2,7 +2,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { WalletConnectorBase, eventListenerHandlers, logger } from '@dynamic-labs/wallet-connector-core';
3
3
  import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
4
4
  import { DynamicError } from '@dynamic-labs/utils';
5
- import { WalletAddressType } from '@dynamic-labs/sdk-api';
5
+ import { WalletAddressType } from '@dynamic-labs/sdk-api-core';
6
6
  import { BitcoinProviderHelper } from './bitcoinProviderHelper.js';
7
7
  import { BitcoinLocalStorageCache } from './BitcoinLocalStorageCache.js';
8
8
  import { getMempoolApiUrl } from './utils/getMempoolApiUrl.js';
@@ -38,13 +38,19 @@ class BitcoinWalletConnector extends WalletConnectorBase {
38
38
  });
39
39
  }
40
40
  getBalance() {
41
+ var _a;
41
42
  return __awaiter(this, void 0, void 0, function* () {
42
43
  const [connectedAddress] = yield this.getConnectedAccounts();
43
44
  if (!connectedAddress) {
44
45
  throw new DynamicError('getBalance - No connected address found!');
45
46
  }
46
- const API_URL = getMempoolApiUrl(connectedAddress);
47
- const response = yield fetch(`${API_URL}/address/${connectedAddress}`);
47
+ const additionalAddresses = yield this.getAdditionalAddresses(connectedAddress);
48
+ const paymentAddress = (_a = additionalAddresses.find((address) => address.type === WalletAddressType.Payment)) === null || _a === void 0 ? void 0 : _a.address;
49
+ if (!paymentAddress) {
50
+ throw new DynamicError('getBalance - No payment address found!');
51
+ }
52
+ const API_URL = getMempoolApiUrl(paymentAddress);
53
+ const response = yield fetch(`${API_URL}/address/${paymentAddress}`);
48
54
  if (!response.ok) {
49
55
  // if the request fails due to rate limits, return cached value
50
56
  if (response.status === HTTP_STATUS_TOO_MANY_REQUESTS) {
@@ -88,7 +94,7 @@ class BitcoinWalletConnector extends WalletConnectorBase {
88
94
  if (!this.canFetchConnectedAccounts) {
89
95
  return this.getConnectedAccountsFromCache();
90
96
  }
91
- const connectedAccounts = yield this.fetchPublicAddress();
97
+ const connectedAccounts = yield this.getAddress();
92
98
  if (!connectedAccounts) {
93
99
  return [];
94
100
  }
@@ -13,7 +13,7 @@ class OkxConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
13
13
  this.name = 'OKX Wallet (Bitcoin)';
14
14
  this.canFetchConnectedAccounts = true;
15
15
  }
16
- fetchPublicAddress() {
16
+ getAddress() {
17
17
  return _tslib.__awaiter(this, void 0, void 0, function* () {
18
18
  const provider = this.getProvider();
19
19
  if (!provider) {
@@ -40,7 +40,7 @@ class OkxConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
40
40
  sendBitcoin(transaction) {
41
41
  return _tslib.__awaiter(this, void 0, void 0, function* () {
42
42
  const provider = this.getProvider();
43
- const connectedAddress = yield this.fetchPublicAddress();
43
+ const connectedAddress = yield this.getAddress();
44
44
  if (!connectedAddress || !provider) {
45
45
  return;
46
46
  }
@@ -4,7 +4,7 @@ export declare class OkxConnector extends BitcoinWalletConnector {
4
4
  name: string;
5
5
  canFetchConnectedAccounts: boolean;
6
6
  constructor(opts: BitcoinWalletConnectorOpts);
7
- fetchPublicAddress(): Promise<string | undefined>;
7
+ getAddress(): Promise<string | undefined>;
8
8
  signMessage(messageToSign: string): Promise<string | undefined>;
9
9
  sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
10
10
  signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
@@ -9,7 +9,7 @@ class OkxConnector extends BitcoinWalletConnector {
9
9
  this.name = 'OKX Wallet (Bitcoin)';
10
10
  this.canFetchConnectedAccounts = true;
11
11
  }
12
- fetchPublicAddress() {
12
+ getAddress() {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  const provider = this.getProvider();
15
15
  if (!provider) {
@@ -36,7 +36,7 @@ class OkxConnector extends BitcoinWalletConnector {
36
36
  sendBitcoin(transaction) {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  const provider = this.getProvider();
39
- const connectedAddress = yield this.fetchPublicAddress();
39
+ const connectedAddress = yield this.getAddress();
40
40
  if (!connectedAddress || !provider) {
41
41
  return;
42
42
  }
@@ -14,7 +14,7 @@ class UnisatConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
14
14
  this.overrideKey = 'unisat';
15
15
  this.canFetchConnectedAccounts = true;
16
16
  }
17
- fetchPublicAddress() {
17
+ getAddress() {
18
18
  return _tslib.__awaiter(this, void 0, void 0, function* () {
19
19
  const provider = this.getProvider();
20
20
  if (!provider) {
@@ -42,7 +42,7 @@ class UnisatConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
42
42
  sendBitcoin(transaction) {
43
43
  return _tslib.__awaiter(this, void 0, void 0, function* () {
44
44
  const provider = this.getProvider();
45
- const connectedAddress = yield this.fetchPublicAddress();
45
+ const connectedAddress = yield this.getAddress();
46
46
  if (!connectedAddress || !provider) {
47
47
  return;
48
48
  }
@@ -5,7 +5,7 @@ export declare class UnisatConnector extends BitcoinWalletConnector {
5
5
  overrideKey: string;
6
6
  canFetchConnectedAccounts: boolean;
7
7
  constructor(opts: BitcoinWalletConnectorOpts);
8
- fetchPublicAddress(): Promise<string | undefined>;
8
+ getAddress(): Promise<string | undefined>;
9
9
  signMessage(messageToSign: string): Promise<string | undefined>;
10
10
  sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
11
11
  signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
@@ -10,7 +10,7 @@ class UnisatConnector extends BitcoinWalletConnector {
10
10
  this.overrideKey = 'unisat';
11
11
  this.canFetchConnectedAccounts = true;
12
12
  }
13
- fetchPublicAddress() {
13
+ getAddress() {
14
14
  return __awaiter(this, void 0, void 0, function* () {
15
15
  const provider = this.getProvider();
16
16
  if (!provider) {
@@ -38,7 +38,7 @@ class UnisatConnector extends BitcoinWalletConnector {
38
38
  sendBitcoin(transaction) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  const provider = this.getProvider();
41
- const connectedAddress = yield this.fetchPublicAddress();
41
+ const connectedAddress = yield this.getAddress();
42
42
  if (!connectedAddress || !provider) {
43
43
  return;
44
44
  }
package/src/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BitcoinProvider, InputToSign } from 'sats-connect';
2
2
  import { SignPsbtResponse as BtcKitSignPsbtResponse } from '@btckit/types';
3
- import type { WalletAdditionalAddress } from '@dynamic-labs/sdk-api';
3
+ import type { WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
4
4
  import { SATSCONNECT_FEATURE } from './const';
5
5
  export type ErrorWithCode = Error & {
6
6
  code: string;
@@ -9,7 +9,7 @@ require('sats-connect');
9
9
  require('bitcoinjs-lib');
10
10
  require('@dynamic-labs/wallet-connector-core');
11
11
  require('@dynamic-labs/wallet-book');
12
- require('@dynamic-labs/sdk-api');
12
+ require('@dynamic-labs/sdk-api-core');
13
13
  require('@wallet-standard/app');
14
14
  var hasSatsConnectFeature = require('./hasSatsConnectFeature.cjs');
15
15
 
@@ -5,7 +5,7 @@ import 'sats-connect';
5
5
  import 'bitcoinjs-lib';
6
6
  import '@dynamic-labs/wallet-connector-core';
7
7
  import '@dynamic-labs/wallet-book';
8
- import '@dynamic-labs/sdk-api';
8
+ import '@dynamic-labs/sdk-api-core';
9
9
  import '@wallet-standard/app';
10
10
  import { hasSatsConnectFeature } from './hasSatsConnectFeature.js';
11
11