@getpara/react-sdk 1.7.1 → 2.0.0-alpha.3
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/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
- package/dist/chunk-MMUBH76A.js.gz +0 -0
- package/dist/cli/cli.mjs +40 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3049 -3209
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
- package/dist/modal/components/Controls/Selects.d.ts +1 -1
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
- package/dist/modal/components/Footer/Footer.d.ts +1 -1
- package/dist/modal/components/WalletCard/WalletCard.d.ts +2 -2
- package/dist/modal/components/common.d.ts +3 -3
- package/dist/modal/constants/constants.d.ts +1 -1
- package/dist/modal/index.d.ts +0 -2
- package/dist/modal/stores/index.d.ts +0 -2
- package/dist/modal/stores/modal/useModalStore.d.ts +22 -20
- package/dist/modal/types/commonTypes.d.ts +4 -9
- package/dist/modal/types/externalWallets.d.ts +0 -2
- package/dist/modal/types/modalProps.d.ts +1 -29
- package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
- package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
- package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
- package/dist/modal/utils/openPopup.d.ts +2 -2
- package/dist/provider/ParaProvider.d.ts +3 -1
- package/dist/provider/actions/getAccount.d.ts +19 -7
- package/dist/provider/actions/getWallet.d.ts +1 -1
- package/dist/provider/actions/index.d.ts +25 -0
- package/dist/provider/actions/utils.d.ts +3 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
- package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
- package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
- package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
- package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
- package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
- package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
- package/dist/provider/hooks/mutations/index.d.ts +25 -10
- package/dist/provider/hooks/mutations/utils.d.ts +4 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +1 -6
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/utils/useWalletState.d.ts +3 -2
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/providers/AuthProvider.d.ts +31 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +73 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
- package/dist/provider/stores/getters.d.ts +3 -3
- package/dist/provider/stores/setters.d.ts +1 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
- package/dist/provider/stores/slices/index.d.ts +1 -0
- package/dist/provider/stores/types.d.ts +46 -1
- package/dist/provider/types/externalWalletProviders.d.ts +12 -0
- package/dist/provider/types/provider.d.ts +119 -16
- package/dist/provider/types/utils.d.ts +16 -0
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
- package/dist/provider/utils/renameMutations.d.ts +3 -0
- package/package.json +19 -7
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
- package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
- package/dist/modal/hooks/useCreateAccount.d.ts +0 -4
- package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
- package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
- package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
- package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -44
- package/dist/modal/providers/ExternalWalletContext.d.ts +0 -89
- package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
- package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
- package/dist/modal/stores/theme/actions.d.ts +0 -3
- package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
- package/dist/modal/stores/userInfo/actions.d.ts +0 -3
- package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
- package/dist/package.json +0 -4
- package/dist/provider/actions/checkIfUserExists.d.ts +0 -9
- package/dist/provider/actions/createUser.d.ts +0 -12
- package/dist/provider/actions/initiateLogin.d.ts +0 -4
- package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
- package/dist/provider/actions/logout.d.ts +0 -2
- package/dist/provider/actions/signMessage.d.ts +0 -8
- package/dist/provider/actions/signTransaction.d.ts +0 -8
- package/dist/provider/actions/waitForAccountCreation.d.ts +0 -2
- package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
- package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
- package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
- package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
- package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
- package/dist/provider/hooks/mutations/useLogout.d.ts +0 -12
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -14
- package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -12
- package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
- package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
- package/dist/provider/utils/constants.d.ts +0 -5
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { Context, ReactNode } from 'react';
|
|
2
|
-
import { CommonChain, CommonWallet } from '../types/commonTypes.js';
|
|
3
|
-
import { EvmExternalWalletContextType } from './EvmExternalWalletContextStub.js';
|
|
4
|
-
import { TExternalWallet } from '../types/externalWallets.js';
|
|
5
|
-
import { SolanaExternalWalletContextType } from './SolanaExternalWalletContextStub.js';
|
|
6
|
-
import { CosmosExternalWalletContextType } from './CosmosExternalWalletContextStub.js';
|
|
7
|
-
export declare const defaultExternalWallet: {
|
|
8
|
-
wallets: any[];
|
|
9
|
-
chains: any[];
|
|
10
|
-
chainId: any;
|
|
11
|
-
wallet: any;
|
|
12
|
-
qrUri: any;
|
|
13
|
-
chainIdSwitchingTo: any;
|
|
14
|
-
walletDisplayHelpers: {
|
|
15
|
-
showExtension: boolean;
|
|
16
|
-
showMobile: boolean;
|
|
17
|
-
isSolanaMobileIOS: boolean;
|
|
18
|
-
isCosmosMobileWallet: boolean;
|
|
19
|
-
};
|
|
20
|
-
username: any;
|
|
21
|
-
avatar: any;
|
|
22
|
-
connectExternalWallet: () => void;
|
|
23
|
-
disconnectExternalWallet: () => Promise<void>;
|
|
24
|
-
switchChain: () => Promise<void>;
|
|
25
|
-
setChainIdSwitchingTo: () => void;
|
|
26
|
-
verifyWalletSignature: () => Promise<{}>;
|
|
27
|
-
};
|
|
28
|
-
export declare const ExternalWalletContext: Context<{
|
|
29
|
-
wallets: CommonWallet[];
|
|
30
|
-
chains: CommonChain[];
|
|
31
|
-
chainId: string;
|
|
32
|
-
wallet?: CommonWallet;
|
|
33
|
-
qrUri?: string;
|
|
34
|
-
chainIdSwitchingTo?: string;
|
|
35
|
-
walletDisplayHelpers: {
|
|
36
|
-
showExtension: boolean;
|
|
37
|
-
showMobile: boolean;
|
|
38
|
-
isSolanaMobileIOS: boolean;
|
|
39
|
-
isCosmosMobileWallet: boolean;
|
|
40
|
-
};
|
|
41
|
-
username?: string;
|
|
42
|
-
avatar?: string;
|
|
43
|
-
connectExternalWallet: (wallet: CommonWallet, isMobile?: boolean, isManualWalletConnect?: boolean) => void;
|
|
44
|
-
disconnectExternalWallet: () => Promise<void>;
|
|
45
|
-
switchChain: (chainId: string) => Promise<void>;
|
|
46
|
-
setChainIdSwitchingTo: (chainId?: string) => void;
|
|
47
|
-
verifyWalletSignature: () => Promise<{
|
|
48
|
-
address?: string;
|
|
49
|
-
signature?: string;
|
|
50
|
-
cosmosPublicKeyHex?: string;
|
|
51
|
-
cosmosSigner?: string;
|
|
52
|
-
}>;
|
|
53
|
-
}>;
|
|
54
|
-
interface ExternalWalletProviderProps {
|
|
55
|
-
children: ReactNode;
|
|
56
|
-
walletSort: TExternalWallet[];
|
|
57
|
-
evmContext: Context<EvmExternalWalletContextType>;
|
|
58
|
-
solanaContext: Context<SolanaExternalWalletContextType>;
|
|
59
|
-
cosmosContext: Context<CosmosExternalWalletContextType>;
|
|
60
|
-
externalWalletsWithFullAuth?: TExternalWallet[];
|
|
61
|
-
}
|
|
62
|
-
export declare function ExternalWalletProvider({ children, evmContext, solanaContext, cosmosContext, walletSort, externalWalletsWithFullAuth, }: ExternalWalletProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
-
export declare const useExternalWallets: () => {
|
|
64
|
-
wallets: CommonWallet[];
|
|
65
|
-
chains: CommonChain[];
|
|
66
|
-
chainId: string;
|
|
67
|
-
wallet?: CommonWallet;
|
|
68
|
-
qrUri?: string;
|
|
69
|
-
chainIdSwitchingTo?: string;
|
|
70
|
-
walletDisplayHelpers: {
|
|
71
|
-
showExtension: boolean;
|
|
72
|
-
showMobile: boolean;
|
|
73
|
-
isSolanaMobileIOS: boolean;
|
|
74
|
-
isCosmosMobileWallet: boolean;
|
|
75
|
-
};
|
|
76
|
-
username?: string;
|
|
77
|
-
avatar?: string;
|
|
78
|
-
connectExternalWallet: (wallet: CommonWallet, isMobile?: boolean, isManualWalletConnect?: boolean) => void;
|
|
79
|
-
disconnectExternalWallet: () => Promise<void>;
|
|
80
|
-
switchChain: (chainId: string) => Promise<void>;
|
|
81
|
-
setChainIdSwitchingTo: (chainId?: string) => void;
|
|
82
|
-
verifyWalletSignature: () => Promise<{
|
|
83
|
-
address?: string;
|
|
84
|
-
signature?: string;
|
|
85
|
-
cosmosPublicKeyHex?: string;
|
|
86
|
-
cosmosSigner?: string;
|
|
87
|
-
}>;
|
|
88
|
-
};
|
|
89
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { CommonWallet } from '../types/commonTypes.js';
|
|
3
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
4
|
-
export declare const defaultSolanaExternalWallet: {
|
|
5
|
-
wallets: any[];
|
|
6
|
-
disconnect: () => Promise<void>;
|
|
7
|
-
signMessage: () => Promise<{}>;
|
|
8
|
-
signVerificationMessage: () => Promise<{}>;
|
|
9
|
-
};
|
|
10
|
-
export type SolanaExternalWalletContextType = {
|
|
11
|
-
wallets: CommonWallet[];
|
|
12
|
-
disconnect: () => Promise<void>;
|
|
13
|
-
signMessage: (message: string) => Promise<{
|
|
14
|
-
signature?: string;
|
|
15
|
-
error?: string;
|
|
16
|
-
}>;
|
|
17
|
-
signVerificationMessage: () => Promise<{
|
|
18
|
-
address?: string;
|
|
19
|
-
signature?: string;
|
|
20
|
-
error?: string;
|
|
21
|
-
}>;
|
|
22
|
-
};
|
|
23
|
-
export declare const SolanaExternalWalletContext: import("react").Context<SolanaExternalWalletContextType>;
|
|
24
|
-
export interface SolanaExternalWalletProviderProps {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
para: ParaWeb;
|
|
27
|
-
onSwitchWallet: (args: {
|
|
28
|
-
address?: string;
|
|
29
|
-
error?: string;
|
|
30
|
-
}) => void;
|
|
31
|
-
}
|
|
32
|
-
export declare function SolanaExternalWalletProvider({ children }: SolanaExternalWalletProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { StoreApi } from 'zustand';
|
|
2
|
-
import { ExternalWalletProviderActions, ExternalWalletProviderStore } from './useExternalWalletProviderStore.js';
|
|
3
|
-
export declare const getActions: (set: StoreApi<ExternalWalletProviderStore>["setState"]) => ExternalWalletProviderActions;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { EvmExternalWalletContextType, EvmExternalWalletProvider } from '../../providers/EvmExternalWalletContextStub.js';
|
|
2
|
-
import { Context } from 'react';
|
|
3
|
-
import { SolanaExternalWalletContextType, SolanaExternalWalletProvider } from '../../providers/SolanaExternalWalletContextStub.js';
|
|
4
|
-
import { CosmosExternalWalletContextType, CosmosExternalWalletProvider } from '../../providers/CosmosExternalWalletContextStub.js';
|
|
5
|
-
import { TExternalWallet } from '../../types/externalWallets.js';
|
|
6
|
-
interface ExternalWalletProviderState {
|
|
7
|
-
EvmProvider?: typeof EvmExternalWalletProvider;
|
|
8
|
-
evmContext?: Context<EvmExternalWalletContextType>;
|
|
9
|
-
SolanaProvider?: typeof SolanaExternalWalletProvider;
|
|
10
|
-
solanaContext?: Context<SolanaExternalWalletContextType>;
|
|
11
|
-
CosmosProvider?: typeof CosmosExternalWalletProvider;
|
|
12
|
-
cosmosContext?: Context<CosmosExternalWalletContextType>;
|
|
13
|
-
connectParaEvmWallet?: () => Promise<any>;
|
|
14
|
-
connectParaCosmosWallet?: () => Promise<any>;
|
|
15
|
-
fullAuthWallets: TExternalWallet[];
|
|
16
|
-
}
|
|
17
|
-
export interface ExternalWalletProviderActions {
|
|
18
|
-
updateState: (state: Partial<ExternalWalletProviderState>) => void;
|
|
19
|
-
}
|
|
20
|
-
export type ExternalWalletProviderStore = ExternalWalletProviderState & ExternalWalletProviderActions;
|
|
21
|
-
export declare const useExternalWalletProviderStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ExternalWalletProviderStore>>;
|
|
22
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ParaModalTheme, OAuthLogoVariantType, TAuthLayout } from '../../types/modalProps.js';
|
|
2
|
-
interface ThemeState {
|
|
3
|
-
isDark?: boolean;
|
|
4
|
-
logo?: string;
|
|
5
|
-
appName?: string;
|
|
6
|
-
bareModal?: boolean;
|
|
7
|
-
embeddedModal?: boolean;
|
|
8
|
-
oAuthLogoVariant?: OAuthLogoVariantType;
|
|
9
|
-
authLayout?: TAuthLayout[];
|
|
10
|
-
theme?: ParaModalTheme;
|
|
11
|
-
hideWallets?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ThemeActions {
|
|
14
|
-
updateState: (state: Partial<ThemeState>) => void;
|
|
15
|
-
getLogo: () => string | undefined;
|
|
16
|
-
setAuthLayout: (authLayout: TAuthLayout[]) => void;
|
|
17
|
-
}
|
|
18
|
-
export type ThemeStore = ThemeState & ThemeActions;
|
|
19
|
-
export declare const useThemeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ThemeStore>>;
|
|
20
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Auth } from '@getpara/user-management-client';
|
|
2
|
-
import { ModalAuthInfo } from '@getpara/react-common';
|
|
3
|
-
type SetAuthInfo = Auth & Partial<Pick<ModalAuthInfo, 'pfpUrl' | 'displayName'>>;
|
|
4
|
-
type UserInfoState = {
|
|
5
|
-
auth: Auth | null;
|
|
6
|
-
pfpUrl: string | null;
|
|
7
|
-
displayName: string | null;
|
|
8
|
-
recoveryShare: string | null;
|
|
9
|
-
};
|
|
10
|
-
export interface UserInfoActions {
|
|
11
|
-
resetState: () => void;
|
|
12
|
-
setAuthInfo: (auth: SetAuthInfo) => void;
|
|
13
|
-
getAuthInfo: () => ModalAuthInfo | null;
|
|
14
|
-
setRecoveryShare: (recoveryShare: string | null) => void;
|
|
15
|
-
}
|
|
16
|
-
export type UserInfoStore = UserInfoState & UserInfoActions;
|
|
17
|
-
export declare const DEFAULT_USER_INFO_STATE: UserInfoState;
|
|
18
|
-
export declare const useUserInfoStore: import("zustand").UseBoundStore<import("zustand").StoreApi<UserInfoStore>>;
|
|
19
|
-
export {};
|
package/dist/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CountryCallingCode } from 'libphonenumber-js';
|
|
2
|
-
import { CreateUserType } from './createUser.js';
|
|
3
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
4
|
-
export interface CheckIfUserExistsArgs {
|
|
5
|
-
type: CreateUserType;
|
|
6
|
-
identifier: string;
|
|
7
|
-
countryCode?: CountryCallingCode;
|
|
8
|
-
}
|
|
9
|
-
export declare const checkIfUserExists: (para?: ParaWeb, args?: CheckIfUserExistsArgs) => Promise<boolean>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
2
|
-
import { CountryCallingCode } from 'libphonenumber-js';
|
|
3
|
-
export declare enum CreateUserType {
|
|
4
|
-
EMAIL = "EMAIL",
|
|
5
|
-
PHONE = "PHONE"
|
|
6
|
-
}
|
|
7
|
-
export interface CreateUserArgs {
|
|
8
|
-
type: CreateUserType;
|
|
9
|
-
identifier: string;
|
|
10
|
-
countryCode?: CountryCallingCode;
|
|
11
|
-
}
|
|
12
|
-
export declare const createUser: (para?: ParaWeb, args?: CreateUserArgs) => Promise<void>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Auth } from '@getpara/user-management-client';
|
|
2
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
3
|
-
export type InitiateLoginArgs = Auth;
|
|
4
|
-
export declare const initiateLogin: (para?: ParaWeb, args?: Auth) => Promise<Set<import("@getpara/user-management-client").AuthMethod>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
2
|
-
export interface SignMessageArgs {
|
|
3
|
-
walletId: string;
|
|
4
|
-
messageBase64: string;
|
|
5
|
-
timeoutMs?: number;
|
|
6
|
-
cosmosSignDocBase64?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const signMessage: (para?: ParaWeb, args?: SignMessageArgs) => Promise<import("@getpara/web-sdk").FullSignatureRes>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
2
|
-
export interface SignTransactionArgs {
|
|
3
|
-
walletId: string;
|
|
4
|
-
rlpEncodedTxBase64: string;
|
|
5
|
-
chainId: string;
|
|
6
|
-
timeoutMs?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const signTransaction: (para?: ParaWeb, args?: SignTransactionArgs) => Promise<import("@getpara/web-sdk").FullSignatureRes>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import ParaWeb from '@getpara/web-sdk';
|
|
2
|
-
export interface WaitForLoginAndSetupArgs {
|
|
3
|
-
loginWindow?: Window;
|
|
4
|
-
skipSessionRefresh?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const waitForLoginAndSetup: (para?: ParaWeb, args?: WaitForLoginAndSetupArgs) => Promise<import("@getpara/web-sdk").LoginResponse>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { CheckIfUserExistsArgs } from '../../actions/checkIfUserExists.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
type UseCheckIfUserExistsReturnType<TData = boolean, TError = Error, TVariables = CheckIfUserExistsArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
6
|
-
checkIfUserExists: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
checkIfUserExistsAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
}>;
|
|
9
|
-
/**
|
|
10
|
-
* Hook for checking is a user exists
|
|
11
|
-
*/
|
|
12
|
-
export declare const useCheckIfUserExists: () => UseCheckIfUserExistsReturnType<boolean, Error, CheckIfUserExistsArgs, unknown>;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { CreateUserArgs } from '../../actions/createUser.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
type UseCreateUserReturnType<TData = void, TError = Error, TVariables = CreateUserArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
6
|
-
createUser: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
createUserAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
}>;
|
|
9
|
-
/**
|
|
10
|
-
* Hook for creating a new user
|
|
11
|
-
*/
|
|
12
|
-
export declare const useCreateUser: () => UseCreateUserReturnType<void, Error, CreateUserArgs, unknown>;
|
|
13
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { InitiateLoginArgs } from '../../actions/initiateLogin.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
import { AuthMethod } from '@getpara/web-sdk';
|
|
6
|
-
type UseInitiateLoginReturnType<TData = Set<AuthMethod>, TError = Error, TVariables = InitiateLoginArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
7
|
-
initiateLogin: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
initiateLoginAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Hook for initiating a user login
|
|
12
|
-
*/
|
|
13
|
-
export declare const useInitiateLogin: () => UseInitiateLoginReturnType<Set<AuthMethod>, Error, InitiateLoginArgs, unknown>;
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { Compute } from '../../types/utils.js';
|
|
3
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
4
|
-
type UseKeepSessionAliveReturnType<TData = void, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
5
|
-
keepSessionAlive: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
6
|
-
keepSessionAliveAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* Hook for keeping a session alive
|
|
10
|
-
*/
|
|
11
|
-
export declare const useKeepSessionAlive: () => UseKeepSessionAliveReturnType<void, Error, void, unknown>;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { Compute } from '../../types/utils.js';
|
|
3
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
4
|
-
type UseLogoutReturnType<TData = void, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
5
|
-
logout: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
6
|
-
logoutAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* Hook for logging out a user
|
|
10
|
-
*/
|
|
11
|
-
export declare const useLogout: () => UseLogoutReturnType<void, Error, void, unknown>;
|
|
12
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { SignMessageArgs } from '../../actions/signMessage.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
import { FullSignatureRes } from '@getpara/web-sdk';
|
|
6
|
-
type SignMessageMutationArgs = Omit<SignMessageArgs, 'walletId'> & Partial<Pick<SignMessageArgs, 'walletId'>>;
|
|
7
|
-
type UseSignMessageReturnType<TData = FullSignatureRes, TError = Error, TVariables = SignMessageMutationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
8
|
-
signMessage: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
9
|
-
signMessageAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* Hook for signing a message
|
|
13
|
-
*/
|
|
14
|
-
export declare const useSignMessage: () => UseSignMessageReturnType<FullSignatureRes, Error, SignMessageMutationArgs, unknown>;
|
|
15
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { SignTransactionArgs } from '../../actions/signTransaction.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
import { FullSignatureRes } from '@getpara/web-sdk';
|
|
6
|
-
type UseSignTransactionReturnType<TData = FullSignatureRes, TError = Error, TVariables = SignTransactionArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
7
|
-
signTransaction: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
signTransactionAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Hook for signing a transaction
|
|
12
|
-
*/
|
|
13
|
-
export declare const useSignTransaction: () => UseSignTransactionReturnType<FullSignatureRes, Error, SignTransactionArgs, unknown>;
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
type UseWaitForAccountCreationReturnType<TData = boolean, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
5
|
-
waitForAccountCreation: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
6
|
-
waitForAccountCreationAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* Hook for waiting for account creation
|
|
10
|
-
*/
|
|
11
|
-
export declare const useWaitForAccountCreation: () => UseWaitForAccountCreationReturnType<boolean, Error, void, unknown>;
|
|
12
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { WaitForLoginAndSetupArgs } from '../../actions/waitForLoginAndSetup.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
|
-
import { LoginResponse } from '@getpara/web-sdk';
|
|
6
|
-
type UseWaitForLoginAndSetupReturnType<TData = LoginResponse, TError = Error, TVariables = WaitForLoginAndSetupArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
7
|
-
waitForLoginAndSetup: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
waitForLoginAndSetupAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Hook for waiting for user login and account setup
|
|
12
|
-
*/
|
|
13
|
-
export declare const useWaitForLoginAndSetup: () => UseWaitForLoginAndSetupReturnType<LoginResponse, Error, WaitForLoginAndSetupArgs, unknown>;
|
|
14
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
|
|
2
|
-
import { UseMutationReturnType } from '../../types/query.js';
|
|
3
|
-
import { Compute } from '../../types/utils.js';
|
|
4
|
-
import { AccountSetupResponse } from '@getpara/web-sdk';
|
|
5
|
-
type UseWaitForPasskeyAndCreateWalletReturnType<TData = AccountSetupResponse, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
6
|
-
waitForPasskeyAndCreateWallet: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
7
|
-
waitForPasskeyAndCreateWalletAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
8
|
-
}>;
|
|
9
|
-
/**
|
|
10
|
-
* Hook for waiting for session setup and wallet creation
|
|
11
|
-
*/
|
|
12
|
-
export declare const useWaitForPasskeyAndCreateWallet: () => UseWaitForPasskeyAndCreateWalletReturnType<AccountSetupResponse, Error, void, unknown>;
|
|
13
|
-
export {};
|