@getpara/react-sdk-lite 2.0.0-alpha.33
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.
- package/dist/chunk-MMUBH76A.js +59 -0
- package/dist/cli/cli.mjs +51 -0
- package/dist/css/modal.css +13 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -0
- package/dist/modal/ParaModal.d.ts +2 -0
- package/dist/modal/ParaModal.js +308 -0
- package/dist/modal/components/Account/Account.d.ts +5 -0
- package/dist/modal/components/Account/Account.js +148 -0
- package/dist/modal/components/Account/AccountProfile.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfile.js +168 -0
- package/dist/modal/components/Account/AccountProfileLink.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileLink.js +206 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +111 -0
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileUnlink.js +47 -0
- package/dist/modal/components/AddFunds/AddFunds.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFunds.js +69 -0
- package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsAsset.js +125 -0
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +78 -0
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +31 -0
- package/dist/modal/components/AddFunds/AddFundsContext.js +160 -0
- package/dist/modal/components/AddFunds/AddFundsDone.d.ts +6 -0
- package/dist/modal/components/AddFunds/AddFundsDone.js +49 -0
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsProvider.js +109 -0
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsReceive.js +83 -0
- package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsSettings.js +237 -0
- package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +2 -0
- package/dist/modal/components/AddFunds/MoonPayEmbed.js +7 -0
- package/dist/modal/components/AddFunds/common.d.ts +19 -0
- package/dist/modal/components/AddFunds/common.js +24 -0
- package/dist/modal/components/AddFunds/index.d.ts +3 -0
- package/dist/modal/components/AddFunds/index.js +4 -0
- package/dist/modal/components/AuthInput/AuthInput.d.ts +20 -0
- package/dist/modal/components/AuthInput/AuthInput.js +277 -0
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +7 -0
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +33 -0
- package/dist/modal/components/AuthInput/phoneMasks.d.ts +247 -0
- package/dist/modal/components/AuthInput/phoneMasks.js +253 -0
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +9 -0
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +50 -0
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +9 -0
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +179 -0
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +9 -0
- package/dist/modal/components/AuthOptions/AuthOptions.js +85 -0
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +1 -0
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +18 -0
- package/dist/modal/components/AwaitingIFrameStep/AwaitingIFrameStep.d.ts +1 -0
- package/dist/modal/components/AwaitingIFrameStep/AwaitingIFrameStep.js +12 -0
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +1 -0
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +10 -0
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +1 -0
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +18 -0
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +5 -0
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +49 -0
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -0
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +62 -0
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -0
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +48 -0
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +6 -0
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +29 -0
- package/dist/modal/components/Body/Body.d.ts +11 -0
- package/dist/modal/components/Body/Body.js +354 -0
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -0
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +95 -0
- package/dist/modal/components/ChainSwitch/config.d.ts +7 -0
- package/dist/modal/components/ChainSwitch/config.js +17 -0
- package/dist/modal/components/Controls/Controls.d.ts +5 -0
- package/dist/modal/components/Controls/Controls.js +78 -0
- package/dist/modal/components/Controls/Selects.d.ts +2 -0
- package/dist/modal/components/Controls/Selects.js +173 -0
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +1 -0
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +75 -0
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +8 -0
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +175 -0
- package/dist/modal/components/ExternalWalletStep/config.d.ts +7 -0
- package/dist/modal/components/ExternalWalletStep/config.js +17 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +1 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +39 -0
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +1 -0
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +182 -0
- package/dist/modal/components/Footer/Footer.d.ts +1 -0
- package/dist/modal/components/Footer/Footer.js +95 -0
- package/dist/modal/components/Header/Header.d.ts +1 -0
- package/dist/modal/components/Header/Header.js +43 -0
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +3 -0
- package/dist/modal/components/Header/hooks/useStepTitle.js +62 -0
- package/dist/modal/components/Hero/Hero.d.ts +1 -0
- package/dist/modal/components/Hero/Hero.js +116 -0
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +1 -0
- package/dist/modal/components/IFrameStep/IFrameStep.js +70 -0
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +5 -0
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +44 -0
- package/dist/modal/components/ModalContent/ModalContent.d.ts +10 -0
- package/dist/modal/components/ModalContent/ModalContent.js +88 -0
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +3 -0
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +31 -0
- package/dist/modal/components/OAuth/OAuth.d.ts +6 -0
- package/dist/modal/components/OAuth/OAuth.js +81 -0
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +8 -0
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +74 -0
- package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +1 -0
- package/dist/modal/components/OnRampComponents/AddingFunds.js +23 -0
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +9 -0
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +77 -0
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +6 -0
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +107 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +5 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +132 -0
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +5 -0
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +27 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +12 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +160 -0
- package/dist/modal/components/Waiting/Waiting.d.ts +6 -0
- package/dist/modal/components/Waiting/Waiting.js +17 -0
- package/dist/modal/components/WalletCard/PartnerIcon.d.ts +6 -0
- package/dist/modal/components/WalletCard/PartnerIcon.js +34 -0
- package/dist/modal/components/WalletCard/WalletCard.d.ts +18 -0
- package/dist/modal/components/WalletCard/WalletCard.js +128 -0
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +6 -0
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +83 -0
- package/dist/modal/components/common.d.ts +59 -0
- package/dist/modal/components/common.js +261 -0
- package/dist/modal/components/index.d.ts +1 -0
- package/dist/modal/components/index.js +2 -0
- package/dist/modal/constants/constants.d.ts +40 -0
- package/dist/modal/constants/constants.js +142 -0
- package/dist/modal/constants/defaults.d.ts +5 -0
- package/dist/modal/constants/defaults.js +10 -0
- package/dist/modal/constants/oAuthLogos.d.ts +17 -0
- package/dist/modal/constants/oAuthLogos.js +158 -0
- package/dist/modal/constants/walletTypeConfig.d.ts +6 -0
- package/dist/modal/constants/walletTypeConfig.js +13 -0
- package/dist/modal/hooks/useGoBack.d.ts +1 -0
- package/dist/modal/hooks/useGoBack.js +43 -0
- package/dist/modal/hooks/useTelegramLogin.d.ts +12 -0
- package/dist/modal/hooks/useTelegramLogin.js +65 -0
- package/dist/modal/index.d.ts +8 -0
- package/dist/modal/index.js +29 -0
- package/dist/modal/stores/index.d.ts +1 -0
- package/dist/modal/stores/index.js +2 -0
- package/dist/modal/stores/modal/actions.d.ts +3 -0
- package/dist/modal/stores/modal/actions.js +139 -0
- package/dist/modal/stores/modal/useModalStore.d.ts +105 -0
- package/dist/modal/stores/modal/useModalStore.js +75 -0
- package/dist/modal/types/commonTypes.d.ts +6 -0
- package/dist/modal/types/commonTypes.js +1 -0
- package/dist/modal/types/modalProps.d.ts +129 -0
- package/dist/modal/types/modalProps.js +12 -0
- package/dist/modal/utils/authInputHelpers.d.ts +5 -0
- package/dist/modal/utils/authInputHelpers.js +41 -0
- package/dist/modal/utils/authLayoutHelpers.d.ts +3 -0
- package/dist/modal/utils/authLayoutHelpers.js +8 -0
- package/dist/modal/utils/countryCodes.d.ts +8 -0
- package/dist/modal/utils/countryCodes.js +45 -0
- package/dist/modal/utils/getMailtoLink.d.ts +1 -0
- package/dist/modal/utils/getMailtoLink.js +10 -0
- package/dist/modal/utils/getTileButtonFlex.d.ts +1 -0
- package/dist/modal/utils/getTileButtonFlex.js +20 -0
- package/dist/modal/utils/getWalletDisplayName.d.ts +5 -0
- package/dist/modal/utils/getWalletDisplayName.js +22 -0
- package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
- package/dist/modal/utils/isPasskeySupported.js +15 -0
- package/dist/modal/utils/openPopup.d.ts +6 -0
- package/dist/modal/utils/openPopup.js +60 -0
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +1 -0
- package/dist/modal/utils/routeMobileExternalWallet.js +31 -0
- package/dist/modal/utils/steps.d.ts +136 -0
- package/dist/modal/utils/steps.js +279 -0
- package/dist/modal/utils/stringFormatters.d.ts +5 -0
- package/dist/modal/utils/stringFormatters.js +19 -0
- package/dist/modal/utils/validateOnRampConfig.d.ts +5 -0
- package/dist/modal/utils/validateOnRampConfig.js +32 -0
- package/dist/package.json +6 -0
- package/dist/provider/ParaProvider.d.ts +4 -0
- package/dist/provider/ParaProvider.js +140 -0
- package/dist/provider/actions/getEmbeddedAccount.d.ts +26 -0
- package/dist/provider/actions/getEmbeddedAccount.js +57 -0
- package/dist/provider/actions/getWallet.d.ts +5 -0
- package/dist/provider/actions/getWallet.js +18 -0
- package/dist/provider/actions/index.d.ts +47 -0
- package/dist/provider/actions/index.js +79 -0
- package/dist/provider/actions/utils.d.ts +4 -0
- package/dist/provider/actions/utils.js +34 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
- package/dist/provider/components/CosmosWalletWrapper.js +43 -0
- package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
- package/dist/provider/components/EvmWalletWrapper.js +43 -0
- package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
- package/dist/provider/components/ExternalWalletWrapper.js +140 -0
- package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
- package/dist/provider/components/SolanaWalletWrapper.js +44 -0
- package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
- package/dist/provider/external/getParaCosmosConnector.js +19 -0
- package/dist/provider/external/getParaCosmosLib.d.ts +4 -0
- package/dist/provider/external/getParaCosmosLib.js +16 -0
- package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
- package/dist/provider/external/getParaEvmConnector.js +19 -0
- package/dist/provider/external/getParaEvmLib.d.ts +4 -0
- package/dist/provider/external/getParaEvmLib.js +16 -0
- package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
- package/dist/provider/external/getParaSolanaConnector.js +19 -0
- package/dist/provider/external/getParaSolanaLib.d.ts +4 -0
- package/dist/provider/external/getParaSolanaLib.js +16 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +8 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +8 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +8 -0
- package/dist/provider/hooks/index.d.ts +3 -0
- package/dist/provider/hooks/index.js +4 -0
- package/dist/provider/hooks/mutations/core.d.ts +27 -0
- package/dist/provider/hooks/mutations/core.js +66 -0
- package/dist/provider/hooks/mutations/index.d.ts +3 -0
- package/dist/provider/hooks/mutations/index.js +9 -0
- package/dist/provider/hooks/mutations/useLinkAccount.d.ts +9 -0
- package/dist/provider/hooks/mutations/useLinkAccount.js +18 -0
- package/dist/provider/hooks/mutations/utils.d.ts +12 -0
- package/dist/provider/hooks/mutations/utils.js +90 -0
- package/dist/provider/hooks/queries/core.d.ts +4 -0
- package/dist/provider/hooks/queries/core.js +16 -0
- package/dist/provider/hooks/queries/index.d.ts +5 -0
- package/dist/provider/hooks/queries/index.js +13 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +90 -0
- package/dist/provider/hooks/queries/useAccount.js +141 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +5 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +24 -0
- package/dist/provider/hooks/queries/useParaStatus.d.ts +22 -0
- package/dist/provider/hooks/queries/useParaStatus.js +25 -0
- package/dist/provider/hooks/queries/useWallet.d.ts +5 -0
- package/dist/provider/hooks/queries/useWallet.js +26 -0
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +6 -0
- package/dist/provider/hooks/queries/useWalletBalance.js +55 -0
- package/dist/provider/hooks/queries/utils.d.ts +7 -0
- package/dist/provider/hooks/queries/utils.js +25 -0
- package/dist/provider/hooks/utils/index.d.ts +3 -0
- package/dist/provider/hooks/utils/index.js +10 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +3 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +74 -0
- package/dist/provider/hooks/utils/useClient.d.ts +5 -0
- package/dist/provider/hooks/utils/useClient.js +10 -0
- package/dist/provider/hooks/utils/useEventListeners.d.ts +2 -0
- package/dist/provider/hooks/utils/useEventListeners.js +157 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +4 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +27 -0
- package/dist/provider/hooks/utils/useInternalClient.d.ts +5 -0
- package/dist/provider/hooks/utils/useInternalClient.js +10 -0
- package/dist/provider/hooks/utils/useModal.d.ts +11 -0
- package/dist/provider/hooks/utils/useModal.js +27 -0
- package/dist/provider/hooks/utils/useWalletState.d.ts +15 -0
- package/dist/provider/hooks/utils/useWalletState.js +48 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/index.js +11 -0
- package/dist/provider/providers/AccountLinkProvider.d.ts +47 -0
- package/dist/provider/providers/AccountLinkProvider.js +452 -0
- package/dist/provider/providers/AuthProvider.d.ts +38 -0
- package/dist/provider/providers/AuthProvider.js +575 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.js +66 -0
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/EvmExternalWalletProvider.js +74 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +61 -0
- package/dist/provider/providers/ExternalWalletProvider.js +626 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.js +66 -0
- package/dist/provider/stores/getters.d.ts +4 -0
- package/dist/provider/stores/getters.js +13 -0
- package/dist/provider/stores/setters.d.ts +1 -0
- package/dist/provider/stores/setters.js +7 -0
- package/dist/provider/stores/slices/analytics.d.ts +3 -0
- package/dist/provider/stores/slices/analytics.js +9 -0
- package/dist/provider/stores/slices/client.d.ts +3 -0
- package/dist/provider/stores/slices/client.js +9 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/config.js +11 -0
- package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
- package/dist/provider/stores/slices/externalWallets.js +46 -0
- package/dist/provider/stores/slices/index.d.ts +5 -0
- package/dist/provider/stores/slices/index.js +6 -0
- package/dist/provider/stores/slices/modal.d.ts +3 -0
- package/dist/provider/stores/slices/modal.js +18 -0
- package/dist/provider/stores/slices/wallet.d.ts +3 -0
- package/dist/provider/stores/slices/wallet.js +13 -0
- package/dist/provider/stores/types.d.ts +86 -0
- package/dist/provider/stores/types.js +1 -0
- package/dist/provider/stores/useStore.d.ts +17 -0
- package/dist/provider/stores/useStore.js +34 -0
- package/dist/provider/types/externalWalletProviders.d.ts +12 -0
- package/dist/provider/types/externalWalletProviders.js +1 -0
- package/dist/provider/types/provider.d.ts +166 -0
- package/dist/provider/types/provider.js +1 -0
- package/dist/provider/types/query.d.ts +3 -0
- package/dist/provider/types/query.js +1 -0
- package/dist/provider/types/utils.d.ts +45 -0
- package/dist/provider/types/utils.js +1 -0
- package/dist/provider/utils/constants.d.ts +5 -0
- package/dist/provider/utils/constants.js +10 -0
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
- package/dist/provider/utils/paraConfigTypeGuards.js +13 -0
- package/dist/provider/utils/renameMutations.d.ts +5 -0
- package/dist/provider/utils/renameMutations.js +18 -0
- package/dist/public/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/package.json +63 -0
- package/styles.css/package.json +3 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const signUpOrLogIn: import("./utils.js").CoreAction<"signUpOrLogIn">;
|
|
2
|
+
export declare const verifyNewAccount: import("./utils.js").CoreAction<"verifyNewAccount">;
|
|
3
|
+
export declare const waitForLogin: import("./utils.js").CoreAction<"waitForLogin">;
|
|
4
|
+
export declare const waitForSignup: import("./utils.js").CoreAction<"waitForSignup">;
|
|
5
|
+
export declare const waitForWalletCreation: import("./utils.js").CoreAction<"waitForWalletCreation">;
|
|
6
|
+
export declare const verifyOAuth: import("./utils.js").CoreAction<"verifyOAuth">;
|
|
7
|
+
export declare const verifyFarcaster: import("./utils.js").CoreAction<"verifyFarcaster">;
|
|
8
|
+
export declare const verifyTelegram: import("./utils.js").CoreAction<"verifyTelegram">;
|
|
9
|
+
export declare const loginExternalWallet: import("./utils.js").CoreAction<"loginExternalWallet">;
|
|
10
|
+
export declare const verifyExternalWallet: import("./utils.js").CoreAction<"verifyExternalWallet">;
|
|
11
|
+
export declare const setup2fa: import("./utils.js").CoreAction<"setup2fa">;
|
|
12
|
+
export declare const enable2fa: import("./utils.js").CoreAction<"enable2fa">;
|
|
13
|
+
export declare const verify2fa: import("./utils.js").CoreAction<"verify2fa">;
|
|
14
|
+
export declare const keepSessionAlive: import("./utils.js").CoreAction<"keepSessionAlive">;
|
|
15
|
+
export declare const logout: import("./utils.js").CoreAction<"logout">;
|
|
16
|
+
export declare const resendVerificationCode: import("./utils.js").CoreAction<"resendVerificationCode">;
|
|
17
|
+
export declare const createWallet: import("./utils.js").CoreAction<"createWallet">;
|
|
18
|
+
export declare const createWalletPerType: import("./utils.js").CoreAction<"createWalletPerType">;
|
|
19
|
+
export declare const createPregenWallet: import("./utils.js").CoreAction<"createPregenWallet">;
|
|
20
|
+
export declare const createPregenWalletPerType: import("./utils.js").CoreAction<"createPregenWalletPerType">;
|
|
21
|
+
export declare const claimPregenWallets: import("./utils.js").CoreAction<"claimPregenWallets">;
|
|
22
|
+
export declare const hasPregenWallet: import("./utils.js").CoreAction<"hasPregenWallet">;
|
|
23
|
+
export declare const updatePregenWalletIdentifier: import("./utils.js").CoreAction<"updatePregenWalletIdentifier">;
|
|
24
|
+
export declare const createGuestWallets: import("./utils.js").CoreAction<"createGuestWallets">;
|
|
25
|
+
export declare const signMessage: import("./utils.js").CoreAction<"signMessage">;
|
|
26
|
+
export declare const signTransaction: import("./utils.js").CoreAction<"signTransaction">;
|
|
27
|
+
export declare const getWalletBalance: import("./utils.js").CoreAction<"getWalletBalance">;
|
|
28
|
+
export declare const issueJwt: import("./utils.js").CoreAction<"issueJwt">;
|
|
29
|
+
export declare const getLinkedAccounts: import("./utils.js").CoreAction<"getLinkedAccounts">;
|
|
30
|
+
export declare const accountLinkInProgress: import("./utils.js").CoreAction<"accountLinkInProgress">;
|
|
31
|
+
export declare const linkAccount: (_?: import("@getpara/core-sdk").default, __?: {
|
|
32
|
+
auth: import("@getpara/user-management-client").VerifiedAuth;
|
|
33
|
+
} | {
|
|
34
|
+
externalWallet: import("@getpara/user-management-client").ExternalWalletInfo;
|
|
35
|
+
} | {
|
|
36
|
+
type: import("@getpara/user-management-client").TLinkedAccountType | "X";
|
|
37
|
+
} | undefined) => Promise<import("@getpara/core-sdk").AccountLinkInProgress>;
|
|
38
|
+
export declare const unlinkAccount: (_?: import("@getpara/core-sdk").default, __?: {
|
|
39
|
+
linkedAccountId: string;
|
|
40
|
+
} | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
41
|
+
export declare const verifyEmailOrPhoneLink: (_?: import("@getpara/core-sdk").default, __?: {
|
|
42
|
+
verificationCode?: string;
|
|
43
|
+
} | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
44
|
+
export declare const verifyFarcasterLink: (_?: import("@getpara/core-sdk").default, __?: import("@getpara/core-sdk/dist/types/types/methods.js").FarcasterParams | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
45
|
+
export declare const verifyTelegramLink: (_?: import("@getpara/core-sdk").default, __?: import("@getpara/core-sdk/dist/types/types/methods.js").TelegramParams | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
46
|
+
export declare const verifyOAuthLink: (_?: import("@getpara/core-sdk").default, __?: import("@getpara/core-sdk/dist/types/types/methods.js").OAuthParams | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
47
|
+
export declare const verifyExternalWalletLink: (_?: import("@getpara/core-sdk").default, __?: Omit<import("@getpara/user-management-client").VerifyExternalWalletParams, "externalWallet"> | undefined) => Promise<import("@getpara/user-management-client").LinkedAccounts>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { generateCoreAction, generateInternalAction } from "./utils.js";
|
|
4
|
+
const signUpOrLogIn = generateCoreAction("signUpOrLogIn");
|
|
5
|
+
const verifyNewAccount = generateCoreAction("verifyNewAccount");
|
|
6
|
+
const waitForLogin = generateCoreAction("waitForLogin");
|
|
7
|
+
const waitForSignup = generateCoreAction("waitForSignup");
|
|
8
|
+
const waitForWalletCreation = generateCoreAction("waitForWalletCreation");
|
|
9
|
+
const verifyOAuth = generateCoreAction("verifyOAuth");
|
|
10
|
+
const verifyFarcaster = generateCoreAction("verifyFarcaster");
|
|
11
|
+
const verifyTelegram = generateCoreAction("verifyTelegram");
|
|
12
|
+
const loginExternalWallet = generateCoreAction("loginExternalWallet");
|
|
13
|
+
const verifyExternalWallet = generateCoreAction("verifyExternalWallet");
|
|
14
|
+
const setup2fa = generateCoreAction("setup2fa");
|
|
15
|
+
const enable2fa = generateCoreAction("enable2fa");
|
|
16
|
+
const verify2fa = generateCoreAction("verify2fa");
|
|
17
|
+
const keepSessionAlive = generateCoreAction("keepSessionAlive");
|
|
18
|
+
const logout = generateCoreAction("logout");
|
|
19
|
+
const resendVerificationCode = generateCoreAction("resendVerificationCode");
|
|
20
|
+
const createWallet = generateCoreAction("createWallet");
|
|
21
|
+
const createWalletPerType = generateCoreAction("createWalletPerType");
|
|
22
|
+
const createPregenWallet = generateCoreAction("createPregenWallet");
|
|
23
|
+
const createPregenWalletPerType = generateCoreAction("createPregenWalletPerType");
|
|
24
|
+
const claimPregenWallets = generateCoreAction("claimPregenWallets");
|
|
25
|
+
const hasPregenWallet = generateCoreAction("hasPregenWallet");
|
|
26
|
+
const updatePregenWalletIdentifier = generateCoreAction("updatePregenWalletIdentifier");
|
|
27
|
+
const createGuestWallets = generateCoreAction("createGuestWallets");
|
|
28
|
+
const signMessage = generateCoreAction("signMessage");
|
|
29
|
+
const signTransaction = generateCoreAction("signTransaction");
|
|
30
|
+
const getWalletBalance = generateCoreAction("getWalletBalance");
|
|
31
|
+
const issueJwt = generateCoreAction("issueJwt");
|
|
32
|
+
const getLinkedAccounts = generateCoreAction("getLinkedAccounts");
|
|
33
|
+
const accountLinkInProgress = generateCoreAction("accountLinkInProgress");
|
|
34
|
+
const linkAccount = generateInternalAction("linkAccount");
|
|
35
|
+
const unlinkAccount = generateInternalAction("unlinkAccount");
|
|
36
|
+
const verifyEmailOrPhoneLink = generateInternalAction("verifyEmailOrPhoneLink");
|
|
37
|
+
const verifyFarcasterLink = generateInternalAction("verifyFarcasterLink");
|
|
38
|
+
const verifyTelegramLink = generateInternalAction("verifyTelegramLink");
|
|
39
|
+
const verifyOAuthLink = generateInternalAction("verifyOAuthLink");
|
|
40
|
+
const verifyExternalWalletLink = generateInternalAction("verifyExternalWalletLink");
|
|
41
|
+
export {
|
|
42
|
+
accountLinkInProgress,
|
|
43
|
+
claimPregenWallets,
|
|
44
|
+
createGuestWallets,
|
|
45
|
+
createPregenWallet,
|
|
46
|
+
createPregenWalletPerType,
|
|
47
|
+
createWallet,
|
|
48
|
+
createWalletPerType,
|
|
49
|
+
enable2fa,
|
|
50
|
+
getLinkedAccounts,
|
|
51
|
+
getWalletBalance,
|
|
52
|
+
hasPregenWallet,
|
|
53
|
+
issueJwt,
|
|
54
|
+
keepSessionAlive,
|
|
55
|
+
linkAccount,
|
|
56
|
+
loginExternalWallet,
|
|
57
|
+
logout,
|
|
58
|
+
resendVerificationCode,
|
|
59
|
+
setup2fa,
|
|
60
|
+
signMessage,
|
|
61
|
+
signTransaction,
|
|
62
|
+
signUpOrLogIn,
|
|
63
|
+
unlinkAccount,
|
|
64
|
+
updatePregenWalletIdentifier,
|
|
65
|
+
verify2fa,
|
|
66
|
+
verifyEmailOrPhoneLink,
|
|
67
|
+
verifyExternalWallet,
|
|
68
|
+
verifyExternalWalletLink,
|
|
69
|
+
verifyFarcaster,
|
|
70
|
+
verifyFarcasterLink,
|
|
71
|
+
verifyNewAccount,
|
|
72
|
+
verifyOAuth,
|
|
73
|
+
verifyOAuthLink,
|
|
74
|
+
verifyTelegram,
|
|
75
|
+
verifyTelegramLink,
|
|
76
|
+
waitForLogin,
|
|
77
|
+
waitForSignup,
|
|
78
|
+
waitForWalletCreation
|
|
79
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import ParaWeb, { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods, InternalAction, InternalMethodName, InternalMethods } from '@getpara/web-sdk';
|
|
2
|
+
export type CoreAction<method extends CoreMethodName & keyof CoreMethods> = (para?: ParaWeb, ...args: [CoreMethodParams<method>] | []) => Promise<Awaited<CoreMethodResponse<method>>>;
|
|
3
|
+
export declare function generateCoreAction<const method extends CoreMethodName & keyof CoreMethods>(method: method): CoreAction<method>;
|
|
4
|
+
export declare function generateInternalAction<const method extends InternalMethodName & keyof InternalMethods>(method: method): InternalAction<method>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
function generateCoreAction(method) {
|
|
6
|
+
return (_para, ...args) => __async(this, null, function* () {
|
|
7
|
+
try {
|
|
8
|
+
if (!_para) {
|
|
9
|
+
throw new Error("no para instance");
|
|
10
|
+
}
|
|
11
|
+
const para = _para;
|
|
12
|
+
return typeof para[method] === "function" ? yield para[method](...args) : para[method];
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw e;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function generateInternalAction(method) {
|
|
19
|
+
return (_para, ...args) => __async(this, null, function* () {
|
|
20
|
+
try {
|
|
21
|
+
if (!_para) {
|
|
22
|
+
throw new Error("no para instance");
|
|
23
|
+
}
|
|
24
|
+
const para = _para;
|
|
25
|
+
return typeof para[method] === "function" ? yield para[method](...args) : para[method];
|
|
26
|
+
} catch (e) {
|
|
27
|
+
throw e;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
generateCoreAction,
|
|
33
|
+
generateInternalAction
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ParaCosmosProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
3
|
+
import { ParaGrazProviderProps } from '@getpara/cosmos-wallet-connectors';
|
|
4
|
+
export declare const CosmosWalletWrapper: ({ children, cosmosConnectorConfig, grazProviderProps, onSwitchWallet, }: {
|
|
5
|
+
cosmosConnectorConfig: ParaCosmosProviderConfigNoWallets;
|
|
6
|
+
grazProviderProps: ParaGrazProviderProps;
|
|
7
|
+
onSwitchWallet: ({ address, error }: {
|
|
8
|
+
address?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
} & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { CosmosExternalWalletProvider } from "../providers/CosmosExternalWalletProvider.js";
|
|
5
|
+
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
6
|
+
import { useStore } from "../stores/useStore.js";
|
|
7
|
+
import { COSMOS_WALLETS } from "@getpara/web-sdk";
|
|
8
|
+
import { useWallet } from "../hooks/index.js";
|
|
9
|
+
const CosmosWalletWrapper = ({
|
|
10
|
+
children,
|
|
11
|
+
cosmosConnectorConfig,
|
|
12
|
+
grazProviderProps,
|
|
13
|
+
onSwitchWallet
|
|
14
|
+
}) => {
|
|
15
|
+
const para = useInternalClient();
|
|
16
|
+
const { data: wallet } = useWallet();
|
|
17
|
+
const externalWalletsWithFullAuth = useStore((state) => state.externalWalletsWithFullAuth);
|
|
18
|
+
const wallets = useStore((state) => state.externalWallets);
|
|
19
|
+
const isUsing = wallets.some((w) => w in COSMOS_WALLETS);
|
|
20
|
+
const connectionOnly = useStore((state) => state.connectionOnly);
|
|
21
|
+
const includeWalletVerification = useStore((state) => state.includeWalletVerification);
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
CosmosExternalWalletProvider,
|
|
24
|
+
{
|
|
25
|
+
config: cosmosConnectorConfig,
|
|
26
|
+
internalConfig: {
|
|
27
|
+
onSwitchWallet,
|
|
28
|
+
para,
|
|
29
|
+
walletsWithFullAuth: externalWalletsWithFullAuth,
|
|
30
|
+
connectedWallet: wallet,
|
|
31
|
+
connectionOnly,
|
|
32
|
+
includeWalletVerification
|
|
33
|
+
},
|
|
34
|
+
grazProviderProps,
|
|
35
|
+
isUsing,
|
|
36
|
+
wallets,
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
CosmosWalletWrapper
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Chain, Transport } from 'viem';
|
|
3
|
+
import { ParaEvmProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
4
|
+
import { ParaWagmiProviderProps } from '@getpara/evm-wallet-connectors';
|
|
5
|
+
export declare const EvmWalletWrapper: <chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport>>({ children, evmProviderConfig, wagmiProviderProps, onSwitchWallet, }: {
|
|
6
|
+
evmProviderConfig: ParaEvmProviderConfigNoWallets<chains, transports>;
|
|
7
|
+
wagmiProviderProps: ParaWagmiProviderProps;
|
|
8
|
+
onSwitchWallet: ({ address, error }: {
|
|
9
|
+
address?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
} & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { EvmExternalWalletProvider } from "../providers/EvmExternalWalletProvider.js";
|
|
5
|
+
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
6
|
+
import { useStore } from "../stores/useStore.js";
|
|
7
|
+
import { EVM_WALLETS } from "@getpara/web-sdk";
|
|
8
|
+
import { useWallet } from "../hooks/index.js";
|
|
9
|
+
const EvmWalletWrapper = ({
|
|
10
|
+
children,
|
|
11
|
+
evmProviderConfig,
|
|
12
|
+
wagmiProviderProps,
|
|
13
|
+
onSwitchWallet
|
|
14
|
+
}) => {
|
|
15
|
+
const para = useInternalClient();
|
|
16
|
+
const { data: wallet } = useWallet();
|
|
17
|
+
const externalWalletsWithFullAuth = useStore((state) => state.externalWalletsWithFullAuth);
|
|
18
|
+
const wallets = useStore((state) => state.externalWallets);
|
|
19
|
+
const connectionOnly = useStore((state) => state.connectionOnly);
|
|
20
|
+
const includeWalletVerification = useStore((state) => state.includeWalletVerification);
|
|
21
|
+
const isUsing = wallets.some((w) => w in EVM_WALLETS);
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
EvmExternalWalletProvider,
|
|
24
|
+
{
|
|
25
|
+
config: evmProviderConfig,
|
|
26
|
+
internalConfig: {
|
|
27
|
+
onSwitchWallet,
|
|
28
|
+
para,
|
|
29
|
+
walletsWithFullAuth: externalWalletsWithFullAuth,
|
|
30
|
+
connectedWallet: wallet,
|
|
31
|
+
connectionOnly,
|
|
32
|
+
includeWalletVerification
|
|
33
|
+
},
|
|
34
|
+
wagmiProviderProps,
|
|
35
|
+
isUsing,
|
|
36
|
+
wallets,
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
EvmWalletWrapper
|
|
43
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ExternalWalletConfig } from '../types/provider.js';
|
|
3
|
+
import { Chain, Transport } from 'viem';
|
|
4
|
+
interface ExternalWalletWrapperProps<chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]['id'], Transport>> extends PropsWithChildren {
|
|
5
|
+
config?: Omit<ExternalWalletConfig<chains, transports>, 'wallets'>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ExternalWalletWrapper: <chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport>>({ children, config, }: ExternalWalletWrapperProps<chains, transports>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../chunk-MMUBH76A.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { useCallback, useEffect, useMemo } from "react";
|
|
8
|
+
import { useModalStore } from "../../modal/stores/index.js";
|
|
9
|
+
import { ExternalWalletProvider } from "../providers/ExternalWalletProvider.js";
|
|
10
|
+
import { EvmWalletWrapper } from "./EvmWalletWrapper.js";
|
|
11
|
+
import { CosmosWalletWrapper } from "./CosmosWalletWrapper.js";
|
|
12
|
+
import { SolanaWalletWrapper } from "./SolanaWalletWrapper.js";
|
|
13
|
+
import { useStore } from "../stores/useStore.js";
|
|
14
|
+
const ExternalWalletWrapper = ({
|
|
15
|
+
children,
|
|
16
|
+
config
|
|
17
|
+
}) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const { appDescription, appIcon, appUrl, walletConnect, evmConnector, cosmosConnector, solanaConnector } = config != null ? config : {};
|
|
20
|
+
const appName = useStore((state) => state.appName);
|
|
21
|
+
const resetModalState = useModalStore((state) => state.resetState);
|
|
22
|
+
const wallets = useStore((state) => state.externalWallets);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!!wallets.length && !(walletConnect == null ? void 0 : walletConnect.projectId)) {
|
|
25
|
+
console.warn(
|
|
26
|
+
"It is recommended to provide a WalletConnect project id to ensure wallet connection works as expected. Sign up for your free key at https://cloud.walletconnect.com/sign-in"
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}, [wallets, walletConnect]);
|
|
30
|
+
const evmProviderConfig = useMemo(
|
|
31
|
+
() => {
|
|
32
|
+
var _a2, _b;
|
|
33
|
+
return !evmConnector ? {
|
|
34
|
+
appName,
|
|
35
|
+
chains: [
|
|
36
|
+
{
|
|
37
|
+
id: 11155111,
|
|
38
|
+
name: "Sepolia",
|
|
39
|
+
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
40
|
+
rpcUrls: { default: { http: ["https://rpc.sepolia.org"] } },
|
|
41
|
+
blockExplorers: {
|
|
42
|
+
default: {
|
|
43
|
+
name: "Etherscan",
|
|
44
|
+
url: "https://sepolia.etherscan.io",
|
|
45
|
+
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
contracts: {
|
|
49
|
+
multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 751532 },
|
|
50
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
51
|
+
ensUniversalResolver: { address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC", blockCreated: 5317080 }
|
|
52
|
+
},
|
|
53
|
+
testnet: true
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
projectId: (_a2 = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _a2 : ""
|
|
57
|
+
} : __spreadValues({ appName, appDescription, appIcon, appUrl, projectId: (_b = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _b : "" }, evmConnector == null ? void 0 : evmConnector.config);
|
|
58
|
+
},
|
|
59
|
+
[appName, appDescription, appIcon, appUrl, walletConnect == null ? void 0 : walletConnect.projectId, evmConnector]
|
|
60
|
+
);
|
|
61
|
+
const solanaProviderConfig = useMemo(() => {
|
|
62
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
63
|
+
const appIdentity = {
|
|
64
|
+
name: (_b = (_a2 = solanaConnector == null ? void 0 : solanaConnector.config.appIdentity) == null ? void 0 : _a2.name) != null ? _b : appName,
|
|
65
|
+
uri: (_d = (_c = solanaConnector == null ? void 0 : solanaConnector.config.appIdentity) == null ? void 0 : _c.uri) != null ? _d : appUrl,
|
|
66
|
+
icon: (_f = (_e = solanaConnector == null ? void 0 : solanaConnector.config.appIdentity) == null ? void 0 : _e.icon) != null ? _f : appIcon
|
|
67
|
+
};
|
|
68
|
+
return !solanaConnector ? { appIdentity, chain: "devnet", endpoint: "https://api.devnet.solana.com" } : __spreadValues({ appIdentity }, solanaConnector == null ? void 0 : solanaConnector.config);
|
|
69
|
+
}, [solanaConnector]);
|
|
70
|
+
const cosmosProviderConfig = useMemo(
|
|
71
|
+
() => !cosmosConnector ? {
|
|
72
|
+
chains: [
|
|
73
|
+
{
|
|
74
|
+
chainId: "theta-testnet-001",
|
|
75
|
+
currencies: [{ coinDenom: "atom", coinMinimalDenom: "uatom", coinDecimals: 6 }],
|
|
76
|
+
rest: "https://cosmoshubt.lava.build",
|
|
77
|
+
rpc: "https://cosmoshubt.tendermintrpc.lava.build:443",
|
|
78
|
+
bech32Config: {
|
|
79
|
+
bech32PrefixAccAddr: "cosmos",
|
|
80
|
+
bech32PrefixAccPub: "cosmospub",
|
|
81
|
+
bech32PrefixValAddr: "cosmosvaloper",
|
|
82
|
+
bech32PrefixValPub: "cosmosvaloperpub",
|
|
83
|
+
bech32PrefixConsAddr: "cosmosvalcons",
|
|
84
|
+
bech32PrefixConsPub: "cosmosvalconspub"
|
|
85
|
+
},
|
|
86
|
+
chainName: "cosmoshubtestnet",
|
|
87
|
+
feeCurrencies: [
|
|
88
|
+
{
|
|
89
|
+
coinDenom: "atom",
|
|
90
|
+
coinMinimalDenom: "uatom",
|
|
91
|
+
coinDecimals: 6,
|
|
92
|
+
coinGeckoId: "",
|
|
93
|
+
gasPriceStep: { low: 0.01, average: 0.025, high: 0.03 }
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
stakeCurrency: { coinDenom: "atom", coinMinimalDenom: "uatom", coinDecimals: 6 },
|
|
97
|
+
bip44: { coinType: 118 }
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
onSwitchChain: () => {
|
|
101
|
+
},
|
|
102
|
+
selectedChainId: "theta-testnet-001"
|
|
103
|
+
} : cosmosConnector.config,
|
|
104
|
+
[cosmosConnector]
|
|
105
|
+
);
|
|
106
|
+
const grazProviderProps = useMemo(() => {
|
|
107
|
+
var _a2, _b;
|
|
108
|
+
const connectorsGrazProviderProps = cosmosConnector == null ? void 0 : cosmosConnector.grazProviderProps;
|
|
109
|
+
return __spreadProps(__spreadValues({}, connectorsGrazProviderProps), {
|
|
110
|
+
walletConnect: __spreadProps(__spreadValues({}, connectorsGrazProviderProps == null ? void 0 : connectorsGrazProviderProps.walletConnect), {
|
|
111
|
+
options: __spreadProps(__spreadValues({}, (_a2 = connectorsGrazProviderProps == null ? void 0 : connectorsGrazProviderProps.walletConnect) == null ? void 0 : _a2.options), { projectId: (_b = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _b : "" })
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
}, [cosmosConnector, walletConnect == null ? void 0 : walletConnect.projectId]);
|
|
115
|
+
const handleSwitchWallet = useCallback(({ address, error }) => {
|
|
116
|
+
if (error || !address) {
|
|
117
|
+
resetModalState();
|
|
118
|
+
}
|
|
119
|
+
}, []);
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
EvmWalletWrapper,
|
|
122
|
+
{
|
|
123
|
+
evmProviderConfig,
|
|
124
|
+
wagmiProviderProps: (_a = evmConnector == null ? void 0 : evmConnector.wagmiProviderProps) != null ? _a : {},
|
|
125
|
+
onSwitchWallet: handleSwitchWallet,
|
|
126
|
+
children: /* @__PURE__ */ jsx(
|
|
127
|
+
CosmosWalletWrapper,
|
|
128
|
+
{
|
|
129
|
+
cosmosConnectorConfig: cosmosProviderConfig,
|
|
130
|
+
grazProviderProps,
|
|
131
|
+
onSwitchWallet: handleSwitchWallet,
|
|
132
|
+
children: /* @__PURE__ */ jsx(SolanaWalletWrapper, { onSwitchWallet: handleSwitchWallet, solanaProviderConfig, children: /* @__PURE__ */ jsx(ExternalWalletProvider, { children }) })
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
ExternalWalletWrapper
|
|
140
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ParaSolanaProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
3
|
+
export declare const SolanaWalletWrapper: ({ children, solanaProviderConfig, onSwitchWallet, }: {
|
|
4
|
+
solanaProviderConfig: ParaSolanaProviderConfigNoWallets;
|
|
5
|
+
onSwitchWallet: ({ address, error }: {
|
|
6
|
+
address?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
} & PropsWithChildren) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { SolanaExternalWalletProvider } from "../providers/SolanaExternalWalletProvider.js";
|
|
5
|
+
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
6
|
+
import { useStore } from "../stores/useStore.js";
|
|
7
|
+
import { SOLANA_WALLETS } from "@getpara/web-sdk";
|
|
8
|
+
const SolanaWalletWrapper = ({
|
|
9
|
+
children,
|
|
10
|
+
solanaProviderConfig,
|
|
11
|
+
onSwitchWallet
|
|
12
|
+
}) => {
|
|
13
|
+
const externalWalletsWithFullAuth = useStore((state) => state.externalWalletsWithFullAuth);
|
|
14
|
+
const para = useInternalClient();
|
|
15
|
+
const wallets = useStore((state) => state.externalWallets);
|
|
16
|
+
const connectionOnly = useStore((state) => state.connectionOnly);
|
|
17
|
+
const includeWalletVerification = useStore((state) => state.includeWalletVerification);
|
|
18
|
+
const isUsing = wallets.some((w) => w in SOLANA_WALLETS);
|
|
19
|
+
if (!solanaProviderConfig) {
|
|
20
|
+
if (isUsing) {
|
|
21
|
+
throw new Error("A valid solanaConnector config is required to use an external Solana wallet.");
|
|
22
|
+
}
|
|
23
|
+
return children;
|
|
24
|
+
}
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
SolanaExternalWalletProvider,
|
|
27
|
+
{
|
|
28
|
+
config: solanaProviderConfig,
|
|
29
|
+
internalConfig: {
|
|
30
|
+
onSwitchWallet,
|
|
31
|
+
para,
|
|
32
|
+
walletsWithFullAuth: externalWalletsWithFullAuth,
|
|
33
|
+
connectionOnly,
|
|
34
|
+
includeWalletVerification
|
|
35
|
+
},
|
|
36
|
+
isUsing,
|
|
37
|
+
wallets,
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
SolanaWalletWrapper
|
|
44
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
import { CosmosExternalWalletContextType, ParaCosmosProvider, WalletList } from '@getpara/cosmos-wallet-connectors';
|
|
3
|
+
export declare const getParaCosmosConnector: () => Promise<{
|
|
4
|
+
Provider: typeof ParaCosmosProvider | undefined;
|
|
5
|
+
context: Context<CosmosExternalWalletContextType>;
|
|
6
|
+
wallets: WalletList;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { CosmosExternalWalletContext } from "./stubs/CosmosExternalWalletContextStub.js";
|
|
6
|
+
import { getParaCosmosLib } from "./getParaCosmosLib.js";
|
|
7
|
+
const getParaCosmosConnector = () => __async(void 0, null, function* () {
|
|
8
|
+
let Provider = void 0, context = CosmosExternalWalletContext, wallets = [];
|
|
9
|
+
const { lib } = yield getParaCosmosLib();
|
|
10
|
+
if (lib) {
|
|
11
|
+
Provider = lib.ParaCosmosProvider;
|
|
12
|
+
context = lib.CosmosExternalWalletContext;
|
|
13
|
+
wallets = lib.allWallets;
|
|
14
|
+
}
|
|
15
|
+
return { Provider, context, wallets };
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
getParaCosmosConnector
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
const getParaCosmosLib = () => __async(void 0, null, function* () {
|
|
6
|
+
let lib;
|
|
7
|
+
try {
|
|
8
|
+
lib = yield import("@getpara/cosmos-wallet-connectors");
|
|
9
|
+
} catch (e) {
|
|
10
|
+
lib = void 0;
|
|
11
|
+
}
|
|
12
|
+
return { lib };
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
getParaCosmosLib
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
import { EvmExternalWalletContextType, ParaEvmProvider, WalletList } from '@getpara/evm-wallet-connectors';
|
|
3
|
+
export declare const getParaEvmConnector: () => Promise<{
|
|
4
|
+
Provider: typeof ParaEvmProvider | undefined;
|
|
5
|
+
context: Context<EvmExternalWalletContextType>;
|
|
6
|
+
wallets: WalletList;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { EvmExternalWalletContext } from "./stubs/EvmExternalWalletContextStub.js";
|
|
6
|
+
import { getParaEvmLib } from "./getParaEvmLib.js";
|
|
7
|
+
const getParaEvmConnector = () => __async(void 0, null, function* () {
|
|
8
|
+
let Provider = void 0, context = EvmExternalWalletContext, wallets = [];
|
|
9
|
+
const { lib } = yield getParaEvmLib();
|
|
10
|
+
if (lib) {
|
|
11
|
+
Provider = lib.ParaEvmProvider;
|
|
12
|
+
context = lib.EvmExternalWalletContext;
|
|
13
|
+
wallets = lib.allWallets;
|
|
14
|
+
}
|
|
15
|
+
return { Provider, context, wallets };
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
getParaEvmConnector
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
const getParaEvmLib = () => __async(void 0, null, function* () {
|
|
6
|
+
let lib;
|
|
7
|
+
try {
|
|
8
|
+
lib = yield import("@getpara/evm-wallet-connectors");
|
|
9
|
+
} catch (e) {
|
|
10
|
+
lib = void 0;
|
|
11
|
+
}
|
|
12
|
+
return { lib };
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
getParaEvmLib
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
import { ParaSolanaProvider, SolanaExternalWalletContextType, WalletList } from '@getpara/solana-wallet-connectors';
|
|
3
|
+
export declare const getParaSolanaConnector: () => Promise<{
|
|
4
|
+
Provider: typeof ParaSolanaProvider | undefined;
|
|
5
|
+
context: Context<SolanaExternalWalletContextType>;
|
|
6
|
+
wallets: WalletList;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { SolanaExternalWalletContext } from "./stubs/SolanaExternalWalletContextStub.js";
|
|
6
|
+
import { getParaSolanaLib } from "./getParaSolanaLib.js";
|
|
7
|
+
const getParaSolanaConnector = () => __async(void 0, null, function* () {
|
|
8
|
+
let Provider = void 0, context = SolanaExternalWalletContext, wallets = [];
|
|
9
|
+
const { lib } = yield getParaSolanaLib();
|
|
10
|
+
if (lib) {
|
|
11
|
+
Provider = lib.ParaSolanaProvider;
|
|
12
|
+
context = lib.SolanaExternalWalletContext;
|
|
13
|
+
wallets = lib.allWallets;
|
|
14
|
+
}
|
|
15
|
+
return { Provider, context, wallets };
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
getParaSolanaConnector
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
const getParaSolanaLib = () => __async(void 0, null, function* () {
|
|
6
|
+
let lib;
|
|
7
|
+
try {
|
|
8
|
+
lib = yield import("@getpara/solana-wallet-connectors");
|
|
9
|
+
} catch (e) {
|
|
10
|
+
lib = void 0;
|
|
11
|
+
}
|
|
12
|
+
return { lib };
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
getParaSolanaLib
|
|
16
|
+
};
|