@getpara/react-sdk 1.12.0 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.mjs +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/modal/ParaModal.js +211 -313
- package/dist/modal/components/Account/Account.js +73 -16
- package/dist/modal/components/AddFunds/AddFunds.js +5 -6
- package/dist/modal/components/AddFunds/AddFundsAsset.js +15 -13
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +16 -10
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +2 -2
- package/dist/modal/components/AddFunds/AddFundsContext.js +20 -14
- package/dist/modal/components/AddFunds/AddFundsDone.js +10 -4
- package/dist/modal/components/AddFunds/AddFundsProvider.js +11 -7
- package/dist/modal/components/AddFunds/AddFundsReceive.js +17 -13
- package/dist/modal/components/AddFunds/AddFundsSettings.js +10 -6
- package/dist/modal/components/AddFunds/common.d.ts +1 -1
- package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
- package/dist/modal/components/AuthInput/AuthInput.js +70 -91
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +4 -4
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +4 -3
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +20 -7
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +4 -3
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +54 -10
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +4 -3
- package/dist/modal/components/AuthOptions/AuthOptions.js +35 -7
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +5 -1
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +9 -4
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -3
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +25 -17
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +34 -72
- package/dist/modal/components/Body/Body.d.ts +4 -3
- package/dist/modal/components/Body/Body.js +27 -10
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +5 -4
- package/dist/modal/components/Controls/Controls.js +5 -2
- package/dist/modal/components/Controls/Selects.d.ts +1 -1
- package/dist/modal/components/Controls/Selects.js +30 -25
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +10 -6
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +7 -69
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +7 -6
- package/dist/modal/components/Footer/Footer.d.ts +1 -1
- package/dist/modal/components/Footer/Footer.js +6 -4
- package/dist/modal/components/Header/hooks/useStepTitle.js +7 -3
- package/dist/modal/components/Hero/Hero.js +5 -5
- package/dist/modal/components/IFrameStep/IFrameStep.js +8 -4
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +7 -4
- package/dist/modal/components/ModalContent/ModalContent.js +14 -243
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +3 -57
- package/dist/modal/components/OAuth/OAuth.d.ts +2 -2
- package/dist/modal/components/OAuth/OAuth.js +11 -85
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +11 -60
- package/dist/modal/components/OnRampComponents/AddingFunds.js +1 -1
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +10 -4
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +23 -32
- package/dist/modal/components/StripeComponents/StripeComponents.js +1 -1
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +5 -2
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +44 -60
- package/dist/modal/components/WalletCard/WalletCard.d.ts +5 -5
- package/dist/modal/components/WalletCard/WalletCard.js +8 -7
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +33 -12
- package/dist/modal/components/common.d.ts +5 -5
- package/dist/modal/components/common.js +10 -4
- package/dist/modal/constants/constants.d.ts +1 -1
- package/dist/modal/constants/oAuthLogos.d.ts +3 -3
- package/dist/modal/hooks/useGoBack.js +6 -5
- package/dist/modal/index.d.ts +0 -3
- package/dist/modal/index.js +1 -5
- package/dist/modal/stores/index.d.ts +0 -2
- package/dist/modal/stores/index.js +0 -2
- package/dist/modal/stores/modal/actions.js +69 -16
- package/dist/modal/stores/modal/useModalStore.d.ts +26 -22
- package/dist/modal/stores/modal/useModalStore.js +9 -13
- package/dist/modal/types/commonTypes.d.ts +0 -52
- package/dist/modal/types/modalProps.d.ts +8 -32
- package/dist/modal/utils/authInputHelpers.d.ts +7 -0
- package/dist/modal/utils/authInputHelpers.js +38 -0
- package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
- package/dist/modal/{components/AuthInput → utils}/countryCodes.js +6 -3
- package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
- package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
- package/dist/modal/utils/isPasskeySupported.js +15 -0
- package/dist/modal/utils/openPopup.d.ts +2 -2
- package/dist/modal/utils/openPopup.js +2 -2
- package/dist/modal/utils/steps.d.ts +6 -0
- package/dist/modal/utils/steps.js +15 -0
- package/dist/provider/ParaProvider.d.ts +3 -1
- package/dist/provider/ParaProvider.js +69 -8
- package/dist/provider/actions/getAccount.d.ts +26 -8
- package/dist/provider/actions/getAccount.js +42 -14
- package/dist/provider/actions/getWallet.d.ts +3 -3
- package/dist/provider/actions/index.d.ts +27 -0
- package/dist/provider/actions/index.js +59 -0
- package/dist/provider/actions/utils.d.ts +3 -0
- package/dist/provider/actions/utils.js +15 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
- package/dist/provider/components/CosmosWalletWrapper.js +34 -0
- package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
- package/dist/provider/components/EvmWalletWrapper.js +34 -0
- package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
- package/dist/provider/components/ExternalWalletWrapper.js +139 -0
- package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
- package/dist/provider/components/SolanaWalletWrapper.js +36 -0
- package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
- package/dist/provider/external/getParaCosmosConnector.js +22 -0
- package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
- package/dist/provider/external/getParaEvmConnector.js +22 -0
- package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
- package/dist/provider/external/getParaSolanaConnector.js +22 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +18 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +21 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +14 -0
- package/dist/provider/hooks/mutations/index.d.ts +27 -11
- package/dist/provider/hooks/mutations/index.js +54 -17
- package/dist/provider/hooks/mutations/utils.d.ts +5 -0
- package/dist/provider/hooks/mutations/utils.js +59 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +1 -7
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +1 -2
- package/dist/provider/hooks/queries/useWalletBalance.js +40 -11
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +5 -5
- package/dist/provider/hooks/utils/useEventListeners.d.ts +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +100 -56
- package/dist/provider/hooks/utils/useWalletState.d.ts +5 -4
- package/dist/provider/hooks/utils/useWalletState.js +24 -9
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +1 -0
- package/dist/provider/providers/AuthProvider.d.ts +35 -0
- package/dist/provider/providers/AuthProvider.js +498 -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 +76 -0
- package/dist/{modal/providers/ExternalWalletContext.js → provider/providers/ExternalWalletProvider.js} +146 -112
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.js +66 -0
- package/dist/provider/stores/getters.d.ts +3 -3
- package/dist/provider/stores/setters.d.ts +1 -0
- package/dist/provider/stores/setters.js +7 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/config.js +9 -0
- package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
- package/dist/provider/stores/slices/externalWallets.js +40 -0
- package/dist/provider/stores/slices/index.d.ts +1 -0
- package/dist/provider/stores/slices/index.js +1 -0
- package/dist/provider/stores/slices/modal.js +11 -4
- package/dist/provider/stores/types.d.ts +50 -4
- package/dist/provider/stores/useStore.js +4 -3
- package/dist/provider/types/externalWalletProviders.d.ts +12 -0
- package/dist/provider/types/externalWalletProviders.js +1 -0
- package/dist/provider/types/provider.d.ts +126 -17
- package/dist/provider/types/utils.d.ts +20 -0
- package/dist/provider/utils/constants.js +3 -4
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
- package/dist/provider/utils/paraConfigTypeGuards.js +13 -0
- package/dist/provider/utils/renameMutations.d.ts +3 -0
- package/dist/provider/utils/renameMutations.js +5 -3
- package/package.json +20 -8
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.js +0 -124
- package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
- package/dist/modal/hooks/useActiveWallet.js +0 -15
- package/dist/modal/hooks/useCreateAccount.d.ts +0 -6
- package/dist/modal/hooks/useCreateAccount.js +0 -77
- package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
- package/dist/modal/hooks/useEmbeddedExternalConnection.js +0 -54
- package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
- package/dist/modal/hooks/useSetLoginURLs.js +0 -49
- package/dist/modal/hooks/useWalletBalance.d.ts +0 -4
- package/dist/modal/hooks/useWalletBalance.js +0 -49
- package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
- package/dist/modal/providers/CosmosExternalWalletContextStub.js +0 -38
- package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -46
- package/dist/modal/providers/EvmExternalWalletContextStub.js +0 -55
- package/dist/modal/providers/ExternalWalletContext.d.ts +0 -92
- package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
- package/dist/modal/providers/SolanaExternalWalletContextStub.js +0 -32
- package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
- package/dist/modal/stores/externalWalletProvider/actions.js +0 -10
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.js +0 -21
- package/dist/modal/stores/theme/actions.d.ts +0 -3
- package/dist/modal/stores/theme/actions.js +0 -28
- package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
- package/dist/modal/stores/theme/useThemeStore.js +0 -21
- package/dist/modal/stores/userInfo/actions.d.ts +0 -3
- package/dist/modal/stores/userInfo/actions.js +0 -30
- package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
- package/dist/modal/stores/userInfo/useUserInfoStore.js +0 -17
- package/dist/provider/actions/checkIfUserExists.d.ts +0 -9
- package/dist/provider/actions/checkIfUserExists.js +0 -21
- package/dist/provider/actions/createGuestWallets.d.ts +0 -2
- package/dist/provider/actions/createGuestWallets.js +0 -13
- package/dist/provider/actions/createUser.d.ts +0 -12
- package/dist/provider/actions/createUser.js +0 -26
- package/dist/provider/actions/getWalletBalance.d.ts +0 -2
- package/dist/provider/actions/getWalletBalance.js +0 -14
- package/dist/provider/actions/initiateLogin.d.ts +0 -4
- package/dist/provider/actions/initiateLogin.js +0 -20
- package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
- package/dist/provider/actions/keepSessionAlive.js +0 -20
- package/dist/provider/actions/logout.d.ts +0 -2
- package/dist/provider/actions/logout.js +0 -17
- package/dist/provider/actions/signMessage.d.ts +0 -8
- package/dist/provider/actions/signMessage.js +0 -20
- package/dist/provider/actions/signTransaction.d.ts +0 -8
- package/dist/provider/actions/signTransaction.js +0 -20
- package/dist/provider/actions/waitForAccountCreation.d.ts +0 -2
- package/dist/provider/actions/waitForAccountCreation.js +0 -21
- package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
- package/dist/provider/actions/waitForLoginAndSetup.js +0 -24
- package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
- package/dist/provider/actions/waitForPasskeyAndCreateWallet.js +0 -21
- package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
- package/dist/provider/hooks/mutations/useCheckIfUserExists.js +0 -23
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +0 -15
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +0 -23
- package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
- package/dist/provider/hooks/mutations/useCreateUser.js +0 -20
- package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
- package/dist/provider/hooks/mutations/useInitiateLogin.js +0 -23
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +0 -20
- package/dist/provider/hooks/mutations/useLogout.d.ts +0 -12
- package/dist/provider/hooks/mutations/useLogout.js +0 -30
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
- package/dist/provider/hooks/mutations/useSignMessage.js +0 -39
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -14
- package/dist/provider/hooks/mutations/useSignTransaction.js +0 -39
- package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -12
- package/dist/provider/hooks/mutations/useWaitForAccountCreation.js +0 -30
- package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
- package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.js +0 -30
- package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
- package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.js +0 -30
- /package/dist/modal/{components/AuthInput → utils}/countryCodes.d.ts +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
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">;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { generateAction } from "./utils.js";
|
|
4
|
+
const signUpOrLogIn = generateAction("signUpOrLogIn");
|
|
5
|
+
const verifyNewAccount = generateAction("verifyNewAccount");
|
|
6
|
+
const waitForLogin = generateAction("waitForLogin");
|
|
7
|
+
const waitForSignup = generateAction("waitForSignup");
|
|
8
|
+
const waitForWalletCreation = generateAction("waitForWalletCreation");
|
|
9
|
+
const verifyOAuth = generateAction("verifyOAuth");
|
|
10
|
+
const verifyFarcaster = generateAction("verifyFarcaster");
|
|
11
|
+
const verifyTelegram = generateAction("verifyTelegram");
|
|
12
|
+
const loginExternalWallet = generateAction("loginExternalWallet");
|
|
13
|
+
const verifyExternalWallet = generateAction("verifyExternalWallet");
|
|
14
|
+
const setup2fa = generateAction("setup2fa");
|
|
15
|
+
const enable2fa = generateAction("enable2fa");
|
|
16
|
+
const verify2fa = generateAction("verify2fa");
|
|
17
|
+
const keepSessionAlive = generateAction("keepSessionAlive");
|
|
18
|
+
const logout = generateAction("logout");
|
|
19
|
+
const resendVerificationCode = generateAction("resendVerificationCode");
|
|
20
|
+
const createWallet = generateAction("createWallet");
|
|
21
|
+
const createWalletPerType = generateAction("createWalletPerType");
|
|
22
|
+
const createPregenWallet = generateAction("createPregenWallet");
|
|
23
|
+
const createPregenWalletPerType = generateAction("createPregenWalletPerType");
|
|
24
|
+
const claimPregenWallets = generateAction("claimPregenWallets");
|
|
25
|
+
const hasPregenWallet = generateAction("hasPregenWallet");
|
|
26
|
+
const updatePregenWalletIdentifier = generateAction("updatePregenWalletIdentifier");
|
|
27
|
+
const createGuestWallets = generateAction("createGuestWallets");
|
|
28
|
+
const signMessage = generateAction("signMessage");
|
|
29
|
+
const signTransaction = generateAction("signTransaction");
|
|
30
|
+
const getWalletBalance = generateAction("getWalletBalance");
|
|
31
|
+
export {
|
|
32
|
+
claimPregenWallets,
|
|
33
|
+
createGuestWallets,
|
|
34
|
+
createPregenWallet,
|
|
35
|
+
createPregenWalletPerType,
|
|
36
|
+
createWallet,
|
|
37
|
+
createWalletPerType,
|
|
38
|
+
enable2fa,
|
|
39
|
+
getWalletBalance,
|
|
40
|
+
hasPregenWallet,
|
|
41
|
+
keepSessionAlive,
|
|
42
|
+
loginExternalWallet,
|
|
43
|
+
logout,
|
|
44
|
+
resendVerificationCode,
|
|
45
|
+
setup2fa,
|
|
46
|
+
signMessage,
|
|
47
|
+
signTransaction,
|
|
48
|
+
signUpOrLogIn,
|
|
49
|
+
updatePregenWalletIdentifier,
|
|
50
|
+
verify2fa,
|
|
51
|
+
verifyExternalWallet,
|
|
52
|
+
verifyFarcaster,
|
|
53
|
+
verifyNewAccount,
|
|
54
|
+
verifyOAuth,
|
|
55
|
+
verifyTelegram,
|
|
56
|
+
waitForLogin,
|
|
57
|
+
waitForSignup,
|
|
58
|
+
waitForWalletCreation
|
|
59
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import ParaWeb, { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } 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 generateAction<const method extends CoreMethodName & keyof CoreMethods>(method: method): CoreAction<method>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
function generateAction(method) {
|
|
6
|
+
return (para, ...args) => __async(this, null, function* () {
|
|
7
|
+
if (!para) {
|
|
8
|
+
throw new Error("no para instance");
|
|
9
|
+
}
|
|
10
|
+
return yield para[method](...args);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
generateAction
|
|
15
|
+
};
|
|
@@ -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,34 @@
|
|
|
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 { CosmosWallet } from "@getpara/react-common";
|
|
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 CosmosWallet);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
CosmosExternalWalletProvider,
|
|
22
|
+
{
|
|
23
|
+
config: cosmosConnectorConfig,
|
|
24
|
+
internalConfig: { onSwitchWallet, para, walletsWithFullAuth: externalWalletsWithFullAuth, connectedWallet: wallet },
|
|
25
|
+
grazProviderProps,
|
|
26
|
+
isUsing,
|
|
27
|
+
wallets,
|
|
28
|
+
children
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
CosmosWalletWrapper
|
|
34
|
+
};
|
|
@@ -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,34 @@
|
|
|
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 { EvmWallet } from "@getpara/react-common";
|
|
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 isUsing = wallets.some((w) => w in EvmWallet);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
EvmExternalWalletProvider,
|
|
22
|
+
{
|
|
23
|
+
config: evmProviderConfig,
|
|
24
|
+
internalConfig: { onSwitchWallet, para, walletsWithFullAuth: externalWalletsWithFullAuth, connectedWallet: wallet },
|
|
25
|
+
wagmiProviderProps,
|
|
26
|
+
isUsing,
|
|
27
|
+
wallets,
|
|
28
|
+
children
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
EvmWalletWrapper
|
|
34
|
+
};
|
|
@@ -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,139 @@
|
|
|
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
|
+
} : cosmosConnector.config,
|
|
103
|
+
[cosmosConnector]
|
|
104
|
+
);
|
|
105
|
+
const grazProviderProps = useMemo(() => {
|
|
106
|
+
var _a2, _b;
|
|
107
|
+
const connectorsGrazProviderProps = cosmosConnector == null ? void 0 : cosmosConnector.grazProviderProps;
|
|
108
|
+
return __spreadProps(__spreadValues({}, connectorsGrazProviderProps), {
|
|
109
|
+
walletConnect: __spreadProps(__spreadValues({}, connectorsGrazProviderProps == null ? void 0 : connectorsGrazProviderProps.walletConnect), {
|
|
110
|
+
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 : "" })
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
}, [cosmosConnector, walletConnect == null ? void 0 : walletConnect.projectId]);
|
|
114
|
+
const handleSwitchWallet = useCallback(({ address, error }) => {
|
|
115
|
+
if (error || !address) {
|
|
116
|
+
resetModalState();
|
|
117
|
+
}
|
|
118
|
+
}, []);
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
EvmWalletWrapper,
|
|
121
|
+
{
|
|
122
|
+
evmProviderConfig,
|
|
123
|
+
wagmiProviderProps: (_a = evmConnector == null ? void 0 : evmConnector.wagmiProviderProps) != null ? _a : {},
|
|
124
|
+
onSwitchWallet: handleSwitchWallet,
|
|
125
|
+
children: /* @__PURE__ */ jsx(
|
|
126
|
+
CosmosWalletWrapper,
|
|
127
|
+
{
|
|
128
|
+
cosmosConnectorConfig: cosmosProviderConfig,
|
|
129
|
+
grazProviderProps,
|
|
130
|
+
onSwitchWallet: handleSwitchWallet,
|
|
131
|
+
children: /* @__PURE__ */ jsx(SolanaWalletWrapper, { onSwitchWallet: handleSwitchWallet, solanaProviderConfig, children: /* @__PURE__ */ jsx(ExternalWalletProvider, { children }) })
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
export {
|
|
138
|
+
ExternalWalletWrapper
|
|
139
|
+
};
|
|
@@ -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,36 @@
|
|
|
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 { SolanaWallet } from "@getpara/react-common";
|
|
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 isUsing = wallets.some((w) => w in SolanaWallet);
|
|
17
|
+
if (!solanaProviderConfig) {
|
|
18
|
+
if (isUsing) {
|
|
19
|
+
throw new Error("A valid solanaConnector config is required to use an external Solana wallet.");
|
|
20
|
+
}
|
|
21
|
+
return children;
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
SolanaExternalWalletProvider,
|
|
25
|
+
{
|
|
26
|
+
config: solanaProviderConfig,
|
|
27
|
+
internalConfig: { onSwitchWallet, para, walletsWithFullAuth: externalWalletsWithFullAuth },
|
|
28
|
+
isUsing,
|
|
29
|
+
wallets,
|
|
30
|
+
children
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
SolanaWalletWrapper
|
|
36
|
+
};
|
|
@@ -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,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { CosmosExternalWalletContext } from "./stubs/CosmosExternalWalletContextStub.js";
|
|
6
|
+
const getParaCosmosConnector = () => __async(void 0, null, function* () {
|
|
7
|
+
let Provider, context, wallets;
|
|
8
|
+
try {
|
|
9
|
+
const lib = yield import("@getpara/cosmos-wallet-connectors");
|
|
10
|
+
Provider = lib.ParaCosmosProvider;
|
|
11
|
+
context = lib.CosmosExternalWalletContext;
|
|
12
|
+
wallets = lib.allWallets;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
Provider = void 0;
|
|
15
|
+
context = CosmosExternalWalletContext;
|
|
16
|
+
wallets = [];
|
|
17
|
+
}
|
|
18
|
+
return { Provider, context, wallets };
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
getParaCosmosConnector
|
|
22
|
+
};
|
|
@@ -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,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { EvmExternalWalletContext } from "./stubs/EvmExternalWalletContextStub.js";
|
|
6
|
+
const getParaEvmConnector = () => __async(void 0, null, function* () {
|
|
7
|
+
let Provider, context, wallets;
|
|
8
|
+
try {
|
|
9
|
+
const lib = yield import("@getpara/evm-wallet-connectors");
|
|
10
|
+
Provider = lib.ParaEvmProvider;
|
|
11
|
+
context = lib.EvmExternalWalletContext;
|
|
12
|
+
wallets = lib.allWallets;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
Provider = void 0;
|
|
15
|
+
context = EvmExternalWalletContext;
|
|
16
|
+
wallets = [];
|
|
17
|
+
}
|
|
18
|
+
return { Provider, context, wallets };
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
getParaEvmConnector
|
|
22
|
+
};
|
|
@@ -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,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { SolanaExternalWalletContext } from "./stubs/SolanaExternalWalletContextStub.js";
|
|
6
|
+
const getParaSolanaConnector = () => __async(void 0, null, function* () {
|
|
7
|
+
let Provider, context, wallets;
|
|
8
|
+
try {
|
|
9
|
+
const lib = yield import("@getpara/solana-wallet-connectors");
|
|
10
|
+
Provider = lib.ParaSolanaProvider;
|
|
11
|
+
context = lib.SolanaExternalWalletContext;
|
|
12
|
+
wallets = lib.allWallets;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
Provider = void 0;
|
|
15
|
+
context = SolanaExternalWalletContext;
|
|
16
|
+
wallets = [];
|
|
17
|
+
}
|
|
18
|
+
return { Provider, context, wallets };
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
getParaSolanaConnector
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CosmosExternalWalletContextType } from '@getpara/cosmos-wallet-connectors';
|
|
2
|
+
export declare const defaultCosmosExternalWallet: {
|
|
3
|
+
wallets: never[];
|
|
4
|
+
chains: never[];
|
|
5
|
+
chainId: undefined;
|
|
6
|
+
disconnect: () => Promise<void>;
|
|
7
|
+
switchChain: () => Promise<{}>;
|
|
8
|
+
connectParaEmbedded: () => Promise<{}>;
|
|
9
|
+
signMessage: () => Promise<{}>;
|
|
10
|
+
signVerificationMessage: () => Promise<{}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const CosmosExternalWalletContext: import("react").Context<CosmosExternalWalletContextType>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createContext } from "react";
|
|
4
|
+
const defaultCosmosExternalWallet = {
|
|
5
|
+
wallets: [],
|
|
6
|
+
chains: [],
|
|
7
|
+
chainId: void 0,
|
|
8
|
+
disconnect: () => Promise.resolve(),
|
|
9
|
+
switchChain: () => Promise.resolve({}),
|
|
10
|
+
connectParaEmbedded: () => Promise.resolve({}),
|
|
11
|
+
signMessage: () => Promise.resolve({}),
|
|
12
|
+
signVerificationMessage: () => Promise.resolve({})
|
|
13
|
+
};
|
|
14
|
+
const CosmosExternalWalletContext = createContext(defaultCosmosExternalWallet);
|
|
15
|
+
export {
|
|
16
|
+
CosmosExternalWalletContext,
|
|
17
|
+
defaultCosmosExternalWallet
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createContext } from "react";
|
|
4
|
+
const defaultEvmExternalWallet = {
|
|
5
|
+
wallets: [],
|
|
6
|
+
chains: [],
|
|
7
|
+
chainId: void 0,
|
|
8
|
+
username: void 0,
|
|
9
|
+
avatar: void 0,
|
|
10
|
+
disconnect: () => Promise.resolve(),
|
|
11
|
+
switchChain: () => Promise.resolve({}),
|
|
12
|
+
connectParaEmbedded: () => Promise.resolve({}),
|
|
13
|
+
signMessage: () => Promise.resolve({}),
|
|
14
|
+
signVerificationMessage: () => Promise.resolve({}),
|
|
15
|
+
getWalletBalance: () => Promise.resolve(void 0)
|
|
16
|
+
};
|
|
17
|
+
const EvmExternalWalletContext = createContext(defaultEvmExternalWallet);
|
|
18
|
+
export {
|
|
19
|
+
EvmExternalWalletContext,
|
|
20
|
+
defaultEvmExternalWallet
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SolanaExternalWalletContextType } from '@getpara/solana-wallet-connectors';
|
|
2
|
+
export declare const defaultSolanaExternalWallet: {
|
|
3
|
+
wallets: never[];
|
|
4
|
+
disconnect: () => Promise<void>;
|
|
5
|
+
signMessage: () => Promise<{}>;
|
|
6
|
+
signVerificationMessage: () => Promise<{}>;
|
|
7
|
+
};
|
|
8
|
+
export declare const SolanaExternalWalletContext: import("react").Context<SolanaExternalWalletContextType>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createContext } from "react";
|
|
4
|
+
const defaultSolanaExternalWallet = {
|
|
5
|
+
wallets: [],
|
|
6
|
+
disconnect: () => Promise.resolve(),
|
|
7
|
+
signMessage: () => Promise.resolve({}),
|
|
8
|
+
signVerificationMessage: () => Promise.resolve({})
|
|
9
|
+
};
|
|
10
|
+
const SolanaExternalWalletContext = createContext(defaultSolanaExternalWallet);
|
|
11
|
+
export {
|
|
12
|
+
SolanaExternalWalletContext,
|
|
13
|
+
defaultSolanaExternalWallet
|
|
14
|
+
};
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
1
|
+
export declare const useSignUpOrLogIn: () => import("../../types/utils.js").CoreMethodHook<"signUpOrLogIn">;
|
|
2
|
+
export declare const useVerifyNewAccount: () => import("../../types/utils.js").CoreMethodHook<"verifyNewAccount">;
|
|
3
|
+
export declare const useWaitForLogin: () => import("../../types/utils.js").CoreMethodHook<"waitForLogin">;
|
|
4
|
+
export declare const useWaitForSignup: () => import("../../types/utils.js").CoreMethodHook<"waitForSignup">;
|
|
5
|
+
export declare const useWaitForWalletCreation: () => import("../../types/utils.js").CoreMethodHook<"waitForWalletCreation">;
|
|
6
|
+
export declare const useVerifyOAuth: () => import("../../types/utils.js").CoreMethodHook<"verifyOAuth">;
|
|
7
|
+
export declare const useVerifyFarcaster: () => import("../../types/utils.js").CoreMethodHook<"verifyFarcaster">;
|
|
8
|
+
export declare const useVerifyTelegram: () => import("../../types/utils.js").CoreMethodHook<"verifyTelegram">;
|
|
9
|
+
export declare const useLoginExternalWallet: () => import("../../types/utils.js").CoreMethodHook<"loginExternalWallet">;
|
|
10
|
+
export declare const useVerifyExternalWallet: () => import("../../types/utils.js").CoreMethodHook<"verifyExternalWallet">;
|
|
11
|
+
export declare const useSetup2fa: () => import("../../types/utils.js").CoreMethodHook<"setup2fa">;
|
|
12
|
+
export declare const useEnable2fa: () => import("../../types/utils.js").CoreMethodHook<"enable2fa">;
|
|
13
|
+
export declare const useVerify2fa: () => import("../../types/utils.js").CoreMethodHook<"verify2fa">;
|
|
14
|
+
export declare const useKeepSessionAlive: () => import("../../types/utils.js").CoreMethodHook<"keepSessionAlive">;
|
|
15
|
+
export declare const useLogout: () => import("../../types/utils.js").CoreMethodHook<"logout">;
|
|
16
|
+
export declare const useResendVerificationCode: () => import("../../types/utils.js").CoreMethodHook<"resendVerificationCode">;
|
|
17
|
+
export declare const useCreateWallet: () => import("../../types/utils.js").CoreMethodHook<"createWallet">;
|
|
18
|
+
export declare const useCreateWalletPerType: () => import("../../types/utils.js").CoreMethodHook<"createWalletPerType">;
|
|
19
|
+
export declare const useCreatePregenWallet: () => import("../../types/utils.js").CoreMethodHook<"createPregenWallet">;
|
|
20
|
+
export declare const useCreatePregenWalletPerType: () => import("../../types/utils.js").CoreMethodHook<"createPregenWalletPerType">;
|
|
21
|
+
export declare const useClaimPregenWallets: () => import("../../types/utils.js").CoreMethodHook<"claimPregenWallets">;
|
|
22
|
+
export declare const useHasPregenWallet: () => import("../../types/utils.js").CoreMethodHook<"hasPregenWallet">;
|
|
23
|
+
export declare const useUpdatePregenWalletIdentifier: () => import("../../types/utils.js").CoreMethodHook<"updatePregenWalletIdentifier">;
|
|
24
|
+
export declare const useCreateGuestWallets: () => import("../../types/utils.js").CoreMethodHook<"createGuestWallets">;
|
|
25
|
+
export declare const useSignMessage: () => import("../../types/utils.js").CoreMethodHook<"signMessage">;
|
|
26
|
+
export declare const useSignTransaction: () => import("../../types/utils.js").CoreMethodHook<"signTransaction">;
|
|
27
|
+
export declare const useCreateGuestWalletsState: import("../../types/utils.js").CoreMethodStateHook<"createGuestWallets">;
|