@dynamic-labs/multi-wallet 0.17.0-RC.7 → 0.17.0-RC.9

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 (233) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +8 -14
  3. package/src/index.cjs +0 -57
  4. package/src/index.d.ts +0 -13
  5. package/src/index.js +1 -18
  6. package/src/multi-wallet.cjs +27 -87
  7. package/src/multi-wallet.d.ts +0 -1
  8. package/src/multi-wallet.js +25 -84
  9. package/src/types.d.ts +2 -23
  10. package/src/utils/getApiProviders.cjs +15 -0
  11. package/src/utils/getApiProviders.d.ts +10 -0
  12. package/src/utils/getApiProviders.js +11 -0
  13. package/src/utils/message.cjs +3 -4
  14. package/src/utils/message.js +1 -2
  15. package/src/wallets/algorand/MyAlgoWalletConnector.cjs +3 -3
  16. package/src/wallets/algorand/MyAlgoWalletConnector.js +1 -1
  17. package/src/wallets/constants.cjs +0 -2
  18. package/src/wallets/constants.js +1 -2
  19. package/src/wallets/cosmos/KeplrWalletConnect.cjs +16 -17
  20. package/src/wallets/cosmos/KeplrWalletConnect.d.ts +9 -5
  21. package/src/wallets/cosmos/KeplrWalletConnect.js +9 -10
  22. package/src/wallets/cosmos/KeplrWalletConnector.cjs +13 -5
  23. package/src/wallets/cosmos/KeplrWalletConnector.d.ts +6 -4
  24. package/src/wallets/cosmos/KeplrWalletConnector.js +13 -5
  25. package/src/wallets/cosmos/wcClient.lib.cjs +141 -0
  26. package/src/wallets/{clients/walletConnect/walletConnect.d.ts → cosmos/wcClient.lib.d.ts} +8 -11
  27. package/src/wallets/cosmos/wcClient.lib.js +126 -0
  28. package/src/wallets/flow/FlowWalletConnector.cjs +7 -8
  29. package/src/wallets/flow/FlowWalletConnector.js +2 -3
  30. package/src/wallets/flow/lilico.cjs +2 -2
  31. package/src/wallets/flow/lilico.js +1 -1
  32. package/src/wallets/solana/CoinbaseSolana.cjs +8 -11
  33. package/src/wallets/solana/CoinbaseSolana.d.ts +1 -3
  34. package/src/wallets/solana/CoinbaseSolana.js +8 -11
  35. package/src/wallets/solana/glow.cjs +8 -11
  36. package/src/wallets/solana/glow.d.ts +1 -3
  37. package/src/wallets/solana/glow.js +8 -11
  38. package/src/wallets/solana/injected/BraveSol.cjs +2 -1
  39. package/src/wallets/solana/injected/BraveSol.js +2 -1
  40. package/src/wallets/solana/phantom-ledger.cjs +5 -5
  41. package/src/wallets/solana/phantom-ledger.js +1 -1
  42. package/src/wallets/solana/phantom.cjs +11 -15
  43. package/src/wallets/solana/phantom.d.ts +1 -3
  44. package/src/wallets/solana/phantom.js +9 -13
  45. package/src/wallets/solana/slope.cjs +4 -4
  46. package/src/wallets/solana/slope.js +1 -1
  47. package/src/wallets/solana/solProviderHelper.cjs +49 -51
  48. package/src/wallets/solana/solProviderHelper.d.ts +20 -20
  49. package/src/wallets/solana/solProviderHelper.js +48 -50
  50. package/src/wallets/solana/solWalletConnector.cjs +2 -2
  51. package/src/wallets/solana/solWalletConnector.js +1 -1
  52. package/src/wallets/solana/solflare.cjs +6 -7
  53. package/src/wallets/solana/solflare.d.ts +0 -2
  54. package/src/wallets/solana/solflare.js +6 -7
  55. package/src/wallets/starknet/braavos.cjs +2 -2
  56. package/src/wallets/starknet/braavos.js +1 -1
  57. package/src/wallets/starknet/starknetWalletConnector.cjs +5 -6
  58. package/src/wallets/starknet/starknetWalletConnector.js +2 -3
  59. package/src/wallets/window.d.ts +10 -22
  60. package/src/errors.cjs +0 -66
  61. package/src/errors.d.ts +0 -34
  62. package/src/errors.js +0 -54
  63. package/src/utils/CancellablePromise/CancellablePromise.cjs +0 -33
  64. package/src/utils/CancellablePromise/CancellablePromise.d.ts +0 -9
  65. package/src/utils/CancellablePromise/CancellablePromise.js +0 -29
  66. package/src/utils/CancellablePromise/index.d.ts +0 -1
  67. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.cjs +0 -54
  68. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.d.ts +0 -3
  69. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.js +0 -50
  70. package/src/utils/assignConfirmationScreenToProvider/index.d.ts +0 -1
  71. package/src/utils/encoding.cjs +0 -18
  72. package/src/utils/encoding.d.ts +0 -4
  73. package/src/utils/encoding.js +0 -12
  74. package/src/utils/findProvider/findProvider.cjs +0 -7
  75. package/src/utils/findProvider/findProvider.d.ts +0 -2
  76. package/src/utils/findProvider/findProvider.js +0 -3
  77. package/src/utils/findProvider/index.d.ts +0 -1
  78. package/src/utils/getChainInfo/getChainInfo.cjs +0 -59
  79. package/src/utils/getChainInfo/getChainInfo.d.ts +0 -2
  80. package/src/utils/getChainInfo/getChainInfo.js +0 -55
  81. package/src/utils/getChainInfo/index.d.ts +0 -1
  82. package/src/utils/getWalletConnectorByName.cjs +0 -19
  83. package/src/utils/getWalletConnectorByName.d.ts +0 -2
  84. package/src/utils/getWalletConnectorByName.js +0 -15
  85. package/src/utils/isEmailOTPWalletConnector/index.d.ts +0 -1
  86. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.cjs +0 -7
  87. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.d.ts +0 -2
  88. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.js +0 -3
  89. package/src/utils/isEmailWalletConnector/index.d.ts +0 -1
  90. package/src/utils/isEmailWalletConnector/isEmailWalletConnector.cjs +0 -7
  91. package/src/utils/isEmailWalletConnector/isEmailWalletConnector.d.ts +0 -2
  92. package/src/utils/isEmailWalletConnector/isEmailWalletConnector.js +0 -3
  93. package/src/utils/isFunction/index.d.ts +0 -1
  94. package/src/utils/isFunction/isFunction.cjs +0 -8
  95. package/src/utils/isFunction/isFunction.d.ts +0 -1
  96. package/src/utils/isFunction/isFunction.js +0 -4
  97. package/src/utils/isMobile.cjs +0 -54
  98. package/src/utils/isMobile.d.ts +0 -13
  99. package/src/utils/isMobile.js +0 -46
  100. package/src/utils/isSameAddress/index.d.ts +0 -1
  101. package/src/utils/isSameAddress/isSameAddress.cjs +0 -9
  102. package/src/utils/isSameAddress/isSameAddress.d.ts +0 -1
  103. package/src/utils/isSameAddress/isSameAddress.js +0 -5
  104. package/src/utils/isSameAddress/utils/index.d.ts +0 -1
  105. package/src/utils/isSameAddress/utils/normalizeAddress/index.d.ts +0 -1
  106. package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.cjs +0 -17
  107. package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.d.ts +0 -1
  108. package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.js +0 -13
  109. package/src/utils/isSocialWalletConnector/index.d.ts +0 -1
  110. package/src/utils/isSocialWalletConnector/isSocialWalletConnector.cjs +0 -7
  111. package/src/utils/isSocialWalletConnector/isSocialWalletConnector.d.ts +0 -2
  112. package/src/utils/isSocialWalletConnector/isSocialWalletConnector.js +0 -3
  113. package/src/utils/isUnsupportedProviderError/index.d.ts +0 -1
  114. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.cjs +0 -13
  115. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.d.ts +0 -6
  116. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.js +0 -9
  117. package/src/utils/logger.cjs +0 -9
  118. package/src/utils/logger.d.ts +0 -2
  119. package/src/utils/logger.js +0 -5
  120. package/src/utils/normalizeWalletName/index.d.ts +0 -1
  121. package/src/utils/normalizeWalletName/normalizeWalletName.cjs +0 -7
  122. package/src/utils/normalizeWalletName/normalizeWalletName.d.ts +0 -1
  123. package/src/utils/normalizeWalletName/normalizeWalletName.js +0 -3
  124. package/src/utils/shouldLowercaseAddress.cjs +0 -11
  125. package/src/utils/shouldLowercaseAddress.d.ts +0 -1
  126. package/src/utils/shouldLowercaseAddress.js +0 -7
  127. package/src/utils/walletConnect.cjs +0 -31
  128. package/src/utils/walletConnect.d.ts +0 -5
  129. package/src/utils/walletConnect.js +0 -27
  130. package/src/wallets/ProviderLookup.cjs +0 -18
  131. package/src/wallets/ProviderLookup.d.ts +0 -4
  132. package/src/wallets/ProviderLookup.js +0 -14
  133. package/src/wallets/clients/coinbase/coinbase.cjs +0 -73
  134. package/src/wallets/clients/coinbase/coinbase.d.ts +0 -6
  135. package/src/wallets/clients/coinbase/coinbase.js +0 -66
  136. package/src/wallets/clients/coinbase/index.d.ts +0 -2
  137. package/src/wallets/clients/coinbase/types.d.ts +0 -14
  138. package/src/wallets/clients/walletConnect/index.d.ts +0 -1
  139. package/src/wallets/clients/walletConnect/types.d.ts +0 -4
  140. package/src/wallets/clients/walletConnect/walletConnect.cjs +0 -250
  141. package/src/wallets/clients/walletConnect/walletConnect.js +0 -233
  142. package/src/wallets/cosmos/getKeplrConnector.cjs +0 -18
  143. package/src/wallets/cosmos/getKeplrConnector.d.ts +0 -6
  144. package/src/wallets/cosmos/getKeplrConnector.js +0 -14
  145. package/src/wallets/ethereum/BloctoEvm.cjs +0 -111
  146. package/src/wallets/ethereum/BloctoEvm.d.ts +0 -22
  147. package/src/wallets/ethereum/BloctoEvm.js +0 -105
  148. package/src/wallets/ethereum/EthWalletConnector.cjs +0 -207
  149. package/src/wallets/ethereum/EthWalletConnector.d.ts +0 -38
  150. package/src/wallets/ethereum/EthWalletConnector.js +0 -203
  151. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.cjs +0 -63
  152. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.d.ts +0 -12
  153. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js +0 -59
  154. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/index.d.ts +0 -1
  155. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs +0 -62
  156. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.d.ts +0 -11
  157. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js +0 -58
  158. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/index.d.ts +0 -1
  159. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.cjs +0 -103
  160. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.d.ts +0 -33
  161. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.js +0 -99
  162. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/index.d.ts +0 -2
  163. package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.cjs +0 -56
  164. package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.d.ts +0 -12
  165. package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.js +0 -52
  166. package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/index.d.ts +0 -1
  167. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.cjs +0 -177
  168. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.d.ts +0 -54
  169. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js +0 -173
  170. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/index.d.ts +0 -2
  171. package/src/wallets/ethereum/MagicConnector/index.d.ts +0 -5
  172. package/src/wallets/ethereum/coinbase.cjs +0 -66
  173. package/src/wallets/ethereum/coinbase.d.ts +0 -25
  174. package/src/wallets/ethereum/coinbase.js +0 -64
  175. package/src/wallets/ethereum/ethProviderHelper.cjs +0 -197
  176. package/src/wallets/ethereum/ethProviderHelper.d.ts +0 -40
  177. package/src/wallets/ethereum/ethProviderHelper.js +0 -193
  178. package/src/wallets/ethereum/evm-network.cjs +0 -20
  179. package/src/wallets/ethereum/evm-network.d.ts +0 -6
  180. package/src/wallets/ethereum/evm-network.js +0 -16
  181. package/src/wallets/ethereum/fortmatic.cjs +0 -76
  182. package/src/wallets/ethereum/fortmatic.d.ts +0 -25
  183. package/src/wallets/ethereum/fortmatic.js +0 -70
  184. package/src/wallets/ethereum/injected/BloctoInjected.cjs +0 -13
  185. package/src/wallets/ethereum/injected/BloctoInjected.d.ts +0 -6
  186. package/src/wallets/ethereum/injected/BloctoInjected.js +0 -11
  187. package/src/wallets/ethereum/injected/BraveEvm.cjs +0 -13
  188. package/src/wallets/ethereum/injected/BraveEvm.d.ts +0 -6
  189. package/src/wallets/ethereum/injected/BraveEvm.js +0 -11
  190. package/src/wallets/ethereum/injected/Dawn.cjs +0 -13
  191. package/src/wallets/ethereum/injected/Dawn.d.ts +0 -6
  192. package/src/wallets/ethereum/injected/Dawn.js +0 -11
  193. package/src/wallets/ethereum/injected/ExodusEvm.cjs +0 -13
  194. package/src/wallets/ethereum/injected/ExodusEvm.d.ts +0 -6
  195. package/src/wallets/ethereum/injected/ExodusEvm.js +0 -11
  196. package/src/wallets/ethereum/injected/Frame.cjs +0 -13
  197. package/src/wallets/ethereum/injected/Frame.d.ts +0 -6
  198. package/src/wallets/ethereum/injected/Frame.js +0 -11
  199. package/src/wallets/ethereum/injected/GameStop.cjs +0 -13
  200. package/src/wallets/ethereum/injected/GameStop.d.ts +0 -6
  201. package/src/wallets/ethereum/injected/GameStop.js +0 -11
  202. package/src/wallets/ethereum/injected/Opera.cjs +0 -13
  203. package/src/wallets/ethereum/injected/Opera.d.ts +0 -6
  204. package/src/wallets/ethereum/injected/Opera.js +0 -11
  205. package/src/wallets/ethereum/injected/PhantomEvm.cjs +0 -37
  206. package/src/wallets/ethereum/injected/PhantomEvm.d.ts +0 -7
  207. package/src/wallets/ethereum/injected/PhantomEvm.js +0 -35
  208. package/src/wallets/ethereum/injected/Trust.cjs +0 -13
  209. package/src/wallets/ethereum/injected/Trust.d.ts +0 -6
  210. package/src/wallets/ethereum/injected/Trust.js +0 -11
  211. package/src/wallets/ethereum/injected/UnknownInjectedWallet.cjs +0 -13
  212. package/src/wallets/ethereum/injected/UnknownInjectedWallet.d.ts +0 -6
  213. package/src/wallets/ethereum/injected/UnknownInjectedWallet.js +0 -11
  214. package/src/wallets/ethereum/injected/Zerion.cjs +0 -13
  215. package/src/wallets/ethereum/injected/Zerion.d.ts +0 -6
  216. package/src/wallets/ethereum/injected/Zerion.js +0 -11
  217. package/src/wallets/ethereum/meta-mask.cjs +0 -63
  218. package/src/wallets/ethereum/meta-mask.d.ts +0 -26
  219. package/src/wallets/ethereum/meta-mask.js +0 -61
  220. package/src/wallets/getMobileOrInjectedWallet.cjs +0 -22
  221. package/src/wallets/getMobileOrInjectedWallet.d.ts +0 -9
  222. package/src/wallets/getMobileOrInjectedWallet.js +0 -18
  223. package/src/wallets/getWalletConnectConnector.cjs +0 -16
  224. package/src/wallets/getWalletConnectConnector.d.ts +0 -5
  225. package/src/wallets/getWalletConnectConnector.js +0 -12
  226. package/src/wallets/walletConnect/index.d.ts +0 -2
  227. package/src/wallets/walletConnect/walletConnect.cjs +0 -133
  228. package/src/wallets/walletConnect/walletConnect.d.ts +0 -34
  229. package/src/wallets/walletConnect/walletConnect.js +0 -127
  230. package/src/wallets/walletConnect/walletConnectV2.cjs +0 -268
  231. package/src/wallets/walletConnect/walletConnectV2.d.ts +0 -38
  232. package/src/wallets/walletConnect/walletConnectV2.js +0 -262
  233. package/src/wallets/walletConnect/zerion.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,4 +1,41 @@
