@getpara/react-sdk 1.7.0 → 2.0.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cli/cli.mjs +40 -0
  2. package/dist/index.js +3397 -3345
  3. package/dist/index.js.br +0 -0
  4. package/dist/index.js.gz +0 -0
  5. package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
  6. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
  7. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
  8. package/dist/modal/components/Controls/Selects.d.ts +1 -1
  9. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
  10. package/dist/modal/components/Footer/Footer.d.ts +1 -1
  11. package/dist/modal/components/ModalContent/ModalContent.d.ts +4 -0
  12. package/dist/modal/components/WalletCard/WalletCard.d.ts +2 -2
  13. package/dist/modal/components/common.d.ts +2 -6
  14. package/dist/modal/index.d.ts +0 -2
  15. package/dist/modal/stores/index.d.ts +0 -1
  16. package/dist/modal/stores/modal/useModalStore.d.ts +9 -6
  17. package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +3 -3
  18. package/dist/modal/types/commonTypes.d.ts +2 -12
  19. package/dist/modal/types/externalWallets.d.ts +0 -2
  20. package/dist/modal/types/modalProps.d.ts +1 -29
  21. package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
  22. package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
  23. package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
  24. package/dist/modal/utils/openPopup.d.ts +2 -2
  25. package/dist/modal/utils/steps.d.ts +0 -2
  26. package/dist/provider/ParaProvider.d.ts +3 -1
  27. package/dist/provider/actions/checkIfUserExists.d.ts +2 -7
  28. package/dist/provider/actions/createUser.d.ts +2 -10
  29. package/dist/provider/actions/getAccount.d.ts +9 -6
  30. package/dist/provider/actions/getWallet.d.ts +1 -1
  31. package/dist/provider/actions/initiateLogin.d.ts +3 -3
  32. package/dist/provider/actions/logout.d.ts +4 -1
  33. package/dist/provider/actions/waitForAccountCreation.d.ts +4 -1
  34. package/dist/provider/actions/waitForLoginAndSetup.d.ts +1 -1
  35. package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
  36. package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
  37. package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
  38. package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
  39. package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
  40. package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
  41. package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
  42. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
  43. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
  44. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
  45. package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +1 -1
  46. package/dist/provider/hooks/mutations/useLogout.d.ts +3 -2
  47. package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +3 -2
  48. package/dist/provider/hooks/queries/useAccount.d.ts +4 -3
  49. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  50. package/dist/provider/hooks/utils/useWalletState.d.ts +2 -2
  51. package/dist/provider/index.d.ts +1 -0
  52. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
  53. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
  54. package/dist/provider/providers/ExternalWalletProvider.d.ts +66 -0
  55. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
  56. package/dist/provider/stores/getters.d.ts +3 -3
  57. package/dist/provider/stores/setters.d.ts +1 -0
  58. package/dist/provider/stores/slices/config.d.ts +3 -0
  59. package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
  60. package/dist/provider/stores/slices/index.d.ts +1 -0
  61. package/dist/provider/stores/types.d.ts +43 -1
  62. package/dist/provider/types/externalWalletProviders.d.ts +12 -0
  63. package/dist/provider/types/provider.d.ts +115 -16
  64. package/dist/provider/types/utils.d.ts +1 -0
  65. package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
  66. package/package.json +19 -7
  67. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  68. package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
  69. package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
  70. package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
  71. package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
  72. package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
  73. package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -44
  74. package/dist/modal/providers/ExternalWalletContext.d.ts +0 -89
  75. package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
  76. package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
  77. package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
  78. package/dist/modal/stores/theme/actions.d.ts +0 -3
  79. package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
  80. package/dist/package.json +0 -4
  81. package/dist/provider/utils/constants.d.ts +0 -5
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
@@ -2,5 +2,5 @@ interface AuthInputProps {
2
2
  disableEmailLogin?: boolean;
3
3
  disablePhoneLogin?: boolean;
4
4
  }
