@getpara/react-sdk 2.0.0-dev.3 → 2.0.0-dev.4

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 (341) hide show
  1. package/dist/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
  2. package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
  3. package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
  4. package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
  5. package/dist/cosmos/actions/index.d.ts +2 -0
  6. package/dist/cosmos/actions/index.js +3 -0
  7. package/dist/cosmos/hooks/index.d.ts +2 -0
  8. package/dist/cosmos/hooks/index.js +3 -0
  9. package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
  10. package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
  11. package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
  12. package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
  13. package/dist/cosmos/index.d.ts +2 -0
  14. package/dist/cosmos/index.js +3 -0
  15. package/dist/evm/actions/getViemAccount.d.ts +22 -0
  16. package/dist/evm/actions/getViemAccount.js +20 -0
  17. package/dist/evm/actions/getViemClient.d.ts +7659 -0
  18. package/dist/evm/actions/getViemClient.js +25 -0
  19. package/dist/evm/actions/index.d.ts +2 -0
  20. package/dist/evm/actions/index.js +3 -0
  21. package/dist/evm/hooks/index.d.ts +2 -0
  22. package/dist/evm/hooks/index.js +3 -0
  23. package/dist/evm/hooks/useViemAccount.d.ts +26 -0
  24. package/dist/evm/hooks/useViemAccount.js +32 -0
  25. package/dist/evm/hooks/useViemClient.d.ts +7663 -0
  26. package/dist/evm/hooks/useViemClient.js +30 -0
  27. package/dist/evm/index.d.ts +2 -0
  28. package/dist/evm/index.js +3 -0
  29. package/dist/index.d.ts +3 -5
  30. package/dist/index.js +4 -4
  31. package/dist/provider/ParaProvider.d.ts +1 -2
  32. package/dist/provider/ParaProvider.js +13 -106
  33. package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
  34. package/dist/solana/actions/getSolanaSigner.js +15 -0
  35. package/dist/solana/actions/index.d.ts +1 -0
  36. package/dist/solana/actions/index.js +2 -0
  37. package/dist/solana/hooks/index.d.ts +1 -0
  38. package/dist/solana/hooks/index.js +2 -0
  39. package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
  40. package/dist/solana/hooks/useSolanaSigner.js +32 -0
  41. package/dist/solana/index.d.ts +2 -0
  42. package/dist/solana/index.js +3 -0
  43. package/package.json +19 -29
  44. package/styles.css/package.json +1 -1
  45. package/dist/cli/cli.mjs +0 -50
  46. package/dist/modal/ParaModal.d.ts +0 -2
  47. package/dist/modal/ParaModal.js +0 -301
  48. package/dist/modal/components/Account/Account.d.ts +0 -5
  49. package/dist/modal/components/Account/Account.js +0 -148
  50. package/dist/modal/components/Account/AccountProfile.d.ts +0 -1
  51. package/dist/modal/components/Account/AccountProfile.js +0 -168
  52. package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
  53. package/dist/modal/components/Account/AccountProfileLink.js +0 -206
  54. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
  55. package/dist/modal/components/Account/AccountProfileLinkOptions.js +0 -111
  56. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
  57. package/dist/modal/components/Account/AccountProfileUnlink.js +0 -47
  58. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
  59. package/dist/modal/components/AddFunds/AddFunds.js +0 -69
  60. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
  61. package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
  62. package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
  63. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
  64. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
  65. package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
  66. package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
  67. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
  68. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  69. package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
  70. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  71. package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
  72. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
  73. package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
  74. package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
  75. package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
  76. package/dist/modal/components/AddFunds/common.d.ts +0 -19
  77. package/dist/modal/components/AddFunds/common.js +0 -24
  78. package/dist/modal/components/AddFunds/index.d.ts +0 -3
  79. package/dist/modal/components/AddFunds/index.js +0 -4
  80. package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -20
  81. package/dist/modal/components/AuthInput/AuthInput.js +0 -277
  82. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
  83. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  84. package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
  85. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  86. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  87. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
  88. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  89. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -164
  90. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
  91. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -85
  92. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  93. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  94. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  95. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  96. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  97. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  98. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  99. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
  100. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  101. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -62
  102. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  103. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -48
  104. package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
  105. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  106. package/dist/modal/components/Body/Body.d.ts +0 -11
  107. package/dist/modal/components/Body/Body.js +0 -350
  108. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
  109. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
  110. package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
  111. package/dist/modal/components/ChainSwitch/config.js +0 -17
  112. package/dist/modal/components/Controls/Controls.d.ts +0 -5
  113. package/dist/modal/components/Controls/Controls.js +0 -78
  114. package/dist/modal/components/Controls/Selects.d.ts +0 -2
  115. package/dist/modal/components/Controls/Selects.js +0 -173
  116. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +0 -1
  117. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +0 -75
  118. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -8
  119. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -175
  120. package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
  121. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  122. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  123. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -39
  124. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
  125. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -184
  126. package/dist/modal/components/Footer/Footer.d.ts +0 -1
  127. package/dist/modal/components/Footer/Footer.js +0 -95
  128. package/dist/modal/components/Header/Header.d.ts +0 -1
  129. package/dist/modal/components/Header/Header.js +0 -43
  130. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
  131. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -61
  132. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  133. package/dist/modal/components/Hero/Hero.js +0 -116
  134. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  135. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
  136. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
  137. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -44
  138. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
  139. package/dist/modal/components/ModalContent/ModalContent.js +0 -88
  140. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -3
  141. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -31
  142. package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
  143. package/dist/modal/components/OAuth/OAuth.js +0 -79
  144. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
  145. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -74
  146. package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
  147. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  148. package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
  149. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  150. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
  151. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
  152. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  153. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
  154. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  155. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  156. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -12
  157. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -160
  158. package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
  159. package/dist/modal/components/Waiting/Waiting.js +0 -17
  160. package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
  161. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  162. package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
  163. package/dist/modal/components/WalletCard/WalletCard.js +0 -128
  164. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  165. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -83
  166. package/dist/modal/components/common.d.ts +0 -59
  167. package/dist/modal/components/common.js +0 -261
  168. package/dist/modal/components/index.d.ts +0 -1
  169. package/dist/modal/components/index.js +0 -2
  170. package/dist/modal/constants/constants.d.ts +0 -40
  171. package/dist/modal/constants/constants.js +0 -142
  172. package/dist/modal/constants/defaults.d.ts +0 -5
  173. package/dist/modal/constants/defaults.js +0 -10
  174. package/dist/modal/constants/oAuthLogos.d.ts +0 -17
  175. package/dist/modal/constants/oAuthLogos.js +0 -158
  176. package/dist/modal/constants/walletTypeConfig.d.ts +0 -6
  177. package/dist/modal/constants/walletTypeConfig.js +0 -13
  178. package/dist/modal/hooks/useGoBack.d.ts +0 -1
  179. package/dist/modal/hooks/useGoBack.js +0 -43
  180. package/dist/modal/hooks/useTelegramLogin.d.ts +0 -12
  181. package/dist/modal/hooks/useTelegramLogin.js +0 -65
  182. package/dist/modal/index.d.ts +0 -8
  183. package/dist/modal/index.js +0 -29
  184. package/dist/modal/stores/index.d.ts +0 -1
  185. package/dist/modal/stores/index.js +0 -2
  186. package/dist/modal/stores/modal/actions.d.ts +0 -3
  187. package/dist/modal/stores/modal/actions.js +0 -135
  188. package/dist/modal/stores/modal/useModalStore.d.ts +0 -103
  189. package/dist/modal/stores/modal/useModalStore.js +0 -73
  190. package/dist/modal/types/commonTypes.d.ts +0 -6
  191. package/dist/modal/types/commonTypes.js +0 -1
  192. package/dist/modal/types/modalProps.d.ts +0 -129
  193. package/dist/modal/types/modalProps.js +0 -12
  194. package/dist/modal/utils/authInputHelpers.d.ts +0 -5
  195. package/dist/modal/utils/authInputHelpers.js +0 -41
  196. package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
  197. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  198. package/dist/modal/utils/countryCodes.d.ts +0 -8
  199. package/dist/modal/utils/countryCodes.js +0 -45
  200. package/dist/modal/utils/getMailtoLink.d.ts +0 -1
  201. package/dist/modal/utils/getMailtoLink.js +0 -10
  202. package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
  203. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  204. package/dist/modal/utils/getWalletDisplayName.d.ts +0 -5
  205. package/dist/modal/utils/getWalletDisplayName.js +0 -22
  206. package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
  207. package/dist/modal/utils/isPasskeySupported.js +0 -15
  208. package/dist/modal/utils/openPopup.d.ts +0 -6
  209. package/dist/modal/utils/openPopup.js +0 -60
  210. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  211. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  212. package/dist/modal/utils/steps.d.ts +0 -133
  213. package/dist/modal/utils/steps.js +0 -273
  214. package/dist/modal/utils/stringFormatters.d.ts +0 -5
  215. package/dist/modal/utils/stringFormatters.js +0 -19
  216. package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
  217. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  218. package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -26
  219. package/dist/provider/actions/getEmbeddedAccount.js +0 -52
  220. package/dist/provider/actions/getWallet.d.ts +0 -5
  221. package/dist/provider/actions/getWallet.js +0 -18
  222. package/dist/provider/actions/index.d.ts +0 -47
  223. package/dist/provider/actions/index.js +0 -79
  224. package/dist/provider/actions/utils.d.ts +0 -4
  225. package/dist/provider/actions/utils.js +0 -34
  226. package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
  227. package/dist/provider/components/CosmosWalletWrapper.js +0 -43
  228. package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
  229. package/dist/provider/components/EvmWalletWrapper.js +0 -43
  230. package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
  231. package/dist/provider/components/ExternalWalletWrapper.js +0 -140
  232. package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
  233. package/dist/provider/components/SolanaWalletWrapper.js +0 -44
  234. package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
  235. package/dist/provider/external/getParaCosmosConnector.js +0 -19
  236. package/dist/provider/external/getParaCosmosLib.d.ts +0 -4
  237. package/dist/provider/external/getParaCosmosLib.js +0 -16
  238. package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
  239. package/dist/provider/external/getParaEvmConnector.js +0 -19
  240. package/dist/provider/external/getParaEvmLib.d.ts +0 -4
  241. package/dist/provider/external/getParaEvmLib.js +0 -16
  242. package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
  243. package/dist/provider/external/getParaSolanaConnector.js +0 -19
  244. package/dist/provider/external/getParaSolanaLib.d.ts +0 -4
  245. package/dist/provider/external/getParaSolanaLib.js +0 -16
  246. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -2
  247. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -8
  248. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -2
  249. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -8
  250. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -2
  251. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -8
  252. package/dist/provider/hooks/index.d.ts +0 -3
  253. package/dist/provider/hooks/index.js +0 -4
  254. package/dist/provider/hooks/mutations/core.d.ts +0 -27
  255. package/dist/provider/hooks/mutations/core.js +0 -66
  256. package/dist/provider/hooks/mutations/index.d.ts +0 -3
  257. package/dist/provider/hooks/mutations/index.js +0 -9
  258. package/dist/provider/hooks/mutations/useLinkAccount.d.ts +0 -9
  259. package/dist/provider/hooks/mutations/useLinkAccount.js +0 -18
  260. package/dist/provider/hooks/mutations/utils.d.ts +0 -12
  261. package/dist/provider/hooks/mutations/utils.js +0 -90
  262. package/dist/provider/hooks/queries/core.d.ts +0 -4
  263. package/dist/provider/hooks/queries/core.js +0 -16
  264. package/dist/provider/hooks/queries/index.d.ts +0 -4
  265. package/dist/provider/hooks/queries/index.js +0 -11
  266. package/dist/provider/hooks/queries/useAccount.d.ts +0 -90
  267. package/dist/provider/hooks/queries/useAccount.js +0 -135
  268. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -5
  269. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -24
  270. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  271. package/dist/provider/hooks/queries/useWallet.js +0 -26
  272. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
  273. package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
  274. package/dist/provider/hooks/queries/utils.d.ts +0 -7
  275. package/dist/provider/hooks/queries/utils.js +0 -25
  276. package/dist/provider/hooks/utils/index.d.ts +0 -3
  277. package/dist/provider/hooks/utils/index.js +0 -10
  278. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
  279. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  280. package/dist/provider/hooks/utils/useClient.d.ts +0 -5
  281. package/dist/provider/hooks/utils/useClient.js +0 -10
  282. package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
  283. package/dist/provider/hooks/utils/useEventListeners.js +0 -157
  284. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +0 -4
  285. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +0 -27
  286. package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
  287. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  288. package/dist/provider/hooks/utils/useModal.d.ts +0 -11
  289. package/dist/provider/hooks/utils/useModal.js +0 -27
  290. package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
  291. package/dist/provider/hooks/utils/useWalletState.js +0 -48
  292. package/dist/provider/index.d.ts +0 -6
  293. package/dist/provider/index.js +0 -11
  294. package/dist/provider/providers/AccountLinkProvider.d.ts +0 -47
  295. package/dist/provider/providers/AccountLinkProvider.js +0 -452
  296. package/dist/provider/providers/AuthProvider.d.ts +0 -37
  297. package/dist/provider/providers/AuthProvider.js +0 -523
  298. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
  299. package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
  300. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
  301. package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
  302. package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -59
  303. package/dist/provider/providers/ExternalWalletProvider.js +0 -596
  304. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
  305. package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
  306. package/dist/provider/stores/getters.d.ts +0 -4
  307. package/dist/provider/stores/getters.js +0 -13
  308. package/dist/provider/stores/setters.d.ts +0 -1
  309. package/dist/provider/stores/setters.js +0 -7
  310. package/dist/provider/stores/slices/analytics.d.ts +0 -3
  311. package/dist/provider/stores/slices/analytics.js +0 -9
  312. package/dist/provider/stores/slices/client.d.ts +0 -3
  313. package/dist/provider/stores/slices/client.js +0 -9
  314. package/dist/provider/stores/slices/config.d.ts +0 -3
  315. package/dist/provider/stores/slices/config.js +0 -9
  316. package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
  317. package/dist/provider/stores/slices/externalWallets.js +0 -46
  318. package/dist/provider/stores/slices/index.d.ts +0 -5
  319. package/dist/provider/stores/slices/index.js +0 -6
  320. package/dist/provider/stores/slices/modal.d.ts +0 -3
  321. package/dist/provider/stores/slices/modal.js +0 -18
  322. package/dist/provider/stores/slices/wallet.d.ts +0 -3
  323. package/dist/provider/stores/slices/wallet.js +0 -13
  324. package/dist/provider/stores/types.d.ts +0 -76
  325. package/dist/provider/stores/types.js +0 -1
  326. package/dist/provider/stores/useStore.d.ts +0 -17
  327. package/dist/provider/stores/useStore.js +0 -34
  328. package/dist/provider/types/externalWalletProviders.d.ts +0 -12
  329. package/dist/provider/types/externalWalletProviders.js +0 -1
  330. package/dist/provider/types/provider.d.ts +0 -161
  331. package/dist/provider/types/provider.js +0 -1
  332. package/dist/provider/types/query.d.ts +0 -3
  333. package/dist/provider/types/query.js +0 -1
  334. package/dist/provider/types/utils.d.ts +0 -45
  335. package/dist/provider/types/utils.js +0 -1
  336. package/dist/provider/utils/constants.d.ts +0 -5
  337. package/dist/provider/utils/constants.js +0 -10
  338. package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
  339. package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
  340. package/dist/provider/utils/renameMutations.d.ts +0 -5
  341. package/dist/provider/utils/renameMutations.js +0 -18