1
1
 
2
+ ## [0.17.0-RC.9](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.8...v0.17.0-RC.9) (2023-05-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * **DYN-2231:** show in the user profile all existing fields ([#1988](https://github.com/dynamic-labs/DynamicAuth/issues/1988)) ([1f8cee2](https://github.com/dynamic-labs/DynamicAuth/commit/1f8cee22cf8338bd518961288c570c40e807cd52))
8
+ * **TransactionModal:** add insufficient funds warning ([#2031](https://github.com/dynamic-labs/DynamicAuth/issues/2031)) ([bf868e2](https://github.com/dynamic-labs/DynamicAuth/commit/bf868e239e74f4cd0ceda5e09b7538d97d4e431d))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **DYN-1820:** use missing_from_list error code ([#2040](https://github.com/dynamic-labs/DynamicAuth/issues/2040)) ([92c7ad5](https://github.com/dynamic-labs/DynamicAuth/commit/92c7ad565376573d963c65fa821c97a2102ec8d7))
14
+ * **MagicClientNetworkHandler:** save last used network id ([#2045](https://github.com/dynamic-labs/DynamicAuth/issues/2045)) ([6e1c571](https://github.com/dynamic-labs/DynamicAuth/commit/6e1c57127a824cd02d4b785fb8a387e4f221f044))
15
+ * **TransactionModal:** ensure alchemy will not fail when estimating for gas ([#2034](https://github.com/dynamic-labs/DynamicAuth/issues/2034)) ([86c0d7c](https://github.com/dynamic-labs/DynamicAuth/commit/86c0d7cc7b20ff12bc9fc2e33961e177d9decf2a))
16
+
17
+ ## [0.17.0-RC.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.7...v0.17.0-RC.8) (2023-05-03)
18
+
19
+
20
+ ### ⚠ BREAKING CHANGES
21
+
22
+ * Removes support for Fortmatic in favor of Magic
23
+
24
+ ### Features
25
+
26
+ * add selected address to qr code modal ([#2017](https://github.com/dynamic-labs/DynamicAuth/issues/2017)) ([58a5d69](https://github.com/dynamic-labs/DynamicAuth/commit/58a5d691f8a4045d92be1a2bcaf6092f44b91b73))
27
+ * **DYN-2228:** show network picker only when more than 1 network ([#2007](https://github.com/dynamic-labs/DynamicAuth/issues/2007)) ([8329737](https://github.com/dynamic-labs/DynamicAuth/commit/83297378cc5ed019f3f8297b48c16f56d7cfe9a7))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * disable kyc submit button when network is not supported ([#1952](https://github.com/dynamic-labs/DynamicAuth/issues/1952)) ([ec2f0eb](https://github.com/dynamic-labs/DynamicAuth/commit/ec2f0eb708ed2938dd68cbc7e8ee40f3bc856c2b))
33
+ * missing evm networks for connect-only ([#2006](https://github.com/dynamic-labs/DynamicAuth/issues/2006)) ([78561b3](https://github.com/dynamic-labs/DynamicAuth/commit/78561b3243ac38a348a383bb3c79ce58c8731538))
34
+ * wallet-connect menu on mobile ([#2025](https://github.com/dynamic-labs/DynamicAuth/issues/2025)) ([1f358a6](https://github.com/dynamic-labs/DynamicAuth/commit/1f358a66dda696e745db32f121fb4ef62379cb9a))
35
+
36
+
37
+ * remove Fortmatic ([#2010](https://github.com/dynamic-labs/DynamicAuth/issues/2010)) ([0ca95c1](https://github.com/dynamic-labs/DynamicAuth/commit/0ca95c175b5d8383433340832bd9ae7dab85f912))
38
+
2
39
  ## [0.17.0-RC.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.6...v0.17.0-RC.7) (2023-04-28)
3
40
 
4
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/multi-wallet",
3
- "version": "0.17.0-RC.7",
3
+ "version": "0.17.0-RC.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -10,30 +10,24 @@
10
10
  "buffer": "^6.0.3",
11
11
  "deepmerge": "^4.3.1",
12
12
  "@dynamic-labs/sdk-api": "0.0.183",
13
- "@dynamic-labs/wallet-book": "^0.0.11",
14
- "@magic-ext/oauth": "^10.2.0",
13
+ "@dynamic-labs/wallet-book": "^0.0.14",
15
14
  "starknet": "^3.19.0",
16
15
  "ethers": "^5.7.2",
17
16
  "@randlabs/myalgo-connect": "^1.4.2",
18
17
  "@solana/web3.js": "^1.70.1",
19
- "@coinbase/wallet-sdk": "^3.6.4",
20
18
  "@walletconnect/client": "^1.8.0",
21
19
  "@walletconnect/utils": "^1.8.0",
22
- "@blocto/sdk": "^0.3.3",
23
- "fortmatic": "^2.4.0",
24
20
  "@onflow/fcl": "^1.3.2",
25
21
  "get-starknet": "^1.5.0",
26
- "@walletconnect/ethereum-provider": "^1.8.0",
27
- "@walletconnect/universal-provider": "^2.4.2",
28
22
  "tslib": "^2.4.1",
29
- "magic-sdk": "^16.0.1",
30
23
  "@keplr-wallet/provider": "0.11.56",
31
24
  "@keplr-wallet/types": "^0.11.51",
32
- "@dynamic-labs/logger": "0.17.0-RC.7",
33
- "@dynamic-labs/rpc-providers": "0.17.0-RC.7",
34
- "@dynamic-labs/types": "0.17.0-RC.7",
35
- "@dynamic-labs/utils": "0.17.0-RC.7",
36
- "@dynamic-labs/wallet-connector-core": "0.17.0-RC.7"
25
+ "@dynamic-labs/ethereum-all": "0.17.0-RC.9",
26
+ "@dynamic-labs/magic": "0.17.0-RC.9",
27
+ "@dynamic-labs/rpc-providers": "0.17.0-RC.9",
28
+ "@dynamic-labs/types": "0.17.0-RC.9",
29
+ "@dynamic-labs/utils": "0.17.0-RC.9",
30
+ "@dynamic-labs/wallet-connector-core": "0.17.0-RC.9"
37
31
  },
38
32
  "devDependencies": {
39
33
  "@walletconnect/types": "^2.2.1"
package/src/index.cjs CHANGED
@@ -4,74 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('./polyfills.cjs');
6
6
  var multiWallet = require('./multi-wallet.cjs');
7
- var errors = require('./errors.cjs');
8
- var logger = require('./utils/logger.cjs');
9
- var EmailMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.cjs');
10
- var MagicWalletConnector = require('./wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.cjs');
11
- var EmailOTPMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs');
12
- var MagicClientNetworkHandler = require('./wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.cjs');
13
- var MagicSocialWalletConnector = require('./wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.cjs');
14
7
  var message = require('./utils/message.cjs');
15
- var isMobile = require('./utils/isMobile.cjs');
16
- var normalizeWalletName = require('./utils/normalizeWalletName/normalizeWalletName.cjs');
17
- var isEmailWalletConnector = require('./utils/isEmailWalletConnector/isEmailWalletConnector.cjs');
18
- var isEmailOTPWalletConnector = require('./utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.cjs');
19
- var isSocialWalletConnector = require('./utils/isSocialWalletConnector/isSocialWalletConnector.cjs');
20
- var getChainInfo = require('./utils/getChainInfo/getChainInfo.cjs');
21
- var getWalletConnectorByName = require('./utils/getWalletConnectorByName.cjs');
22
- var walletConnect = require('./wallets/clients/walletConnect/walletConnect.cjs');
23
- var coinbase = require('./wallets/clients/coinbase/coinbase.cjs');
24
8
  var KeplrWalletConnector = require('./wallets/cosmos/KeplrWalletConnector.cjs');
25
- var isSameAddress = require('./utils/isSameAddress/isSameAddress.cjs');
26
9
  var constants = require('./wallets/constants.cjs');
27
10
  var phantomLedger = require('./wallets/solana/phantom-ledger.cjs');
28
11
 
29
12
 
30
13
 
31
- exports.filteredWalletConnectWallets = multiWallet.filteredWalletConnectWallets;
32
14
  exports.getEnabledWallets = multiWallet.getEnabledWallets;
33
15
  exports.getSupportedChainsForWalletConnector = multiWallet.getSupportedChainsForWalletConnector;
34
16
  exports.getSupportedWallets = multiWallet.getSupportedWallets;
35
- exports.ChainalysisError = errors.ChainalysisError;
36
- exports.DynamicError = errors.DynamicError;
37
- exports.EmailAlreadyExistsError = errors.EmailAlreadyExistsError;
38
- exports.EmailVerificationError = errors.EmailVerificationError;
39
- exports.NoAccessError = errors.NoAccessError;
40
- exports.NotSupportedError = errors.NotSupportedError;
41
- exports.UsernameAlreadyExistsError = errors.UsernameAlreadyExistsError;
42
- exports.WalletNotDeployedError = errors.WalletNotDeployedError;
43
- exports.WalletUsedError = errors.WalletUsedError;
44
- exports.logger = logger.logger;
45
- exports.EmailMagicWalletConnector = EmailMagicWalletConnector.EmailMagicWalletConnector;
46
- exports.MagicWalletConnector = MagicWalletConnector.MagicWalletConnector;
47
- exports.EmailOTPMagicWalletConnector = EmailOTPMagicWalletConnector.EmailOTPMagicWalletConnector;
48
- exports.MagicClientNetworkHandler = MagicClientNetworkHandler.MagicClientNetworkHandler;
49
- exports.MagicSocialWalletConnector = MagicSocialWalletConnector.MagicSocialWalletConnector;
50
17
  exports.generateMessageToSign = message.generateMessageToSign;
51
- exports.isIPad = isMobile.isIPad;
52
- exports.isIPhone = isMobile.isIPhone;
53
- exports.isMobile = isMobile.isMobile;
54
- exports.normalizeWalletName = normalizeWalletName.normalizeWalletName;
55
- exports.isEmailWalletConnector = isEmailWalletConnector.isEmailWalletConnector;
56
- exports.isEmailOTPWalletConnector = isEmailOTPWalletConnector.isEmailOTPWalletConnector;
57
- exports.isSocialWalletConnector = isSocialWalletConnector.isSocialWalletConnector;
58
- exports.getChainInfo = getChainInfo.getChainInfo;
59
- exports.getWalletConnectorByName = getWalletConnectorByName.getWalletConnectorByName;
60
- exports.createSession = walletConnect.createSession;
61
- exports.fetchWalletConnectCosmosPublicAddress = walletConnect.fetchWalletConnectCosmosPublicAddress;
62
- exports.fetchWalletConnectEVMPublicAddress = walletConnect.fetchWalletConnectEVMPublicAddress;
63
- exports.getDeepLink = walletConnect.getDeepLink;
64
- exports.initClient = walletConnect.initClient;
65
- exports.killWalletConnectSession = walletConnect.killWalletConnectSession;
66
- exports.setupWalletConnectEventListeners = walletConnect.setupWalletConnectEventListeners;
67
- exports.signWalletConnectPersonalMessage = walletConnect.signWalletConnectPersonalMessage;
68
- exports.teardownWalletConnectEventListeners = walletConnect.teardownWalletConnectEventListeners;
69
- exports.useDeepLink = walletConnect.useDeepLink;
70
- exports.fetchPublicAddress = coinbase.fetchPublicAddress;
71
- exports.getCoinbaseProvider = coinbase.getCoinbaseProvider;
72
- exports.killCoinbaseSession = coinbase.killCoinbaseSession;
73
- exports.signMessage = coinbase.signMessage;
74
18
  exports.KeplrWalletConnector = KeplrWalletConnector.KeplrWalletConnector;
75
- exports.isSameAddress = isSameAddress.isSameAddress;
76
19
  exports.defaultStarknetTypedDataDomain = constants.DEFAULT_STARKNET_TYPED_DATA_DOMAIN;
77
20
  exports.phantomLedgerWalletName = phantomLedger.walletName;
package/src/index.d.ts CHANGED
@@ -1,19 +1,6 @@
1
1
  import './polyfills';
2
2
  export * from './multi-wallet';
3
3
  export * from './types';
4
- export * from './errors';
5
- export * from './utils/logger';
6
- export * from './wallets/ethereum/MagicConnector';
7
4
  export { generateMessageToSign } from './utils/message';
8
- export { isIPad, isIPhone, isMobile } from './utils/isMobile';
9
- export { normalizeWalletName } from './utils/normalizeWalletName';
10
- export { isEmailWalletConnector } from './utils/isEmailWalletConnector';
11
- export { isEmailOTPWalletConnector } from './utils/isEmailOTPWalletConnector';
12
- export { isSocialWalletConnector } from './utils/isSocialWalletConnector';
13
- export { getChainInfo } from './utils/getChainInfo';
14
- export { getWalletConnectorByName } from './utils/getWalletConnectorByName';
15
- export * from './wallets/clients/walletConnect';
16
- export * from './wallets/clients/coinbase';
17
5
  export { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector';
18
- export * from './utils/isSameAddress';
19
6
  export { DEFAULT_STARKNET_TYPED_DATA_DOMAIN as defaultStarknetTypedDataDomain } from './wallets/constants';
package/src/index.js CHANGED
@@ -1,23 +1,6 @@
1
1
  import './polyfills.js';
2
- export { filteredWalletConnectWallets, getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets } from './multi-wallet.js';
3
- export { ChainalysisError, DynamicError, EmailAlreadyExistsError, EmailVerificationError, NoAccessError, NotSupportedError, UsernameAlreadyExistsError, WalletNotDeployedError, WalletUsedError } from './errors.js';
4
- export { logger } from './utils/logger.js';
5
- export { EmailMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js';
6
- export { MagicWalletConnector } from './wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js';
7
- export { EmailOTPMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js';
8
- export { MagicClientNetworkHandler } from './wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.js';
9
- export { MagicSocialWalletConnector } from './wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.js';
2
+ export { getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets } from './multi-wallet.js';
10
3
  export { generateMessageToSign } from './utils/message.js';
11
- export { isIPad, isIPhone, isMobile } from './utils/isMobile.js';
12
- export { normalizeWalletName } from './utils/normalizeWalletName/normalizeWalletName.js';
13
- export { isEmailWalletConnector } from './utils/isEmailWalletConnector/isEmailWalletConnector.js';
14
- export { isEmailOTPWalletConnector } from './utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.js';
15
- export { isSocialWalletConnector } from './utils/isSocialWalletConnector/isSocialWalletConnector.js';
16
- export { getChainInfo } from './utils/getChainInfo/getChainInfo.js';
17
- export { getWalletConnectorByName } from './utils/getWalletConnectorByName.js';
18
- export { createSession, fetchWalletConnectCosmosPublicAddress, fetchWalletConnectEVMPublicAddress, getDeepLink, initClient, killWalletConnectSession, setupWalletConnectEventListeners, signWalletConnectPersonalMessage, teardownWalletConnectEventListeners, useDeepLink } from './wallets/clients/walletConnect/walletConnect.js';
19
- export { fetchPublicAddress, getCoinbaseProvider, killCoinbaseSession, signMessage } from './wallets/clients/coinbase/coinbase.js';
20
4
  export { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector.js';
21
- export { isSameAddress } from './utils/isSameAddress/isSameAddress.js';
22
5
  export { DEFAULT_STARKNET_TYPED_DATA_DOMAIN as defaultStarknetTypedDataDomain } from './wallets/constants.js';
23
6
  export { walletName as phantomLedgerWalletName } from './wallets/solana/phantom-ledger.js';
@@ -3,63 +3,29 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
+ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
6
7
  var walletBook = require('@dynamic-labs/wallet-book');
7
- var sdkApi = require('@dynamic-labs/sdk-api');
8
+ var magic = require('@dynamic-labs/magic');
9
+ var utils = require('@dynamic-labs/utils');
10
+ var ethereumAll = require('@dynamic-labs/ethereum-all');
8
11
  var phantom = require('./wallets/solana/phantom.cjs');
9
- var coinbase = require('./wallets/ethereum/coinbase.cjs');
10
12
  var slope = require('./wallets/solana/slope.cjs');
11
13
  var solflare = require('./wallets/solana/solflare.cjs');
12
14
  var glow = require('./wallets/solana/glow.cjs');
13
15
  var blocto = require('./wallets/flow/blocto.cjs');
14
16
  var dapper = require('./wallets/flow/dapper.cjs');
15
- var isMobile = require('./utils/isMobile.cjs');
16
- var walletConnect = require('./utils/walletConnect.cjs');
17
17
  var MyAlgoWalletConnector = require('./wallets/algorand/MyAlgoWalletConnector.cjs');
18
- var BraveEvm = require('./wallets/ethereum/injected/BraveEvm.cjs');
19
- var Opera = require('./wallets/ethereum/injected/Opera.cjs');
20
18
  var BraveSol = require('./wallets/solana/injected/BraveSol.cjs');
21
- var UnknownInjectedWallet = require('./wallets/ethereum/injected/UnknownInjectedWallet.cjs');
22
- var GameStop = require('./wallets/ethereum/injected/GameStop.cjs');
23
- var ExodusEvm = require('./wallets/ethereum/injected/ExodusEvm.cjs');
24
19
  var ExodusSol = require('./wallets/solana/injected/ExodusSol.cjs');
25
- var BloctoInjected = require('./wallets/ethereum/injected/BloctoInjected.cjs');
26
20
  var argentx = require('./wallets/starknet/argentx.cjs');
27
21
  var braavos = require('./wallets/starknet/braavos.cjs');
28
- var BloctoEvm = require('./wallets/ethereum/BloctoEvm.cjs');
29
22
  var phantomLedger = require('./wallets/solana/phantom-ledger.cjs');
30
23
  var CoinbaseSolana = require('./wallets/solana/CoinbaseSolana.cjs');
31
- var Frame = require('./wallets/ethereum/injected/Frame.cjs');
32
- var fortmatic = require('./wallets/ethereum/fortmatic.cjs');
33
24
  var lilico = require('./wallets/flow/lilico.cjs');
34
- var getWalletConnectConnector = require('./wallets/getWalletConnectConnector.cjs');
35
- var Dawn = require('./wallets/ethereum/injected/Dawn.cjs');
36
- var PhantomEvm = require('./wallets/ethereum/injected/PhantomEvm.cjs');
37
- require('magic-sdk');
38
- require('ethers');
39
- require('@dynamic-labs/wallet-connector-core');
40
- require('@dynamic-labs/utils');
41
- require('./utils/logger.cjs');
42
- var EmailOTPMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs');
43
- var MagicSocialWalletConnector = require('./wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.cjs');
44
- var isEmailWalletConnector = require('./utils/isEmailWalletConnector/isEmailWalletConnector.cjs');
45
- var getKeplrConnector = require('./wallets/cosmos/getKeplrConnector.cjs');
46
- var Zerion = require('./wallets/ethereum/injected/Zerion.cjs');
47
- var getMobileOrInjectedWallet = require('./wallets/getMobileOrInjectedWallet.cjs');
48
- var metaMask = require('./wallets/ethereum/meta-mask.cjs');
49
- var Trust = require('./wallets/ethereum/injected/Trust.cjs');
50
- var findProvider = require('./utils/findProvider/findProvider.cjs');
25
+ var KeplrWalletConnector = require('./wallets/cosmos/KeplrWalletConnector.cjs');
26
+ var getApiProviders = require('./utils/getApiProviders.cjs');
51
27
 
52
28
  let wallets = [];
53
- // These wallets are either not supported or implement their
54
- // own WalletConnect connector
55
- const filteredWalletConnectWallets = [
56
- 'MetaMask',
57
- 'Gnosis Safe',
58
- 'Trust',
59
- 'lilico',
60
- 'Keplr',
61
- 'Zerion',
62
- ];
63
29
  const defaultWalletUiUtils = {
64
30
  enableInternalSign: () => {
65
31
  throw Error('enableInternalSign, not implemented');
@@ -72,71 +38,54 @@ const defaultWalletUiUtils = {
72
38
  },
73
39
  };
74
40
  const getSupportedWallets = (args) => tslib.__awaiter(void 0, void 0, void 0, function* () {
75
- const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, magicLinkConfig = undefined, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, providers = [], skipMemo = false, vendorCredentials = {}, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
41
+ var _a;
42
+ const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
76
43
  if (!skipMemo && wallets.length > 0) {
77
44
  return wallets;
78
45
  }
79
46
  const evmNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || [];
80
47
  const solanaNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.solana) || [];
81
48
  const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
82
- const magicLinkProvider = findProvider.findProvider(providers, sdkApi.ProviderEnum.MagicLink);
49
+ const apiProviders = getApiProviders.getApiProviders(customerApiProviders);
83
50
  const opts = {
51
+ apiProviders,
84
52
  appLogoUrl,
85
53
  appName,
86
54
  chainRpcProviders,
55
+ cosmosNetworks: cosmosNetworkConfigs,
87
56
  evmNetworks: evmNetworkConfigs,
57
+ isWalletConnectV2Enabled,
58
+ projectId: walletConnectProjectId,
88
59
  solNetworks: solanaNetworkConfigs,
89
60
  walletUiUtils: walletUiUtils || defaultWalletUiUtils,
90
61
  };
91
- const walletConnectWallets = walletConnect.fetchWalletConnectWallets(Object.assign(Object.assign({}, opts), { isV2Enabled: isWalletConnectV2Enabled }));
92
- // temporary hack to filter out metamask, which currently has walletconnect
93
- // functionality built-in
94
- const filtered = walletConnectWallets.filter(({ name }) => !filteredWalletConnectWallets.includes(name));
62
+ const importedWallets = [
63
+ ...ethereumAll.EthereumWalletConnectors(opts),
64
+ ].map((wallet) => new wallet(opts));
95
65
  const allWallets = [
96
- new Dawn(opts),
66
+ ...importedWallets,
97
67
  new phantom(opts),
98
- getMobileOrInjectedWallet.getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new metaMask(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'MetaMask' })),
99
- getMobileOrInjectedWallet.getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new Trust(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'Trust' })),
100
- new PhantomEvm(opts),
101
68
  new phantomLedger["default"](opts),
102
- new coinbase(opts),
103
69
  new solflare(opts),
104
70
  new glow(opts),
105
71
  new slope(opts),
106
72
  new dapper(opts),
107
73
  new blocto(opts),
108
- new BloctoEvm(opts),
109
- new BloctoInjected(opts),
110
- getWalletConnectConnector.getWalletConnectConnector(Object.assign(Object.assign({}, opts), { isWalletConnectV2Enabled, projectId: walletConnectProjectId })),
111
74
  new BraveSol(opts),
112
- new BraveEvm(opts),
113
- new UnknownInjectedWallet(opts),
114
- new GameStop(opts),
115
- new ExodusEvm(opts),
116
75
  new ExodusSol(opts),
117
- new Opera(opts),
118
- ...((magicLinkProvider === null || magicLinkProvider === void 0 ? void 0 : magicLinkProvider.providerProjectId)
76
+ ...(((_a = apiProviders.magicLink) === null || _a === void 0 ? void 0 : _a.providerProjectId)
119
77
  ? [
120
- new EmailOTPMagicWalletConnector.EmailOTPMagicWalletConnector(Object.assign(Object.assign({}, opts), { apiKey: magicLinkProvider.providerProjectId, config: magicLinkConfig, defaultChainId: magicLinkProvider.defaultChainId })),
121
- new MagicSocialWalletConnector.MagicSocialWalletConnector(Object.assign(Object.assign({}, opts), { apiKey: magicLinkProvider.providerProjectId, config: magicLinkConfig, defaultChainId: magicLinkProvider.defaultChainId })),
78
+ new magic.EmailOTPMagicWalletConnector(Object.assign({}, opts)),
79
+ new magic.MagicSocialWalletConnector(Object.assign({}, opts)),
122
80
  ]
123
81
  : []),
124
82
  new MyAlgoWalletConnector(),
125
83
  new argentx(),
126
84
  new braavos(),
127
85
  new CoinbaseSolana(opts),
128
- new Frame(opts),
129
86
  new lilico(opts),
130
- getMobileOrInjectedWallet.getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new Zerion(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'Zerion' })),
131
- //TODO: https://linear.app/dynamic-labs/issue/DYN-2127/rename-evmnetworks-to-networks-across-the-application
132
- getKeplrConnector.getKeplerConnector({ evmNetworks: cosmosNetworkConfigs }),
133
- ...((vendorCredentials === null || vendorCredentials === void 0 ? void 0 : vendorCredentials.fortmatic)
134
- ? [
135
- new fortmatic(Object.assign(Object.assign({}, opts), { apiKey: vendorCredentials.fortmatic })),
136
- ]
137
- : []),
138
- ...filtered,
139
- ];
87
+ new KeplrWalletConnector.KeplrWalletConnector(opts),
88
+ ].map((wallet) => wallet.getMobileOrInstalledWallet());
140
89
  yield Promise.all(allWallets.map((wallet) => { var _a; return (_a = wallet.init) === null || _a === void 0 ? void 0 : _a.call(wallet); }));
141
90
  // Memoize the wallets
142
91
  const filteredWallets = filterWalletsForPlatform(allWallets);
@@ -155,30 +104,22 @@ const filterWalletsForPlatform = (wallets) => wallets.filter((wallet) => {
155
104
  if (wallet.isInstalledOnBrowser()) {
156
105
  return true;
157
106
  }
158
- else if (isEmailWalletConnector.isEmailWalletConnector(wallet)) {
107
+ else if (walletConnectorCore.isEmailWalletConnector(wallet)) {
159
108
  return true;
160
109
  }
161
110
  else if (metadata.showOnlyIfInstalled) {
162
111
  return false;
163
112
  }
164
- else if (!isMobile.isMobile()) {
113
+ else if (!utils.isMobile()) {
165
114
  return true;
166
115
  }
167
116
  else {
168
- return handleMobileWalletFilter(wallet, metadata);
117
+ return handleMobileWalletFilter(metadata);
169
118
  }
170
119
  });
171
- const handleMobileWalletFilter = (wallet, metadata) => {
120
+ const handleMobileWalletFilter = (metadata) => {
172
121
  if (!metadata.mobile)
173
122
  return false;
174
- /**
175
- * Custom check added with DYN-1489 for mobile version only:
176
- * it shows a WalletConnect listItem that wraps-up all the WalletConnect wallets
177
- * in a new wallet-list view.
178
- */
179
- if (wallet.isWalletConnect && wallet.name === 'WalletConnect') {
180
- return true;
181
- }
182
123
  /**
183
124
  * WalletConnect provides a "universal" and "native" deep link. They recommend using
184
125
  * the universal deep link over the native one due to UX differences, and our current
@@ -192,7 +133,7 @@ const handleMobileWalletFilter = (wallet, metadata) => {
192
133
  * if a wallet has a non-empty value for ios, that means that wallet has an ios app
193
134
  * and we support that app. the same goes for android
194
135
  */
195
- if (isMobile.isIPad() || isMobile.isIPhone()) {
136
+ if (utils.isIPad() || utils.isIPhone()) {
196
137
  const hasIOSLink = metadata.mobile.iosId !== undefined;
197
138
  return !isWalletConnectWallet
198
139
  ? hasIOSLink
@@ -244,7 +185,6 @@ const getEnabledWallets = (props) => tslib.__awaiter(void 0, void 0, void 0, fun
244
185
  });
245
186
 
246
187
  exports.phantomLedgerWalletName = phantomLedger.walletName;
247
- exports.filteredWalletConnectWallets = filteredWalletConnectWallets;
248
188
  exports.getEnabledWallets = getEnabledWallets;
249
189
  exports.getSupportedChainsForWalletConnector = getSupportedChainsForWalletConnector;
250
190
  exports.getSupportedWallets = getSupportedWallets;
@@ -1,7 +1,6 @@
1
1
  import { Chain, WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
2
  import { GetSupportedWallets, GetSupportedWalletsOpts } from './types';
3
3
  export { walletName as phantomLedgerWalletName } from './wallets/solana/phantom-ledger';
4
- export declare const filteredWalletConnectWallets: string[];
5
4
  export declare const getSupportedWallets: GetSupportedWallets;
6
5
  export declare const getSupportedChainsForWalletConnector: (walletConnector: WalletConnector) => Chain[];
7
6
  export declare const getEnabledWallets: (props: {
@@ -1,62 +1,28 @@
1
1
  import { __awaiter } from 'tslib';
2
+ import { isEmailWalletConnector } from '@dynamic-labs/wallet-connector-core';
2
3
  import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
3
- import { ProviderEnum } from '@dynamic-labs/sdk-api';
4
+ import { EmailOTPMagicWalletConnector, MagicSocialWalletConnector } from '@dynamic-labs/magic';
5
+ import { isMobile, isIPad, isIPhone } from '@dynamic-labs/utils';
6
+ import { EthereumWalletConnectors } from '@dynamic-labs/ethereum-all';
4
7
  import Phantom from './wallets/solana/phantom.js';
5
- import Coinbase from './wallets/ethereum/coinbase.js';
6
8
  import Slope from './wallets/solana/slope.js';
7
9
  import Solflare from './wallets/solana/solflare.js';
8
10
  import Glow from './wallets/solana/glow.js';
9
11
  import Blocto from './wallets/flow/blocto.js';
10
12
  import Dapper from './wallets/flow/dapper.js';
11
- import { isMobile, isIPad, isIPhone } from './utils/isMobile.js';
12
- import { fetchWalletConnectWallets } from './utils/walletConnect.js';
13
13
  import MyAlgoWalletConnector from './wallets/algorand/MyAlgoWalletConnector.js';
14
- import BraveEvm from './wallets/ethereum/injected/BraveEvm.js';
15
- import Opera from './wallets/ethereum/injected/Opera.js';
16
14
  import BraveSol from './wallets/solana/injected/BraveSol.js';
17
- import UnknownInjectedWallet from './wallets/ethereum/injected/UnknownInjectedWallet.js';
18
- import GameStop from './wallets/ethereum/injected/GameStop.js';
19
- import ExodusEvm from './wallets/ethereum/injected/ExodusEvm.js';
20
15
  import ExodusSol from './wallets/solana/injected/ExodusSol.js';
21
- import BloctoInjected from './wallets/ethereum/injected/BloctoInjected.js';
22
16
  import ArgentX from './wallets/starknet/argentx.js';
23
17
  import Braavos from './wallets/starknet/braavos.js';
24
- import BloctoEvm from './wallets/ethereum/BloctoEvm.js';
25
18
  import PhantomLedger from './wallets/solana/phantom-ledger.js';
26
19
  export { walletName as phantomLedgerWalletName } from './wallets/solana/phantom-ledger.js';
27
20
  import CoinbaseSolana from './wallets/solana/CoinbaseSolana.js';
28
- import Frame from './wallets/ethereum/injected/Frame.js';
29
- import Fortmatic from './wallets/ethereum/fortmatic.js';
30
21
  import Lilico from './wallets/flow/lilico.js';
31
- import { getWalletConnectConnector } from './wallets/getWalletConnectConnector.js';
32
- import Dawn from './wallets/ethereum/injected/Dawn.js';
33
- import PhantomEvm from './wallets/ethereum/injected/PhantomEvm.js';
34
- import 'magic-sdk';
35
- import 'ethers';
36
- import '@dynamic-labs/wallet-connector-core';
37
- import '@dynamic-labs/utils';
38
- import './utils/logger.js';
39
- import { EmailOTPMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js';
40
- import { MagicSocialWalletConnector } from './wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.js';
41
- import { isEmailWalletConnector } from './utils/isEmailWalletConnector/isEmailWalletConnector.js';
42
- import { getKeplerConnector } from './wallets/cosmos/getKeplrConnector.js';
43
- import Zerion from './wallets/ethereum/injected/Zerion.js';
44
- import { getMobileOrInjectedWallet } from './wallets/getMobileOrInjectedWallet.js';
45
- import MetaMask from './wallets/ethereum/meta-mask.js';
46
- import Trust from './wallets/ethereum/injected/Trust.js';
47
- import { findProvider } from './utils/findProvider/findProvider.js';
22
+ import { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector.js';
23
+ import { getApiProviders } from './utils/getApiProviders.js';
48
24
 
49
25
  let wallets = [];
50
- // These wallets are either not supported or implement their
51
- // own WalletConnect connector
52
- const filteredWalletConnectWallets = [
53
- 'MetaMask',
54
- 'Gnosis Safe',
55
- 'Trust',
56
- 'lilico',
57
- 'Keplr',
58
- 'Zerion',
59
- ];
60
26
  const defaultWalletUiUtils = {
61
27
  enableInternalSign: () => {
62
28
  throw Error('enableInternalSign, not implemented');
@@ -69,71 +35,54 @@ const defaultWalletUiUtils = {
69
35
  },
70
36
  };
71
37
  const getSupportedWallets = (args) => __awaiter(void 0, void 0, void 0, function* () {
72
- const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, magicLinkConfig = undefined, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, providers = [], skipMemo = false, vendorCredentials = {}, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
38
+ var _a;
39
+ const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
73
40
  if (!skipMemo && wallets.length > 0) {
74
41
  return wallets;
75
42
  }
76
43
  const evmNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || [];
77
44
  const solanaNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.solana) || [];
78
45
  const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
79
- const magicLinkProvider = findProvider(providers, ProviderEnum.MagicLink);
46
+ const apiProviders = getApiProviders(customerApiProviders);
80
47
  const opts = {
48
+ apiProviders,
81
49
  appLogoUrl,
82
50
  appName,
83
51
  chainRpcProviders,
52
+ cosmosNetworks: cosmosNetworkConfigs,
84
53
  evmNetworks: evmNetworkConfigs,
54
+ isWalletConnectV2Enabled,
55
+ projectId: walletConnectProjectId,
85
56
  solNetworks: solanaNetworkConfigs,
86
57
  walletUiUtils: walletUiUtils || defaultWalletUiUtils,
87
58
  };
88
- const walletConnectWallets = fetchWalletConnectWallets(Object.assign(Object.assign({}, opts), { isV2Enabled: isWalletConnectV2Enabled }));
89
- // temporary hack to filter out metamask, which currently has walletconnect
90
- // functionality built-in
91
- const filtered = walletConnectWallets.filter(({ name }) => !filteredWalletConnectWallets.includes(name));
59
+ const importedWallets = [
60
+ ...EthereumWalletConnectors(opts),
61
+ ].map((wallet) => new wallet(opts));
92
62
  const allWallets = [
93
- new Dawn(opts),
63
+ ...importedWallets,
94
64
  new Phantom(opts),
95
- getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new MetaMask(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'MetaMask' })),
96
- getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new Trust(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'Trust' })),
97
- new PhantomEvm(opts),
98
65
  new PhantomLedger(opts),
99
- new Coinbase(opts),
100
66
  new Solflare(opts),
101
67
  new Glow(opts),
102
68
  new Slope(opts),
103
69
  new Dapper(opts),
104
70
  new Blocto(opts),
105
- new BloctoEvm(opts),
106
- new BloctoInjected(opts),
107
- getWalletConnectConnector(Object.assign(Object.assign({}, opts), { isWalletConnectV2Enabled, projectId: walletConnectProjectId })),
108
71
  new BraveSol(opts),
109
- new BraveEvm(opts),
110
- new UnknownInjectedWallet(opts),
111
- new GameStop(opts),
112
- new ExodusEvm(opts),
113
72
  new ExodusSol(opts),
114
- new Opera(opts),
115
- ...((magicLinkProvider === null || magicLinkProvider === void 0 ? void 0 : magicLinkProvider.providerProjectId)
73
+ ...(((_a = apiProviders.magicLink) === null || _a === void 0 ? void 0 : _a.providerProjectId)
116
74
  ? [
117
- new EmailOTPMagicWalletConnector(Object.assign(Object.assign({}, opts), { apiKey: magicLinkProvider.providerProjectId, config: magicLinkConfig, defaultChainId: magicLinkProvider.defaultChainId })),
118
- new MagicSocialWalletConnector(Object.assign(Object.assign({}, opts), { apiKey: magicLinkProvider.providerProjectId, config: magicLinkConfig, defaultChainId: magicLinkProvider.defaultChainId })),
75
+ new EmailOTPMagicWalletConnector(Object.assign({}, opts)),
76
+ new MagicSocialWalletConnector(Object.assign({}, opts)),
119
77
  ]
120
78
  : []),
121
79
  new MyAlgoWalletConnector(),
122
80
  new ArgentX(),
123
81
  new Braavos(),
124
82
  new CoinbaseSolana(opts),
125
- new Frame(opts),
126
83
  new Lilico(opts),
127
- getMobileOrInjectedWallet(Object.assign(Object.assign({}, opts), { injectedWallet: new Zerion(opts), isWalletConnectV2: isWalletConnectV2Enabled, walletName: 'Zerion' })),
128
- //TODO: https://linear.app/dynamic-labs/issue/DYN-2127/rename-evmnetworks-to-networks-across-the-application
129
- getKeplerConnector({ evmNetworks: cosmosNetworkConfigs }),
130
- ...((vendorCredentials === null || vendorCredentials === void 0 ? void 0 : vendorCredentials.fortmatic)
131
- ? [
132
- new Fortmatic(Object.assign(Object.assign({}, opts), { apiKey: vendorCredentials.fortmatic })),
133
- ]
134
- : []),
135
- ...filtered,
136
- ];
84
+ new KeplrWalletConnector(opts),
85
+ ].map((wallet) => wallet.getMobileOrInstalledWallet());
137
86
  yield Promise.all(allWallets.map((wallet) => { var _a; return (_a = wallet.init) === null || _a === void 0 ? void 0 : _a.call(wallet); }));
138
87
  // Memoize the wallets
139
88
  const filteredWallets = filterWalletsForPlatform(allWallets);
@@ -162,20 +111,12 @@ const filterWalletsForPlatform = (wallets) => wallets.filter((wallet) => {
162
111
  return true;
163
112
  }
164
113
  else {
165
- return handleMobileWalletFilter(wallet, metadata);
114
+ return handleMobileWalletFilter(metadata);
166
115
  }
167
116
  });
168
- const handleMobileWalletFilter = (wallet, metadata) => {
117
+ const handleMobileWalletFilter = (metadata) => {
169
118
  if (!metadata.mobile)
170
119
  return false;
171
- /**
172
- * Custom check added with DYN-1489 for mobile version only:
173
- * it shows a WalletConnect listItem that wraps-up all the WalletConnect wallets
174
- * in a new wallet-list view.
175
- */
176
- if (wallet.isWalletConnect && wallet.name === 'WalletConnect') {
177
- return true;
178
- }
179
120
  /**
180
121
  * WalletConnect provides a "universal" and "native" deep link. They recommend using
181
122
  * the universal deep link over the native one due to UX differences, and our current
@@ -240,4 +181,4 @@ const getEnabledWallets = (props) => __awaiter(void 0, void 0, void 0, function*
240
181
  return allEnabledWallets;
241
182
  });
242
183
 
243
- export { filteredWalletConnectWallets, getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets };
184
+ export { getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets };