@getpara/react-sdk 2.0.0-alpha.6 → 2.0.0-alpha.60

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 (310) 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/css/modal.css +14 -1
  16. package/dist/evm/actions/getViemAccount.d.ts +22 -0
  17. package/dist/evm/actions/getViemAccount.js +20 -0
  18. package/dist/evm/actions/getViemClient.d.ts +7659 -0
  19. package/dist/evm/actions/getViemClient.js +25 -0
  20. package/dist/evm/actions/index.d.ts +2 -0
  21. package/dist/evm/actions/index.js +3 -0
  22. package/dist/evm/hooks/index.d.ts +2 -0
  23. package/dist/evm/hooks/index.js +3 -0
  24. package/dist/evm/hooks/useViemAccount.d.ts +26 -0
  25. package/dist/evm/hooks/useViemAccount.js +32 -0
  26. package/dist/evm/hooks/useViemClient.d.ts +7663 -0
  27. package/dist/evm/hooks/useViemClient.js +30 -0
  28. package/dist/evm/index.d.ts +2 -0
  29. package/dist/evm/index.js +3 -0
  30. package/dist/index.d.ts +3 -6
  31. package/dist/index.js +4 -9
  32. package/dist/provider/ParaProvider.d.ts +1 -2
  33. package/dist/provider/ParaProvider.js +17 -76
  34. package/dist/public/PPMori-Regular.woff2 +0 -0
  35. package/dist/public/PPMori-SemiBold.woff2 +0 -0
  36. package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
  37. package/dist/solana/actions/getSolanaSigner.js +15 -0
  38. package/dist/solana/actions/index.d.ts +1 -0
  39. package/dist/solana/actions/index.js +2 -0
  40. package/dist/solana/hooks/index.d.ts +1 -0
  41. package/dist/solana/hooks/index.js +2 -0
  42. package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
  43. package/dist/solana/hooks/useSolanaSigner.js +32 -0
  44. package/dist/solana/index.d.ts +2 -0
  45. package/dist/solana/index.js +3 -0
  46. package/package.json +37 -48
  47. package/styles.css/package.json +1 -1
  48. package/dist/cli/cli.mjs +0 -35
  49. package/dist/modal/ParaModal.d.ts +0 -2
  50. package/dist/modal/ParaModal.js +0 -262
  51. package/dist/modal/components/Account/Account.d.ts +0 -5
  52. package/dist/modal/components/Account/Account.js +0 -139
  53. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
  54. package/dist/modal/components/AddFunds/AddFunds.js +0 -69
  55. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
  56. package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
  57. package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
  58. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
  59. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
  60. package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
  61. package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
  62. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
  63. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  64. package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
  65. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  66. package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
  67. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
  68. package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
  69. package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
  70. package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
  71. package/dist/modal/components/AddFunds/common.d.ts +0 -19
  72. package/dist/modal/components/AddFunds/common.js +0 -24
  73. package/dist/modal/components/AddFunds/index.d.ts +0 -3
  74. package/dist/modal/components/AddFunds/index.js +0 -4
  75. package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -6
  76. package/dist/modal/components/AuthInput/AuthInput.js +0 -262
  77. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
  78. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  79. package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
  80. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  81. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  82. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
  83. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  84. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -157
  85. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
  86. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -67
  87. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  88. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  89. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  90. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  91. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  92. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  93. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  94. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
  95. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  96. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -63
  97. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  98. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -55
  99. package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
  100. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  101. package/dist/modal/components/Body/Body.d.ts +0 -11
  102. package/dist/modal/components/Body/Body.js +0 -327
  103. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
  104. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
  105. package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
  106. package/dist/modal/components/ChainSwitch/config.js +0 -17
  107. package/dist/modal/components/Controls/Controls.d.ts +0 -5
  108. package/dist/modal/components/Controls/Controls.js +0 -77
  109. package/dist/modal/components/Controls/Selects.d.ts +0 -2
  110. package/dist/modal/components/Controls/Selects.js +0 -189
  111. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -1
  112. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -144
  113. package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
  114. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  115. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  116. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -34
  117. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
  118. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -173
  119. package/dist/modal/components/Footer/Footer.d.ts +0 -1
  120. package/dist/modal/components/Footer/Footer.js +0 -95
  121. package/dist/modal/components/Header/Header.d.ts +0 -1
  122. package/dist/modal/components/Header/Header.js +0 -43
  123. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
  124. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -54
  125. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  126. package/dist/modal/components/Hero/Hero.js +0 -116
  127. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  128. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
  129. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -1
  130. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -31
  131. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
  132. package/dist/modal/components/ModalContent/ModalContent.js +0 -95
  133. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -2
  134. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -27
  135. package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
  136. package/dist/modal/components/OAuth/OAuth.js +0 -79
  137. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -1
  138. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -90
  139. package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
  140. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  141. package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
  142. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  143. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
  144. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
  145. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  146. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
  147. package/dist/modal/components/StripeComponents/StripeComponents.d.ts +0 -16
  148. package/dist/modal/components/StripeComponents/StripeComponents.js +0 -88
  149. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  150. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  151. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -1
  152. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -143
  153. package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
  154. package/dist/modal/components/Waiting/Waiting.js +0 -17
  155. package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
  156. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  157. package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
  158. package/dist/modal/components/WalletCard/WalletCard.js +0 -128
  159. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  160. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -73
  161. package/dist/modal/components/common.d.ts +0 -42
  162. package/dist/modal/components/common.js +0 -175
  163. package/dist/modal/components/index.d.ts +0 -1
  164. package/dist/modal/components/index.js +0 -2
  165. package/dist/modal/constants/constants.d.ts +0 -39
  166. package/dist/modal/constants/constants.js +0 -138
  167. package/dist/modal/constants/defaults.d.ts +0 -5
  168. package/dist/modal/constants/defaults.js +0 -10
  169. package/dist/modal/constants/oAuthLogos.d.ts +0 -8
  170. package/dist/modal/constants/oAuthLogos.js +0 -24
  171. package/dist/modal/hooks/useGoBack.d.ts +0 -1
  172. package/dist/modal/hooks/useGoBack.js +0 -43
  173. package/dist/modal/index.d.ts +0 -8
  174. package/dist/modal/index.js +0 -29
  175. package/dist/modal/stores/index.d.ts +0 -1
  176. package/dist/modal/stores/index.js +0 -2
  177. package/dist/modal/stores/modal/actions.d.ts +0 -3
  178. package/dist/modal/stores/modal/actions.js +0 -133
  179. package/dist/modal/stores/modal/useModalStore.d.ts +0 -102
  180. package/dist/modal/stores/modal/useModalStore.js +0 -68
  181. package/dist/modal/types/commonTypes.d.ts +0 -6
  182. package/dist/modal/types/commonTypes.js +0 -1
  183. package/dist/modal/types/externalWallets.d.ts +0 -33
  184. package/dist/modal/types/externalWallets.js +0 -32
  185. package/dist/modal/types/modalProps.d.ts +0 -124
  186. package/dist/modal/types/modalProps.js +0 -12
  187. package/dist/modal/utils/authInputHelpers.d.ts +0 -7
  188. package/dist/modal/utils/authInputHelpers.js +0 -38
  189. package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
  190. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  191. package/dist/modal/utils/countryCodes.d.ts +0 -8
  192. package/dist/modal/utils/countryCodes.js +0 -45
  193. package/dist/modal/utils/getMailtoLink.d.ts +0 -1
  194. package/dist/modal/utils/getMailtoLink.js +0 -10
  195. package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
  196. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  197. package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
  198. package/dist/modal/utils/isPasskeySupported.js +0 -15
  199. package/dist/modal/utils/openPopup.d.ts +0 -6
  200. package/dist/modal/utils/openPopup.js +0 -60
  201. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  202. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  203. package/dist/modal/utils/steps.d.ts +0 -120
  204. package/dist/modal/utils/steps.js +0 -247
  205. package/dist/modal/utils/stringFormatters.d.ts +0 -5
  206. package/dist/modal/utils/stringFormatters.js +0 -19
  207. package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
  208. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  209. package/dist/provider/actions/getAccount.d.ts +0 -26
  210. package/dist/provider/actions/getAccount.js +0 -51
  211. package/dist/provider/actions/getWallet.d.ts +0 -5
  212. package/dist/provider/actions/getWallet.js +0 -14
  213. package/dist/provider/actions/index.d.ts +0 -27
  214. package/dist/provider/actions/index.js +0 -59
  215. package/dist/provider/actions/utils.d.ts +0 -3
  216. package/dist/provider/actions/utils.js +0 -15
  217. package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
  218. package/dist/provider/components/CosmosWalletWrapper.js +0 -34
  219. package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
  220. package/dist/provider/components/EvmWalletWrapper.js +0 -34
  221. package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
  222. package/dist/provider/components/ExternalWalletWrapper.js +0 -139
  223. package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
  224. package/dist/provider/components/SolanaWalletWrapper.js +0 -36
  225. package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
  226. package/dist/provider/external/getParaCosmosConnector.js +0 -22
  227. package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
  228. package/dist/provider/external/getParaEvmConnector.js +0 -22
  229. package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
  230. package/dist/provider/external/getParaSolanaConnector.js +0 -22
  231. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -12
  232. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -18
  233. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -3
  234. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -21
  235. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -8
  236. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -14
  237. package/dist/provider/hooks/index.d.ts +0 -3
  238. package/dist/provider/hooks/index.js +0 -4
  239. package/dist/provider/hooks/mutations/index.d.ts +0 -26
  240. package/dist/provider/hooks/mutations/index.js +0 -61
  241. package/dist/provider/hooks/mutations/utils.d.ts +0 -4
  242. package/dist/provider/hooks/mutations/utils.js +0 -22
  243. package/dist/provider/hooks/queries/index.d.ts +0 -3
  244. package/dist/provider/hooks/queries/index.js +0 -10
  245. package/dist/provider/hooks/queries/useAccount.d.ts +0 -5
  246. package/dist/provider/hooks/queries/useAccount.js +0 -21
  247. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  248. package/dist/provider/hooks/queries/useWallet.js +0 -22
  249. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
  250. package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
  251. package/dist/provider/hooks/utils/index.d.ts +0 -3
  252. package/dist/provider/hooks/utils/index.js +0 -10
  253. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
  254. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  255. package/dist/provider/hooks/utils/useClient.d.ts +0 -5
  256. package/dist/provider/hooks/utils/useClient.js +0 -10
  257. package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
  258. package/dist/provider/hooks/utils/useEventListeners.js +0 -147
  259. package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
  260. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  261. package/dist/provider/hooks/utils/useModal.d.ts +0 -8
  262. package/dist/provider/hooks/utils/useModal.js +0 -17
  263. package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
  264. package/dist/provider/hooks/utils/useWalletState.js +0 -48
  265. package/dist/provider/index.d.ts +0 -4
  266. package/dist/provider/index.js +0 -9
  267. package/dist/provider/providers/AuthProvider.d.ts +0 -35
  268. package/dist/provider/providers/AuthProvider.js +0 -498
  269. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
  270. package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
  271. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
  272. package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
  273. package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -76
  274. package/dist/provider/providers/ExternalWalletProvider.js +0 -428
  275. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
  276. package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
  277. package/dist/provider/stores/getters.d.ts +0 -4
  278. package/dist/provider/stores/getters.js +0 -13
  279. package/dist/provider/stores/setters.d.ts +0 -1
  280. package/dist/provider/stores/setters.js +0 -7
  281. package/dist/provider/stores/slices/client.d.ts +0 -3
  282. package/dist/provider/stores/slices/client.js +0 -9
  283. package/dist/provider/stores/slices/config.d.ts +0 -3
  284. package/dist/provider/stores/slices/config.js +0 -9
  285. package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
  286. package/dist/provider/stores/slices/externalWallets.js +0 -40
  287. package/dist/provider/stores/slices/index.d.ts +0 -4
  288. package/dist/provider/stores/slices/index.js +0 -5
  289. package/dist/provider/stores/slices/modal.d.ts +0 -3
  290. package/dist/provider/stores/slices/modal.js +0 -16
  291. package/dist/provider/stores/slices/wallet.d.ts +0 -3
  292. package/dist/provider/stores/slices/wallet.js +0 -13
  293. package/dist/provider/stores/types.d.ts +0 -64
  294. package/dist/provider/stores/types.js +0 -1
  295. package/dist/provider/stores/useStore.d.ts +0 -17
  296. package/dist/provider/stores/useStore.js +0 -28
  297. package/dist/provider/types/externalWalletProviders.d.ts +0 -12
  298. package/dist/provider/types/externalWalletProviders.js +0 -1
  299. package/dist/provider/types/provider.d.ts +0 -147
  300. package/dist/provider/types/provider.js +0 -1
  301. package/dist/provider/types/query.d.ts +0 -3
  302. package/dist/provider/types/query.js +0 -1
  303. package/dist/provider/types/utils.d.ts +0 -22
  304. package/dist/provider/types/utils.js +0 -1
  305. package/dist/provider/utils/constants.d.ts +0 -5
  306. package/dist/provider/utils/constants.js +0 -10
  307. package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
  308. package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
  309. package/dist/provider/utils/renameMutations.d.ts +0 -5
  310. package/dist/provider/utils/renameMutations.js +0 -18
@@ -1,40 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { EvmExternalWalletContext } from "../../external/stubs/EvmExternalWalletContextStub.js";
4
- import { CosmosExternalWalletContext } from "../../external/stubs/CosmosExternalWalletContextStub.js";
5
- import { SolanaExternalWalletContext } from "../../external/stubs/SolanaExternalWalletContextStub.js";
6
- import { createRef } from "react";
7
- const createExternalWalletsSlice = (set) => ({
8
- externalWallets: [],
9
- setExternalWallets: (externalWallets) => set({ externalWallets }),
10
- externalWalletsWithFullAuth: [],
11
- setExternalWalletsWithFullAuth: (externalWalletsWithFullAuth) => set({ externalWalletsWithFullAuth }),
12
- evmContext: EvmExternalWalletContext,
13
- setEvmContext: (evmContext) => set({ evmContext }),
14
- EvmProvider: void 0,
15
- setEvmProvider: (EvmProvider) => set({ EvmProvider }),
16
- evmWallets: [],
17
- setEvmWallets: (evmWallets) => set({ evmWallets }),
18
- isLoadingEvmLib: true,
19
- setIsLoadingEvmLib: (isLoadingEvmLib) => set({ isLoadingEvmLib }),
20
- cosmosContext: CosmosExternalWalletContext,
21
- setCosmosContext: (cosmosContext) => set({ cosmosContext }),
22
- CosmosProvider: void 0,
23
- setCosmosProvider: (CosmosProvider) => set({ CosmosProvider }),
24
- cosmosWallets: [],
25
- setCosmosWallets: (cosmosWallets) => set({ cosmosWallets }),
26
- isLoadingCosmosLib: true,
27
- setIsLoadingCosmosLib: (isLoadingCosmosLib) => set({ isLoadingCosmosLib }),
28
- solanaContext: SolanaExternalWalletContext,
29
- setSolanaContext: (solanaContext) => set({ solanaContext }),
30
- SolanaProvider: void 0,
31
- setSolanaProvider: (SolanaProvider) => set({ SolanaProvider }),
32
- solanaWallets: [],
33
- setSolanaWallets: (solanaWallets) => set({ solanaWallets }),
34
- isLoadingSolanaLib: true,
35
- setIsLoadingSolanaLib: (isLoadingSolanaLib) => set({ isLoadingSolanaLib }),
36
- onLoginRef: createRef()
37
- });
38
- export {
39
- createExternalWalletsSlice
40
- };
@@ -1,4 +0,0 @@
1
- export * from './client.js';
2
- export * from './modal.js';
3
- export * from './wallet.js';
4
- export * from './externalWallets.js';
@@ -1,5 +0,0 @@
1
- "use client";
2
- export * from "./client.js";
3
- export * from "./modal.js";
4
- export * from "./wallet.js";
5
- export * from "./externalWallets.js";
@@ -1,3 +0,0 @@
1
- import { StateCreator } from 'zustand';
2
- import { ModalSlice, Store } from '../types.js';
3
- export declare const createModalSlice: StateCreator<Store, [], [], ModalSlice>;
@@ -1,16 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- const createModalSlice = (set, get) => {
4
- var _a, _b, _c, _d, _e, _f, _g;
5
- return {
6
- modalConfig: void 0,
7
- setModalConfig: (modalConfig) => set({ modalConfig }),
8
- isDarkTheme: ((_c = (_b = (_a = get()) == null ? void 0 : _a.modalConfig) == null ? void 0 : _b.theme) == null ? void 0 : _c.mode) === "dark",
9
- oAuthLogoVariant: (_g = (_f = (_e = (_d = get()) == null ? void 0 : _d.modalConfig) == null ? void 0 : _e.theme) == null ? void 0 : _f.oAuthLogoVariant) != null ? _g : "default",
10
- isOpen: false,
11
- setIsOpen: (isOpen) => set({ isOpen })
12
- };
13
- };
14
- export {
15
- createModalSlice
16
- };
@@ -1,3 +0,0 @@
1
- import { StateCreator } from 'zustand';
2
- import { Store, WalletSlice } from '../types.js';
3
- export declare const createWalletSlice: StateCreator<Store, [], [], WalletSlice>;
@@ -1,13 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- const createWalletSlice = (set) => ({
4
- rpcUrl: void 0,
5
- setRpcUrl: (rpcUrl) => set({ rpcUrl }),
6
- selectedWalletId: void 0,
7
- selectedWalletType: void 0,
8
- setSelectedWallet: (selectedWalletId, selectedWalletType) => set({ selectedWalletId, selectedWalletType }),
9
- clearSelectedWallet: () => set({ selectedWalletId: void 0, selectedWalletType: void 0 })
10
- });
11
- export {
12
- createWalletSlice
13
- };
@@ -1,64 +0,0 @@
1
- import { Context, MutableRefObject } from 'react';
2
- import ParaWeb, { TWalletType } from '@getpara/web-sdk';
3
- import { EvmExternalWalletContextType, ParaEvmProvider, WalletList as EvmWalletList } from '@getpara/evm-wallet-connectors';
4
- import { CosmosExternalWalletContextType, ParaCosmosProvider, WalletList as CosmosWalletList } from '@getpara/cosmos-wallet-connectors';
5
- import { ParaSolanaProvider, SolanaExternalWalletContextType, WalletList as SolanaWalletList } from '@getpara/solana-wallet-connectors';
6
- import { ParaModalProps } from '../../modal/index.js';
7
- import { OAuthLogoVariantType } from '../../modal/types/modalProps.js';
8
- import { type TExternalWallet } from '@getpara/react-common';
9
- export interface ClientSlice {
10
- client?: ParaWeb;
11
- setClient: (_: ParaWeb) => void;
12
- }
13
- export interface ConfigSlice {
14
- appName: string;
15
- setAppName: (_: string) => void;
16
- }
17
- export interface ModalSlice {
18
- modalConfig?: ParaModalProps;
19
- setModalConfig: (_?: ParaModalProps) => void;
20
- isDarkTheme: boolean;
21
- oAuthLogoVariant: OAuthLogoVariantType;
22
- isOpen: boolean;
23
- setIsOpen: (_: boolean) => void;
24
- }
25
- export interface WalletSlice {
26
- rpcUrl?: string;
27
- setRpcUrl: (_?: string) => void;
28
- selectedWalletId?: string;
29
- selectedWalletType?: TWalletType;
30
- setSelectedWallet: (_?: string, __?: TWalletType) => void;
31
- clearSelectedWallet: () => void;
32
- }
33
- export interface ExternalWalletsSlice {
34
- externalWallets: TExternalWallet[];
35
- setExternalWallets: (_: TExternalWallet[]) => void;
36
- externalWalletsWithFullAuth: TExternalWallet[];
37
- setExternalWalletsWithFullAuth: (_: TExternalWallet[]) => void;
38
- evmContext: Context<EvmExternalWalletContextType>;
39
- setEvmContext: (_: Context<EvmExternalWalletContextType>) => void;
40
- EvmProvider?: typeof ParaEvmProvider;
41
- setEvmProvider: (_: typeof ParaEvmProvider) => void;
42
- evmWallets: EvmWalletList;
43
- setEvmWallets: (_: EvmWalletList) => void;
44
- isLoadingEvmLib: boolean;
45
- setIsLoadingEvmLib: (_: boolean) => void;
46
- cosmosContext: Context<CosmosExternalWalletContextType>;
47
- setCosmosContext: (_: Context<CosmosExternalWalletContextType>) => void;
48
- CosmosProvider?: typeof ParaCosmosProvider;
49
- setCosmosProvider: (_: typeof ParaCosmosProvider) => void;
50
- cosmosWallets: CosmosWalletList;
51
- setCosmosWallets: (_: CosmosWalletList) => void;
52
- isLoadingCosmosLib: boolean;
53
- setIsLoadingCosmosLib: (_: boolean) => void;
54
- solanaContext: Context<SolanaExternalWalletContextType>;
55
- setSolanaContext: (_: Context<SolanaExternalWalletContextType>) => void;
56
- SolanaProvider?: typeof ParaSolanaProvider;
57
- setSolanaProvider: (_: typeof ParaSolanaProvider) => void;
58
- solanaWallets: SolanaWalletList;
59
- setSolanaWallets: (_: SolanaWalletList) => void;
60
- isLoadingSolanaLib: boolean;
61
- setIsLoadingSolanaLib: (_: boolean) => void;
62
- onLoginRef: MutableRefObject<(() => Promise<void>) | null>;
63
- }
64
- export type Store = ClientSlice & ModalSlice & WalletSlice & ExternalWalletsSlice & ConfigSlice;
@@ -1 +0,0 @@
1
- "use client";
@@ -1,17 +0,0 @@
1
- import { StoreApi } from 'zustand';
2
- import { Store } from './types.js';
3
- export declare const vanillaStore: Omit<StoreApi<Store>, "persist"> & {
4
- persist: {
5
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<Store, Pick<Store, "selectedWalletId" | "selectedWalletType">>>) => void;
6
- clearStorage: () => void;
7
- rehydrate: () => Promise<void> | void;
8
- hasHydrated: () => boolean;
9
- onHydrate: (fn: (state: Store) => void) => () => void;
10
- onFinishHydration: (fn: (state: Store) => void) => () => void;
11
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<Store, Pick<Store, "selectedWalletId" | "selectedWalletType">>>;
12
- };
13
- };
14
- export declare const useStore: {
15
- (): Store;
16
- <T>(selector: (state: Store) => T): T;
17
- };
@@ -1,28 +0,0 @@
1
- "use client";
2
- import {
3
- __spreadValues
4
- } from "../../chunk-MMUBH76A.js";
5
- import { createStore, useStore as useZustandStore } from "zustand";
6
- import { createClientSlice, createExternalWalletsSlice, createModalSlice, createWalletSlice } from "./slices/index.js";
7
- import { createJSONStorage, persist } from "zustand/middleware";
8
- import { createConfigSlice } from "./slices/config.js";
9
- const vanillaStore = createStore()(
10
- persist(
11
- (...a) => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, createClientSlice(...a)), createModalSlice(...a)), createWalletSlice(...a)), createExternalWalletsSlice(...a)), createConfigSlice(...a)),
12
- {
13
- version: 1,
14
- name: "@PARA/provider-state",
15
- storage: createJSONStorage(() => localStorage),
16
- partialize: (state) => ({
17
- selectedWalletId: state.selectedWalletId,
18
- selectedWalletType: state.selectedWalletType
19
- })
20
- }
21
- )
22
- );
23
- const createBoundedUseStore = (store) => (selector) => useZustandStore(store, selector);
24
- const useStore = createBoundedUseStore(vanillaStore);
25
- export {
26
- useStore,
27
- vanillaStore
28
- };
@@ -1,12 +0,0 @@
1
- import { ParaCosmosProviderConfig } from '@getpara/cosmos-wallet-connectors';
2
- import { ParaSolanaProviderConfig } from '@getpara/solana-wallet-connectors';
3
- import { Chain, Transport } from 'viem';
4
- import { type ParaEvmProviderConfig } from '@getpara/evm-wallet-connectors';
5
- import { type TExternalWallet } from '@getpara/react-common';
6
- export type ExternalWalletProviderCommon = {
7
- isUsing: boolean;
8
- wallets: TExternalWallet[];
9
- };
10
- export type ParaEvmProviderConfigNoWallets<chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]['id'], Transport>> = Omit<ParaEvmProviderConfig<chains, transports>, 'wallets'>;
11
- export type ParaCosmosProviderConfigNoWallets = Omit<ParaCosmosProviderConfig, 'wallets'>;
12
- export type ParaSolanaProviderConfigNoWallets = Omit<ParaSolanaProviderConfig, 'wallets'>;
@@ -1 +0,0 @@
1
- "use client";
@@ -1,147 +0,0 @@
1
- import { ParaWagmiProviderProps } from '@getpara/evm-wallet-connectors';
2
- import ParaWeb, { AccountCreationEvent, AccountSetupEvent, ConstructorOpts, Environment, ExternalWalletChangeEvent, LoginEvent, LogoutEvent, PregenWalletClaimedEvent, SignMessageEvent, SignTransactionEvent, WalletCreatedEvent, WalletsChangeEvent, GuestWalletsCreatedEvent } from '@getpara/web-sdk';
3
- import { PropsWithChildren } from 'react';
4
- import { Chain, Transport } from 'viem';
5
- import { ParaModalProps } from '../../modal/index.js';
6
- import { ParaGrazProviderProps } from '@getpara/cosmos-wallet-connectors';
7
- import { ParaCosmosProviderConfigNoWallets, ParaEvmProviderConfigNoWallets, ParaSolanaProviderConfigNoWallets } from './externalWalletProviders.js';
8
- import { type TExternalWallet } from '@getpara/react-common';
9
- export type Callbacks = {
10
- onLogout?: (event: LogoutEvent) => void;
11
- onLogin?: (event: LoginEvent) => void;
12
- onAccountSetup?: (event: AccountSetupEvent) => void;
13
- onAccountCreation?: (event: AccountCreationEvent) => void;
14
- onSignMessage?: (event: SignMessageEvent) => void;
15
- onSignTransaction?: (event: SignTransactionEvent) => void;
16
- onExternalWalletChange?: (event: ExternalWalletChangeEvent) => void;
17
- onWalletsChange?: (event: WalletsChangeEvent) => void;
18
- onWalletCreated?: (event: WalletCreatedEvent) => void;
19
- onPregenWalletClaimed?: (event: PregenWalletClaimedEvent) => void;
20
- onGuestWalletsCreated?: (event: GuestWalletsCreatedEvent) => void;
21
- };
22
- export type ParaProviderConfig = {
23
- /**
24
- * The name of your app, used throughout the modal and any configured external wallets.
25
- */
26
- appName: string;
27
- /**
28
- * Disables the automatic session keep alive that's provided by ParaProvider.
29
- */
30
- disableAutoSessionKeepAlive?: boolean;
31
- /**
32
- * Disables the ParaModal that's provided by ParaProvider. Use this is you're providing a separate modal in another location in your app.
33
- */
34
- disableEmbeddedModal?: boolean;
35
- /**
36
- * RPC url to use for retrieving the embedded wallet balance
37
- */
38
- rpcUrl?: string;
39
- };
40
- export type ExternalWalletConfig<chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]['id'], Transport>> = {
41
- /**
42
- * A description of your app, displayed in some external wallets.
43
- */
44
- appDescription?: string;
45
- /**
46
- * A URL for your app, displayed in some external wallets.
47
- */
48
- appUrl?: string;
49
- /**
50
- * An icon for your app, displayed in some external wallets.
51
- */
52
- appIcon?: string;
53
- /**
54
- * Config for the EVM external wallets connector using Wagmi.
55
- *
56
- * NOTE: In addition to this config, you MUST also have the `@getpara/evm-wallet-connectors` package installed.
57
- */
58
- evmConnector?: {
59
- /**
60
- * Config for the Para EVM external wallets connector.
61
- */
62
- config: Omit<ParaEvmProviderConfigNoWallets<chains, transports>, 'appName' | 'appDescription' | 'appUrl' | 'appIcon' | 'projectId'>;
63
- /**
64
- * Config for the Wagmi provider.
65
- */
66
- wagmiProviderProps?: ParaWagmiProviderProps;
67
- };
68
- /**
69
- * Config for the Cosmos external wallets connector using Graz.
70
- *
71
- * NOTE: In addition to this config, you MUST also have the `@getpara/cosmos-wallet-connectors` package installed.
72
- */
73
- cosmosConnector?: {
74
- /**
75
- * Config for the Para Cosmos external wallets connector.
76
- */
77
- config: ParaCosmosProviderConfigNoWallets;
78
- /**
79
- * Config for the Graz provider.
80
- */
81
- grazProviderProps?: ParaGrazProviderProps;
82
- };
83
- /**
84
- * Config for the Solana external wallets connector using @solana/wallet-adapter-react.
85
- *
86
- * NOTE: In addition to this config, you MUST also have the `@getpara/solana-wallet-connectors` package installed.
87
- */
88
- solanaConnector?: {
89
- /**
90
- * Config for the Para Solana external wallets connector.
91
- */
92
- config: Omit<ParaSolanaProviderConfigNoWallets, 'appIdentity'> & Pick<Partial<ParaSolanaProviderConfigNoWallets>, 'appIdentity'>;
93
- };
94
- /**
95
- * Config for any connectors that use Wallet Connect.
96
- */
97
- walletConnect?: {
98
- /**
99
- * Your Wallet Connect project ID.
100
- */
101
- projectId: string;
102
- };
103
- /**
104
- * Which external wallets to show and in what order they should be displayed.
105
- *
106
- * NOTE: Any wallets that are detected as installed will be sorted first, followed by those that are not detected or not installed.
107
- */
108
- wallets?: TExternalWallet[];
109
- /**
110
- * Which external wallets will include full verification and Para auth.
111
- */
112
- walletsWithParaAuth?: TExternalWallet[];
113
- };
114
- export interface ParaProviderProps<chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]['id'], Transport>> extends PropsWithChildren {
115
- /**
116
- * Arguments to setup a new Para instance, or a Para instance you have already instantiated.
117
- */
118
- paraClientConfig: {
119
- /**
120
- * Environment for your Para instance.
121
- */
122
- env: Environment;
123
- /**
124
- * API key for you Para instance.
125
- *
126
- * NOTE: Be sure this key matches the environment.
127
- */
128
- apiKey: string;
129
- opts?: ConstructorOpts;
130
- } | ParaWeb;
131
- /**
132
- * Configuration used for the Para modal.
133
- */
134
- paraModalConfig?: ParaModalProps;
135
- /**
136
- * Callbacks fired for events from the Para instance.
137
- */
138
- callbacks?: Callbacks;
139
- /**
140
- * Config for the ParaProvider.
141
- */
142
- config: ParaProviderConfig;
143
- /**
144
- * Config for any external wallets.
145
- */
146
- externalWalletConfig?: ExternalWalletConfig<chains, transports>;
147
- }
@@ -1 +0,0 @@
1
- "use client";
@@ -1,3 +0,0 @@
1
- import { UseMutationResult } from '@tanstack/react-query';
2
- import { Compute, UnionStrictOmit } from './utils.js';
3
- export type UseMutationReturnType<data = unknown, error = Error, variables = void, context = unknown> = Compute<UnionStrictOmit<UseMutationResult<data, error, variables, context>, 'mutate' | 'mutateAsync'>>;
@@ -1 +0,0 @@
1
- "use client";
@@ -1,22 +0,0 @@
1
- import { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } from '@getpara/web-sdk';
2
- import { UseMutationReturnType } from './query.js';
3
- import { UseMutateFunction, UseMutateAsyncFunction } from '@tanstack/react-query';
4
- export type Compute<type> = {
5
- [key in keyof type]: type[key];
6
- } & unknown;
7
- /** Strict version of built-in Omit type */
8
- export type StrictOmit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
9
- export type UnionStrictOmit<type, keys extends keyof type> = type extends any ? StrictOmit<type, keys> : never;
10
- export type ChangeFields<T, R> = Omit<T, keyof R> & R;
11
- type SyncHook<method extends CoreMethodName & keyof CoreMethods> = {
12
- mutate: UseMutateFunction<Awaited<CoreMethodResponse<method>>, Error, CoreMethodParams<method> | void, unknown>;
13
- } & {
14
- [K in method]: UseMutateFunction<Awaited<CoreMethodResponse<method>>, Error, CoreMethodParams<method> | void, unknown>;
15
- };
16
- type AsyncHook<method extends CoreMethodName & keyof CoreMethods> = {
17
- mutateAsync: UseMutateAsyncFunction<CoreMethodResponse<method>, Error, CoreMethodParams<method> | void, unknown>;
18
- } & {
19
- [K in `${method}Async`]: UseMutateAsyncFunction<CoreMethodResponse<method>, Error, CoreMethodParams<method> | void, unknown>;
20
- };
21
- export type CoreMethodHook<method extends CoreMethodName & keyof CoreMethods> = Compute<UseMutationReturnType<CoreMethods[method]['response'], Error, CoreMethods[method]['params'] | void, unknown> & SyncHook<method> & AsyncHook<method>>;
22
- export {};
@@ -1 +0,0 @@
1
- "use client";
@@ -1,5 +0,0 @@
1
- export declare const EXTERNAL_WALLET_PACKAGE_BY_TYPE: {
2
- EVM: string;
3
- COSMOS: string;
4
- SOLANA: string;
5
- };
@@ -1,10 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- const EXTERNAL_WALLET_PACKAGE_BY_TYPE = {
4
- EVM: "Wagmi",
5
- COSMOS: "Graz",
6
- SOLANA: "@solana/wallet-adapter-react"
7
- };
8
- export {
9
- EXTERNAL_WALLET_PACKAGE_BY_TYPE
10
- };
@@ -1,7 +0,0 @@
1
- import ParaWeb, { ConstructorOpts, Environment } from '@getpara/web-sdk';
2
- export declare function isConfigType(obj: any): obj is {
3
- env: Environment;
4
- apiKey: string;
5
- opts?: ConstructorOpts;
6
- };
7
- export declare function isParaWeb(obj: any): obj is ParaWeb;
@@ -1,13 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- import ParaWeb from "@getpara/web-sdk";
4
- function isConfigType(obj) {
5
- return !!obj && typeof obj === "object" && "env" in obj && "apiKey" in obj;
6
- }
7
- function isParaWeb(obj) {
8
- return obj instanceof ParaWeb;
9
- }
10
- export {
11
- isConfigType,
12
- isParaWeb
13
- };
@@ -1,5 +0,0 @@
1
- import { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } from '@getpara/web-sdk';
2
- import { DefaultError, UseMutationResult } from '@tanstack/react-query';
3
- import { CoreMethodHook } from '../types/utils.js';
4
- export declare function renameMutations<TResp = unknown, TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(mutationObj: UseMutationResult<TData, TError, TVariables, TContext>, name: string): TResp;
5
- export declare function renameCoreMutations<method extends CoreMethodName & keyof CoreMethods>(mutationObj: UseMutationResult<CoreMethodResponse<method>, Error, CoreMethodParams<method> | undefined, unknown>, name: method): CoreMethodHook<method>;
@@ -1,18 +0,0 @@
1
- "use client";
2
- import {
3
- __spreadValues
4
- } from "../../chunk-MMUBH76A.js";
5
- function renameMutations(mutationObj, name) {
6
- const newMutations = {
7
- [name]: mutationObj.mutate,
8
- [`${name}Async`]: mutationObj.mutateAsync
9
- };
10
- return __spreadValues(__spreadValues({}, newMutations), mutationObj);
11
- }
12
- function renameCoreMutations(mutationObj, name) {
13
- return renameMutations(mutationObj, name);
14
- }
15
- export {
16
- renameCoreMutations,
17
- renameMutations
18
- };