@dynamic-labs/solana 1.1.0-alpha.2 → 1.1.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +221 -0
  2. package/_virtual/_tslib.cjs +6 -1
  3. package/_virtual/_tslib.js +6 -1
  4. package/package.json +10 -6
  5. package/src/CoinbaseSolana.cjs +29 -34
  6. package/src/CoinbaseSolana.d.ts +5 -10
  7. package/src/CoinbaseSolana.js +29 -34
  8. package/src/Solflare.d.ts +4 -9
  9. package/src/errors/SignMessageNotSupportedError.cjs +16 -0
  10. package/src/errors/SignMessageNotSupportedError.d.ts +4 -0
  11. package/src/errors/SignMessageNotSupportedError.js +12 -0
  12. package/src/index.cjs +6 -15
  13. package/src/index.d.ts +2 -5
  14. package/src/index.js +6 -13
  15. package/src/injected/BackpackSol.cjs +9 -21
  16. package/src/injected/BackpackSol.d.ts +3 -5
  17. package/src/injected/BackpackSol.js +9 -21
  18. package/src/injected/InjectedWalletBase.cjs +31 -15
  19. package/src/injected/InjectedWalletBase.d.ts +7 -2
  20. package/src/injected/InjectedWalletBase.js +31 -15
  21. package/src/injected/Phantom.cjs +23 -2
  22. package/src/injected/Phantom.d.ts +3 -0
  23. package/src/injected/Phantom.js +23 -2
  24. package/src/injected/fetchInjectedWalletConnectors.cjs +48 -0
  25. package/src/injected/fetchInjectedWalletConnectors.d.ts +6 -0
  26. package/src/injected/fetchInjectedWalletConnectors.js +43 -0
  27. package/src/injected/index.d.ts +1 -2
  28. package/src/phantomRedirect/PhantomRedirect.d.ts +30 -0
  29. package/src/phantomRedirect/storage.d.ts +33 -0
  30. package/src/phantomRedirect/utils.d.ts +3 -0
  31. package/src/solProviderHelper.cjs +99 -114
  32. package/src/solProviderHelper.d.ts +28 -29
  33. package/src/solProviderHelper.js +100 -115
  34. package/src/solWalletConnector.cjs +86 -0
  35. package/src/solWalletConnector.d.ts +12 -2
  36. package/src/solWalletConnector.js +88 -2
  37. package/src/types.d.ts +9 -3
  38. package/src/Glow.cjs +0 -50
  39. package/src/Glow.d.ts +0 -12
  40. package/src/Glow.js +0 -46
  41. package/src/Solflare.cjs +0 -83
  42. package/src/Solflare.js +0 -79
  43. package/src/injected/BraveSol.cjs +0 -21
  44. package/src/injected/BraveSol.d.ts +0 -5
  45. package/src/injected/BraveSol.js +0 -17
  46. package/src/injected/ExodusSol.cjs +0 -14
  47. package/src/injected/ExodusSol.d.ts +0 -4
  48. package/src/injected/ExodusSol.js +0 -10
  49. package/src/injected/MagicEdenSol.cjs +0 -14
  50. package/src/injected/MagicEdenSol.d.ts +0 -4
  51. package/src/injected/MagicEdenSol.js +0 -10
  52. package/src/injected/PhantomLedger.cjs +0 -70
  53. package/src/injected/PhantomLedger.d.ts +0 -14
  54. package/src/injected/PhantomLedger.js +0 -65
  55. package/src/injected/index.cjs +0 -21
  56. package/src/injected/index.js +0 -17
package/CHANGELOG.md CHANGED
@@ -1,4 +1,225 @@
1
1
 
