@getpara/react-sdk 2.0.0-alpha.7 → 2.0.0-alpha.71

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 (311) hide show
  1. package/README.md +21 -0
  2. package/dist/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
  3. package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
  4. package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
  5. package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
  6. package/dist/cosmos/actions/index.d.ts +2 -0
  7. package/dist/cosmos/actions/index.js +3 -0
  8. package/dist/cosmos/hooks/index.d.ts +2 -0
  9. package/dist/cosmos/hooks/index.js +3 -0
  10. package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
  11. package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
  12. package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
  13. package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
  14. package/dist/cosmos/index.d.ts +2 -0
  15. package/dist/cosmos/index.js +3 -0
  16. package/dist/css/modal.css +14 -1
  17. package/dist/evm/actions/getViemAccount.d.ts +22 -0
  18. package/dist/evm/actions/getViemAccount.js +20 -0
  19. package/dist/evm/actions/getViemClient.d.ts +17993 -0
  20. package/dist/evm/actions/getViemClient.js +25 -0
  21. package/dist/evm/actions/index.d.ts +2 -0
  22. package/dist/evm/actions/index.js +3 -0
  23. package/dist/evm/hooks/index.d.ts +2 -0
  24. package/dist/evm/hooks/index.js +3 -0
  25. package/dist/evm/hooks/useViemAccount.d.ts +26 -0
  26. package/dist/evm/hooks/useViemAccount.js +32 -0
  27. package/dist/evm/hooks/useViemClient.d.ts +17997 -0
  28. package/dist/evm/hooks/useViemClient.js +30 -0
  29. package/dist/evm/index.d.ts +2 -0
  30. package/dist/evm/index.js +3 -0
  31. package/dist/index.d.ts +3 -6
  32. package/dist/index.js +4 -9
  33. package/dist/provider/ParaProvider.d.ts +1 -2
  34. package/dist/provider/ParaProvider.js +17 -76
  35. package/dist/public/PPMori-Regular.woff2 +0 -0
  36. package/dist/public/PPMori-SemiBold.woff2 +0 -0
  37. package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
  38. package/dist/solana/actions/getSolanaSigner.js +15 -0
  39. package/dist/solana/actions/index.d.ts +1 -0
  40. package/dist/solana/actions/index.js +2 -0
  41. package/dist/solana/hooks/index.d.ts +1 -0
  42. package/dist/solana/hooks/index.js +2 -0
  43. package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
  44. package/dist/solana/hooks/useSolanaSigner.js +32 -0
  45. package/dist/solana/index.d.ts +2 -0
  46. package/dist/solana/index.js +3 -0
  47. package/package.json +37 -51
  48. package/styles.css/package.json +1 -1
  49. package/dist/cli/cli.mjs +0 -35
  50. package/dist/modal/ParaModal.d.ts +0 -2
  51. package/dist/modal/ParaModal.js +0 -262
  52. package/dist/modal/components/Account/Account.d.ts +0 -5
  53. package/dist/modal/components/Account/Account.js +0 -139
  54. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
  55. package/dist/modal/components/AddFunds/AddFunds.js +0 -69
  56. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
  57. package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
  58. package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
  59. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
  60. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
  61. package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
  62. package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
  63. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
  64. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  65. package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
  66. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  67. package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
  68. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
  69. package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
  70. package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
  71. package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
  72. package/dist/modal/components/AddFunds/common.d.ts +0 -19
  73. package/dist/modal/components/AddFunds/common.js +0 -24
  74. package/dist/modal/components/AddFunds/index.d.ts +0 -3
  75. package/dist/modal/components/AddFunds/index.js +0 -4
  76. package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -6
  77. package/dist/modal/components/AuthInput/AuthInput.js +0 -262
  78. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
  79. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  80. package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
  81. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  82. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  83. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
  84. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  85. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -157
  86. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
  87. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -67
  88. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  89. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  90. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  91. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  92. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  93. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  94. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  95. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
  96. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  97. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -63
  98. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  99. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -55
  100. package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
  101. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  102. package/dist/modal/components/Body/Body.d.ts +0 -11
  103. package/dist/modal/components/Body/Body.js +0 -327
  104. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
  105. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
  106. package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
  107. package/dist/modal/components/ChainSwitch/config.js +0 -17
  108. package/dist/modal/components/Controls/Controls.d.ts +0 -5
  109. package/dist/modal/components/Controls/Controls.js +0 -77
  110. package/dist/modal/components/Controls/Selects.d.ts +0 -2
  111. package/dist/modal/components/Controls/Selects.js +0 -189
  112. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -1
  113. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -144
  114. package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
  115. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  116. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  117. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -34
  118. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
  119. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -173
  120. package/dist/modal/components/Footer/Footer.d.ts +0 -1
  121. package/dist/modal/components/Footer/Footer.js +0 -95
  122. package/dist/modal/components/Header/Header.d.ts +0 -1
  123. package/dist/modal/components/Header/Header.js +0 -43
  124. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
  125. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -54
  126. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  127. package/dist/modal/components/Hero/Hero.js +0 -116
  128. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  129. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
  130. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -1
  131. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -31
  132. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
  133. package/dist/modal/components/ModalContent/ModalContent.js +0 -95
  134. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -2
  135. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -27
  136. package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
  137. package/dist/modal/components/OAuth/OAuth.js +0 -79
  138. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -1
  139. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -90
  140. package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
  141. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  142. package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
  143. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  144. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
  145. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
  146. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  147. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
  148. package/dist/modal/components/StripeComponents/StripeComponents.d.ts +0 -16
  149. package/dist/modal/components/StripeComponents/StripeComponents.js +0 -88
  150. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  151. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  152. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -1
  153. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -143
  154. package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
  155. package/dist/modal/components/Waiting/Waiting.js +0 -17
  156. package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
  157. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  158. package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
  159. package/dist/modal/components/WalletCard/WalletCard.js +0 -128
  160. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  161. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -73
  162. package/dist/modal/components/common.d.ts +0 -42
  163. package/dist/modal/components/common.js +0 -175
  164. package/dist/modal/components/index.d.ts +0 -1
  165. package/dist/modal/components/index.js +0 -2
  166. package/dist/modal/constants/constants.d.ts +0 -39
  167. package/dist/modal/constants/constants.js +0 -138
  168. package/dist/modal/constants/defaults.d.ts +0 -5
  169. package/dist/modal/constants/defaults.js +0 -10
  170. package/dist/modal/constants/oAuthLogos.d.ts +0 -8
  171. package/dist/modal/constants/oAuthLogos.js +0 -24
  172. package/dist/modal/hooks/useGoBack.d.ts +0 -1
  173. package/dist/modal/hooks/useGoBack.js +0 -43
  174. package/dist/modal/index.d.ts +0 -8
  175. package/dist/modal/index.js +0 -29
  176. package/dist/modal/stores/index.d.ts +0 -1
  177. package/dist/modal/stores/index.js +0 -2
  178. package/dist/modal/stores/modal/actions.d.ts +0 -3
  179. package/dist/modal/stores/modal/actions.js +0 -133
  180. package/dist/modal/stores/modal/useModalStore.d.ts +0 -102
  181. package/dist/modal/stores/modal/useModalStore.js +0 -68
  182. package/dist/modal/types/commonTypes.d.ts +0 -6
  183. package/dist/modal/types/commonTypes.js +0 -1
  184. package/dist/modal/types/externalWallets.d.ts +0 -33
  185. package/dist/modal/types/externalWallets.js +0 -32
  186. package/dist/modal/types/modalProps.d.ts +0 -124
  187. package/dist/modal/types/modalProps.js +0 -12
  188. package/dist/modal/utils/authInputHelpers.d.ts +0 -7
  189. package/dist/modal/utils/authInputHelpers.js +0 -38
  190. package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
  191. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  192. package/dist/modal/utils/countryCodes.d.ts +0 -8
  193. package/dist/modal/utils/countryCodes.js +0 -45
  194. package/dist/modal/utils/getMailtoLink.d.ts +0 -1
  195. package/dist/modal/utils/getMailtoLink.js +0 -10
  196. package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
  197. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  198. package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
  199. package/dist/modal/utils/isPasskeySupported.js +0 -15
  200. package/dist/modal/utils/openPopup.d.ts +0 -6
  201. package/dist/modal/utils/openPopup.js +0 -60
  202. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  203. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  204. package/dist/modal/utils/steps.d.ts +0 -120
  205. package/dist/modal/utils/steps.js +0 -247
  206. package/dist/modal/utils/stringFormatters.d.ts +0 -5
  207. package/dist/modal/utils/stringFormatters.js +0 -19
  208. package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
  209. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  210. package/dist/provider/actions/getAccount.d.ts +0 -26
  211. package/dist/provider/actions/getAccount.js +0 -51
  212. package/dist/provider/actions/getWallet.d.ts +0 -5
  213. package/dist/provider/actions/getWallet.js +0 -14
  214. package/dist/provider/actions/index.d.ts +0 -27
  215. package/dist/provider/actions/index.js +0 -59
  216. package/dist/provider/actions/utils.d.ts +0 -3
  217. package/dist/provider/actions/utils.js +0 -15
  218. package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
  219. package/dist/provider/components/CosmosWalletWrapper.js +0 -34
  220. package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
  221. package/dist/provider/components/EvmWalletWrapper.js +0 -34
  222. package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
  223. package/dist/provider/components/ExternalWalletWrapper.js +0 -139
  224. package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
  225. package/dist/provider/components/SolanaWalletWrapper.js +0 -36
  226. package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
  227. package/dist/provider/external/getParaCosmosConnector.js +0 -22
  228. package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
  229. package/dist/provider/external/getParaEvmConnector.js +0 -22
  230. package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
  231. package/dist/provider/external/getParaSolanaConnector.js +0 -22
  232. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -12
  233. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -18
  234. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -3
  235. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -21
  236. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -8
  237. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -14
  238. package/dist/provider/hooks/index.d.ts +0 -3
  239. package/dist/provider/hooks/index.js +0 -4
  240. package/dist/provider/hooks/mutations/index.d.ts +0 -26
  241. package/dist/provider/hooks/mutations/index.js +0 -61
  242. package/dist/provider/hooks/mutations/utils.d.ts +0 -4
  243. package/dist/provider/hooks/mutations/utils.js +0 -22
  244. package/dist/provider/hooks/queries/index.d.ts +0 -3
  245. package/dist/provider/hooks/queries/index.js +0 -10
  246. package/dist/provider/hooks/queries/useAccount.d.ts +0 -5
  247. package/dist/provider/hooks/queries/useAccount.js +0 -21
  248. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  249. package/dist/provider/hooks/queries/useWallet.js +0 -22
  250. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
  251. package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
  252. package/dist/provider/hooks/utils/index.d.ts +0 -3
  253. package/dist/provider/hooks/utils/index.js +0 -10
  254. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
  255. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  256. package/dist/provider/hooks/utils/useClient.d.ts +0 -5
  257. package/dist/provider/hooks/utils/useClient.js +0 -10
  258. package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
  259. package/dist/provider/hooks/utils/useEventListeners.js +0 -147
  260. package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
  261. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  262. package/dist/provider/hooks/utils/useModal.d.ts +0 -8
  263. package/dist/provider/hooks/utils/useModal.js +0 -17
  264. package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
  265. package/dist/provider/hooks/utils/useWalletState.js +0 -48
  266. package/dist/provider/index.d.ts +0 -4
  267. package/dist/provider/index.js +0 -9
  268. package/dist/provider/providers/AuthProvider.d.ts +0 -35
  269. package/dist/provider/providers/AuthProvider.js +0 -498
  270. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
  271. package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
  272. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
  273. package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
  274. package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -76
  275. package/dist/provider/providers/ExternalWalletProvider.js +0 -428
  276. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
  277. package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
  278. package/dist/provider/stores/getters.d.ts +0 -4
  279. package/dist/provider/stores/getters.js +0 -13
  280. package/dist/provider/stores/setters.d.ts +0 -1
  281. package/dist/provider/stores/setters.js +0 -7
  282. package/dist/provider/stores/slices/client.d.ts +0 -3
  283. package/dist/provider/stores/slices/client.js +0 -9
  284. package/dist/provider/stores/slices/config.d.ts +0 -3
  285. package/dist/provider/stores/slices/config.js +0 -9
  286. package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
  287. package/dist/provider/stores/slices/externalWallets.js +0 -40
  288. package/dist/provider/stores/slices/index.d.ts +0 -4
  289. package/dist/provider/stores/slices/index.js +0 -5
  290. package/dist/provider/stores/slices/modal.d.ts +0 -3
  291. package/dist/provider/stores/slices/modal.js +0 -16
  292. package/dist/provider/stores/slices/wallet.d.ts +0 -3
  293. package/dist/provider/stores/slices/wallet.js +0 -13
  294. package/dist/provider/stores/types.d.ts +0 -64
  295. package/dist/provider/stores/types.js +0 -1
  296. package/dist/provider/stores/useStore.d.ts +0 -17
  297. package/dist/provider/stores/useStore.js +0 -28
  298. package/dist/provider/types/externalWalletProviders.d.ts +0 -12
  299. package/dist/provider/types/externalWalletProviders.js +0 -1
  300. package/dist/provider/types/provider.d.ts +0 -147
  301. package/dist/provider/types/provider.js +0 -1
  302. package/dist/provider/types/query.d.ts +0 -3
  303. package/dist/provider/types/query.js +0 -1
  304. package/dist/provider/types/utils.d.ts +0 -22
  305. package/dist/provider/types/utils.js +0 -1
  306. package/dist/provider/utils/constants.d.ts +0 -5
  307. package/dist/provider/utils/constants.js +0 -10
  308. package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
  309. package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
  310. package/dist/provider/utils/renameMutations.d.ts +0 -5
  311. 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
- };