@dynamic-labs/multi-wallet 0.16.0-RC.0 → 0.16.0-RC.10

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 (122) hide show
  1. package/CHANGELOG.md +221 -1
  2. package/package.json +25 -21
  3. package/src/index.d.ts +4 -4
  4. package/src/index.js +8 -7
  5. package/src/index.js.map +1 -1
  6. package/src/multi-wallet.d.ts +1 -0
  7. package/src/multi-wallet.js +60 -51
  8. package/src/multi-wallet.js.map +1 -1
  9. package/src/types.d.ts +23 -41
  10. package/src/utils/CancellablePromise/CancellablePromise.d.ts +9 -0
  11. package/src/utils/CancellablePromise/CancellablePromise.js +32 -0
  12. package/src/utils/CancellablePromise/CancellablePromise.js.map +1 -0
  13. package/src/utils/CancellablePromise/index.d.ts +1 -0
  14. package/src/utils/CancellablePromise/index.js +6 -0
  15. package/src/utils/CancellablePromise/index.js.map +1 -0
  16. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.d.ts +3 -0
  17. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.js +52 -0
  18. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.js.map +1 -0
  19. package/src/utils/assignConfirmationScreenToProvider/index.d.ts +1 -0
  20. package/src/utils/assignConfirmationScreenToProvider/index.js +6 -0
  21. package/src/utils/assignConfirmationScreenToProvider/index.js.map +1 -0
  22. package/src/utils/getChainInfo/getChainInfo.d.ts +2 -0
  23. package/src/utils/getChainInfo/getChainInfo.js +58 -0
  24. package/src/utils/getChainInfo/getChainInfo.js.map +1 -0
  25. package/src/utils/getChainInfo/index.d.ts +1 -0
  26. package/src/utils/getChainInfo/index.js +6 -0
  27. package/src/utils/getChainInfo/index.js.map +1 -0
  28. package/src/utils/isEmailOTPWalletConnector/index.d.ts +1 -0
  29. package/src/utils/isEmailOTPWalletConnector/index.js +6 -0
  30. package/src/utils/isEmailOTPWalletConnector/index.js.map +1 -0
  31. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.d.ts +2 -0
  32. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.js +6 -0
  33. package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.js.map +1 -0
  34. package/src/utils/isFunction/index.d.ts +1 -0
  35. package/src/utils/isFunction/index.js +6 -0
  36. package/src/utils/isFunction/index.js.map +1 -0
  37. package/src/utils/isFunction/isFunction.d.ts +1 -0
  38. package/src/utils/isFunction/isFunction.js +7 -0
  39. package/src/utils/isFunction/isFunction.js.map +1 -0
  40. package/src/utils/message.d.ts +2 -1
  41. package/src/utils/message.js +7 -10
  42. package/src/utils/message.js.map +1 -1
  43. package/src/utils/walletConnect.d.ts +1 -4
  44. package/src/utils/walletConnect.js +15 -15
  45. package/src/utils/walletConnect.js.map +1 -1
  46. package/src/wallets/algorand/myalgo.d.ts +1 -0
  47. package/src/wallets/algorand/myalgo.js +3 -0
  48. package/src/wallets/algorand/myalgo.js.map +1 -1
  49. package/src/wallets/clients/walletConnect/walletConnect.d.ts +4 -4
  50. package/src/wallets/clients/walletConnect/walletConnect.js +5 -4
  51. package/src/wallets/clients/walletConnect/walletConnect.js.map +1 -1
  52. package/src/wallets/cosmos/getKeplrConnector.d.ts +6 -0
  53. package/src/wallets/cosmos/getKeplrConnector.js +17 -0
  54. package/src/wallets/cosmos/getKeplrConnector.js.map +1 -0
  55. package/src/wallets/cosmos/index.d.ts +1 -0
  56. package/src/wallets/cosmos/index.js +6 -0
  57. package/src/wallets/cosmos/index.js.map +1 -0
  58. package/src/wallets/cosmos/keplr.d.ts +98 -0
  59. package/src/wallets/cosmos/keplr.js +226 -0
  60. package/src/wallets/cosmos/keplr.js.map +1 -0
  61. package/src/wallets/cosmos/keplrWalletConnect.d.ts +8 -0
  62. package/src/wallets/cosmos/keplrWalletConnect.js +11 -0
  63. package/src/wallets/cosmos/keplrWalletConnect.js.map +1 -0
  64. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.d.ts +12 -0
  65. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js +56 -0
  66. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js.map +1 -0
  67. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/index.d.ts +1 -0
  68. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/index.js +6 -0
  69. package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/index.js.map +1 -0
  70. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.d.ts +16 -0
  71. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js +54 -0
  72. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js.map +1 -0
  73. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/index.d.ts +1 -0
  74. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/index.js +6 -0
  75. package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/index.js.map +1 -0
  76. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.d.ts +63 -0
  77. package/src/wallets/ethereum/{MagicLink.js → MagicConnector/MagicWalletConnector/MagicWalletConnector.js} +89 -67
  78. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js.map +1 -0
  79. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/index.d.ts +2 -0
  80. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/index.js +6 -0
  81. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/index.js.map +1 -0
  82. package/src/wallets/ethereum/MagicConnector/index.d.ts +3 -0
  83. package/src/wallets/ethereum/MagicConnector/index.js +7 -0
  84. package/src/wallets/ethereum/MagicConnector/index.js.map +1 -0
  85. package/src/wallets/ethereum/ethProvider.d.ts +1 -0
  86. package/src/wallets/ethereum/ethProvider.js +4 -0
  87. package/src/wallets/ethereum/ethProvider.js.map +1 -1
  88. package/src/wallets/ethereum/ethProviderHelper.d.ts +1 -1
  89. package/src/wallets/ethereum/ethProviderHelper.js +18 -11
  90. package/src/wallets/ethereum/ethProviderHelper.js.map +1 -1
  91. package/src/wallets/ethereum/injected/Dawn.d.ts +6 -0
  92. package/src/wallets/ethereum/injected/Dawn.js +13 -0
  93. package/src/wallets/ethereum/injected/Dawn.js.map +1 -0
  94. package/src/wallets/flow/flow-provider.d.ts +1 -0
  95. package/src/wallets/flow/flow-provider.js +3 -0
  96. package/src/wallets/flow/flow-provider.js.map +1 -1
  97. package/src/wallets/solana/solProvider.d.ts +1 -0
  98. package/src/wallets/solana/solProvider.js +4 -0
  99. package/src/wallets/solana/solProvider.js.map +1 -1
  100. package/src/wallets/starknet/braavos.d.ts +2 -1
  101. package/src/wallets/starknet/braavos.js +21 -0
  102. package/src/wallets/starknet/braavos.js.map +1 -1
  103. package/src/wallets/starknet/starknetProvider.d.ts +1 -0
  104. package/src/wallets/starknet/starknetProvider.js +3 -0
  105. package/src/wallets/starknet/starknetProvider.js.map +1 -1
  106. package/src/wallets/walletConnect/walletConnect.d.ts +1 -0
  107. package/src/wallets/walletConnect/walletConnect.js +19 -9
  108. package/src/wallets/walletConnect/walletConnect.js.map +1 -1
  109. package/src/wallets/walletConnect/walletConnectV2.d.ts +1 -0
  110. package/src/wallets/walletConnect/walletConnectV2.js +17 -7
  111. package/src/wallets/walletConnect/walletConnectV2.js.map +1 -1
  112. package/src/wallets/window.d.ts +9 -1
  113. package/src/data/wallet-connect-wallets.json +0 -9926
  114. package/src/data/wallet-links.json +0 -3912
  115. package/src/fixtures.d.ts +0 -11
  116. package/src/fixtures.js +0 -67
  117. package/src/fixtures.js.map +0 -1
  118. package/src/utils/walletLinks.d.ts +0 -13
  119. package/src/utils/walletLinks.js +0 -12
  120. package/src/utils/walletLinks.js.map +0 -1
  121. package/src/wallets/ethereum/MagicLink.d.ts +0 -45
  122. package/src/wallets/ethereum/MagicLink.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,225 @@