5
- export declare const AuthInput: ({ disableEmailLogin, disablePhoneLogin }: AuthInputProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const AuthInput: ({ disableEmailLogin, disablePhoneLogin }: AuthInputProps) => import("react/jsx-runtime").JSX.Element | null;
6
6
  export {};
@@ -1,7 +1,7 @@
1
1
  import { MutableRefObject } from 'react';
2
- export declare const useDropdownPosition: (inputRef: MutableRefObject<HTMLCpslInputElement | HTMLDivElement>) => {
3
- dropdownMaxHeight: number;
4
- dropdownWidth: number;
5
- mobileAnchor: number;
2
+ export declare const useDropdownPosition: (inputRef: MutableRefObject<HTMLCpslInputElement | HTMLDivElement | null>) => {
3
+ dropdownMaxHeight: number | undefined;
4
+ dropdownWidth: number | undefined;
5
+ mobileAnchor: number | undefined;
6
6
  resize: () => void;
7
7
  };
@@ -1 +1 @@
1
- export declare const ChainSwitch: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ChainSwitch: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,2 @@
1
- export declare const ChainSelect: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ChainSelect: () => import("react/jsx-runtime").JSX.Element | null;
2
2
  export declare const AccountSelect: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const ExternalWalletStep: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ExternalWalletStep: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- export declare const Footer: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const Footer: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,9 @@
1
1
  import { ParaModalProps } from '../../types/modalProps.js';
2
+ import { useCreateAccount } from '../../hooks/useCreateAccount.js';
2
3
  type ModalContentProps = Omit<ParaModalProps, 'para' | 'isOpen' | 'theme' | 'branding' | 'onModalStepChange' | 'onExpandModalChange'>;
4
+ export declare const ActionsContext: import("react").Context<{
5
+ createAccount: ReturnType<typeof useCreateAccount>;
6
+ }>;
3
7
  export type ModalContentHandle = {
4
8
  /**
5
9
  * Trigger the modal close handler
@@ -1,11 +1,11 @@
1
1
  import { WalletType } from '@getpara/web-sdk';
2
- export declare const ExternalWalletCard: ({ address, showAddFunds }: Pick<SharedWalletCardProps, "address" | "showAddFunds">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ExternalWalletCard: ({ address, showAddFunds }: Pick<SharedWalletCardProps, "address" | "showAddFunds">) => import("react/jsx-runtime").JSX.Element | null;
3
3
  interface WalletCardProps {
4
4
  id: string;
5
5
  type: WalletType;
6
6
  showAddFunds?: boolean;
7
7
  }
8
- export declare const WalletCard: ({ id, type, showAddFunds }: WalletCardProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const WalletCard: ({ id, type, showAddFunds }: WalletCardProps) => import("react/jsx-runtime").JSX.Element | null;
9
9
  interface SharedWalletCardProps {
10
10
  address: string;
11
11
  id?: string;
@@ -8,16 +8,12 @@ export declare const FullWidthFilledDisabledInput: typeof CpslInput;
8
8
  export declare const CenteredText: typeof CpslText;
9
9
  export declare const InnerStepContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
10
  export declare const StepContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
11
- ref?: import("react").Ref<HTMLDivElement>;
11
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
12
  }, {
13
13
  $wide?: boolean;
14
14
  }>> & string;
15
15
  export declare const Heading: typeof CpslText;
16
16
  export declare const StyledCpslTileButton: typeof CpslTileButton;
17
17
  export declare const HeroIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>, "ref"> & {
18
- ref?: import("react").Ref<HTMLCpslIconElement>;
19
- }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>>, keyof import("react").Component<any, {}, any>>;
20
- export declare const ErrorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
- export declare const ErrorIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>, "ref"> & {
22
- ref?: import("react").Ref<HTMLCpslIconElement>;
18
+ ref?: ((instance: HTMLCpslIconElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLCpslIconElement> | null | undefined;
23
19
  }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>>, keyof import("react").Component<any, {}, any>>;
@@ -7,5 +7,3 @@ export { ON_RAMP_PROVIDERS, ON_RAMP_ASSETS, NETWORKS, getAssetIcon, getAssetName
7
7
  export { SaveRecoverySecret } from './components/RecoverySecretStep/RecoverySecretStep.js';
8
8
  export * from './utils/validateOnRampConfig.js';
9
9
  export * from './types/externalWallets.js';
10
- export { useExternalWalletProviderStore } from './stores/externalWalletProvider/useExternalWalletProviderStore.js';
11
- export * from './types/commonTypes.js';
@@ -1,3 +1,2 @@
1
1
  export * from './modal/useModalStore.js';
2
2
  export * from './userInfo/useUserInfoStore.js';
3
- export * from './theme/useThemeStore.js';
@@ -3,6 +3,7 @@ import { OnRampConfig as OnRampConfigBase, OnRampPurchase, WalletType } from '@g
3
3
  import { Tab as AddFundsTabType } from '../../components/AddFunds/AddFunds.js';
4
4
  import { AuthMethod } from '@getpara/core-sdk';
5
5
  import { BiometricLocationHint } from '@getpara/user-management-client';
6
+ import { TAuthLayout } from '../../types/modalProps.js';
6
7
  import { MutableRefObject } from 'react';
7
8
  type Flow = 'login' | 'signUp' | 'account';
8
9
  type ActiveWallet = [string | undefined, WalletType | undefined];
@@ -22,7 +23,7 @@ interface ModalState {
22
23
  webAuthURLForCreate: string | undefined;
23
24
  passwordUrlForLogin: string | undefined;
24
25
  supportedAuthMethods: Set<AuthMethod>;
25
- onModalStepChange: (value: OnModalStepChangeValue) => void | undefined;
26
+ onModalStepChange?: (value: OnModalStepChangeValue) => void | undefined;
26
27
  onRampConfig: OnRampConfig | undefined;
27
28
  onRampPurchase: Partial<OnRampPurchase> | undefined;
28
29
  isFullyLoggedIn: boolean;
@@ -36,14 +37,15 @@ interface ModalState {
36
37
  biometricLocationHints: BiometricLocationHint[] | undefined;
37
38
  iFrameUrl: string | undefined;
38
39
  isIFrameReady: boolean | undefined;
40
+ authLayout?: TAuthLayout[];
39
41
  authStepRoute: ModalStep | undefined;
40
42
  refs: {
41
- popupWindow: MutableRefObject<Window>;
43
+ popupWindow: MutableRefObject<Window | null>;
42
44
  poll: MutableRefObject<{
43
45
  action: 'login' | 'createPasskey' | 'createPassword';
44
46
  timeout: number;
45
- }>;
46
- currentStep: MutableRefObject<ModalStep>;
47
+ } | null>;
48
+ currentStep: MutableRefObject<ModalStep | null>;
47
49
  };
48
50
  isPasskeySupported: boolean;
49
51
  }
@@ -59,11 +61,11 @@ export interface ModalActions {
59
61
  setWebAuthURLForLogin: (url?: string) => void;
60
62
  setWebAuthURLForCreate: (url?: string) => void;
61
63
  setPasswordUrlForLogin: (url?: string) => void;
62
- setOnModalStepChange: (fn: (value: OnModalStepChangeValue) => void) => void;
64
+ setOnModalStepChange: (fn?: (value: OnModalStepChangeValue) => void) => void;
63
65
  setOnRampConfig: (_: OnRampConfig | undefined) => void;
64
66
  setOnRampPurchase: (_: Partial<OnRampPurchase> | undefined) => void;
65
67
  setIsFullyLoggedIn: (isFullyLoggedIn: boolean) => void;
66
- setAccountAddFundTab: (accountAddFundTab: AddFundsTabType) => void;
68
+ setAccountAddFundTab: (accountAddFundTab?: AddFundsTabType) => void;
67
69
  setSelectedExternalWalletId: (id?: string) => void;
68
70
  setIsUsingMobileConnector: (isUsingMobileConnector?: boolean) => void;
69
71
  setIsExternalWalletConnecting: (isExternalWalletConnecting: boolean) => void;
@@ -73,6 +75,7 @@ export interface ModalActions {
73
75
  setBiometricLocationHints: (_?: BiometricLocationHint[]) => void;
74
76
  setIFrameUrl: (_?: string) => void;
75
77
  setIsIFrameReady: (_?: boolean) => void;
78
+ setAuthLayout: (authLayout: TAuthLayout[]) => void;
76
79
  setAuthStepRoute: (_?: ModalStep) => void;
77
80
  setIsPasskeySupported: (_: boolean) => void;
78
81
  }
@@ -1,8 +1,8 @@
1
- import { Auth } from '@getpara/user-management-client';
1
+ import { PrimaryAuth } from '@getpara/user-management-client';
2
2
  import { ModalAuthInfo } from '@getpara/react-common';
3
- type SetAuthInfo = Auth & Partial<Pick<ModalAuthInfo, 'pfpUrl' | 'displayName'>>;
3
+ type SetAuthInfo = PrimaryAuth & Partial<Pick<ModalAuthInfo, 'pfpUrl' | 'displayName'>>;
4
4
  type UserInfoState = {
5
- auth: Auth | null;
5
+ auth: PrimaryAuth | null;
6
6
  pfpUrl: string | null;
7
7
  displayName: string | null;
8
8
  recoveryShare: string | null;
@@ -1,10 +1,8 @@
1
1
  import { IconType } from '@getpara/react-components';
2
- import { WalletType } from '@getpara/web-sdk';
3
2
  export type WalletMetadata = {
4
3
  id: string;
5
4
  name: string;
6
5
  iconUrl: string;
7
- rdns?: string;
8
6
  installed?: boolean;
9
7
  isExtension?: boolean;
10
8
  isMobile?: boolean;
@@ -31,21 +29,13 @@ export type WalletMetadata = {
31
29
  export type CommonWallet = {
32
30
  connect: () => Promise<{
33
31
  address?: string;
34
- bufferAddress?: string;
35
32
  error?: string;
36
- userExists: boolean;
37
- isVerified: boolean;
38
33
  }>;
39
- connectMobile: (_: {
40
- isManualWalletConnect?: boolean;
41
- }) => Promise<{
34
+ connectMobile: (isManualWalletConnect?: boolean) => Promise<{
42
35
  address?: string;
43
- bufferAddress?: string;
44
36
  error?: string;
45
- userExists: boolean;
46
- isVerified: boolean;
47
37
  }>;
48
- type: WalletType;
38
+ type: 'EVM' | 'SOLANA' | 'COSMOS';
49
39
  } & WalletMetadata;
50
40
  export type CommonChain = {
51
41
  id: string | number;
@@ -4,7 +4,6 @@ export declare enum EvmWallet {
4
4
  COINBASE = "COINBASE",
5
5
  WALLETCONNECT = "WALLETCONNECT",
6
6
  ZERION = "ZERION",
7
- SAFE = "SAFE",
8
7
  RABBY = "RABBY"
9
8
  }
10
9
  export declare enum SolanaWallet {
@@ -27,7 +26,6 @@ export declare const ExternalWallet: {
27
26
  COINBASE: EvmWallet.COINBASE;
28
27
  WALLETCONNECT: EvmWallet.WALLETCONNECT;
29
28
  ZERION: EvmWallet.ZERION;
30
- SAFE: EvmWallet.SAFE;
31
29
  RABBY: EvmWallet.RABBY;
32
30
  };
33
31
  export type TExternalWallet = keyof typeof ExternalWallet;
@@ -1,8 +1,7 @@
1
- import ParaWeb, { CurrentWalletIds, OAuthMethod, deprecated__NetworkProp, deprecated__OnRampConfig } from '@getpara/web-sdk';
1
+ import ParaWeb, { CurrentWalletIds, OAuthMethod } from '@getpara/web-sdk';
2
2
  import { Theme } from '@getpara/react-components';
3
3
  import { OnModalStepChangeValue } from '../stores/index.js';
4
4
  import { ModalStep, ModalStepProp } from '../utils/steps.js';
5
- import { TExternalWallet } from './externalWallets.js';
6
5
  export type ParaModalHandle = {
7
6
  /**
8
7
  * Move the modal backward
@@ -74,21 +73,6 @@ export interface ParaModalProps {
74
73
  * Logo to be shown throughout the modal.
75
74
  */
76
75
  logo?: string;
77
- /**
78
- * App name to be shown throughout the modal.
79
- */
80
- appName?: string;
81
- /**
82
- * Configure on-ramp providers to allow users to add funds upon signing up.
83
- * @deprecated Configure on-ramps in the Para Developer Portal.
84
- */
85
- onRampConfig?: deprecated__OnRampConfig;
86
- /**
87
- * Configures which EVM networks your app supports, an array of one or more of `["ETHEREUM", "ARBITRUM", "BASE", "OPTIMISM", and "POLYGON"]`.
88
- * Defaults to `["ETHEREUM"]`.
89
- * @deprecated Configure this setting in the Para Developer Portal.
90
- */
91
- networks?: deprecated__NetworkProp[];
92
76
  /**
93
77
  * Whether or not to run configured on-ramp providers in test mode.
94
78
  */
@@ -110,18 +94,6 @@ export interface ParaModalProps {
110
94
  */
111
95
  embeddedModal?: boolean;
112
96
  className?: string;
113
- /**
114
- * Which external wallets to show and in what order they should be displayed.
115
- *
116
- * NOTE: Any wallets that are detected as installed will be sorted first, followed by those that are not detected or not installed.
117
- */
118
- externalWallets?: TExternalWallet[];
119
- /**
120
- * Which external wallets to include full Para authentication for.
121
- *
122
- * These wallets should also be included in the externalWallets list in order to be displayed in the modal.
123
- */
124
- externalWalletsWithParaAuth?: TExternalWallet[];
125
97
  /**
126
98
  * How the modal should order the components on the main auth screen.
127
99
  * Only the first method of each type (auth or external) will be used.
@@ -1,3 +1,3 @@
1
1
  import { TAuthLayout } from '../types/modalProps.js';
2
- export declare const hasExternalWallet: (authLayout: TAuthLayout[]) => "AUTH:FULL" | "AUTH:CONDENSED" | "EXTERNAL:FULL" | "EXTERNAL:CONDENSED";
3
- export declare const hasEmbeddedAuth: (authLayout: TAuthLayout[]) => "AUTH:FULL" | "AUTH:CONDENSED" | "EXTERNAL:FULL" | "EXTERNAL:CONDENSED";
2
+ export declare const hasExternalWallet: (authLayout: TAuthLayout[]) => "AUTH:FULL" | "AUTH:CONDENSED" | "EXTERNAL:FULL" | "EXTERNAL:CONDENSED" | undefined;
3
+ export declare const hasEmbeddedAuth: (authLayout: TAuthLayout[]) => "AUTH:FULL" | "AUTH:CONDENSED" | "EXTERNAL:FULL" | "EXTERNAL:CONDENSED" | undefined;
@@ -1 +1 @@
1
- export declare const getTileButtonFlex: (index: number, totalItems: number) => "1 1 auto" | "0 0 calc(33.333333% - 5.336px)" | "0 0 calc(50% - 4px)";
1
+ export declare const getTileButtonFlex: (index: number, totalItems: number) => "1 1 auto" | "0 0 calc(33.333333% - 5.336px)" | "0 0 calc(50% - 4px)" | undefined;
@@ -0,0 +1 @@
1
+ export declare const isPasskeySupported: () => boolean;
@@ -2,5 +2,5 @@ export declare function openPopup({ url, target, type, current, }: {
2
2
  url: string;
3
3
  target: string;
4
4
  type: 'OAUTH' | 'LOGIN_PASSKEY' | 'CREATE_PASSKEY' | 'TRANSACTION_REVIEW' | 'CREATE_PASSWORD' | 'LOGIN_PASSWORD';
5
- current?: Window;
6
- }): Window;
5
+ current?: Window | null;
6
+ }): Window | null;
@@ -5,7 +5,6 @@ export declare enum ModalStep {
5
5
  EX_WALLET_MORE = "EX_WALLET_MORE",
6
6
  EX_WALLET_SELECTED = "EX_WALLET_SELECTED",
7
7
  VERIFICATIONS = "VERIFICATIONS",
8
- EXTERNAL_WALLET_VERIFICATION = "EXTERNAL_WALLET_VERIFICATION",
9
8
  AWAITING_OAUTH = "AWAITING_OAUTH",
10
9
  FARCASTER_OAUTH = "FARCASTER_OAUTH",
11
10
  BIOMETRIC_CREATION = "BIOMETRIC_CREATION",
@@ -56,7 +55,6 @@ declare enum SignUpModalStep {
56
55
  EX_WALLET_MORE = "EX_WALLET_MORE",
57
56
  EX_WALLET_SELECTED = "EX_WALLET_SELECTED",
58
57
  VERIFICATIONS = "VERIFICATIONS",
59
- EXTERNAL_WALLET_VERIFICATION = "EXTERNAL_WALLET_VERIFICATION",
60
58
  AWAITING_OAUTH = "AWAITING_OAUTH",
61
59
  FARCASTER_OAUTH = "FARCASTER_OAUTH",
62
60
  TELEGRAM_OAUTH = "TELEGRAM_OAUTH",
@@ -1,2 +1,4 @@
1
1
  import { ParaProviderProps } from './types/provider.js';
2
- export declare const ParaProvider: ({ children, paraClientConfig, callbacks, config }: ParaProviderProps) => import("react").ReactNode;
2
+ import { Chain, Transport } from 'viem';
3
+ import { ParaModalHandle } from '../modal/index.js';
4
+ export declare const ParaProvider: import("react").ForwardRefExoticComponent<ParaProviderProps<readonly [Chain, ...Chain[]], Record<number, Transport>> & import("react").RefAttributes<ParaModalHandle>>;
@@ -1,9 +1,4 @@
1
- import { CountryCallingCode } from 'libphonenumber-js';
2
- import { CreateUserType } from './createUser.js';
3
1
  import ParaWeb from '@getpara/web-sdk';
4
- export interface CheckIfUserExistsArgs {
5
- type: CreateUserType;
6
- identifier: string;
7
- countryCode?: CountryCallingCode;
8
- }
2
+ import { Auth } from '@getpara/user-management-client';
3
+ export type CheckIfUserExistsArgs = Auth<'email'> | Auth<'phone'>;
9
4
  export declare const checkIfUserExists: (para?: ParaWeb, args?: CheckIfUserExistsArgs) => Promise<boolean>;
@@ -1,12 +1,4 @@
1
+ import { Auth } from '@getpara/user-management-client';
1
2
  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
- }
3
+ export type CreateUserArgs = Auth<'email'> | Auth<'phone'>;
12
4
  export declare const createUser: (para?: ParaWeb, args?: CreateUserArgs) => Promise<void>;
@@ -1,7 +1,10 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export declare const getAccount: (para?: ParaWeb) => Promise<{
1
+ import ParaWeb, { Wallet } from '@getpara/web-sdk';
2
+ type AccountType = {
3
3
  isConnected: boolean;
4
- email: any;
5
- phone: any;
6
- wallets: any;
7
- }>;
4
+ email?: string;
5
+ phone?: string;
6
+ wallets?: Record<string, Wallet>;
7
+ userId?: string;
8
+ };
9
+ export declare const getAccount: (para?: ParaWeb) => Promise<AccountType>;
10
+ export {};
@@ -2,4 +2,4 @@ import ParaWeb, { WalletType } from '@getpara/web-sdk';
2
2
  export declare const getWallet: (para?: ParaWeb, selectedWallet?: {
3
3
  id?: string;
4
4
  type?: WalletType;
5
- }) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer">>;
5
+ }) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer"> | null | undefined>;
@@ -1,4 +1,4 @@
1
- import { Auth } from '@getpara/user-management-client';
1
+ import { PrimaryAuth } from '@getpara/user-management-client';
2
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>>;
3
+ export type InitiateLoginArgs = PrimaryAuth;
4
+ export declare const initiateLogin: (para?: ParaWeb, args?: InitiateLoginArgs) => Promise<Set<import("@getpara/user-management-client").AuthMethod>>;
@@ -1,2 +1,5 @@
1
1
  import ParaWeb from '@getpara/web-sdk';
2
- export declare const logout: (para?: ParaWeb) => Promise<void>;
2
+ export interface LogoutArgs {
3
+ clearPregenWallets?: boolean;
4
+ }
5
+ export declare const logout: (para?: ParaWeb, args?: LogoutArgs) => Promise<void>;
@@ -1,2 +1,5 @@
1
1
  import ParaWeb from '@getpara/web-sdk';
2
- export declare const waitForAccountCreation: (para?: ParaWeb) => Promise<true>;
2
+ export interface waitForAccountCreationArgs {
3
+ popupWindow?: Window | null;
4
+ }
5
+ export declare const waitForAccountCreation: (para?: ParaWeb, args?: waitForAccountCreationArgs) => Promise<true>;
@@ -1,6 +1,6 @@
1
1
  import ParaWeb from '@getpara/web-sdk';
2
2
  export interface WaitForLoginAndSetupArgs {
3
- loginWindow?: Window;
3
+ popupWindow?: Window | null;
4
4
  skipSessionRefresh?: boolean;
5
5
  }
6
6
  export declare const waitForLoginAndSetup: (para?: ParaWeb, args?: WaitForLoginAndSetupArgs) => Promise<import("@getpara/web-sdk").LoginResponse>;
@@ -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,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,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,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,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,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,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,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,3 @@
1
+ import { EvmExternalWalletContextType } from '@getpara/evm-wallet-connectors';
2
+ export declare const defaultEvmExternalWallet: EvmExternalWalletContextType;
3
+ export declare const EvmExternalWalletContext: import("react").Context<EvmExternalWalletContextType>;
@@ -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>;
@@ -10,5 +10,5 @@ type UseInitiateLoginReturnType<TData = Set<AuthMethod>, TError = Error, TVariab
10
10
  /**
11
11
  * Hook for initiating a user login
12
12
  */
13
- export declare const useInitiateLogin: () => UseInitiateLoginReturnType<Set<AuthMethod>, Error, InitiateLoginArgs, unknown>;
13
+ export declare const useInitiateLogin: () => UseInitiateLoginReturnType<Set<AuthMethod>, Error, import("@getpara/user-management-client").PrimaryAuth, unknown>;
14
14
  export {};
@@ -1,12 +1,13 @@
1
1
  import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
+ import { LogoutArgs } from '../../actions/logout.js';
2
3
  import { Compute } from '../../types/utils.js';
3
4
  import { UseMutationReturnType } from '../../types/query.js';
4
- type UseLogoutReturnType<TData = void, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
5
+ type UseLogoutReturnType<TData = void, TError = Error, TVariables = LogoutArgs | undefined, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
5
6
  logout: UseMutateFunction<TData, TError, TVariables, TContext>;
6
7
  logoutAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
7
8
  }>;
8
9
  /**
9
10
  * Hook for logging out a user
10
11
  */
11
- export declare const useLogout: () => UseLogoutReturnType<void, Error, void, unknown>;
12
+ export declare const useLogout: () => UseLogoutReturnType<void, Error, LogoutArgs | undefined, unknown>;
12
13
  export {};
@@ -1,12 +1,13 @@
1
1
  import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
+ import { waitForAccountCreationArgs } from '../../actions/waitForAccountCreation.js';
2
3
  import { UseMutationReturnType } from '../../types/query.js';
3
4
  import { Compute } from '../../types/utils.js';
4
- type UseWaitForAccountCreationReturnType<TData = boolean, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
5
+ type UseWaitForAccountCreationReturnType<TData = boolean, TError = Error, TVariables = waitForAccountCreationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
5
6
  waitForAccountCreation: UseMutateFunction<TData, TError, TVariables, TContext>;
6
7
  waitForAccountCreationAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
7
8
  }>;
8
9
  /**
9
10
  * Hook for waiting for account creation
10
11
  */
11
- export declare const useWaitForAccountCreation: () => UseWaitForAccountCreationReturnType<boolean, Error, void, unknown>;
12
+ export declare const useWaitForAccountCreation: () => UseWaitForAccountCreationReturnType<boolean, Error, waitForAccountCreationArgs, unknown>;
12
13
  export {};
@@ -4,7 +4,8 @@ export declare const ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
4
4
  */
5
5
  export declare const useAccount: () => import("@tanstack/react-query").UseQueryResult<{
6
6
  isConnected: boolean;
7
- email: any;
8
- phone: any;
9
- wallets: any;
7
+ email?: string;
8
+ phone?: string;
9
+ wallets?: Record<string, import("@getpara/core-sdk").Wallet>;
10
+ userId?: string;
10
11
  }, Error>;
@@ -2,4 +2,4 @@ export declare const WALLET_BASE_KEY = "PARA_WALLET";
2
2
  /**
3
3
  * Hook for retrieving the selected wallet
4
4
  */
5
- export declare const useWallet: () => import("@tanstack/react-query").UseQueryResult<Omit<import("@getpara/core-sdk").Wallet, "signer">, Error>;
5
+ export declare const useWallet: () => import("@tanstack/react-query").UseQueryResult<Omit<import("@getpara/core-sdk").Wallet, "signer"> | null | undefined, Error>;
@@ -4,8 +4,8 @@ import { WalletType } from '@getpara/web-sdk';
4
4
  */
5
5
  export declare const useWalletState: () => {
6
6
  selectedWallet: {
7
- id: string;
8
- type: WalletType;
7
+ id: string | undefined;
8
+ type: WalletType | undefined;
9
9
  };
10
10
  setSelectedWallet: ({ id, type }: {
11
11
  id?: string;
@@ -1,3 +1,4 @@
1
1
  export { ParaProvider } from './ParaProvider.js';
2
2
  export * from './hooks/index.js';
3
3
  export * from './stores/getters.js';
4
+ export * from './stores/setters.js';
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { ExternalWalletProviderCommon, ParaCosmosProviderConfigNoWallets } from '../types/externalWalletProviders.js';
3
+ import { ParaCosmosProviderProps } from '@getpara/cosmos-wallet-connectors';
4
+ export declare function CosmosExternalWalletProvider({ children, isUsing, wallets: walletsFromProps, ...rest }: Omit<ParaCosmosProviderProps, 'config'> & {
5
+ config: ParaCosmosProviderConfigNoWallets;
6
+ } & PropsWithChildren & ExternalWalletProviderCommon): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
7
+ export declare const MemoizedCosmosExternalWalletProvider: import("react").MemoExoticComponent<typeof CosmosExternalWalletProvider>;