@@ -1,173 +0,0 @@
1
- "use client";
2
- import {
3
- __async,
4
- __spreadProps,
5
- __spreadValues
6
- } from "../../../chunk-MMUBH76A.js";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { CpslButton, CpslIcon, CpslIdenticon, CpslText } from "@getpara/react-components";
9
- import { safeStyled } from "@getpara/react-common";
10
- import { truncateAddress } from "@getpara/web-sdk";
11
- import { useEffect, useRef } from "react";
12
- import { useDropdownPosition } from "../AuthInput/hooks/useDropdownPosition.js";
13
- import { useAccount, useWallet, useWalletState } from "../../../provider/index.js";
14
- import { HeaderSelect, HeaderSelectContainer, HeaderSelectItem } from "../common.js";
15
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
16
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
17
- import { useStore } from "../../../provider/stores/useStore.js";
18
- import { useCopyToClipboard } from "@getpara/react-common";
19
- import { getWalletDisplayName } from "../../utils/getWalletDisplayName.js";
20
- const getValue = (id, type) => {
21
- return id && type ? `${id}~${type}` : void 0;
22
- };
23
- const ChainSelect = () => {
24
- var _a, _b;
25
- const containerRef = useRef(null);
26
- const { dropdownMaxHeight, dropdownWidth, mobileAnchor, resize } = useDropdownPosition(containerRef);
27
- const { data: activeWallet } = useWallet();
28
- const { switchChain, chainId, chains, chainIdSwitchingTo } = useExternalWallets();
29
- useEffect(() => {
30
- if (dropdownMaxHeight && chainId) {
31
- resize();
32
- }
33
- }, [chainId, chainIdSwitchingTo, dropdownMaxHeight]);
34
- const handleChainChange = (chainId2) => __async(void 0, null, function* () {
35
- yield switchChain(chainId2);
36
- });
37
- if (!activeWallet || !activeWallet.isExternal || activeWallet.type === "SOLANA") {
38
- return null;
39
- }
40
- const chainIdToUse = chainIdSwitchingTo != null ? chainIdSwitchingTo : chainId;
41
- const selectedChainName = (_a = chains.find((c) => c.id.toString() === chainIdToUse)) == null ? void 0 : _a.name;
42
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(HeaderSelectContainer, { ref: containerRef, id: "inputContainer", children: /* @__PURE__ */ jsxs(
43
- HeaderSelect,
44
- {
45
- selectedValue: (_b = chainIdToUse == null ? void 0 : chainIdToUse.toString()) != null ? _b : "",
46
- onCpslSelectValueChange: (e) => {
47
- handleChainChange(e.detail);
48
- },
49
- showFormattedSelectedItem: true,
50
- placeholder: "Choose chain...",
51
- anchorElId: "inputContainer",
52
- dropdownMaxHeight,
53
- $width: dropdownWidth != null ? dropdownWidth : 0,
54
- $top: (mobileAnchor != null ? mobileAnchor : 0) + 16 + 1,
55
- autoWidth: true,
56
- selectedItemVariant: "bodyXS",
57
- children: [
58
- chainIdToUse && /* @__PURE__ */ jsx(ChainName, { variant: "bodyXS", color: "contrast", slot: "selected-item", children: selectedChainName }),
59
- chains == null ? void 0 : chains.map((chain) => /* @__PURE__ */ jsx(HeaderSelectItem, { slot: "items", value: chain.id.toString(), children: /* @__PURE__ */ jsx(ChainName, { variant: "bodyXS", color: "contrast", children: chain.name }) }, chain.id))
60
- ]
61
- }
62
- ) }) });
63
- };
64
- const AccountSelect = () => {
65
- var _a;
66
- const hideWallets = useStore((state) => {
67
- var _a2;
68
- return (_a2 = state.modalConfig) == null ? void 0 : _a2.hideWallets;
69
- });
70
- const para = useInternalClient();
71
- const containerRef = useRef(null);
72
- const { dropdownMaxHeight, dropdownWidth, mobileAnchor, resize } = useDropdownPosition(containerRef);
73
- const [isCopied, copy] = useCopyToClipboard();
74
- const { setSelectedWallet } = useWalletState();
75
- const { data: activeWallet } = useWallet();
76
- const { embedded } = useAccount();
77
- const availableWallets = embedded == null ? void 0 : embedded.wallets;
78
- const isGuest = para.isGuestMode && (activeWallet == null ? void 0 : activeWallet.pregenIdentifierType) === "GUEST_ID";
79
- const handleCopy = () => {
80
- copy((activeWallet == null ? void 0 : activeWallet.address) ? para.getDisplayAddress(activeWallet.id, { addressType: activeWallet.type }) : "");
81
- };
82
- const ActiveWalletNode = activeWallet ? /* @__PURE__ */ jsxs(FlexRow, { slot: "selected-item", style: { height: "24px" }, children: [
83
- !isGuest && /* @__PURE__ */ jsx(CpslIdenticon, { variant: "avatar", size: "24px", hash: para.getIdenticonHash(activeWallet.id, activeWallet.type) }),
84
- /* @__PURE__ */ jsx(WalletName, { variant: "bodyXS", color: "contrast", style: { marginLeft: isGuest ? "8px" : "0px" }, children: isGuest ? "Guest" : getWalletDisplayName(para, __spreadProps(__spreadValues({}, activeWallet), { hideWallets })) }),
85
- !hideWallets && /* @__PURE__ */ jsxs(Fragment, { children: [
86
- /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", children: (_a = activeWallet.ensName) != null ? _a : para.getDisplayAddress(activeWallet.id, { truncate: true, addressType: activeWallet.type }) }),
87
- /* @__PURE__ */ jsx(
88
- CpslButton,
89
- {
90
- id: "ignore-click",
91
- size: "small",
92
- variant: "ghost",
93
- onClick: (e) => {
94
- e.stopPropagation();
95
- e.preventDefault();
96
- handleCopy();
97
- },
98
- children: /* @__PURE__ */ jsx(CpslIcon, { id: "ignore-click", slot: "start", icon: isCopied ? "check" : "copy" })
99
- }
100
- )
101
- ] })
102
- ] }) : null;
103
- useEffect(() => {
104
- if (dropdownMaxHeight && (activeWallet == null ? void 0 : activeWallet.address)) {
105
- resize();
106
- }
107
- }, [activeWallet, availableWallets, dropdownMaxHeight]);
108
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(HeaderSelectContainer, { ref: containerRef, id: "addressInputContainer", children: availableWallets && availableWallets.length > 1 ? /* @__PURE__ */ jsxs(
109
- HeaderSelect,
110
- {
111
- selectedValue: getValue(activeWallet == null ? void 0 : activeWallet.id, activeWallet == null ? void 0 : activeWallet.type),
112
- onCpslSelectValueChange: (e) => {
113
- const [id, type] = e.detail.split("~");
114
- setSelectedWallet({ id, type });
115
- },
116
- showFormattedSelectedItem: true,
117
- placeholder: "Choose wallet...",
118
- anchorElId: "addressInputContainer",
119
- dropdownMaxHeight,
120
- $width: dropdownWidth != null ? dropdownWidth : 0,
121
- $top: (mobileAnchor != null ? mobileAnchor : 0) + 16 + 1,
122
- autoWidth: true,
123
- selectedItemVariant: "bodyXS",
124
- children: [
125
- activeWallet && ActiveWalletNode,
126
- availableWallets.map(({ address, name: _name, id, type, isExternal }) => {
127
- const key = getValue(id, type);
128
- const name = _name != null ? _name : getWalletDisplayName(para, { type, isExternal, isMenu: true, hideWallets });
129
- return /* @__PURE__ */ jsx(HeaderSelectItem, { slot: "items", value: key, children: /* @__PURE__ */ jsxs(FlexRow, { children: [
130
- /* @__PURE__ */ jsx(CpslIdenticon, { size: "40px", hash: para.getIdenticonHash(id, type) }),
131
- /* @__PURE__ */ jsxs(FlexCol, { children: [
132
- name && /* @__PURE__ */ jsx(CpslText, { variant: "bodyS", color: "contrast", children: name }),
133
- !hideWallets && address && type && /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", children: truncateAddress(address, type, { prefix: para.cosmosPrefix }) })
134
- ] })
135
- ] }) }, key);
136
- })
137
- ]
138
- }
139
- ) : ActiveWalletNode }) });
140
- };
141
- const Container = safeStyled.div`
142
- flex: 0;
143
- width: 100%;
144
- display: flex;
145
- justify-content: center;
146
- `;
147
- const FlexRow = safeStyled.div`
148
- display: flex;
149
- align-items: center;
150
- gap: 8px;
151
- `;
152
- const FlexCol = safeStyled.div`
153
- display: flex;
154
- flex-direction: column;
155
- align-items: flex-start;
156
- `;
157
- const WalletName = safeStyled(CpslText)`
158
- white-space: nowrap;
159
- `;
160
- const ChainName = safeStyled(CpslText)`
161
- max-width: 150px;
162
- text-transform: capitalize;
163
-
164
- &::part(text-element) {
165
- white-space: nowrap;
166
- text-overflow: ellipsis;
167
- overflow: hidden;
168
- }
169
- `;
170
- export {
171
- AccountSelect,
172
- ChainSelect
173
- };
@@ -1 +0,0 @@
1
- export declare const ExternalWalletNetworkSelectStep: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,75 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { safeStyled } from "@getpara/react-common";
5
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
6
- import { useModalStore } from "../../stores/index.js";
7
- import { ModalStep } from "../../utils/steps.js";
8
- import { CpslButton, CpslIcon, CpslText } from "@getpara/react-components";
9
- import { WALLET_TYPE_CONFIG } from "../../constants/walletTypeConfig.js";
10
- import { useAccountLinking } from "../../../provider/providers/AccountLinkProvider.js";
11
- const ExternalWalletNetworkSelectStep = () => {
12
- var _a, _b;
13
- const setStep = useModalStore((state) => state.setStep);
14
- const selectedExternalWalletId = useModalStore((state) => state.selectedExternalWalletId);
15
- const setSelectedExternalWalletId = useModalStore((state) => state.setSelectedExternalWalletId);
16
- const { wallets, connectExternalWallet } = useExternalWallets();
17
- const { accountLinkInProgress, linkAccount } = useAccountLinking();
18
- const externalWalletProvider = (_b = accountLinkInProgress == null ? void 0 : accountLinkInProgress.pendingWalletProvider) != null ? _b : (_a = accountLinkInProgress == null ? void 0 : accountLinkInProgress.externalWallet) == null ? void 0 : _a.providerId;
19
- if (!accountLinkInProgress && !selectedExternalWalletId) {
20
- setStep(ModalStep.ACCOUNT_MAIN);
21
- return null;
22
- }
23
- const availableWallets = wallets.filter((w) => w.internalId === (externalWalletProvider != null ? externalWalletProvider : selectedExternalWalletId));
24
- const firstWallet = availableWallets[0];
25
- const handleWalletClick = (wallet) => () => {
26
- if (accountLinkInProgress) {
27
- linkAccount({ externalWallet: wallet });
28
- return;
29
- }
30
- setSelectedExternalWalletId(wallet.internalId);
31
- setStep(ModalStep.EX_WALLET_SELECTED);
32
- if (wallet.installed || wallet.internalId === "FARCASTER") {
33
- connectExternalWallet(wallet);
34
- } else if (wallet.isMobile) {
35
- connectExternalWallet(wallet, true);
36
- }
37
- };
38
- return /* @__PURE__ */ jsxs(Container, { children: [
39
- /* @__PURE__ */ jsx(Avatar, { slot: "image", src: firstWallet == null ? void 0 : firstWallet.iconUrl }),
40
- /* @__PURE__ */ jsx(ButtonContainer, { children: availableWallets.map((wallet) => {
41
- const config = WALLET_TYPE_CONFIG[wallet.type];
42
- return /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, variant: "tertiary", onClick: handleWalletClick(wallet), children: /* @__PURE__ */ jsxs(ButtonInnerContainer, { children: [
43
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: config.icon }),
44
- /* @__PURE__ */ jsx(CpslText, { weight: "medium", children: config.name })
45
- ] }) }, wallet.type);
46
- }) })
47
- ] });
48
- };
49
- const Container = safeStyled.div`
50
- display: flex;
51
- flex-direction: column;
52
- align-items: center;
53
- gap: 32px;
54
- `;
55
- const ButtonContainer = safeStyled.div`
56
- width: 100%;
57
- display: flex;
58
- flex-direction: column;
59
- align-items: center;
60
- gap: 8px;
61
- `;
62
- const Avatar = safeStyled.img`
63
- width: 80px;
64
- height: 80px;
65
- object-fit: contain;
66
- `;
67
- const ButtonInnerContainer = safeStyled.div`
68
- width: 100%;
69
- display: flex;
70
- align-items: center;
71
- gap: 8px;
72
- `;
73
- export {
74
- ExternalWalletNetworkSelectStep
75
- };
@@ -1,8 +0,0 @@
1
- import { CommonWallet } from '@getpara/react-common';
2
- export declare const ExternalWalletMobileConnect: ({ wallet, qrUri: propsQrUri, onConnectWc, isSelfFetching, }: {
3
- wallet: CommonWallet;
4
- qrUri?: string;
5
- onConnectWc: (_: CommonWallet) => Promise<void>;
6
- isSelfFetching?: boolean;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export declare const ExternalWalletStep: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,175 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CpslButton, CpslIcon, CpslQrCode, CpslSpinner, CpslText } from "@getpara/react-components";
7
- import { CenteredText, ErrorContainer, ErrorIcon, InnerStepContainer, QRContainer, StepContainer } from "../common.js";
8
- import { useEffect, useMemo, useState } from "react";
9
- import { useModalStore } from "../../stores/index.js";
10
- import { safeStyled } from "@getpara/react-common";
11
- import { useCopyToClipboard } from "@getpara/react-common";
12
- import { ModalStep } from "../../utils/steps.js";
13
- import { isMobile, isTablet } from "@getpara/web-sdk";
14
- import { routeMobileExternalWallet } from "../../utils/routeMobileExternalWallet.js";
15
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
16
- import { useStore } from "../../../provider/stores/useStore.js";
17
- const ExternalWalletMobileConnect = ({
18
- wallet,
19
- qrUri: propsQrUri,
20
- onConnectWc,
21
- isSelfFetching = false
22
- }) => {
23
- var _a, _b;
24
- const [isCopied, copy] = useCopyToClipboard();
25
- const appName = useStore((state) => state.appName);
26
- const [qrUri, setQrUri] = useState(isSelfFetching ? void 0 : propsQrUri);
27
- const isWalletConnect = wallet.id === "walletConnect";
28
- const handleCopy = () => {
29
- if (qrUri) {
30
- copy(qrUri);
31
- }
32
- };
33
- useEffect(() => {
34
- const fetchQrUri = () => {
35
- var _a2;
36
- if (!isSelfFetching) {
37
- return;
38
- }
39
- (_a2 = wallet.getQrUri) == null ? void 0 : _a2.call(wallet).then(setQrUri).catch();
40
- };
41
- fetchQrUri();
42
- }, [wallet, isSelfFetching]);
43
- useEffect(() => {
44
- setQrUri(propsQrUri);
45
- }, [propsQrUri]);
46
- if (wallet.type === "SOLANA" || isMobile() && !isTablet()) {
47
- return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- wallet.type === "SOLANA" && qrUri && /* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(CpslText, { weight: "semiBold", color: "error", children: `Continue in the ${wallet.name} mobile app.` }) }),
49
- wallet.id !== "walletConnect" && /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
50
- wallet.type === "SOLANA" && qrUri && !wallet.hasIosSafariExtension || wallet.type !== "SOLANA" ? /* @__PURE__ */ jsx(CpslButton, { onClick: () => routeMobileExternalWallet(qrUri), fullWidth: true, children: "Connect Wallet" }) : /* @__PURE__ */ jsx(Text, { weight: "semiBold", children: wallet.hasIosSafariExtension ? `Please install and use the ${wallet.name} extension for iOS Safari.` : `Please navigate to ${appName} in the ${wallet.name} wallet.` }),
51
- !wallet.hasIosSafariExtension && /* @__PURE__ */ jsx(Link, { href: (_a = wallet.downloadUrl) != null ? _a : "", target: "_blank", children: /* @__PURE__ */ jsxs(ExternalButton, { variant: "secondary", children: [
52
- `Get ${wallet.name}`,
53
- /* @__PURE__ */ jsx(ExternalIcon, { icon: "linkExternal" })
54
- ] }) })
55
- ] })
56
- ] });
57
- }
58
- const GetWalletButton = /* @__PURE__ */ jsxs(ExternalButton, { variant: "secondary", onClick: isWalletConnect ? onConnectWc : void 0, children: [
59
- `${isWalletConnect ? "Open" : "Get"} ${wallet.name}`,
60
- /* @__PURE__ */ jsx(ExternalIcon, { icon: "linkExternal" })
61
- ] });
62
- return /* @__PURE__ */ jsxs(Fragment, { children: [
63
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
64
- /* @__PURE__ */ jsx(CpslText, { weight: "semiBold", children: "Scan with your mobile device" }),
65
- /* @__PURE__ */ jsx(QRContainer, { children: !qrUri ? /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) : /* @__PURE__ */ jsx(CpslQrCode, { url: qrUri, imageSrc: wallet.iconUrl }) }),
66
- /* @__PURE__ */ jsxs(CpslButton, { size: "small", variant: "ghost", onClick: handleCopy, children: [
67
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: isCopied ? "check" : "copy" }),
68
- isCopied ? "Copied" : "Copy Link"
69
- ] })
70
- ] }),
71
- /* @__PURE__ */ jsx(InnerStepContainer, { children: isWalletConnect ? /* @__PURE__ */ jsx(Fragment, { children: GetWalletButton }) : /* @__PURE__ */ jsx(Link, { href: (_b = wallet.downloadUrl) != null ? _b : "", target: "_blank", children: GetWalletButton }) })
72
- ] });
73
- };
74
- const ExternalWalletStep = () => {
75
- const externalWalletError = useModalStore((state) => state.externalWalletError);
76
- const setStep = useModalStore((state) => state.setStep);
77
- const { connectExternalWallet, wallet, qrUri, walletDisplayHelpers } = useExternalWallets();
78
- useEffect(() => {
79
- routeMobileExternalWallet(qrUri);
80
- }, [qrUri]);
81
- const handleTryAgainClick = () => __async(void 0, null, function* () {
82
- if (wallet) {
83
- yield connectExternalWallet(wallet);
84
- }
85
- });
86
- const Content = useMemo(() => {
87
- var _a;
88
- if (!wallet) {
89
- return null;
90
- }
91
- const isWalletConnect = wallet.id === "walletConnect";
92
- const isMobileWalletConnect = isMobile() && isWalletConnect;
93
- if (isMobileWalletConnect) {
94
- /* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(Text, { weight: "semiBold", children: "Continue in the WalletConnect modal." }) });
95
- }
96
- const { showExtension, showMobile } = walletDisplayHelpers;
97
- if (!showMobile && !showExtension) {
98
- return /* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(Text, { weight: "semiBold", children: `${wallet.name} isn't supported on mobile devices.
99
-
100
- Please choose another wallet or continue on desktop.` }) });
101
- }
102
- if (showExtension) {
103
- const isInstalled = wallet.installed;
104
- return /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
105
- isInstalled && !(externalWalletError == null ? void 0 : externalWalletError.length) ? /* @__PURE__ */ jsx(CenteredText, { color: "contrast", weight: "semiBold", children: `Confirm connection request in the ${wallet.name} browser extension.` }) : /* @__PURE__ */ jsxs(ErrorContainer, { children: [
106
- /* @__PURE__ */ jsx(ErrorIcon, { icon: "alertCircle" }),
107
- /* @__PURE__ */ jsx(CpslText, { weight: "semiBold", color: "error", children: isInstalled ? externalWalletError == null ? void 0 : externalWalletError[0] : `${wallet.name} not detected` })
108
- ] }),
109
- /* @__PURE__ */ jsxs(
110
- CpslButton,
111
- {
112
- as: isInstalled ? "button" : "a",
113
- href: (_a = wallet.downloadUrl) != null ? _a : "",
114
- target: "_blank",
115
- variant: "secondary",
116
- onClick: handleTryAgainClick,
117
- children: [
118
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: isInstalled ? "refresh" : "linkExternal" }),
119
- isInstalled ? "Try Again" : `Get ${wallet.name}`
120
- ]
121
- }
122
- )
123
- ] });
124
- }
125
- if (showMobile) {
126
- return /* @__PURE__ */ jsx(
127
- ExternalWalletMobileConnect,
128
- {
129
- wallet,
130
- qrUri,
131
- onConnectWc: (w) => __async(void 0, null, function* () {
132
- yield connectExternalWallet(w, true, true);
133
- })
134
- }
135
- );
136
- }
137
- }, [wallet, walletDisplayHelpers, externalWalletError, qrUri]);
138
- useEffect(() => {
139
- if (!wallet) {
140
- setStep(ModalStep.AUTH_MAIN);
141
- }
142
- }, [wallet]);
143
- if (!wallet) {
144
- return null;
145
- }
146
- return /* @__PURE__ */ jsx(Container, { children: Content });
147
- };
148
- const Container = safeStyled(StepContainer)`
149
- flex: 1;
150
- justify-content: space-between;
151
- `;
152
- const Text = safeStyled(CenteredText)`
153
- white-space: pre-line;
154
- `;
155
- const ExternalButton = safeStyled(CpslButton)`
156
- display: flex;
157
- gap: 8px;
158
- align-items: center;
159
- justify-content: center;
160
- width: 100%;
161
- cursor: pointer;
162
- margin-top: 8px;
163
- text-decoration: none;
164
- `;
165
- const ExternalIcon = safeStyled(CpslIcon)`
166
- --height: 20px;
167
- --width: 20px;
168
- `;
169
- const Link = safeStyled.a`
170
- text-decoration: none;
171
- `;
172
- export {
173
- ExternalWalletMobileConnect,
174
- ExternalWalletStep
175
- };
@@ -1,7 +0,0 @@
1
- import { Tab } from '../../types/commonTypes.js';
2
- export declare enum TabValue {
3
- extension = "extension",
4
- mobile = "mobile",
5
- web = "web"
6
- }
7
- export declare const TABS: Record<'extension' | 'mobile' | 'web', Tab<TabValue>>;
@@ -1,17 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- var TabValue = /* @__PURE__ */ ((TabValue2) => {
4
- TabValue2["extension"] = "extension";
5
- TabValue2["mobile"] = "mobile";
6
- TabValue2["web"] = "web";
7
- return TabValue2;
8
- })(TabValue || {});
9
- const TABS = {
10
- extension: { label: "Extension", value: "extension" /* extension */, icon: "puzzlePiece" },
11
- mobile: { label: "Mobile", value: "mobile" /* mobile */, icon: "phone" },
12
- web: { label: "Web", value: "web" /* web */, icon: "globe" }
13
- };
14
- export {
15
- TABS,
16
- TabValue
17
- };
@@ -1 +0,0 @@
1
- export declare const ExternalWalletVerificationStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,39 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslButton, CpslSpinner, CpslText } from "@getpara/react-components";
5
- import { safeStyled } from "@getpara/react-common";
6
- import { useModalStore } from "../../stores/index.js";
7
- import { ErrorContainer, ErrorIcon, Heading, InnerStepContainer, StepContainer } from "../common.js";
8
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
9
- import { useEffect, useRef } from "react";
10
- const ExternalWalletVerificationStep = () => {
11
- const effectRan = useRef(false);
12
- const { verifyWalletSignature } = useExternalWallets();
13
- const externalWalletError = useModalStore((state) => state.externalWalletError);
14
- useEffect(() => {
15
- const hasRun = effectRan.current;
16
- if (!hasRun) {
17
- verifyWalletSignature();
18
- effectRan.current = true;
19
- }
20
- }, []);
21
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
22
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
23
- /* @__PURE__ */ jsx(Heading, { variant: "headingS", weight: "bold", children: "Verify Your Wallet" }),
24
- /* @__PURE__ */ jsx(InlineText, { variant: "bodyS", color: "secondary", children: "Sign the message with your wallet to complete sign up." }),
25
- !!(externalWalletError == null ? void 0 : externalWalletError[0]) && /* @__PURE__ */ jsxs(ErrorContainer, { children: [
26
- /* @__PURE__ */ jsx(ErrorIcon, { icon: "alertCircle" }),
27
- /* @__PURE__ */ jsx(CpslText, { weight: "semiBold", color: "error", children: externalWalletError == null ? void 0 : externalWalletError[0] })
28
- ] })
29
- ] }),
30
- /* @__PURE__ */ jsx(InnerStepContainer, { children: !externalWalletError || !effectRan.current ? /* @__PURE__ */ jsx(CpslSpinner, {}) : /* @__PURE__ */ jsx(CpslButton, { onClick: verifyWalletSignature, children: "Retry" }) })
31
- ] });
32
- };
33
- const InlineText = safeStyled(CpslText)`
34
- text-align: center;
35
- display: inline-block;
36
- `;
37
- export {
38
- ExternalWalletVerificationStep
39
- };
@@ -1 +0,0 @@
1
- export declare const ExternalWallets: () => import("react/jsx-runtime").JSX.Element;