1
1
 
2
- ## [0.16.0-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.15.0...v0.16.0-RC.0) (2023-03-01)
2
+ ## [0.16.0-RC.10](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.9...v0.16.0-RC.10) (2023-03-31)
3
+
4
+
5
+ ### Features
6
+
7
+ * **DYN-2093:** add new_user boolean flag to UserProfile ([4150047](https://github.com/dynamic-labs/DynamicAuth/commit/4150047ae5598ec949f1e1e4484d08be6e84eba5))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **magic-otp:** reload the page on click edit email ([11af506](https://github.com/dynamic-labs/DynamicAuth/commit/11af506b50462b8e121d5b95b1b1ec53ed09992b))
13
+ * **multi-wallet:** display OTP view when reconnecting wallet ([4a3ad0a](https://github.com/dynamic-labs/DynamicAuth/commit/4a3ad0a96912edba8451697252de47ea5858fe31))
14
+ * **Portal:** allow for custom element id ([d27589d](https://github.com/dynamic-labs/DynamicAuth/commit/d27589de093e0933c69041a90fe18bb35325cfc8))
15
+
16
+ ## [0.16.0-RC.9](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.8...v0.16.0-RC.9) (2023-03-30)
17
+
18
+
19
+ ### Features
20
+
21
+ * **DYN-2030:** cosmos/keplr integration ([#1756](https://github.com/dynamic-labs/DynamicAuth/issues/1756)) ([1521dac](https://github.com/dynamic-labs/DynamicAuth/commit/1521dac370b6dbecfedf7eaa367c436ce4d9286d))
22
+
23
+ ## [0.16.0-RC.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.7...v0.16.0-RC.8) (2023-03-29)
24
+
25
+
26
+ ### Features
27
+
28
+ * **DYN-2030:** filter keplr wallets ([6f38c81](https://github.com/dynamic-labs/DynamicAuth/commit/6f38c818d1489f118d10703f180d20e79b262c2f))
29
+ * **Keplr:** prepare basic Keplr, Cosmos connector ([0316736](https://github.com/dynamic-labs/DynamicAuth/commit/03167364d78218aa7b93dc24333a1172826411c7))
30
+ * **magic_otp:** enable magic otp ([cd073a3](https://github.com/dynamic-labs/DynamicAuth/commit/cd073a3a50ccb268a0bbd7f1462a85cf263e34e3))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * make depedencies patch only ([ac23c2b](https://github.com/dynamic-labs/DynamicAuth/commit/ac23c2bb315d650a6d8727893b8997e98e8a0d86))
36
+ * multiple improvments for keplr integration ([119da9b](https://github.com/dynamic-labs/DynamicAuth/commit/119da9be7c1513ef4e4805c832a0e22f9a2fbdde))
37
+ * pin @hcaptcha/react-hcaptcha to patch updates only ([c173f14](https://github.com/dynamic-labs/DynamicAuth/commit/c173f1448ad3db8c9257cc74f7bb5d9cfaabc9f3))
38
+ * show all the wallets if they are less than number of wallets to show ([17258b1](https://github.com/dynamic-labs/DynamicAuth/commit/17258b19fcea4da386f20d01877fb6dc8e54fc83))
39
+
40
+ ## [0.16.0-RC.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.6...v0.16.0-RC.7) (2023-03-27)
41
+
42
+
43
+ ### Features
44
+
45
+ * support phantom evm in non-override mode ([6505dfa](https://github.com/dynamic-labs/DynamicAuth/commit/6505dfa15640c775bc3c9a25c830b64ad9d5c4ce))
46
+ * update user profile ui ([#1670](https://github.com/dynamic-labs/DynamicAuth/issues/1670)) ([13220fa](https://github.com/dynamic-labs/DynamicAuth/commit/13220faee806a94d3594c21f61cf00ad9eb23dbf))
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * **CustomerCallbacks:** make sure that we always call customer callbacks ([5013508](https://github.com/dynamic-labs/DynamicAuth/commit/5013508207d3c55a591b4e781e12049757528526))
52
+ * do not filter out magic even if all chains are disabled ([6970129](https://github.com/dynamic-labs/DynamicAuth/commit/697012962909427ca30c4426e86c7b080261e76d))
53
+ * **email_wallet:** display loading state for magic auth ([ebab810](https://github.com/dynamic-labs/DynamicAuth/commit/ebab81041c7988cd6b239ab4614755b693b6f3b4))
54
+ * exclude flow from primary wallet sync hook ([d6fc719](https://github.com/dynamic-labs/DynamicAuth/commit/d6fc719f9c382b66666a7aebdbea71b92e9df43b))
55
+ * **magic_wallet:** disconnect user when magic is logged out ([8573cb5](https://github.com/dynamic-labs/DynamicAuth/commit/8573cb50231da281c534d3f83a05aa3f7b55bd14))
56
+ * **magic_wallet:** prevent failure when email is edited ([dd7cbbb](https://github.com/dynamic-labs/DynamicAuth/commit/dd7cbbb823aa65ef1df80a5dcf909aff961c37ce))
57
+ * **NetworkPicker:** make sure that we use correct network picker on 'network not supported' step ([2062d5f](https://github.com/dynamic-labs/DynamicAuth/commit/2062d5fb2ad68c2b44c70445c0146cc7b9ee56bc))
58
+ * remove dep on multi-wallet in wagmi connector ([e8069b3](https://github.com/dynamic-labs/DynamicAuth/commit/e8069b30a39728e8175880838e2bd3e30c0adb1f))
59
+ * wallet transfer icon size ([77409bd](https://github.com/dynamic-labs/DynamicAuth/commit/77409bd0c1f674be26c93786235bd9f95d5b29ad))
60
+
61
+ ## [0.16.0-RC.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.5...v0.16.0-RC.6) (2023-03-21)
62
+
63
+
64
+ ### Features
65
+
66
+ * add Braavos in-App browser navigation ([5c59e5a](https://github.com/dynamic-labs/DynamicAuth/commit/5c59e5a24f00a0ed74561a30a42ac3ec0b801998))
67
+ * add Dawn wallet ([6fc9135](https://github.com/dynamic-labs/DynamicAuth/commit/6fc91354083433cbebbdd8fd593db78eea7307d7))
68
+ * add getDeepLink to WalletConnector ([7af621c](https://github.com/dynamic-labs/DynamicAuth/commit/7af621ccc35875c296b7698c5c474f53ba702dca))
69
+ * add new link-wallet icon ([bf8b7ce](https://github.com/dynamic-labs/DynamicAuth/commit/bf8b7ce35612a73b3b4b0d4ee670c4294c9ae9a2))
70
+ * change buttonSize prop name to buttonPadding and add a padding-none variant ([91ec635](https://github.com/dynamic-labs/DynamicAuth/commit/91ec63520dbc1f87f351c1b1716d4a07068b34e0))
71
+ * create LogoutButton ([6c76820](https://github.com/dynamic-labs/DynamicAuth/commit/6c76820d4c23122e1227372c7badad63dca28ad1))
72
+ * **DYN-2039:** expose defaultNumberOfWalletsToShow ([bf069b9](https://github.com/dynamic-labs/DynamicAuth/commit/bf069b9810ef64f1872f8f68f27c3d950ce87efd))
73
+ * **DYN-2044:** update network switcher in kyc step ([687d38c](https://github.com/dynamic-labs/DynamicAuth/commit/687d38ce7f844e26ea288389124e65e392fd8429))
74
+ * fix tests ([8977740](https://github.com/dynamic-labs/DynamicAuth/commit/8977740f0f8e75e4dcba1fe0fad773ba4c5030ac))
75
+ * **magic:** add network/testMode/locale/redirectURI magic configuration ([34b7a97](https://github.com/dynamic-labs/DynamicAuth/commit/34b7a9721c0d67e13809e44ca2983bcbb2240b22))
76
+ * **magic:** sendTransaction/signMessage modal improvements ([6ee448e](https://github.com/dynamic-labs/DynamicAuth/commit/6ee448ecf726905934e1a5d8e7c23bc2e9b77ee9))
77
+ * make profile the 1st option in the widget switcher ([9693f47](https://github.com/dynamic-labs/DynamicAuth/commit/9693f47279d92ebacc13e5c8e08a24a002d0e8c6))
78
+ * move LinkWalletIcon to iconic ([76ba74d](https://github.com/dynamic-labs/DynamicAuth/commit/76ba74d8feda15b2ee4903e441d5394e4fe55ce3))
79
+ * move logout button from widget header to index view footer and profile view footer ([c919005](https://github.com/dynamic-labs/DynamicAuth/commit/c919005ccd43444f734bdafd6e9876e6bf59327d))
80
+ * move widget switcher to the top ([e038744](https://github.com/dynamic-labs/DynamicAuth/commit/e0387444813dadc8f4494edca152649f9e3a3a56))
81
+ * set max height to onboarding user data form ([a25129e](https://github.com/dynamic-labs/DynamicAuth/commit/a25129ed72460b392fa54cdc85e7d7276ffc826b))
82
+ * set max height to user profile view ([c207b21](https://github.com/dynamic-labs/DynamicAuth/commit/c207b2111bb39189487e08b95889ab9977d9db81))
83
+ * update buttons aligment in footer ([e6f3638](https://github.com/dynamic-labs/DynamicAuth/commit/e6f36384a902db03b5ae7aec0909192a0ddf5776))
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * add missing width to dynamic logo to work with webkit browsers ([c03cdfb](https://github.com/dynamic-labs/DynamicAuth/commit/c03cdfb6577f6a9b6c0432befb6bec57fa89afa0))
89
+ * **DYN-2045:** no access icon is too big ([8c34ab7](https://github.com/dynamic-labs/DynamicAuth/commit/8c34ab74643f0c8bf06bedfda7f8487f8d0591fc))
90
+ * **DynamicContext:** use the app name and logo from project settings ([0a08dc8](https://github.com/dynamic-labs/DynamicAuth/commit/0a08dc80ab699e3c4b499e1180dac2f22b7b1604))
91
+ * icon with spinner inner icon size ([b8f94e2](https://github.com/dynamic-labs/DynamicAuth/commit/b8f94e2d4239bd2992e7918dbd27848f3878825e))
92
+ * PendingConnectView icon size ([a801edf](https://github.com/dynamic-labs/DynamicAuth/commit/a801edff524e8993b8f6a6723ca4c0eca0349c01))
93
+ * remove IsBrowser from dynamic wagmi connector ([f89d5c0](https://github.com/dynamic-labs/DynamicAuth/commit/f89d5c0b6368d873181bdfc51656db638d8c2692))
94
+ * remove scroll copy ([601774c](https://github.com/dynamic-labs/DynamicAuth/commit/601774c12debc02f3f14a772c1cf54a792addded))
95
+
96
+ ## [0.16.0-RC.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.4...v0.16.0-RC.5) (2023-03-16)
97
+
98
+
99
+ ### Features
100
+
101
+ * add modal backdrop css variables ([8b872d4](https://github.com/dynamic-labs/DynamicAuth/commit/8b872d403437da4232698dd059ad727aec74c24b))
102
+ * add optional evmNetworks prop to dynamic wagmi connector ([29f1a95](https://github.com/dynamic-labs/DynamicAuth/commit/29f1a951b96ab17025da60e95cceeda2e7d644e9))
103
+ * add optional evmNetworks prop to dynamic wagmi connector ([62da3fa](https://github.com/dynamic-labs/DynamicAuth/commit/62da3fa024480c65eea7343037101e9a65b79ffa))
104
+ * implement @dynamic-labs/wallet-book ([f6ebbee](https://github.com/dynamic-labs/DynamicAuth/commit/f6ebbee99786409cb8ee037a53942bac3aab1ca6))
105
+
106
+
107
+ ### Bug Fixes
108
+
109
+ * **bundle_size:** move bundle size to its own CI job ([6870845](https://github.com/dynamic-labs/DynamicAuth/commit/68708457464f7d740e055cda00dd5c26f42d8c83))
110
+ * coolwallet icon id ([c48e1bf](https://github.com/dynamic-labs/DynamicAuth/commit/c48e1bf4331594d11f3fceee17fc726a7f28970d))
111
+ * **DYN-2016:** User is not able to logout when 'wallet not connected' promp shows ([a19b113](https://github.com/dynamic-labs/DynamicAuth/commit/a19b1132290c5602c4cbfb24240588d2343da0d6))
112
+ * image-update-npm ([ae05791](https://github.com/dynamic-labs/DynamicAuth/commit/ae05791434c6f12cc3953bcda33d430d15b056d0))
113
+ * **magic_wallet:** add confirmation to transactions ([14d0e20](https://github.com/dynamic-labs/DynamicAuth/commit/14d0e2069e64a393d82f97d7214d8449e930b341))
114
+ * **react-focus-lock:** ensure it will not fight with blocto focus ([631f0f9](https://github.com/dynamic-labs/DynamicAuth/commit/631f0f9c6bdeca47baec65078f996e0ae26bb905))
115
+ * **UserAddress:** use correct user address in UserAddress component ([9ea8754](https://github.com/dynamic-labs/DynamicAuth/commit/9ea875482fe2f27aaeb97a7186596f85489a44b4))
116
+ * **UserProfile:** Submit button should be active after changes are made ([3d36e2e](https://github.com/dynamic-labs/DynamicAuth/commit/3d36e2e374646f7981765845a2c547af969927a1))
117
+
118
+ ## [0.16.0-RC.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.3...v0.16.0-RC.4) (2023-03-10)
119
+
120
+
121
+ ### Features
122
+
123
+ * Show toolkit on user profile open ([fe373be](https://github.com/dynamic-labs/DynamicAuth/commit/fe373be16b54727bb6596b6bae3e42afa3b3262b))
124
+
125
+
126
+ ### Bug Fixes
127
+
128
+ * **DYN-144:** Dynamic widget should show when multiWalletWidgetState changes ([1e0ae27](https://github.com/dynamic-labs/DynamicAuth/commit/1e0ae27bb99d95a2e436f011302c532dfecfc3db))
129
+ * **dynamic_context:** use token to check if is authenticated ([88e4de4](https://github.com/dynamic-labs/DynamicAuth/commit/88e4de44636078bfc2408130ec526d75f0909f93))
130
+ * update validateAuthUser to account for verified credential with emails ([4d3ab68](https://github.com/dynamic-labs/DynamicAuth/commit/4d3ab6812525efa9e042374150ba59fe47596212))
131
+
132
+ ## [0.16.0-RC.3](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.2...v0.16.0-RC.3) (2023-03-08)
133
+
134
+ ## [0.16.0-RC.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.1...v0.16.0-RC.2) (2023-03-08)
135
+
136
+
137
+ ### Features
138
+
139
+ * add feedback to the button component ([cb8e79b](https://github.com/dynamic-labs/DynamicAuth/commit/cb8e79b230eda12a76141b0bbe8b6df8a8a8bd55))
140
+ * **DYN-1792:** install hCaptcha ([d981a10](https://github.com/dynamic-labs/DynamicAuth/commit/d981a10180b352c26518b9b20580bdb06f1f9c46))
141
+ * **LoginWithEmail:** hide wallets in login with email view when chains are disabled ([ffbea58](https://github.com/dynamic-labs/DynamicAuth/commit/ffbea582d32ef88bfa6e1b5cfb6dce3cdc4b0601))
142
+ * **magic-link:** add send transaction confirmation gate ([77d6ac9](https://github.com/dynamic-labs/DynamicAuth/commit/77d6ac94b33776d838aabb3383ee5a2ad1ce9e4f))
143
+ * save authMode to localstorage ([e0ba68c](https://github.com/dynamic-labs/DynamicAuth/commit/e0ba68c148db69229f2dd53baa6c19764a13d3df))
144
+
145
+
146
+ ### Bug Fixes
147
+
148
+ * **DYN-2006:** broken user profile on single wallet and email login ([7937d7b](https://github.com/dynamic-labs/DynamicAuth/commit/7937d7be855f03e9772a2c7b37fa3f2ba2775a58))
149
+ * **LoginWithEmail:** update email verifaction success message background color to dynamic-connection-green-2 ([cc86957](https://github.com/dynamic-labs/DynamicAuth/commit/cc86957ba025a313175034478ac61f7d228e8472))
150
+ * network picker for connect-only ([561bf95](https://github.com/dynamic-labs/DynamicAuth/commit/561bf951fa8fb9a0ba8b686d9c11458df40b040b))
151
+ * not opening the widget ([810a400](https://github.com/dynamic-labs/DynamicAuth/commit/810a4002242c43679b25fa158a44b9bf74ea1702))
152
+ * update profile to work with connect-only ([3577c53](https://github.com/dynamic-labs/DynamicAuth/commit/3577c5337db4f08e2943ed3ed2d920586d9bf8cc))
153
+
154
+ ## [0.16.0-RC.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.15.1-RC.1...v0.16.0-RC.1) (2023-03-07)
155
+
156
+
157
+ ### ⚠ BREAKING CHANGES
158
+
159
+ * as we move to use verifiedCredentials instead of
160
+ blockchainAccounts we blockChainAccount is removed from the user's
161
+ object.
162
+
163
+ ### Features
164
+
165
+ * replace blockchainAccounts with verifiedCredentials ([5f32e4e](https://github.com/dynamic-labs/DynamicAuth/commit/5f32e4e038e7888c1a8993dc381f23688758ce46))
166
+
167
+ ## [0.16.0-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.15.1-RC.1...v0.16.0-RC.0) (2023-03-07)
168
+
169
+
170
+ ### ⚠ BREAKING CHANGES
171
+
172
+ * as we move to use verifiedCredentials instead of
173
+ blockchainAccounts we blockChainAccount is removed from the user's
174
+ object.
175
+
176
+ ### Features
177
+
178
+ * replace blockchainAccounts with verifiedCredentials ([5f32e4e](https://github.com/dynamic-labs/DynamicAuth/commit/5f32e4e038e7888c1a8993dc381f23688758ce46))
179
+
180
+ ### [0.15.1-RC.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.0...v0.15.1-RC.1) (2023-03-06)
181
+
182
+
183
+ ### Features
184
+
185
+ * **DYN-1918:** adds test to verify zIndexes ([298571b](https://github.com/dynamic-labs/DynamicAuth/commit/298571b42e25db54bf96921e1a5b5309a455b578))
186
+ * setup EmvNetworks for Magic Link connector ([b9e5a1e](https://github.com/dynamic-labs/DynamicAuth/commit/b9e5a1eb4c3da4da7d4a6bbaadf2c18901209a2e))
187
+ * **Toolkit:** hide toolkit on mobile ([223f608](https://github.com/dynamic-labs/DynamicAuth/commit/223f608c659d8a2c4651c1da440ebec276455316))
188
+ * **WalletListItem:** add handleWalletItemClick to useWalletItemActions hook ([72083e0](https://github.com/dynamic-labs/DynamicAuth/commit/72083e040802760d8e5887456f0162ef037f77e6))
189
+ * **WalletListItem:** create getWalletListItemLabel helper method ([42920a7](https://github.com/dynamic-labs/DynamicAuth/commit/42920a7b35f21cfa9ed402352f1cda5d7921f64b))
190
+ * **WalletListItem:** simplify WalletListItem ([95c0e71](https://github.com/dynamic-labs/DynamicAuth/commit/95c0e7106fb64b8441a6f65995a61d7638724067))
191
+
192
+
193
+ ### Bug Fixes
194
+
195
+ * no access button provides to login with email or wallet list ([20c0dfc](https://github.com/dynamic-labs/DynamicAuth/commit/20c0dfc2258001eb7f8e0b085d2b79f68bb3c01a))
196
+ * number of walllets show numbers under 10 ([7876cf6](https://github.com/dynamic-labs/DynamicAuth/commit/7876cf6f0b3188e1aabc8bb37753a34de7c35288))
197
+ * **UserProfile:** remove borderBottom in UserProfileField component ([9f848fe](https://github.com/dynamic-labs/DynamicAuth/commit/9f848fe6fa7e3ba30278ad8d6117acf2687b31aa))
198
+ * **UserProfile:** widget is visible after relogin ([b2efbad](https://github.com/dynamic-labs/DynamicAuth/commit/b2efbadefc047183d4ae6c97a3d230fa77780795))
199
+ * **wallet-ui-utils:** add confirmation screen to wallet provider ([8341c8b](https://github.com/dynamic-labs/DynamicAuth/commit/8341c8bab559dffc2fc4a7bca70a8fa6dcb797c2))
200
+ * **WalletList:** remove console.logs from walletListBuilder spec ([aa9d088](https://github.com/dynamic-labs/DynamicAuth/commit/aa9d088fc199434258482024ed1310a4a70aa85d))
201
+
202
+ ### [0.15.1-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0-RC.0...v0.15.1-RC.0) (2023-03-06)
203
+
204
+
205
+ ### Features
206
+
207
+ * **DYN-1918:** adds test to verify zIndexes ([298571b](https://github.com/dynamic-labs/DynamicAuth/commit/298571b42e25db54bf96921e1a5b5309a455b578))
208
+ * setup EmvNetworks for Magic Link connector ([b9e5a1e](https://github.com/dynamic-labs/DynamicAuth/commit/b9e5a1eb4c3da4da7d4a6bbaadf2c18901209a2e))
209
+ * **Toolkit:** hide toolkit on mobile ([223f608](https://github.com/dynamic-labs/DynamicAuth/commit/223f608c659d8a2c4651c1da440ebec276455316))
210
+ * **WalletListItem:** add handleWalletItemClick to useWalletItemActions hook ([72083e0](https://github.com/dynamic-labs/DynamicAuth/commit/72083e040802760d8e5887456f0162ef037f77e6))
211
+ * **WalletListItem:** create getWalletListItemLabel helper method ([42920a7](https://github.com/dynamic-labs/DynamicAuth/commit/42920a7b35f21cfa9ed402352f1cda5d7921f64b))
212
+ * **WalletListItem:** simplify WalletListItem ([95c0e71](https://github.com/dynamic-labs/DynamicAuth/commit/95c0e7106fb64b8441a6f65995a61d7638724067))
213
+
214
+
215
+ ### Bug Fixes
216
+
217
+ * no access button provides to login with email or wallet list ([20c0dfc](https://github.com/dynamic-labs/DynamicAuth/commit/20c0dfc2258001eb7f8e0b085d2b79f68bb3c01a))
218
+ * number of walllets show numbers under 10 ([7876cf6](https://github.com/dynamic-labs/DynamicAuth/commit/7876cf6f0b3188e1aabc8bb37753a34de7c35288))
219
+ * **UserProfile:** remove borderBottom in UserProfileField component ([9f848fe](https://github.com/dynamic-labs/DynamicAuth/commit/9f848fe6fa7e3ba30278ad8d6117acf2687b31aa))
220
+ * **UserProfile:** widget is visible after relogin ([b2efbad](https://github.com/dynamic-labs/DynamicAuth/commit/b2efbadefc047183d4ae6c97a3d230fa77780795))
221
+ * **wallet-ui-utils:** add confirmation screen to wallet provider ([8341c8b](https://github.com/dynamic-labs/DynamicAuth/commit/8341c8bab559dffc2fc4a7bca70a8fa6dcb797c2))
222
+ * **WalletList:** remove console.logs from walletListBuilder spec ([aa9d088](https://github.com/dynamic-labs/DynamicAuth/commit/aa9d088fc199434258482024ed1310a4a70aa85d))
3
223
 
4
224
  ## [0.15.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.14.31...v0.15.0) (2023-03-01)
5
225
 
package/package.json CHANGED
@@ -1,30 +1,35 @@
1
1
  {
2
2
  "name": "@dynamic-labs/multi-wallet",
3
- "version": "0.16.0-RC.0",
3
+ "version": "0.16.0-RC.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
7
7
  "directory": "packages/multi-wallet"
8
8
  },
9
9
  "dependencies": {
10
- "buffer": "^6.0.3",
11
- "@dynamic-labs/sdk-api": "0.0.152",
12
- "starknet": "^3.19.0",
13
- "ethers": "^5.7.2",
14
- "@randlabs/myalgo-connect": "^1.4.2",
15
- "@solana/web3.js": "^1.70.1",
16
- "@coinbase/wallet-sdk": "^3.6.2",
17
- "@walletconnect/client": "^1.8.0",
18
- "@blocto/sdk": "^0.3.3",
19
- "fortmatic": "^2.4.0",
20
- "@onflow/fcl": "^1.3.2",
21
- "get-starknet": "^1.5.0",
22
- "@walletconnect/ethereum-provider": "^1.8.0",
23
- "@walletconnect/universal-provider": "^2.4.2",
24
- "tslib": "^2.4.1",
25
- "magic-sdk": "^13.1.0",
26
- "@dynamic-labs/wallet-connector-core": "0.16.0-RC.0",
27
- "@dynamic-labs/logger": "0.16.0-RC.0"
10
+ "@blocto/sdk": "0.3.3",
11
+ "@coinbase/wallet-sdk": "3.6.4",
12
+ "@dynamic-labs/iconic": "0.1.16",
13
+ "@dynamic-labs/sdk-api": "0.0.171",
14
+ "@dynamic-labs/wallet-book": "0.0.7",
15
+ "@keplr-wallet/types": "0.11.51",
16
+ "@onflow/fcl": "1.3.2",
17
+ "@randlabs/myalgo-connect": "1.4.2",
18
+ "@solana/web3.js": "1.70.1",
19
+ "@walletconnect/client": "1.8.0",
20
+ "@walletconnect/ethereum-provider": "1.8.0",
21
+ "@walletconnect/universal-provider": "2.4.2",
22
+ "buffer": "6.0.3",
23
+ "ethers": "5.7.2",
24
+ "fortmatic": "2.4.0",
25
+ "get-starknet": "1.5.0",
26
+ "magic-sdk": "13.6.2",
27
+ "react": "18.2.0",
28
+ "react-dom": "18.2.0",
29
+ "starknet": "3.19.0",
30
+ "tslib": "2.4.1",
31
+ "@dynamic-labs/logger": "0.16.0-RC.10",
32
+ "@dynamic-labs/wallet-connector-core": "0.16.0-RC.10"
28
33
  },
29
34
  "devDependencies": {
30
35
  "@walletconnect/types": "^2.2.1"
@@ -37,6 +42,5 @@
37
42
  "author": "Dynamic Labs, Inc.",
38
43
  "license": "MIT",
39
44
  "main": "./src/index.js",
40
- "types": "./src/index.d.ts",
41
- "peerDependencies": {}
45
+ "types": "./src/index.d.ts"
42
46
  }
package/src/index.d.ts CHANGED
@@ -4,17 +4,17 @@ export * from './types';
4
4
  export * from './errors';
5
5
  export * from './rpcProviders';
6
6
  export * from './utils/logger';
7
- export * from './wallets/ethereum/MagicLink';
7
+ export * from './wallets/ethereum/MagicConnector';
8
8
  export { generateMessageToSign } from './utils/message';
9
9
  export { isIPad, isIPhone, isMobile } from './utils/isMobile';
10
10
  export { normalizeWalletName } from './utils/normalizeWalletName';
11
11
  export { isEmailWalletConnector } from './utils/isEmailWalletConnector';
12
- export { walletMetadata, getWalletConnectMetadata, } from './utils/walletConnect';
13
- export { getWalletLinks } from './utils/walletLinks';
14
- export type { BrowserName, WalletLinks } from './utils/walletLinks';
12
+ export { isEmailOTPWalletConnector } from './utils/isEmailOTPWalletConnector';
13
+ export { getChainInfo } from './utils/getChainInfo';
15
14
  export { getWalletConnectorByName } from './utils/getWalletConnectorByName';
16
15
  export * from './wallets/clients/walletConnect';
17
16
  export * from './wallets/clients/coinbase';
18
17
  export type { EvmNetwork } from './wallets/ethereum/evm-network';
18
+ export { Keplr } from './wallets/cosmos/keplr';
19
19
  export * from './utils/isSameAddress';
20
20
  export { defaultStarknetTypedDataDomain } from './wallets/constants';
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultStarknetTypedDataDomain = exports.getWalletConnectorByName = exports.getWalletLinks = exports.getWalletConnectMetadata = exports.walletMetadata = exports.isEmailWalletConnector = exports.normalizeWalletName = exports.isMobile = exports.isIPhone = exports.isIPad = exports.generateMessageToSign = void 0;
3
+ exports.defaultStarknetTypedDataDomain = exports.Keplr = exports.getWalletConnectorByName = exports.getChainInfo = exports.isEmailOTPWalletConnector = exports.isEmailWalletConnector = exports.normalizeWalletName = exports.isMobile = exports.isIPhone = exports.isIPad = exports.generateMessageToSign = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  require("./polyfills");
6
6
  tslib_1.__exportStar(require("./multi-wallet"), exports);
@@ -8,7 +8,7 @@ tslib_1.__exportStar(require("./types"), exports);
8
8
  tslib_1.__exportStar(require("./errors"), exports);
9
9
  tslib_1.__exportStar(require("./rpcProviders"), exports);
10
10
  tslib_1.__exportStar(require("./utils/logger"), exports);
11
- tslib_1.__exportStar(require("./wallets/ethereum/MagicLink"), exports);
11
+ tslib_1.__exportStar(require("./wallets/ethereum/MagicConnector"), exports);
12
12
  var message_1 = require("./utils/message");
13
13
  Object.defineProperty(exports, "generateMessageToSign", { enumerable: true, get: function () { return message_1.generateMessageToSign; } });
14
14
  var isMobile_1 = require("./utils/isMobile");
@@ -19,15 +19,16 @@ var normalizeWalletName_1 = require("./utils/normalizeWalletName");
19
19
  Object.defineProperty(exports, "normalizeWalletName", { enumerable: true, get: function () { return normalizeWalletName_1.normalizeWalletName; } });
20
20
  var isEmailWalletConnector_1 = require("./utils/isEmailWalletConnector");
21
21
  Object.defineProperty(exports, "isEmailWalletConnector", { enumerable: true, get: function () { return isEmailWalletConnector_1.isEmailWalletConnector; } });
22
- var walletConnect_1 = require("./utils/walletConnect");
23
- Object.defineProperty(exports, "walletMetadata", { enumerable: true, get: function () { return walletConnect_1.walletMetadata; } });
24
- Object.defineProperty(exports, "getWalletConnectMetadata", { enumerable: true, get: function () { return walletConnect_1.getWalletConnectMetadata; } });
25
- var walletLinks_1 = require("./utils/walletLinks");
26
- Object.defineProperty(exports, "getWalletLinks", { enumerable: true, get: function () { return walletLinks_1.getWalletLinks; } });
22
+ var isEmailOTPWalletConnector_1 = require("./utils/isEmailOTPWalletConnector");
23
+ Object.defineProperty(exports, "isEmailOTPWalletConnector", { enumerable: true, get: function () { return isEmailOTPWalletConnector_1.isEmailOTPWalletConnector; } });
24
+ var getChainInfo_1 = require("./utils/getChainInfo");
25
+ Object.defineProperty(exports, "getChainInfo", { enumerable: true, get: function () { return getChainInfo_1.getChainInfo; } });
27
26
  var getWalletConnectorByName_1 = require("./utils/getWalletConnectorByName");
28
27
  Object.defineProperty(exports, "getWalletConnectorByName", { enumerable: true, get: function () { return getWalletConnectorByName_1.getWalletConnectorByName; } });
29
28
  tslib_1.__exportStar(require("./wallets/clients/walletConnect"), exports);
30
29
  tslib_1.__exportStar(require("./wallets/clients/coinbase"), exports);
30
+ var keplr_1 = require("./wallets/cosmos/keplr");
31
+ Object.defineProperty(exports, "Keplr", { enumerable: true, get: function () { return keplr_1.Keplr; } });
31
32
  tslib_1.__exportStar(require("./utils/isSameAddress"), exports);
32
33
  var constants_1 = require("./wallets/constants");
33
34
  Object.defineProperty(exports, "defaultStarknetTypedDataDomain", { enumerable: true, get: function () { return constants_1.defaultStarknetTypedDataDomain; } });
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/multi-wallet/src/index.ts"],"names":[],"mappings":";;;;AAAA,uBAAqB;AAErB,yDAA+B;AAC/B,kDAAwB;AACxB,mDAAyB;AACzB,yDAA+B;AAC/B,yDAA+B;AAC/B,uEAA6C;AAE7C,2CAAwD;AAA/C,gHAAA,qBAAqB,OAAA;AAC9B,6CAA8D;AAArD,kGAAA,MAAM,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAEnC,mEAAkE;AAAzD,0HAAA,mBAAmB,OAAA;AAC5B,yEAAwE;AAA/D,gIAAA,sBAAsB,OAAA;AAE/B,uDAG+B;AAF7B,+GAAA,cAAc,OAAA;AACd,yHAAA,wBAAwB,OAAA;AAE1B,mDAAqD;AAA5C,6GAAA,cAAc,OAAA;AAEvB,6EAA4E;AAAnE,oIAAA,wBAAwB,OAAA;AAEjC,0EAAgD;AAChD,qEAA2C;AAI3C,gEAAsC;AAEtC,iDAAqE;AAA5D,2HAAA,8BAA8B,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/multi-wallet/src/index.ts"],"names":[],"mappings":";;;;AAAA,uBAAqB;AAErB,yDAA+B;AAC/B,kDAAwB;AACxB,mDAAyB;AACzB,yDAA+B;AAC/B,yDAA+B;AAC/B,4EAAkD;AAElD,2CAAwD;AAA/C,gHAAA,qBAAqB,OAAA;AAC9B,6CAA8D;AAArD,kGAAA,MAAM,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAEnC,mEAAkE;AAAzD,0HAAA,mBAAmB,OAAA;AAC5B,yEAAwE;AAA/D,gIAAA,sBAAsB,OAAA;AAC/B,+EAA8E;AAArE,sIAAA,yBAAyB,OAAA;AAClC,qDAAoD;AAA3C,4GAAA,YAAY,OAAA;AACrB,6EAA4E;AAAnE,oIAAA,wBAAwB,OAAA;AAEjC,0EAAgD;AAChD,qEAA2C;AAI3C,gDAA+C;AAAtC,8FAAA,KAAK,OAAA;AAEd,gEAAsC;AAEtC,iDAAqE;AAA5D,2HAAA,8BAA8B,OAAA"}
@@ -6,6 +6,7 @@ export declare const getSupportedWallets: GetSupportedWallets;
6
6
  export declare const getSupportedChainsForWalletConnector: (walletConnector: WalletConnector) => Chain[];
7
7
  export declare const getEnabledWallets: (props: {
8
8
  enabledChains: Chain[];
9
+ enabledNetworks: number[];
9
10
  getSupportedWalletOpts: GetSupportedWalletsOpts;
10
11
  installed: boolean;
11
12
  }) => Promise<WalletConnector[]>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEnabledWallets = exports.getSupportedChainsForWalletConnector = exports.getSupportedWallets = exports.filteredWalletConnectWallets = exports.phantomLedgerWalletName = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const wallet_book_1 = require("@dynamic-labs/wallet-book");
5
6
  const phantom_1 = tslib_1.__importDefault(require("./wallets/solana/phantom"));
6
7
  const coinbase_1 = tslib_1.__importDefault(require("./wallets/ethereum/coinbase"));
7
8
  const slope_1 = tslib_1.__importDefault(require("./wallets/solana/slope"));
@@ -10,7 +11,6 @@ const glow_1 = tslib_1.__importDefault(require("./wallets/solana/glow"));
10
11
  const blocto_1 = tslib_1.__importDefault(require("./wallets/flow/blocto"));
11
12
  const dapper_1 = tslib_1.__importDefault(require("./wallets/flow/dapper"));
12
13
  const isMobile_1 = require("./utils/isMobile");
13
- const walletLinks_1 = require("./utils/walletLinks");
14
14
  const walletConnect_1 = require("./utils/walletConnect");
15
15
  const myalgo_1 = tslib_1.__importDefault(require("./wallets/algorand/myalgo"));
16
16
  const BraveEvm_1 = tslib_1.__importDefault(require("./wallets/ethereum/injected/BraveEvm"));
@@ -34,10 +34,11 @@ const getMetaMaskConnector_1 = require("./wallets/getMetaMaskConnector");
34
34
  const getTrustConnector_1 = require("./wallets/getTrustConnector");
35
35
  const getWalletConnectConnector_1 = require("./wallets/getWalletConnectConnector");
36
36
  const initializeWalletProviders_1 = require("./wallets/initializeWalletProviders");
37
- const logger_1 = require("./utils/logger");
37
+ const Dawn_1 = tslib_1.__importDefault(require("./wallets/ethereum/injected/Dawn"));
38
38
  const PhantomEvm_1 = tslib_1.__importDefault(require("./wallets/ethereum/injected/PhantomEvm"));
39
- const MagicLink_1 = require("./wallets/ethereum/MagicLink");
39
+ const MagicConnector_1 = require("./wallets/ethereum/MagicConnector");
40
40
  const isEmailWalletConnector_1 = require("./utils/isEmailWalletConnector");
41
+ const getKeplrConnector_1 = require("./wallets/cosmos/getKeplrConnector");
41
42
  var phantom_ledger_2 = require("./wallets/solana/phantom-ledger");
42
43
  Object.defineProperty(exports, "phantomLedgerWalletName", { enumerable: true, get: function () { return phantom_ledger_2.walletName; } });
43
44
  let wallets = [];
@@ -48,20 +49,24 @@ exports.filteredWalletConnectWallets = [
48
49
  'Gnosis Safe',
49
50
  'Trust',
50
51
  'lilico',
52
+ 'Keplr',
51
53
  ];
52
54
  const defaultWalletUiUtils = {
53
55
  enableInternalSign: () => {
54
56
  throw Error('enableInternalSign, not implemented');
55
57
  },
56
- requestSignMessageConfirmation: () => {
57
- throw Error('requestSignMessageConfirmation, not implemented');
58
+ sendTransaction: () => {
59
+ throw Error('requestSendTransactionConfirmation not implemented');
60
+ },
61
+ signMessage: () => {
62
+ throw Error('signMessage not implemented');
58
63
  },
59
64
  };
60
- const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, networkConfigurations, skipMemo, vendorCredentials, walletConnectProjectId, walletUiUtils, magicLinkApiKey, } = {
65
+ const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, networkConfigurations, skipMemo, vendorCredentials, walletConnectProjectId, walletUiUtils, magicLinkApiKey, magicLinkConfig, } = {
61
66
  appLogoUrl: '',
62
67
  appName: '',
63
68
  isWalletConnectV2Enabled: false,
64
- networkConfigurations: { evm: [], solana: [], starknet: [] },
69
+ networkConfigurations: { cosmos: [], evm: [], solana: [], starknet: [] },
65
70
  skipMemo: false,
66
71
  vendorCredentials: {},
67
72
  walletConnectProjectId: '',
@@ -71,11 +76,13 @@ const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, ne
71
76
  }
72
77
  const evmNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || [];
73
78
  const solanaNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.solana) || [];
79
+ const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
74
80
  const walletConnectWallets = (0, walletConnect_1.fetchWalletConnectWallets)(evmNetworkConfigs, isWalletConnectV2Enabled);
75
81
  // temporary hack to filter out metamask, which currently has walletconnect
76
82
  // functionality built-in
77
83
  const filtered = walletConnectWallets.filter(({ name }) => !exports.filteredWalletConnectWallets.includes(name));
78
84
  const allWallets = [
85
+ new Dawn_1.default({ evmNetworks: evmNetworkConfigs }),
79
86
  new phantom_1.default({ solNetworks: solanaNetworkConfigs }),
80
87
  (0, getMetaMaskConnector_1.getMetaMaskConnector)({ evmNetworks: evmNetworkConfigs }),
81
88
  (0, getTrustConnector_1.getTrustConnector)({
@@ -107,8 +114,10 @@ const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, ne
107
114
  new Opera_1.default({ evmNetworks: evmNetworkConfigs }),
108
115
  ...(magicLinkApiKey
109
116
  ? [
110
- new MagicLink_1.MagicConnector({
117
+ new MagicConnector_1.EmailOTPMagicWalletConnector({
111
118
  apiKey: magicLinkApiKey,
119
+ config: magicLinkConfig,
120
+ evmNetworks: evmNetworkConfigs,
112
121
  walletUiUtils: walletUiUtils || defaultWalletUiUtils,
113
122
  }),
114
123
  ]
@@ -121,6 +130,8 @@ const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, ne
121
130
  new Frame_1.default({ evmNetworks: evmNetworkConfigs }),
122
131
  new lilico_1.default({ appLogoUrl, appName }),
123
132
  new PhantomEvm_1.default({ evmNetworks: evmNetworkConfigs }),
133
+ //TODO: https://linear.app/dynamic-labs/issue/DYN-2127/rename-evmnetworks-to-networks-across-the-application
134
+ (0, getKeplrConnector_1.getKeplerConnector)({ evmNetworks: cosmosNetworkConfigs }),
124
135
  ...((vendorCredentials === null || vendorCredentials === void 0 ? void 0 : vendorCredentials.fortmatic)
125
136
  ? [
126
137
  new fortmatic_1.default({
@@ -143,37 +154,32 @@ const getSupportedWallets = ({ appLogoUrl, appName, isWalletConnectV2Enabled, ne
143
154
  });
144
155
  exports.getSupportedWallets = getSupportedWallets;
145
156
  const applyLinksOverrides = (wallets) => wallets.map((wallet) => {
146
- const links = (0, walletLinks_1.getWalletLinks)(wallet.name);
147
- if (links !== undefined &&
148
- links.switchNetworkOnlyFromWallet !== undefined) {
149
- wallet.switchNetworkOnlyFromWallet = links.switchNetworkOnlyFromWallet;
157
+ const metadata = (0, wallet_book_1.getWalletBookWallet)(wallet.name);
158
+ if (metadata.switchNetworkOnlyFromWallet !== undefined) {
159
+ wallet.switchNetworkOnlyFromWallet = metadata.switchNetworkOnlyFromWallet;
150
160
  }
151
161
  return wallet;
152
162
  });
153
163
  const filterWalletsForPlatform = (wallets) => wallets.filter((wallet) => {
154
- const links = (0, walletLinks_1.getWalletLinks)(wallet.name);
155
- if (links === undefined) {
156
- logger_1.logger.error(`Missing wallet configuration for ${wallet.name}`);
157
- return false;
158
- }
164
+ const metadata = (0, wallet_book_1.getWalletBookWallet)(wallet.name);
159
165
  if (wallet.isInstalledOnBrowser()) {
160
166
  return true;
161
167
  }
162
168
  else if ((0, isEmailWalletConnector_1.isEmailWalletConnector)(wallet)) {
163
169
  return true;
164
170
  }
165
- else if (links.showOnlyIfInstalled) {
171
+ else if (metadata.showOnlyIfInstalled) {
166
172
  return false;
167
173
  }
168
174
  else if (!(0, isMobile_1.isMobile)()) {
169
175
  return true;
170
176
  }
171
177
  else {
172
- return handleMobileWalletFilter(wallet, links);
178
+ return handleMobileWalletFilter(wallet, metadata);
173
179
  }
174
180
  });
175
- const handleMobileWalletFilter = (wallet, links) => {
176
- if (links.mobile.disabled)
181
+ const handleMobileWalletFilter = (wallet, metadata) => {
182
+ if (!metadata.mobile)
177
183
  return false;
178
184
  /**
179
185
  * Custom check added with DYN-1489 for mobile version only:
@@ -183,31 +189,28 @@ const handleMobileWalletFilter = (wallet, links) => {
183
189
  if (wallet.isWalletConnect && wallet.name === 'WalletConnect') {
184
190
  return true;
185
191
  }
186
- const walletConnectMetadata = (0, walletConnect_1.getWalletConnectMetadata)(wallet.name);
187
192
  /**
188
193
  * WalletConnect provides a "universal" and "native" deep link. They recommend using
189
194
  * the universal deep link over the native one due to UX differences, and our current
190
195
  * implementation uses only universal. This means we need to filter for wallets that
191
196
  * have a universal deep link available.
192
197
  */
193
- const hasWalletConnectLink = walletConnectMetadata &&
194
- (Boolean(walletConnectMetadata.mobile.universal) ||
195
- Boolean(walletConnectMetadata.mobile.native));
196
- const isWalletConnectWallet = walletConnectMetadata !== undefined;
198
+ const hasWalletConnectLink = Boolean(metadata.mobile.universal) || Boolean(metadata.mobile.native);
199
+ const isWalletConnectWallet = metadata.walletConnect !== undefined;
197
200
  /**
198
201
  * wallets-links.json is the source of truth for wallet support on mobile platforms.
199
202
  * if a wallet has a non-empty value for ios, that means that wallet has an ios app
200
203
  * and we support that app. the same goes for android
201
204
  */
202
205
  if ((0, isMobile_1.isIPad)() || (0, isMobile_1.isIPhone)()) {
203
- const hasIOSLink = links.mobile.ios !== '';
206
+ const hasIOSLink = metadata.mobile.iosId !== undefined;
204
207
  return !isWalletConnectWallet
205
208
  ? hasIOSLink
206
209
  : hasIOSLink && hasWalletConnectLink;
207
210
  // It is an android device
208
211
  }
209
212
  else {
210
- const hasAndroidLink = links.mobile.android !== '';
213
+ const hasAndroidLink = metadata.mobile.androidId !== undefined;
211
214
  return !isWalletConnectWallet
212
215
  ? hasAndroidLink
213
216
  : hasAndroidLink && hasWalletConnectLink;
@@ -218,34 +221,40 @@ const chainStringToChains = {
218
221
  'flow:mainnet': ['FLOW'],
219
222
  };
220
223
  const getSupportedChainsForWalletConnector = (walletConnector) => {
221
- const metadata = (0, walletConnect_1.getWalletConnectMetadata)(walletConnector.name);
222
- // if this walletConnector is in the metadata, then it is a WalletConnect wallet
223
- if (metadata) {
224
- /**
225
- * chains could contain multiple eth networks eg
226
- * "eip155:1",
227
- * "eip155:10",
228
- * "eip155:56",
229
- * "eip155:100",
230
- *
231
- * so we will use a set to ensure uniqueness
232
- */
233
- const chainSet = new Set();
234
- const chainStringList = metadata.chains;
235
- chainStringList.forEach((chainString) => {
236
- const chains = chainStringToChains[chainString];
237
- chains === null || chains === void 0 ? void 0 : chains.forEach((chain) => {
238
- chainSet.add(chain);
239
- });
224
+ var _a;
225
+ const metadata = (0, wallet_book_1.getWalletBookWallet)(walletConnector.name);
226
+ /**
227
+ * chains could contain multiple eth networks eg
228
+ * "eip155:1",
229
+ * "eip155:10",
230
+ * "eip155:56",
231
+ * "eip155:100",
232
+ *
233
+ * so we will use a set to ensure uniqueness
234
+ */
235
+ const chainSet = new Set();
236
+ const chainStringList = (_a = metadata.chains) !== null && _a !== void 0 ? _a : [];
237
+ chainStringList.forEach((chainString) => {
238
+ const chains = chainStringToChains[chainString];
239
+ chains === null || chains === void 0 ? void 0 : chains.forEach((chain) => {
240
+ chainSet.add(chain);
240
241
  });
241
- return [...chainSet];
242
- }
243
- return walletConnector.supportedChains;
242
+ });
243
+ walletConnector.supportedChains.forEach((chain) => {
244
+ chainSet.add(chain);
245
+ });
246
+ return [...chainSet];
244
247
  };
245
248
  exports.getSupportedChainsForWalletConnector = getSupportedChainsForWalletConnector;
246
249
  const getEnabledWallets = (props) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
247
250
  const supportedWallets = yield (0, exports.getSupportedWallets)(props.getSupportedWalletOpts);
248
- const allEnabledWallets = supportedWallets.filter((wallet) => props.enabledChains.some((chain) => (0, exports.getSupportedChainsForWalletConnector)(wallet).includes(chain)) && wallet.isInstalledOnBrowser() === props.installed);
251
+ const isKeplrWalletEnabled = (wallet) => wallet.name.includes('Keplr') &&
252
+ props.enabledNetworks.includes(wallet.networkId) &&
253
+ wallet.isInstalledOnBrowser() === props.installed;
254
+ const allEnabledWallets = supportedWallets.filter((wallet) => isKeplrWalletEnabled(wallet) ||
255
+ (props.enabledChains.some((chain) => (0, exports.getSupportedChainsForWalletConnector)(wallet).includes(chain)) &&
256
+ wallet.isInstalledOnBrowser() === props.installed) ||
257
+ wallet.key === 'magiclink');
249
258
  return allEnabledWallets;
250
259
  });
251
260
  exports.getEnabledWallets = getEnabledWallets;