2
+ ## [1.1.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.19...v1.1.0-alpha.20) (2024-01-31)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * return all enabled chains in getSupportedNetworks instead of undefined ([#4547](https://github.com/dynamic-labs/DynamicAuth/issues/4547)) ([08e7889](https://github.com/dynamic-labs/DynamicAuth/commit/08e78896e045f24bbd96e39416a7f58006929da0))
8
+ * show modal for existing social account from other signin provider ([#4535](https://github.com/dynamic-labs/DynamicAuth/issues/4535)) ([282914a](https://github.com/dynamic-labs/DynamicAuth/commit/282914ac94b3ef5bd66e0b2265d9e414203a7406))
9
+
10
+ ## [1.1.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.18...v1.1.0-alpha.19) (2024-01-31)
11
+
12
+
13
+ ### Features
14
+
15
+ * add PhantomRedirect connector ([#4467](https://github.com/dynamic-labs/DynamicAuth/issues/4467)) ([75d6c95](https://github.com/dynamic-labs/DynamicAuth/commit/75d6c95940fcec185a699c2100b3e2d21a8233d5))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * lock starknet to 5.25.0 since 5.27.0 breaks the build ([#4541](https://github.com/dynamic-labs/DynamicAuth/issues/4541)) ([00b4799](https://github.com/dynamic-labs/DynamicAuth/commit/00b479977f768cb067480e2e565eabf45e1000a2))
21
+
22
+ ## [1.1.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.17...v1.1.0-alpha.18) (2024-01-30)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * catch email_associated_with_different_provider from response ([#4532](https://github.com/dynamic-labs/DynamicAuth/issues/4532)) ([52be1b4](https://github.com/dynamic-labs/DynamicAuth/commit/52be1b45af46c2b70972b99d73387eb4d7161ec6))
28
+
29
+ ## [1.1.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.16...v1.1.0-alpha.17) (2024-01-30)
30
+
31
+
32
+ ### Features
33
+
34
+ * add sendRawTransaction to BitcoinWalletConnector ([2e86c5a](https://github.com/dynamic-labs/DynamicAuth/commit/2e86c5a5245bd0fc29162ef1f7fe2fbd65245fe1))
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * properly handle AccountExistsError for signInOAuth ([#4529](https://github.com/dynamic-labs/DynamicAuth/issues/4529)) ([d37fdc3](https://github.com/dynamic-labs/DynamicAuth/commit/d37fdc310fe4b70f8948fd5ed3d058342afbe08f))
40
+
41
+ ## [1.1.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.15...v1.1.0-alpha.16) (2024-01-30)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * add fallback to getWalletBookWallet for customers still passing in name, add deprecation warn ([#4518](https://github.com/dynamic-labs/DynamicAuth/issues/4518)) ([b233ea1](https://github.com/dynamic-labs/DynamicAuth/commit/b233ea1cd640d8d9d94c52ab230787f3d869151a))
47
+ * handle braavos network change to account which doesn not exist ([#4519](https://github.com/dynamic-labs/DynamicAuth/issues/4519)) ([486020f](https://github.com/dynamic-labs/DynamicAuth/commit/486020fb09a274388ba34c8d1b37ac3a1ff3dba6))
48
+
49
+ ## [1.1.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.14...v1.1.0-alpha.15) (2024-01-28)
50
+
51
+
52
+ ### Features
53
+
54
+ * add wallet group override to wallet book ([#4488](https://github.com/dynamic-labs/DynamicAuth/issues/4488)) ([cb19ad3](https://github.com/dynamic-labs/DynamicAuth/commit/cb19ad3ea82de488752ceceeaf0e1458a388df6e))
55
+ * enable solana embedded wallets ([#4457](https://github.com/dynamic-labs/DynamicAuth/issues/4457)) ([b0c47f4](https://github.com/dynamic-labs/DynamicAuth/commit/b0c47f4475baa12f52076da46ef993c13bd2c243))
56
+ * group ArgentX wallets ([#4495](https://github.com/dynamic-labs/DynamicAuth/issues/4495)) ([b10d79a](https://github.com/dynamic-labs/DynamicAuth/commit/b10d79a668efecedca37ddb358e6adf95319650d))
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * add support for newest backpack extension ([#4468](https://github.com/dynamic-labs/DynamicAuth/issues/4468)) ([a219f32](https://github.com/dynamic-labs/DynamicAuth/commit/a219f325be672599e50b07f6751234a7fc98286e))
62
+ * bump timeout for slower connections ([#4475](https://github.com/dynamic-labs/DynamicAuth/issues/4475)) ([7a07ff5](https://github.com/dynamic-labs/DynamicAuth/commit/7a07ff589eaaf3b28a94d277df3eedabbca60702))
63
+ * change out getWalletBookWallet for findWalletBookWallet to avoid throwing during lookup ([#4477](https://github.com/dynamic-labs/DynamicAuth/issues/4477)) ([4648040](https://github.com/dynamic-labs/DynamicAuth/commit/4648040c166e73dd2c31b0e27897713339436c2f))
64
+ * connect to wallet with wallet connect even if network is not supported ([#4465](https://github.com/dynamic-labs/DynamicAuth/issues/4465)) ([9dbca3e](https://github.com/dynamic-labs/DynamicAuth/commit/9dbca3eb4d4990ee4be642677c1604170b425dc3))
65
+ * pass id to wagmi chain override ([#4512](https://github.com/dynamic-labs/DynamicAuth/issues/4512)) ([2bf2f04](https://github.com/dynamic-labs/DynamicAuth/commit/2bf2f0487f5b1be936dd279107c11fe5d2b42666))
66
+ * switching wallet in extension caused connected flag to be false temporarily ([#4454](https://github.com/dynamic-labs/DynamicAuth/issues/4454)) ([3650f6e](https://github.com/dynamic-labs/DynamicAuth/commit/3650f6ec471a7c779f4d304ab94c9350dd55055b))
67
+
68
+ ## [1.1.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.13...v1.1.0-alpha.14) (2024-01-23)
69
+
70
+
71
+ ### Features
72
+
73
+ * add wallet-book retryable ([#4462](https://github.com/dynamic-labs/DynamicAuth/issues/4462)) ([513b1a6](https://github.com/dynamic-labs/DynamicAuth/commit/513b1a67d6c49624398ad4b0cdca4f5618c9583f))
74
+
75
+ ## [1.1.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.12...v1.1.0-alpha.13) (2024-01-23)
76
+
77
+
78
+ ### Features
79
+
80
+ * add createWalletClientFromWallet helper function ([#4416](https://github.com/dynamic-labs/DynamicAuth/issues/4416)) ([b384898](https://github.com/dynamic-labs/DynamicAuth/commit/b384898061bb3f9b38b2ed670b6650cfc1d4b429))
81
+ * add hardware wallets to wallet book ([#4445](https://github.com/dynamic-labs/DynamicAuth/issues/4445)) ([66c0f5b](https://github.com/dynamic-labs/DynamicAuth/commit/66c0f5b29a6a700099bb95a6f7622f6178e0bccf))
82
+ * add support for Argent Web and Mobile ([#4328](https://github.com/dynamic-labs/DynamicAuth/issues/4328)) ([bce20b8](https://github.com/dynamic-labs/DynamicAuth/commit/bce20b8f35a8630f2621f53a541a1acb06a38fc0))
83
+ * enable ledger for glow, solflare and backpack ([#4392](https://github.com/dynamic-labs/DynamicAuth/issues/4392)) ([fa7b992](https://github.com/dynamic-labs/DynamicAuth/commit/fa7b992f87ebc43560f87b43ac56f2cd9909b306))
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * breaking changes script ([#4440](https://github.com/dynamic-labs/DynamicAuth/issues/4440)) ([446173d](https://github.com/dynamic-labs/DynamicAuth/commit/446173d074d652d81856c6412e304b46b1565320))
89
+ * broken help icon in create passkey view ([#4428](https://github.com/dynamic-labs/DynamicAuth/issues/4428)) ([e0ffc02](https://github.com/dynamic-labs/DynamicAuth/commit/e0ffc02ffea34b7ac3198ff6e1baf7f9907acddd))
90
+ * infinite loop when connecting with trust wallet ([#4448](https://github.com/dynamic-labs/DynamicAuth/issues/4448)) ([4e20edf](https://github.com/dynamic-labs/DynamicAuth/commit/4e20edf9abaabf20e5e9f9167b44d7f691e844f1))
91
+ * render wagmi elements based on react version ([#4453](https://github.com/dynamic-labs/DynamicAuth/issues/4453)) ([43c624c](https://github.com/dynamic-labs/DynamicAuth/commit/43c624ca996b0c51de1454910f19fdf908149938))
92
+
93
+ ## [1.1.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.11...v1.1.0-alpha.12) (2024-01-18)
94
+
95
+
96
+ ### Features
97
+
98
+ * expose setAuthMode method ([#4419](https://github.com/dynamic-labs/DynamicAuth/issues/4419)) ([7d156b3](https://github.com/dynamic-labs/DynamicAuth/commit/7d156b3e0eab9b9a80f70ff1c5201d90693ae755))
99
+
100
+
101
+ ### Bug Fixes
102
+
103
+ * call onUnlinkSuccess in headless mode too ([#4412](https://github.com/dynamic-labs/DynamicAuth/issues/4412)) ([4c76af9](https://github.com/dynamic-labs/DynamicAuth/commit/4c76af9ac7c7b43883742d1289558dfcb5d612ca))
104
+ * correctly map keplr chain ids from project settings ([#4418](https://github.com/dynamic-labs/DynamicAuth/issues/4418)) ([7046364](https://github.com/dynamic-labs/DynamicAuth/commit/7046364a316f7551f0b995eaae7afea13502eb9b))
105
+ * logging in with an email linked to a third party wallet gets stuck on otp view ([#4407](https://github.com/dynamic-labs/DynamicAuth/issues/4407)) ([35bf142](https://github.com/dynamic-labs/DynamicAuth/commit/35bf142e74efeef866dbd7b8157a049cd36eeccb))
106
+
107
+ ## [1.1.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.10...v1.1.0-alpha.11) (2024-01-17)
108
+
109
+
110
+ ### Features
111
+
112
+ * add Leather wallet and BtcKit connector ([#4335](https://github.com/dynamic-labs/DynamicAuth/issues/4335)) ([fe3316b](https://github.com/dynamic-labs/DynamicAuth/commit/fe3316b5be9ef17eea885e99cf925ccd0f271da7))
113
+ * add solana injected wallet configuration to walletbook ([#4375](https://github.com/dynamic-labs/DynamicAuth/issues/4375)) ([3677ce5](https://github.com/dynamic-labs/DynamicAuth/commit/3677ce5ff40d0c00bfaf0daa0d5d67bc40706ee0))
114
+ * add support for unisat wallet ([#4355](https://github.com/dynamic-labs/DynamicAuth/issues/4355)) ([5b7d6b0](https://github.com/dynamic-labs/DynamicAuth/commit/5b7d6b0a9ea84811a8252b3cdf30a3a8e410180c))
115
+ * add walletbook configurations for solana injected wallets ([#4360](https://github.com/dynamic-labs/DynamicAuth/issues/4360)) ([cdc8e5f](https://github.com/dynamic-labs/DynamicAuth/commit/cdc8e5f4878cb84e26e5b33299aa8547b84b6667))
116
+ * passkey renaming frontend ([#4331](https://github.com/dynamic-labs/DynamicAuth/issues/4331)) ([4551013](https://github.com/dynamic-labs/DynamicAuth/commit/4551013d577c914cb3aedfe458ab9eaa018aceb4))
117
+
118
+
119
+ ### Bug Fixes
120
+
121
+ * correctly update wallets connected flag after wallet switch ([#4397](https://github.com/dynamic-labs/DynamicAuth/issues/4397)) ([543a830](https://github.com/dynamic-labs/DynamicAuth/commit/543a830574f0d5a78fedbb9b18233e8dfbaddd86))
122
+ * export modal header ([#4401](https://github.com/dynamic-labs/DynamicAuth/issues/4401)) ([77cf016](https://github.com/dynamic-labs/DynamicAuth/commit/77cf016fc742458988864647870149a56e991ee4))
123
+ * trigger onAuthSuccess before embedded wallet creation ([4aa341a](https://github.com/dynamic-labs/DynamicAuth/commit/4aa341a1d08332a121daddb7c2dcb09a804a4de7))
124
+ * ui issues on react 17 ([#4373](https://github.com/dynamic-labs/DynamicAuth/issues/4373)) ([93096d6](https://github.com/dynamic-labs/DynamicAuth/commit/93096d6017816a4f0ed299bf618b130d90c81514))
125
+
126
+ ## [1.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.9...v1.1.0-alpha.10) (2024-01-06)
127
+
128
+
129
+ ### Bug Fixes
130
+
131
+ * pass flow network to magic client ([#4322](https://github.com/dynamic-labs/DynamicAuth/issues/4322)) ([f3adccf](https://github.com/dynamic-labs/DynamicAuth/commit/f3adccf9f8d835f6b04e4767acd0fbd2ac238379))
132
+ * prevent error message when mobile wallet app is open ([#4301](https://github.com/dynamic-labs/DynamicAuth/issues/4301)) ([2a66dcf](https://github.com/dynamic-labs/DynamicAuth/commit/2a66dcfaf8100b3d910c559d35d8b731b1cb380e))
133
+ * turnkeyWalletConnector is not an email otp connector and uses dynamic otp ([#4313](https://github.com/dynamic-labs/DynamicAuth/issues/4313)) ([e4ea56f](https://github.com/dynamic-labs/DynamicAuth/commit/e4ea56f40fdf97b3f5440b016ebd95501089cebe))
134
+
135
+ ## [1.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.8...v1.1.0-alpha.9) (2024-01-04)
136
+
137
+
138
+ ### Features
139
+
140
+ * add solana magic support ([#4258](https://github.com/dynamic-labs/DynamicAuth/issues/4258)) ([da726aa](https://github.com/dynamic-labs/DynamicAuth/commit/da726aa78466c52ee3e1f18952e4351cde754cbc))
141
+
142
+
143
+ ### Bug Fixes
144
+
145
+ * edge case with unlinking wallet ([#4285](https://github.com/dynamic-labs/DynamicAuth/issues/4285)) ([1057fe4](https://github.com/dynamic-labs/DynamicAuth/commit/1057fe47599381f5d9dc39ce4cbeca2041c70319))
146
+ * remove normalizeWalletName from DynamicAuth ([5592817](https://github.com/dynamic-labs/DynamicAuth/commit/5592817b62e345319e04cca9a98276ffad87cfc2))
147
+ * **useFetchBalance:** ensure the latest wallet balance is fetched ([#4288](https://github.com/dynamic-labs/DynamicAuth/issues/4288)) ([25dd035](https://github.com/dynamic-labs/DynamicAuth/commit/25dd035cf8893b7cd28f550026134ba0eecda142))
148
+
149
+ ## [1.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2024-01-03)
150
+
151
+
152
+ ### Features
153
+
154
+ * add new sdk view section for text ([#4280](https://github.com/dynamic-labs/DynamicAuth/issues/4280)) ([457ae38](https://github.com/dynamic-labs/DynamicAuth/commit/457ae38cd2be8dae078f40b54ffc4704299d4ed9))
155
+ * add new setShowLinkNewWalletModal method ([f46447a](https://github.com/dynamic-labs/DynamicAuth/commit/f46447ab606f4fdbf55e5fef21dd98f8f2650e90))
156
+ * add pk export for hd wallets ([#4266](https://github.com/dynamic-labs/DynamicAuth/issues/4266)) ([44aac69](https://github.com/dynamic-labs/DynamicAuth/commit/44aac69580ed44e66eab971f87cb6061a3fadc90))
157
+ * add starknet support for sopelia ([#4248](https://github.com/dynamic-labs/DynamicAuth/issues/4248)) ([f9a0980](https://github.com/dynamic-labs/DynamicAuth/commit/f9a0980c3cd2d6d95c5dd17b179fbd0931f08b1a))
158
+ * enable hardware wallet for solana wallets ([#4275](https://github.com/dynamic-labs/DynamicAuth/issues/4275)) ([704b380](https://github.com/dynamic-labs/DynamicAuth/commit/704b380186618a5a5793e88f36ccbe84b59a2e4a))
159
+
160
+
161
+ ### Bug Fixes
162
+
163
+ * phantom solana not connecting on mobile ([#4284](https://github.com/dynamic-labs/DynamicAuth/issues/4284)) ([6ad75f1](https://github.com/dynamic-labs/DynamicAuth/commit/6ad75f152896459f5cf658227f998c246b6a572b))
164
+ * use bitcoin payment address for onramp ([#4273](https://github.com/dynamic-labs/DynamicAuth/issues/4273)) ([a2f54e8](https://github.com/dynamic-labs/DynamicAuth/commit/a2f54e812a11a91ee488eca64f14b5eeea1a8874))
165
+
166
+ ## [1.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.6...v1.1.0-alpha.7) (2023-12-28)
167
+
168
+
169
+ ### Features
170
+
171
+ * better coinbase deeplinking ux ([#4164](https://github.com/dynamic-labs/DynamicAuth/issues/4164)) ([5252608](https://github.com/dynamic-labs/DynamicAuth/commit/525260851900a33a52f129def338963400344205))
172
+
173
+
174
+ ### Bug Fixes
175
+
176
+ * don't prompt for connect when selecting bitcoin wallet if already connected ([#4265](https://github.com/dynamic-labs/DynamicAuth/issues/4265)) ([adef402](https://github.com/dynamic-labs/DynamicAuth/commit/adef402ef94270a17fab896a8585a7f2eacd3681))
177
+
178
+ ## [1.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.5...v1.1.0-alpha.6) (2023-12-27)
179
+
180
+
181
+ ### Features
182
+
183
+ * add multi-wallet-prompts-widget ([#4166](https://github.com/dynamic-labs/DynamicAuth/issues/4166)) ([151e3d2](https://github.com/dynamic-labs/DynamicAuth/commit/151e3d2e7bebbf18448e4af8eecbf660f713cd3d))
184
+
185
+
186
+ ### Bug Fixes
187
+
188
+ * coinbase solana signMessage ([#4254](https://github.com/dynamic-labs/DynamicAuth/issues/4254)) ([f0300a9](https://github.com/dynamic-labs/DynamicAuth/commit/f0300a93ed6c9ba9dfab613820d8cedbe72abb87))
189
+ * make useConnectWithEmailOtp work cross views ([#4252](https://github.com/dynamic-labs/DynamicAuth/issues/4252)) ([a097119](https://github.com/dynamic-labs/DynamicAuth/commit/a097119556c38a22f338a783f79d512b99203cf5))
190
+
191
+ ## [1.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.4...v1.1.0-alpha.5) (2023-12-21)
192
+
193
+
194
+ ### Features
195
+
196
+ * add support for xverse wallet ([#4245](https://github.com/dynamic-labs/DynamicAuth/issues/4245)) ([7b68546](https://github.com/dynamic-labs/DynamicAuth/commit/7b6854684412007bcb33896555900936395176df))
197
+ * **gvty-526:** add embedded reveal ([#4233](https://github.com/dynamic-labs/DynamicAuth/issues/4233)) ([c2d0f90](https://github.com/dynamic-labs/DynamicAuth/commit/c2d0f903f4a4646f86c71834540fd49d51a4a7ae))
198
+
199
+ ## [1.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.3...v1.1.0-alpha.4) (2023-12-21)
200
+
201
+
202
+ ### Features
203
+
204
+ * add bitcoin integration ([#4216](https://github.com/dynamic-labs/DynamicAuth/issues/4216)) ([9584f1c](https://github.com/dynamic-labs/DynamicAuth/commit/9584f1cc3133835049ad1c53da980192263b8f21))
205
+ * add default footer to wallet list when tos and pp not enabled ([#4224](https://github.com/dynamic-labs/DynamicAuth/issues/4224)) ([0ad81c4](https://github.com/dynamic-labs/DynamicAuth/commit/0ad81c409bcb4aafb0dc565685525d620a95efce))
206
+ * adds useConnectWithEmailOtp ([#4234](https://github.com/dynamic-labs/DynamicAuth/issues/4234)) ([4a4e50a](https://github.com/dynamic-labs/DynamicAuth/commit/4a4e50ac8651c2a249d5125ae6bcf49aaf49be8c))
207
+
208
+ ## [1.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.2...v1.1.0-alpha.3) (2023-12-19)
209
+
210
+
211
+ ### Features
212
+
213
+ * add Flow support in magic wallet connector ([#4158](https://github.com/dynamic-labs/DynamicAuth/issues/4158)) ([fbbaea7](https://github.com/dynamic-labs/DynamicAuth/commit/fbbaea76b36ceb693f6bd4f2404dfa1204e61492))
214
+ * add showDynamicUserProfile to DynamicContext ([#4214](https://github.com/dynamic-labs/DynamicAuth/issues/4214)) ([2aeb8e3](https://github.com/dynamic-labs/DynamicAuth/commit/2aeb8e3c45a3d9f87bd9196ea9b46927e02eb633))
215
+
216
+
217
+ ### Bug Fixes
218
+
219
+ * add shortname to braveevm to allow for lookups by name as well as key ([#4213](https://github.com/dynamic-labs/DynamicAuth/issues/4213)) ([969b089](https://github.com/dynamic-labs/DynamicAuth/commit/969b089be516fb57fcdc941f908c078998eb4ec0))
220
+ * solflare connect ([#4215](https://github.com/dynamic-labs/DynamicAuth/issues/4215)) ([9a4164e](https://github.com/dynamic-labs/DynamicAuth/commit/9a4164e53198f33ef7201cd4e1eff745a09e9701))
221
+ * wagmi attempt to connect to primary wallet first ([#4206](https://github.com/dynamic-labs/DynamicAuth/issues/4206)) ([9e5fc8e](https://github.com/dynamic-labs/DynamicAuth/commit/9e5fc8ef026628935ac32d3bb0c22bda35057e5d))
222
+
2
223
  ## [1.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.1...v1.1.0-alpha.2) (2023-12-18)
3
224
 
4
225
 
@@ -25,6 +25,11 @@ function __awaiter(thisArg, _arguments, P, generator) {
25
25
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26
26
  step((generator = generator.apply(thisArg, _arguments || [])).next());
27
27
  });
28
- }
28
+ }
29
+
30
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
31
+ var e = new Error(message);
32
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
33
+ };
29
34
 
30
35
  exports.__awaiter = __awaiter;
@@ -21,6 +21,11 @@ function __awaiter(thisArg, _arguments, P, generator) {
21
21
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
22
  step((generator = generator.apply(thisArg, _arguments || [])).next());
23
23
  });
24
- }
24
+ }
25
+
26
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
27
+ var e = new Error(message);
28
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
29
+ };
25
30
 
26
31
  export { __awaiter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana",
3
- "version": "1.1.0-alpha.2",
3
+ "version": "1.1.0-alpha.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,11 +27,15 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@solana/web3.js": "1.70.1",
30
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.2",
31
- "@dynamic-labs/types": "1.1.0-alpha.2",
32
- "@dynamic-labs/utils": "1.1.0-alpha.2",
33
- "@dynamic-labs/wallet-book": "1.1.0-alpha.2",
34
- "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.2",
30
+ "@dynamic-labs/sdk-api": "0.0.356",
31
+ "bs58": "^5.0.0",
32
+ "tweetnacl": "^1.0.3",
33
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.20",
34
+ "@dynamic-labs/turnkey": "1.1.0-alpha.20",
35
+ "@dynamic-labs/types": "1.1.0-alpha.20",
36
+ "@dynamic-labs/utils": "1.1.0-alpha.20",
37
+ "@dynamic-labs/wallet-book": "1.1.0-alpha.20",
38
+ "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.20",
35
39
  "eventemitter3": "5.0.1"
36
40
  },
37
41
  "peerDependencies": {}
@@ -3,49 +3,44 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../_virtual/_tslib.cjs');
6
- var solWalletConnector = require('./solWalletConnector.cjs');
7
- var solProviderHelper = require('./solProviderHelper.cjs');
6
+ var utils = require('@dynamic-labs/utils');
7
+ var walletBook = require('@dynamic-labs/wallet-book');
8
+ require('@dynamic-labs/turnkey');
9
+ require('@dynamic-labs/sdk-api');
10
+ var InjectedWalletBase = require('./injected/InjectedWalletBase.cjs');
11
+ require('@solana/web3.js');
12
+ require('@dynamic-labs/wallet-connector-core');
13
+ require('./solWalletConnector.cjs');
14
+ var isSignedMessage = require('./utils/isSignedMessage.cjs');
8
15
 
9
- class CoinbaseSolana extends solWalletConnector.SolWalletConnector {
10
- constructor() {
11
- super(...arguments);
16
+ class CoinbaseSolana extends InjectedWalletBase.InjectedWalletBase {
17
+ constructor(opts) {
18
+ super(opts);
12
19
  this.name = 'CoinbaseSolana';
13
- }
14
- setupEventListeners() {
15
- solProviderHelper.SolProviderHelper._setupEventListeners(this, solProviderHelper.SolProviderHelper.findProvider(this.name));
16
- }
17
- teardownEventListeners() {
18
- solProviderHelper.SolProviderHelper._teardownEventListeners(this.name);
19
- }
20
- connect() {
21
- return _tslib.__awaiter(this, void 0, void 0, function* () {
22
- yield solProviderHelper.SolProviderHelper.connectWithName(this.name);
23
- });
20
+ this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
24
21
  }
25
22
  getSigner() {
23
+ var _a;
26
24
  return _tslib.__awaiter(this, void 0, void 0, function* () {
27
- return solProviderHelper.SolProviderHelper.connectWithName(this.name);
28
- });
29
- }
30
- isInstalledOnBrowser() {
31
- return solProviderHelper.SolProviderHelper.isInstalledHelper(this.name);
32
- }
33
- fetchPublicAddress() {
34
- return _tslib.__awaiter(this, void 0, void 0, function* () {
35
- if (this.isInstalledOnBrowser()) {
36
- return solProviderHelper.SolProviderHelper.fetchPublicAddressWithName(this.name);
37
- }
38
- return;
25
+ return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.connect();
39
26
  });
40
27
  }
41
28
  signMessage(messageToSign) {
42
29
  return _tslib.__awaiter(this, void 0, void 0, function* () {
43
- return solProviderHelper.SolProviderHelper.signMessageWithName(messageToSign, this.name);
44
- });
45
- }
46
- getConnectedAccounts() {
47
- return _tslib.__awaiter(this, void 0, void 0, function* () {
48
- return solProviderHelper.SolProviderHelper.getConnectedAccountsWithName(this.name);
30
+ const walletAddress = yield this.fetchPublicAddress();
31
+ if (!walletAddress) {
32
+ return undefined;
33
+ }
34
+ const provider = yield this.getSigner();
35
+ if (!provider) {
36
+ return undefined;
37
+ }
38
+ const encodedMessage = new TextEncoder().encode(messageToSign);
39
+ const signedMessage = yield provider.signMessage(encodedMessage, walletAddress);
40
+ if (!signedMessage) {
41
+ return undefined;
42
+ }
43
+ return utils.bufferToBase64(isSignedMessage.isSignedMessage(signedMessage) ? signedMessage.signature : signedMessage);
49
44
  });
50
45
  }
51
46
  }
@@ -1,13 +1,8 @@
1
- import { SolWalletConnector } from './solWalletConnector';
2
- import { ISolana } from './types';
3
- export declare class CoinbaseSolana extends SolWalletConnector {
1
+ import { SolWalletConnectorOpts } from './solWalletConnector';
2
+ import { InjectedWalletBase } from './injected/InjectedWalletBase';
3
+ export declare class CoinbaseSolana extends InjectedWalletBase {
4
4
  name: string;
5
- setupEventListeners(): void;
6
- teardownEventListeners(): void;
7
- connect(): Promise<void>;
8
- getSigner(): Promise<ISolana | undefined>;
9
- isInstalledOnBrowser(): boolean;
10
- fetchPublicAddress(): Promise<string | undefined>;
5
+ constructor(opts: SolWalletConnectorOpts);
6
+ getSigner<ICoinbaseSolanaSigner>(): Promise<ICoinbaseSolanaSigner | undefined>;
11
7
  signMessage(messageToSign: string): Promise<string | undefined>;
12
- getConnectedAccounts(): Promise<string[]>;
13
8
  }
@@ -1,47 +1,42 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
- import { SolWalletConnector } from './solWalletConnector.js';
3
- import { SolProviderHelper } from './solProviderHelper.js';
2
+ import { bufferToBase64 } from '@dynamic-labs/utils';
3
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
4
+ import '@dynamic-labs/turnkey';
5
+ import '@dynamic-labs/sdk-api';
6
+ import { InjectedWalletBase } from './injected/InjectedWalletBase.js';
7
+ import '@solana/web3.js';
8
+ import '@dynamic-labs/wallet-connector-core';
9
+ import './solWalletConnector.js';
10
+ import { isSignedMessage } from './utils/isSignedMessage.js';
4
11
 
5
- class CoinbaseSolana extends SolWalletConnector {
6
- constructor() {
7
- super(...arguments);
12
+ class CoinbaseSolana extends InjectedWalletBase {
13
+ constructor(opts) {
14
+ super(opts);
8
15
  this.name = 'CoinbaseSolana';
9
- }
10
- setupEventListeners() {
11
- SolProviderHelper._setupEventListeners(this, SolProviderHelper.findProvider(this.name));
12
- }
13
- teardownEventListeners() {
14
- SolProviderHelper._teardownEventListeners(this.name);
15
- }
16
- connect() {
17
- return __awaiter(this, void 0, void 0, function* () {
18
- yield SolProviderHelper.connectWithName(this.name);
19
- });
16
+ this.wallet = findWalletBookWallet(this.walletBook, this.key);
20
17
  }
21
18
  getSigner() {
19
+ var _a;
22
20
  return __awaiter(this, void 0, void 0, function* () {
23
- return SolProviderHelper.connectWithName(this.name);
24
- });
25
- }
26
- isInstalledOnBrowser() {
27
- return SolProviderHelper.isInstalledHelper(this.name);
28
- }
29
- fetchPublicAddress() {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- if (this.isInstalledOnBrowser()) {
32
- return SolProviderHelper.fetchPublicAddressWithName(this.name);
33
- }
34
- return;
21
+ return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.connect();
35
22
  });
36
23
  }
37
24
  signMessage(messageToSign) {
38
25
  return __awaiter(this, void 0, void 0, function* () {
39
- return SolProviderHelper.signMessageWithName(messageToSign, this.name);
40
- });
41
- }
42
- getConnectedAccounts() {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- return SolProviderHelper.getConnectedAccountsWithName(this.name);
26
+ const walletAddress = yield this.fetchPublicAddress();
27
+ if (!walletAddress) {
28
+ return undefined;
29
+ }
30
+ const provider = yield this.getSigner();
31
+ if (!provider) {
32
+ return undefined;
33
+ }
34
+ const encodedMessage = new TextEncoder().encode(messageToSign);
35
+ const signedMessage = yield provider.signMessage(encodedMessage, walletAddress);
36
+ if (!signedMessage) {
37
+ return undefined;
38
+ }
39
+ return bufferToBase64(isSignedMessage(signedMessage) ? signedMessage.signature : signedMessage);
45
40
  });
46
41
  }
47
42
  }
package/src/Solflare.d.ts CHANGED
@@ -1,13 +1,8 @@
1
- import { SolWalletConnector } from './solWalletConnector';
2
- import { ISolana } from './types';
3
- export declare class Solflare extends SolWalletConnector {
1
+ import { InjectedWalletBase } from './injected/InjectedWalletBase';
2
+ import { SolWalletConnectorOpts } from './solWalletConnector';
3
+ export declare class Solflare extends InjectedWalletBase {
4
4
  name: string;
5
- isInstalledOnBrowser(): boolean;
5
+ constructor(opts: SolWalletConnectorOpts);
6
6
  fetchPublicAddress(): Promise<string | undefined>;
7
- connect(): Promise<void>;
8
- getSigner(): Promise<ISolana | undefined>;
9
7
  signMessage(messageToSign: string): Promise<string | undefined>;
10
- getConnectedAccounts(): Promise<string[]>;
11
- setupEventListeners(): void;
12
- teardownEventListeners(): void;
13
8
  }
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('@dynamic-labs/utils');
6
+
7
+ class SignMessageNotSupportedError extends utils.NotSupportedError {
8
+ constructor(walletName) {
9
+ super(`Message signing is currently not supported on ${walletName} hardware wallet.
10
+ You can use signMessageViaTransaction instead to achieve similar functionality
11
+ by signing a transaction with a memo instruction.
12
+ You can read more about it here https://github.com/solana-labs/solana/issues/21366`);
13
+ }
14
+ }
15
+
16
+ exports.SignMessageNotSupportedError = SignMessageNotSupportedError;
@@ -0,0 +1,4 @@
1
+ import { NotSupportedError } from '@dynamic-labs/utils';
2
+ export declare class SignMessageNotSupportedError extends NotSupportedError {
3
+ constructor(walletName: string);
4
+ }
@@ -0,0 +1,12 @@
1
+ import { NotSupportedError } from '@dynamic-labs/utils';
2
+
3
+ class SignMessageNotSupportedError extends NotSupportedError {
4
+ constructor(walletName) {
5
+ super(`Message signing is currently not supported on ${walletName} hardware wallet.
6
+ You can use signMessageViaTransaction instead to achieve similar functionality
7
+ by signing a transaction with a memo instruction.
8
+ You can read more about it here https://github.com/solana-labs/solana/issues/21366`);
9
+ }
10
+ }
11
+
12
+ export { SignMessageNotSupportedError };
package/src/index.cjs CHANGED
@@ -2,28 +2,19 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var CoinbaseSolana = require('./CoinbaseSolana.cjs');
6
- var Glow = require('./Glow.cjs');
7
- var Slope = require('./Slope.cjs');
8
- var Solflare = require('./Solflare.cjs');
9
- var index = require('./injected/index.cjs');
10
- var solWalletConnector = require('./solWalletConnector.cjs');
11
- var solProviderHelper = require('./solProviderHelper.cjs');
5
+ var turnkey = require('@dynamic-labs/turnkey');
6
+ var sdkApi = require('@dynamic-labs/sdk-api');
7
+ var fetchInjectedWalletConnectors = require('./injected/fetchInjectedWalletConnectors.cjs');
12
8
  var isSignedMessage = require('./utils/isSignedMessage.cjs');
13
9
  var isBackpackSolanaSigner = require('./utils/isBackpackSolanaSigner.cjs');
14
10
 
15
11
  /* eslint-disable @typescript-eslint/no-unused-vars */
16
12
  const SolanaWalletConnectors = (props) => [
17
- ...index.injectedWallets,
18
- CoinbaseSolana.CoinbaseSolana,
19
- Glow.Glow,
20
- Slope.Slope,
21
- Solflare.Solflare,
13
+ ...fetchInjectedWalletConnectors.injectedWalletOverrides,
14
+ ...fetchInjectedWalletConnectors.fetchInjectedWalletConnectors(props),
15
+ ...turnkey.TurnkeyWalletConnectors(props, sdkApi.ChainEnum.Sol),
22
16
  ];
23
17
 
24
- exports.Solflare = Solflare.Solflare;
25
- exports.SolWalletConnector = solWalletConnector.SolWalletConnector;
26
- exports.SolProviderHelper = solProviderHelper.SolProviderHelper;
27
18
  exports.isSignedMessage = isSignedMessage.isSignedMessage;
28
19
  exports.isBackpackSolanaSigner = isBackpackSolanaSigner.isBackpackSolanaSigner;
29
20
  exports.SolanaWalletConnectors = SolanaWalletConnectors;
package/src/index.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- export * from './solWalletConnector';
2
- export * from './solProviderHelper';
3
- export * from './Solflare';
4
- export declare const SolanaWalletConnectors: (props: any) => typeof import("./injected/BraveSol").BraveSol[];
1
+ export declare const SolanaWalletConnectors: (props: any) => import("dist/packages/wallet-connector-core/src").WalletConnectorConstructor[];
5
2
  export { isSignedMessage } from './utils/isSignedMessage';
6
3
  export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner';
7
- export type { ISolana, IBackpackSolanaSigner, SignedMessage, ISolanaSigner, } from './types';
4
+ export type { ISolana, IBackpackSolanaSigner, ICoinbaseSolanaSigner, SignedMessage, ISolanaSigner, } from './types';
package/src/index.js CHANGED
@@ -1,21 +1,14 @@
1
- import { CoinbaseSolana } from './CoinbaseSolana.js';
2
- import { Glow } from './Glow.js';
3
- import { Slope } from './Slope.js';
4
- import { Solflare } from './Solflare.js';
5
- export { Solflare } from './Solflare.js';
6
- import { injectedWallets } from './injected/index.js';
7
- export { SolWalletConnector } from './solWalletConnector.js';
8
- export { SolProviderHelper } from './solProviderHelper.js';
1
+ import { TurnkeyWalletConnectors } from '@dynamic-labs/turnkey';
2
+ import { ChainEnum } from '@dynamic-labs/sdk-api';
3
+ import { injectedWalletOverrides, fetchInjectedWalletConnectors } from './injected/fetchInjectedWalletConnectors.js';
9
4
  export { isSignedMessage } from './utils/isSignedMessage.js';
10
5
  export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner.js';
11
6
 
12
7
  /* eslint-disable @typescript-eslint/no-unused-vars */
13
8
  const SolanaWalletConnectors = (props) => [
14
- ...injectedWallets,
15
- CoinbaseSolana,
16
- Glow,
17
- Slope,
18
- Solflare,
9
+ ...injectedWalletOverrides,
10
+ ...fetchInjectedWalletConnectors(props),
11
+ ...TurnkeyWalletConnectors(props, ChainEnum.Sol),
19
12
  ];
20
13
 
21
14
  export { SolanaWalletConnectors };