@openfort/react 0.0.1

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 (192) hide show
  1. package/README.md +139 -0
  2. package/build/assets/ScanIconWithLogos.d.ts +5 -0
  3. package/build/assets/browsers.d.ts +10 -0
  4. package/build/assets/chains.d.ts +61 -0
  5. package/build/assets/icons.d.ts +51 -0
  6. package/build/assets/logos.d.ts +202 -0
  7. package/build/assets/wallet.d.ts +4 -0
  8. package/build/assets/wave.d.ts +2 -0
  9. package/build/components/BalanceButton/index.d.ts +9 -0
  10. package/build/components/Common/Alert/index.d.ts +6 -0
  11. package/build/components/Common/Alert/styles.d.ts +4 -0
  12. package/build/components/Common/Alert/types.d.ts +5 -0
  13. package/build/components/Common/Avatar/index.d.ts +16 -0
  14. package/build/components/Common/Avatar/styles.d.ts +8 -0
  15. package/build/components/Common/BrowserIcon/index.d.ts +4 -0
  16. package/build/components/Common/BrowserIcon/styles.d.ts +1 -0
  17. package/build/components/Common/BrowserIcon/types.d.ts +3 -0
  18. package/build/components/Common/Button/index.d.ts +4 -0
  19. package/build/components/Common/Button/styles.d.ts +16 -0
  20. package/build/components/Common/Button/types.d.ts +16 -0
  21. package/build/components/Common/Chain/index.d.ts +8 -0
  22. package/build/components/Common/Chain/styles.d.ts +9 -0
  23. package/build/components/Common/ChainSelect/index.d.ts +3 -0
  24. package/build/components/Common/ChainSelectDropdown/index.d.ts +9 -0
  25. package/build/components/Common/ChainSelectDropdown/styles.d.ts +4 -0
  26. package/build/components/Common/ChainSelectList/index.d.ts +4 -0
  27. package/build/components/Common/ChainSelectList/styles.d.ts +13 -0
  28. package/build/components/Common/ConnectorList/index.d.ts +2 -0
  29. package/build/components/Common/ConnectorList/styles.d.ts +9 -0
  30. package/build/components/Common/CopyToClipboard/CopyToClipboardIcon.d.ts +5 -0
  31. package/build/components/Common/CopyToClipboard/index.d.ts +7 -0
  32. package/build/components/Common/CustomQRCode/QRCode.d.ts +12 -0
  33. package/build/components/Common/CustomQRCode/index.d.ts +6 -0
  34. package/build/components/Common/CustomQRCode/styles.d.ts +8 -0
  35. package/build/components/Common/CustomQRCode/types.d.ts +8 -0
  36. package/build/components/Common/DynamicContainer/index.d.ts +7 -0
  37. package/build/components/Common/FitText/index.d.ts +10 -0
  38. package/build/components/Common/Input/index.d.ts +4 -0
  39. package/build/components/Common/Input/styles.d.ts +3 -0
  40. package/build/components/Common/Input/types.d.ts +2 -0
  41. package/build/components/Common/LazyImage/index.d.ts +8 -0
  42. package/build/components/Common/Loading/index.d.ts +6 -0
  43. package/build/components/Common/Logo/index.d.ts +8 -0
  44. package/build/components/Common/Logo/styles.d.ts +6 -0
  45. package/build/components/Common/Modal/index.d.ts +24 -0
  46. package/build/components/Common/Modal/styles.d.ts +33 -0
  47. package/build/components/Common/Portal/index.d.ts +2 -0
  48. package/build/components/Common/PoweredByFooter/index.d.ts +5 -0
  49. package/build/components/Common/ScrollArea/index.d.ts +7 -0
  50. package/build/components/Common/ScrollArea/styles.d.ts +8 -0
  51. package/build/components/Common/Spinner/index.d.ts +1 -0
  52. package/build/components/Common/Spinner/styles.d.ts +1 -0
  53. package/build/components/Common/SquircleSpinner/index.d.ts +5 -0
  54. package/build/components/Common/SquircleSpinner/styles.d.ts +4 -0
  55. package/build/components/Common/ThemedButton/index.d.ts +15 -0
  56. package/build/components/Common/ThemedButton/styles.d.ts +4 -0
  57. package/build/components/Common/Tooltip/index.d.ts +4 -0
  58. package/build/components/Common/Tooltip/styles.d.ts +8 -0
  59. package/build/components/Common/Tooltip/types.d.ts +9 -0
  60. package/build/components/ConnectButton/index.d.ts +33 -0
  61. package/build/components/ConnectButton/styles.d.ts +4 -0
  62. package/build/components/ConnectKitThemeProvider/ConnectKitThemeProvider.d.ts +16 -0
  63. package/build/components/ConnectModal/ConnectUsing.d.ts +2 -0
  64. package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.d.ts +9 -0
  65. package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.d.ts +7 -0
  66. package/build/components/ConnectModal/ConnectWithInjector/index.d.ts +16 -0
  67. package/build/components/ConnectModal/ConnectWithInjector/styles.d.ts +9 -0
  68. package/build/components/ConnectModal/ConnectWithOAuth.d.ts +2 -0
  69. package/build/components/ConnectModal/ConnectWithQRCode.d.ts +5 -0
  70. package/build/components/ConnectModal/index.d.ts +8 -0
  71. package/build/components/FloatingGraphic/styles.d.ts +11 -0
  72. package/build/components/NetworkButton/index.d.ts +8 -0
  73. package/build/components/OpenfortKit/OpenfortKit.d.ts +28 -0
  74. package/build/components/OpenfortKit/context.d.ts +38 -0
  75. package/build/components/OpenfortKit/types.d.ts +136 -0
  76. package/build/components/OpenfortKit/useOpenfortKit.d.ts +1 -0
  77. package/build/components/Pages/About/graphics.d.ts +11 -0
  78. package/build/components/Pages/About/index.d.ts +3 -0
  79. package/build/components/Pages/About/styles.d.ts +12 -0
  80. package/build/components/Pages/Connectors/index.d.ts +3 -0
  81. package/build/components/Pages/Connectors/styles.d.ts +9 -0
  82. package/build/components/Pages/DownloadApp/index.d.ts +2 -0
  83. package/build/components/Pages/EmailLogin/index.d.ts +3 -0
  84. package/build/components/Pages/EmailSignup/index.d.ts +3 -0
  85. package/build/components/Pages/EmailVerification/index.d.ts +3 -0
  86. package/build/components/Pages/ForgotPassword/index.d.ts +3 -0
  87. package/build/components/Pages/LinkEmail/index.d.ts +3 -0
  88. package/build/components/Pages/Loading/index.d.ts +3 -0
  89. package/build/components/Pages/MobileConnectors/index.d.ts +3 -0
  90. package/build/components/Pages/MobileConnectors/styles.d.ts +11 -0
  91. package/build/components/Pages/Onboarding/index.d.ts +3 -0
  92. package/build/components/Pages/Profile/LinkedProviders.d.ts +1 -0
  93. package/build/components/Pages/Profile/index.d.ts +5 -0
  94. package/build/components/Pages/Profile/styles.d.ts +10 -0
  95. package/build/components/Pages/Providers/index.d.ts +7 -0
  96. package/build/components/Pages/Providers/styles.d.ts +3 -0
  97. package/build/components/Pages/Recover/index.d.ts +3 -0
  98. package/build/components/Pages/SoicalProviders/index.d.ts +3 -0
  99. package/build/components/Pages/SoicalProviders/styles.d.ts +3 -0
  100. package/build/components/Pages/SwitchNetworks/index.d.ts +3 -0
  101. package/build/components/contexts/web3/index.d.ts +25 -0
  102. package/build/constants/chainConfigs.d.ts +18 -0
  103. package/build/constants/defaultTheme.d.ts +4 -0
  104. package/build/constants/openfort.d.ts +2 -0
  105. package/build/defaultConfig.d.ts +14 -0
  106. package/build/defaultConnectors.d.ts +14 -0
  107. package/build/defaultTransports.d.ts +15 -0
  108. package/build/hooks/connectors/useCoinbaseWalletUri.d.ts +0 -0
  109. package/build/hooks/connectors/useWalletConnectUri.d.ts +7 -0
  110. package/build/hooks/openfort/auth/requestEmailVerification.d.ts +5 -0
  111. package/build/hooks/openfort/auth/status.d.ts +14 -0
  112. package/build/hooks/openfort/auth/useAuthCallback.d.ts +39 -0
  113. package/build/hooks/openfort/auth/useCreateWalletPostAuth.d.ts +6 -0
  114. package/build/hooks/openfort/auth/useEmailAuth.d.ts +51 -0
  115. package/build/hooks/openfort/auth/useGuestAuth.d.ts +16 -0
  116. package/build/hooks/openfort/auth/useOAuth.d.ts +20 -0
  117. package/build/hooks/openfort/auth/useSignOut.d.ts +8 -0
  118. package/build/hooks/openfort/auth/useThirdPartyAuth.d.ts +1 -0
  119. package/build/hooks/openfort/auth/useWalletAuth.d.ts +20 -0
  120. package/build/hooks/openfort/hookConsistency.d.ts +13 -0
  121. package/build/hooks/openfort/useConnectWithSiwe.d.ts +4 -0
  122. package/build/hooks/openfort/useProviders.d.ts +6 -0
  123. package/build/hooks/openfort/useStatus.d.ts +16 -0
  124. package/build/hooks/openfort/useUI.d.ts +10 -0
  125. package/build/hooks/openfort/useUser.d.ts +5 -0
  126. package/build/hooks/openfort/useWallets.d.ts +37 -0
  127. package/build/hooks/useChainIsSupported.d.ts +1 -0
  128. package/build/hooks/useChains.d.ts +2 -0
  129. package/build/hooks/useConnect.d.ts +110 -0
  130. package/build/hooks/useConnectCallback.d.ts +10 -0
  131. package/build/hooks/useConnectors.d.ts +7 -0
  132. package/build/hooks/useEnsFallbackConfig.d.ts +2 -0
  133. package/build/hooks/useFitText.d.ts +14 -0
  134. package/build/hooks/useFocusTrap.d.ts +1 -0
  135. package/build/hooks/useGoogleFont.d.ts +3 -0
  136. package/build/hooks/useIsMobile.d.ts +1 -0
  137. package/build/hooks/useIsMounted.d.ts +1 -0
  138. package/build/hooks/useLastConnector.d.ts +4 -0
  139. package/build/hooks/useLocalStorage.d.ts +7 -0
  140. package/build/hooks/useLocales.d.ts +1 -0
  141. package/build/hooks/useLockBodyScroll.d.ts +1 -0
  142. package/build/hooks/usePrevious.d.ts +1 -0
  143. package/build/hooks/useWalletConnectModal.d.ts +4 -0
  144. package/build/hooks/useWindowSize.d.ts +4 -0
  145. package/build/index.d.ts +27 -0
  146. package/build/index.es.js +13011 -0
  147. package/build/index.es.js.map +1 -0
  148. package/build/localizations/index.d.ts +93 -0
  149. package/build/localizations/locales/ar-AE.d.ts +3 -0
  150. package/build/localizations/locales/ca-AD.d.ts +3 -0
  151. package/build/localizations/locales/ee-EE.d.ts +3 -0
  152. package/build/localizations/locales/en-US.d.ts +93 -0
  153. package/build/localizations/locales/es-ES.d.ts +3 -0
  154. package/build/localizations/locales/fa-IR.d.ts +3 -0
  155. package/build/localizations/locales/fr-FR.d.ts +3 -0
  156. package/build/localizations/locales/index.d.ts +2 -0
  157. package/build/localizations/locales/ja-JP.d.ts +93 -0
  158. package/build/localizations/locales/pt-BR.d.ts +3 -0
  159. package/build/localizations/locales/ru-RU.d.ts +3 -0
  160. package/build/localizations/locales/tr-TR.d.ts +3 -0
  161. package/build/localizations/locales/vi-VN.d.ts +3 -0
  162. package/build/localizations/locales/zh-CN.d.ts +3 -0
  163. package/build/openfort/OpenfortProvider.d.ts +17 -0
  164. package/build/openfort/OpenfortProvider_old.d.ts +0 -0
  165. package/build/openfort/context.d.ts +2 -0
  166. package/build/openfort/core/client.d.ts +24 -0
  167. package/build/openfort/core/index.d.ts +3 -0
  168. package/build/openfort/useOpenfort.d.ts +1 -0
  169. package/build/siwe/create-siwe-message.d.ts +1 -0
  170. package/build/styles/defaultTheme.d.ts +3 -0
  171. package/build/styles/index.d.ts +6 -0
  172. package/build/styles/styled/index.d.ts +12 -0
  173. package/build/styles/themes/base.d.ts +129 -0
  174. package/build/styles/themes/index.d.ts +673 -0
  175. package/build/styles/themes/midnight.d.ts +74 -0
  176. package/build/styles/themes/minimal.d.ts +94 -0
  177. package/build/styles/themes/nouns.d.ts +79 -0
  178. package/build/styles/themes/retro.d.ts +89 -0
  179. package/build/styles/themes/rounded.d.ts +86 -0
  180. package/build/styles/themes/soft.d.ts +69 -0
  181. package/build/styles/themes/web95.d.ts +91 -0
  182. package/build/styles/types.d.ts +80 -0
  183. package/build/types.d.ts +32 -0
  184. package/build/utils/index.d.ts +18 -0
  185. package/build/utils/localstorage.d.ts +9 -0
  186. package/build/utils/p3.d.ts +2 -0
  187. package/build/utils/wallets.d.ts +24 -0
  188. package/build/version.d.ts +1 -0
  189. package/build/wallets/index.d.ts +7 -0
  190. package/build/wallets/useWallets.d.ts +9 -0
  191. package/build/wallets/walletConfigs.d.ts +30 -0
  192. package/package.json +78 -0
@@ -0,0 +1,136 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { CustomAvatarProps, CustomTheme, Languages, Mode, Theme } from '../../types';
3
+ import { RecoveryMethod } from '@openfort/openfort-js';
4
+ import { OpenfortProviderProps } from '../../openfort/OpenfortProvider';
5
+ export declare const routes: {
6
+ readonly PROVIDERS: "providers";
7
+ readonly SOCIAL_PROVIDERS: "socialProviders";
8
+ readonly LOADING: "loading";
9
+ readonly RECOVER: "recover";
10
+ readonly EMAIL_LOGIN: "emailLogin";
11
+ readonly EMAIL_SIGNUP: "emailSignup";
12
+ readonly FORGOT_PASSWORD: "forgotPassword";
13
+ readonly EMAIL_VERIFICATION: "emailVerification";
14
+ readonly LINK_EMAIL: "linkEmail";
15
+ readonly ONBOARDING: "onboarding";
16
+ readonly ABOUT: "about";
17
+ readonly CONNECTORS: "connectors";
18
+ readonly MOBILECONNECTORS: "mobileConnectors";
19
+ readonly CONNECT: "connect";
20
+ readonly DOWNLOAD: "download";
21
+ readonly PROFILE: "profile";
22
+ readonly SWITCHNETWORKS: "switchNetworks";
23
+ };
24
+ export declare enum AuthProvider {
25
+ GOOGLE = "google",
26
+ TWITTER = "twitter",
27
+ FACEBOOK = "facebook",
28
+ EMAIL = "email",
29
+ WALLET = "wallet",
30
+ GUEST = "guest"
31
+ }
32
+ export declare const socialProviders: AuthProvider[];
33
+ type CommonWalletConfig = {
34
+ /** Publishable key for the Shield API */
35
+ shieldPublishableKey: string;
36
+ /** Policy ID (pol_...) for the embedded signer */
37
+ ethereumProviderPolicyId?: string;
38
+ debug?: boolean;
39
+ };
40
+ type EncryptionSession = {
41
+ /** Function to retrieve an encryption session using a session ID */
42
+ getEncryptionSession: () => Promise<string>;
43
+ createEncryptedSessionEndpoint?: never;
44
+ } | {
45
+ /** API endpoint for creating an encrypted session */
46
+ getEncryptionSession?: never;
47
+ createEncryptedSessionEndpoint: string;
48
+ };
49
+ /**
50
+ * Configuration for automatic recovery, which requires an encryption session.
51
+ */
52
+ type AutomaticRecoveryWalletConfig = {
53
+ /** Specifies that the recovery method is automatic */
54
+ recoveryMethod: RecoveryMethod.AUTOMATIC;
55
+ } & EncryptionSession;
56
+ type PasswordRecoveryWalletConfig = {
57
+ /** Specifies that the recovery method is password-based */
58
+ recoveryMethod: RecoveryMethod.PASSWORD;
59
+ } & ((EncryptionSession & {
60
+ shieldEncryptionKey?: never;
61
+ }) | {
62
+ /** Required shield encryption key when no encryption session is used */
63
+ shieldEncryptionKey: string;
64
+ createEncryptedSessionEndpoint?: never;
65
+ getEncryptionSession?: never;
66
+ });
67
+ /**
68
+ * Configuration for automatic recovery.
69
+ * - An encryption session is required.
70
+ *
71
+ * Configuration for password-based recovery.
72
+ * - An encryption session, OR
73
+ * - A `shieldEncryptionKey` without an encryption session.
74
+ *
75
+ * Encryption session can be created using either:
76
+ * - `createEncryptedSessionEndpoint` as a string, OR
77
+ * - `getEncryptionSession.` as a function that returns a promise.
78
+ */
79
+ export type OpenfortWalletConfig = CommonWalletConfig & (AutomaticRecoveryWalletConfig | PasswordRecoveryWalletConfig);
80
+ export type OpenfortOptions = {
81
+ linkWalletOnSignUp?: boolean;
82
+ authProviders?: AuthProvider[];
83
+ skipEmailVerification?: boolean;
84
+ termsOfServiceUrl?: string;
85
+ privacyPolicyUrl?: string;
86
+ logo?: React.ReactNode;
87
+ openfortUrlOverrides?: OpenfortProviderProps['overrides'];
88
+ };
89
+ export type ConnectKitOptions = {
90
+ theme?: Theme;
91
+ mode?: Mode;
92
+ customTheme?: CustomTheme;
93
+ hideBalance?: boolean;
94
+ hideTooltips?: boolean;
95
+ hideRecentBadge?: boolean;
96
+ walletConnectCTA?: 'link' | 'modal' | 'both';
97
+ avoidLayoutShift?: boolean;
98
+ embedGoogleFonts?: boolean;
99
+ truncateLongENSAddress?: boolean;
100
+ walletConnectName?: string;
101
+ reducedMotion?: boolean;
102
+ disclaimer?: ReactNode | string;
103
+ /** Buffer Polyfill, needed for bundlers that don't provide Node polyfills (e.g CRA, Vite, etc.) */
104
+ bufferPolyfill?: boolean;
105
+ customAvatar?: React.FC<CustomAvatarProps>;
106
+ initialChainId?: number;
107
+ enforceSupportedChains?: boolean;
108
+ overlayBlur?: number;
109
+ } & OpenfortOptions;
110
+ export type ConnectKitOptionsExtended = {
111
+ theme: Theme;
112
+ mode: Mode;
113
+ customTheme?: CustomTheme;
114
+ language?: Languages;
115
+ hideBalance?: boolean;
116
+ hideTooltips?: boolean;
117
+ hideQuestionMarkCTA?: boolean;
118
+ hideNoWalletCTA?: boolean;
119
+ hideRecentBadge?: boolean;
120
+ walletConnectCTA?: 'link' | 'modal' | 'both';
121
+ avoidLayoutShift?: boolean;
122
+ embedGoogleFonts?: boolean;
123
+ truncateLongENSAddress?: boolean;
124
+ walletConnectName?: string;
125
+ reducedMotion?: boolean;
126
+ disclaimer?: ReactNode | string;
127
+ bufferPolyfill?: boolean;
128
+ customAvatar?: React.FC<CustomAvatarProps>;
129
+ initialChainId?: number;
130
+ enforceSupportedChains?: boolean;
131
+ ethereumOnboardingUrl?: string;
132
+ walletOnboardingUrl?: string;
133
+ disableSiweRedirect?: boolean;
134
+ overlayBlur?: number;
135
+ } & OpenfortOptions;
136
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useOpenfortKit: () => import("./context").ContextValue;
@@ -0,0 +1,11 @@
1
+ import { EasingFunction } from 'framer-motion';
2
+ export type Easing = [number, number, number, number] | 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'circIn' | 'circOut' | 'circInOut' | 'backIn' | 'backOut' | 'backInOut' | 'anticipate' | EasingFunction;
3
+ type Slide = {
4
+ layoutId?: string;
5
+ duration: number;
6
+ ease: Easing;
7
+ };
8
+ export declare const SlideOne: ({ layoutId }: Slide) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const SlideTwo: ({ layoutId }: Slide) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SlideThree: ({ layoutId }: Slide) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const About: React.FC;
3
+ export default About;
@@ -0,0 +1,12 @@
1
+ export declare const ImageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ImageContainerInner: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
3
+ export declare const MobileImageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const Slides: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const Slide: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {
6
+ $active?: boolean;
7
+ }, never>;
8
+ export declare const Slider: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const Dots: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const Dot: import("styled-components").StyledComponent<"button", any, {
11
+ $active: boolean;
12
+ }, never>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Wallets: React.FC;
3
+ export default Wallets;
@@ -0,0 +1,9 @@
1
+ export declare const InfoBox: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const InfoBoxButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const LearnMoreContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
4
+ export declare const LearnMoreButton: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, any, {}, never>;
5
+ export declare const ConnectorsContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
6
+ export declare const ConnectorButton: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, any, {}, never>;
7
+ export declare const ConnectorRecentlyUsed: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLSpanElement, import("framer-motion").HTMLMotionProps<"span">>, any, {}, never>;
8
+ export declare const ConnectorLabel: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLSpanElement, import("framer-motion").HTMLMotionProps<"span">>, any, {}, never>;
9
+ export declare const ConnectorIcon: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
@@ -0,0 +1,2 @@
1
+ declare const DownloadApp: () => import("react/jsx-runtime").JSX.Element;
2
+ export default DownloadApp;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const EmailLogin: React.FC;
3
+ export default EmailLogin;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const EmailSignup: React.FC;
3
+ export default EmailSignup;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const EmailVerification: React.FC;
3
+ export default EmailVerification;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const ForgotPassword: React.FC;
3
+ export default ForgotPassword;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const LinkEmail: React.FC;
3
+ export default LinkEmail;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const Loading: React.FC;
3
+ export default Loading;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MobileConnectors: React.FC;
3
+ export default MobileConnectors;
@@ -0,0 +1,11 @@
1
+ export declare const WalletItem: import("styled-components").StyledComponent<"div", any, {
2
+ $waiting?: boolean;
3
+ }, never>;
4
+ export declare const WalletIcon: import("styled-components").StyledComponent<"div", any, {
5
+ $outline?: boolean;
6
+ }, never>;
7
+ export declare const WalletLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const WalletList: import("styled-components").StyledComponent<"div", any, {
9
+ $disabled?: boolean;
10
+ }, never>;
11
+ export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Introduction: React.FC;
3
+ export default Introduction;
@@ -0,0 +1 @@
1
+ export declare const LinkedProviders: React.FC;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const Profile: React.FC<{
3
+ closeModal?: () => void;
4
+ }>;
5
+ export default Profile;
@@ -0,0 +1,10 @@
1
+ export declare const AvatarContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
2
+ export declare const AvatarInner: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
3
+ export declare const ChainSelectorContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
4
+ export declare const BalanceContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
5
+ export declare const Balance: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
6
+ export declare const LoadingBalance: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
7
+ export declare const Unsupported: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
8
+ export declare const LinkedProviderContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
9
+ export declare const LinkedProviderButton: import("styled-components").StyledComponent<import("react").FC<import("../../Common/Button/types").ButtonProps>, any, {}, never>;
10
+ export declare const ProvidersHeader: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h3">>, any, {}, never>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { AuthProvider } from "../../OpenfortKit/types";
3
+ export declare const ProviderButtonSwitch: React.FC<{
4
+ provider: AuthProvider;
5
+ }>;
6
+ declare const Providers: React.FC;
7
+ export default Providers;
@@ -0,0 +1,3 @@
1
+ export declare const ProvidersButton: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ProviderLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
3
+ export declare const ProviderIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const CreateEmbeddedSigner: React.FC;
3
+ export default CreateEmbeddedSigner;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const SocialProviders: React.FC;
3
+ export default SocialProviders;
@@ -0,0 +1,3 @@
1
+ export declare const ProvidersButton: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ProviderLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
3
+ export declare const ProviderIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SwitchNetworks: React.FC;
3
+ export default SwitchNetworks;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This provider is responsible for handling reusable web3 logic across the app.
3
+ */
4
+ import React from 'react';
5
+ import { Address, Chain } from 'viem';
6
+ type Web3Context = {
7
+ connect: {
8
+ getUri: (id?: string) => string;
9
+ };
10
+ dapp: {
11
+ chains: Chain[];
12
+ };
13
+ account?: {
14
+ chain: Chain;
15
+ chainIsSupported: boolean;
16
+ address: Address;
17
+ };
18
+ };
19
+ declare const Web3Context: React.Context<Web3Context>;
20
+ export declare const Web3ContextProvider: ({ enabled, children, }: {
21
+ enabled?: boolean;
22
+ children: React.ReactNode;
23
+ }) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const useWeb3: () => Web3Context;
25
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ type Chain = {
3
+ id: number;
4
+ name: string;
5
+ logo: ReactNode;
6
+ rpcUrls?: {
7
+ alchemy?: {
8
+ http?: string[];
9
+ webSocket?: string[];
10
+ };
11
+ infura?: {
12
+ http?: string[];
13
+ webSocket?: string[];
14
+ };
15
+ };
16
+ };
17
+ export declare const chainConfigs: Chain[];
18
+ export {};
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ mobileWidth: number;
3
+ };
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const embeddedWalletId = "xyz.openfort";
2
+ export declare const emailToVerifyLocalStorageKey = "openfort:email-to-verify";
@@ -0,0 +1,14 @@
1
+ import { type CreateConfigParameters } from '@wagmi/core';
2
+ import { CoinbaseWalletParameters } from 'wagmi/connectors';
3
+ export declare const getAppName: () => string;
4
+ export declare const getAppIcon: () => string;
5
+ type DefaultConfigProps = {
6
+ appName: string;
7
+ appIcon?: string;
8
+ appDescription?: string;
9
+ appUrl?: string;
10
+ walletConnectProjectId: string;
11
+ coinbaseWalletPreference?: CoinbaseWalletParameters<'4'>['preference'];
12
+ } & Partial<CreateConfigParameters>;
13
+ declare const defaultConfig: ({ appName, appIcon, appDescription, appUrl, walletConnectProjectId, coinbaseWalletPreference, chains, client, ...props }: DefaultConfigProps) => CreateConfigParameters;
14
+ export default defaultConfig;
@@ -0,0 +1,14 @@
1
+ import { CreateConnectorFn } from 'wagmi';
2
+ import { CoinbaseWalletParameters } from '@wagmi/connectors';
3
+ type DefaultConnectorsProps = {
4
+ app: {
5
+ name: string;
6
+ icon?: string;
7
+ description?: string;
8
+ url?: string;
9
+ };
10
+ walletConnectProjectId?: string;
11
+ coinbaseWalletPreference?: CoinbaseWalletParameters<'4'>['preference'];
12
+ };
13
+ declare const defaultConnectors: ({ app, walletConnectProjectId, coinbaseWalletPreference, }: DefaultConnectorsProps) => CreateConnectorFn[];
14
+ export default defaultConnectors;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * TODO: Automate transports based on configured chains
3
+ *
4
+ * Developers using this causes loss of granular control over a dapps transports,
5
+ * but for simple use cases, it's nice to have and saves a lot of boilerplate.
6
+ *
7
+ */
8
+ import { type CreateConfigParameters } from '@wagmi/core';
9
+ type GetDefaultTransportsProps = {
10
+ chains?: CreateConfigParameters['chains'];
11
+ alchemyId?: string;
12
+ infuraId?: string;
13
+ };
14
+ export declare const getDefaultTransports: ({ chains, alchemyId, infuraId, }: GetDefaultTransportsProps) => CreateConfigParameters["transports"];
15
+ export {};
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ enabled?: boolean;
3
+ };
4
+ export declare function useWalletConnectUri({ enabled }?: Props): {
5
+ uri: string | undefined;
6
+ };
7
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const buildCallbackUrl: ({ email, callbackUrl, provider, }: {
2
+ email?: string;
3
+ callbackUrl?: string;
4
+ provider: string;
5
+ }) => string;
@@ -0,0 +1,14 @@
1
+ import { OpenfortKitError } from "../../../types";
2
+ export type BaseFlowState = {
3
+ status: "idle" | 'awaiting-input' | 'loading' | 'success';
4
+ error?: never;
5
+ } | {
6
+ status: 'error';
7
+ error: OpenfortKitError | null;
8
+ };
9
+ export declare const mapStatus: (status: BaseFlowState) => {
10
+ isLoading: boolean;
11
+ isError: boolean;
12
+ isSuccess: boolean;
13
+ error: OpenfortKitError | null | undefined;
14
+ };
@@ -0,0 +1,39 @@
1
+ import { OpenfortHookOptions, OpenfortKitError } from "../../../types";
2
+ import { AuthProvider } from "../../../components/OpenfortKit/types";
3
+ import { UserWallet } from "../useWallets";
4
+ import { type AuthPlayerResponse as OpenfortUser } from '@openfort/openfort-js';
5
+ type CallbackResult = StoreCredentialsResult | EmailVerificationResult;
6
+ type EmailVerificationResult = {
7
+ type: "verifyEmail";
8
+ email?: string;
9
+ error?: OpenfortKitError;
10
+ };
11
+ type StoreCredentialsResult = {
12
+ type: "storeCredentials";
13
+ user?: OpenfortUser;
14
+ wallet?: UserWallet;
15
+ error?: OpenfortKitError;
16
+ };
17
+ type VerifyEmailOptions = {
18
+ email: string;
19
+ state: string;
20
+ } & OpenfortHookOptions<EmailVerificationResult>;
21
+ type StoreCredentialsOptions = {
22
+ player: string;
23
+ accessToken: string;
24
+ refreshToken: string;
25
+ } & OpenfortHookOptions<StoreCredentialsResult>;
26
+ type UseAuthCallbackOptions = {
27
+ automaticallyHandleCallback?: boolean;
28
+ } & OpenfortHookOptions<CallbackResult>;
29
+ export declare const useAuthCallback: ({ automaticallyHandleCallback, ...hookOptions }?: UseAuthCallbackOptions) => {
30
+ isLoading: boolean;
31
+ isError: boolean;
32
+ isSuccess: boolean;
33
+ error: OpenfortKitError | null | undefined;
34
+ email: string | null;
35
+ provider: AuthProvider | null;
36
+ verifyEmail: ({ email, state, ...options }: VerifyEmailOptions) => Promise<EmailVerificationResult>;
37
+ storeCredentials: ({ player, accessToken, refreshToken, ...options }: StoreCredentialsOptions) => Promise<StoreCredentialsResult>;
38
+ };
39
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const useCreateWalletPostAuth: () => {
2
+ tryUseWallet: () => Promise<{
3
+ error?: string;
4
+ wallet?: import("../useWallets").UserWallet;
5
+ }>;
6
+ };
@@ -0,0 +1,51 @@
1
+ import { type AuthPlayerResponse as OpenfortUser } from '@openfort/openfort-js';
2
+ import { OpenfortHookOptions, OpenfortKitError } from "../../../types";
3
+ import { UserWallet } from '../useWallets';
4
+ export type EmailAuthResult = {
5
+ error?: OpenfortKitError;
6
+ user?: OpenfortUser;
7
+ wallet?: UserWallet;
8
+ requiresEmailVerification?: boolean;
9
+ };
10
+ export type SignInEmailOptions = {
11
+ email: string;
12
+ password: string;
13
+ emailVerificationRedirectTo?: string;
14
+ } & OpenfortHookOptions<EmailAuthResult>;
15
+ export type SignUpEmailOptions = {
16
+ email: string;
17
+ password: string;
18
+ name?: string;
19
+ emailVerificationRedirectTo?: string;
20
+ } & OpenfortHookOptions<EmailAuthResult>;
21
+ export type RequestResetPasswordOptions = {
22
+ email: string;
23
+ emailVerificationRedirectTo?: string;
24
+ } & OpenfortHookOptions<EmailAuthResult>;
25
+ export type ResetPasswordOptions = {
26
+ email: string;
27
+ password: string;
28
+ state: string;
29
+ } & OpenfortHookOptions<EmailAuthResult>;
30
+ export type LinkEmailOptions = {
31
+ email: string;
32
+ password: string;
33
+ emailVerificationRedirectTo?: string;
34
+ } & OpenfortHookOptions<EmailAuthResult>;
35
+ export type UseEmailHookOptions = {
36
+ emailVerificationRedirectTo?: string;
37
+ } & OpenfortHookOptions<EmailAuthResult>;
38
+ export declare const useEmailAuth: (hookOptions?: UseEmailHookOptions) => {
39
+ requiresEmailVerification: boolean;
40
+ isAwaitingInput: boolean;
41
+ isLoading: boolean;
42
+ isError: boolean;
43
+ isSuccess: boolean;
44
+ error: OpenfortKitError | null | undefined;
45
+ signInEmail: (options: SignInEmailOptions) => Promise<EmailAuthResult>;
46
+ signUpEmail: (options: SignUpEmailOptions) => Promise<EmailAuthResult>;
47
+ linkEmail: (options: LinkEmailOptions) => Promise<EmailAuthResult>;
48
+ requestResetPassword: (options: RequestResetPasswordOptions) => Promise<EmailAuthResult>;
49
+ resetPassword: (options: ResetPasswordOptions) => Promise<EmailAuthResult>;
50
+ reset: () => void;
51
+ };
@@ -0,0 +1,16 @@
1
+ import { type AuthPlayerResponse as OpenfortUser } from '@openfort/openfort-js';
2
+ import { OpenfortHookOptions, OpenfortKitError } from "../../../types";
3
+ import { UserWallet } from "../useWallets";
4
+ export type GuestHookResult = {
5
+ error?: OpenfortKitError;
6
+ user?: OpenfortUser;
7
+ wallet?: UserWallet;
8
+ };
9
+ export type GuestHookOptions = OpenfortHookOptions<OpenfortUser>;
10
+ export declare const useGuestAuth: (hookOptions?: GuestHookOptions) => {
11
+ isLoading: boolean;
12
+ isError: boolean;
13
+ isSuccess: boolean;
14
+ error: OpenfortKitError | null | undefined;
15
+ signUpGuest: (options?: GuestHookOptions) => Promise<GuestHookResult>;
16
+ };
@@ -0,0 +1,20 @@
1
+ import { AuthProvider } from '../../../components/OpenfortKit/types';
2
+ import { OpenfortHookOptions, OpenfortKitError } from '../../../types';
3
+ export type InitializeOAuthOptions = {
4
+ provider: AuthProvider;
5
+ redirectTo?: string;
6
+ } & OpenfortHookOptions;
7
+ export type AuthHookOptions = {
8
+ redirectTo?: string;
9
+ } & OpenfortHookOptions;
10
+ export type InitOAuthReturnType = {
11
+ error?: OpenfortKitError;
12
+ };
13
+ export declare const useOAuth: (hookOptions?: AuthHookOptions) => {
14
+ isLoading: boolean;
15
+ isError: boolean;
16
+ isSuccess: boolean;
17
+ error: OpenfortKitError | null | undefined;
18
+ initOAuth: (options: InitializeOAuthOptions) => Promise<InitOAuthReturnType>;
19
+ linkOauth: (options: InitializeOAuthOptions) => Promise<InitOAuthReturnType>;
20
+ };
@@ -0,0 +1,8 @@
1
+ import { OpenfortHookOptions, OpenfortKitError } from '../../../types';
2
+ export declare function useSignOut(hookOptions?: OpenfortHookOptions): {
3
+ signOut: (options?: OpenfortHookOptions) => Promise<{} | undefined>;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ isSuccess: boolean;
7
+ error: OpenfortKitError | null | undefined;
8
+ };
@@ -0,0 +1 @@
1
+ export declare const useThirdPartyAuth: () => void;
@@ -0,0 +1,20 @@
1
+ import { Connector } from "wagmi";
2
+ import { OpenfortHookOptions, OpenfortKitError } from "../../../types";
3
+ type ConnectWalletOptions = {
4
+ connector: Connector | string;
5
+ };
6
+ export declare const useWalletAuth: (hookOptions?: OpenfortHookOptions) => {
7
+ isLoading: boolean;
8
+ isError: boolean;
9
+ isSuccess: boolean;
10
+ error: OpenfortKitError | null | undefined;
11
+ walletConnectingTo: string | null;
12
+ connectWallet: (options: ConnectWalletOptions) => Promise<{
13
+ error: OpenfortKitError;
14
+ } | undefined>;
15
+ linkWallet: (options: ConnectWalletOptions) => Promise<{
16
+ error: OpenfortKitError;
17
+ } | undefined>;
18
+ availableWallets: import("../../../wallets/useWallets").WalletProps[];
19
+ };
20
+ export {};
@@ -0,0 +1,13 @@
1
+ import { OpenfortHookOptions, OpenfortKitError } from "../../types";
2
+ export declare const onSuccess: <T>({ hookOptions, options, data, }: {
3
+ hookOptions?: OpenfortHookOptions<T>;
4
+ options?: OpenfortHookOptions<T>;
5
+ data: T;
6
+ }) => T;
7
+ export declare const onError: <T>({ hookOptions, options, error, }: {
8
+ hookOptions?: OpenfortHookOptions<T>;
9
+ options?: OpenfortHookOptions<T>;
10
+ error: OpenfortKitError;
11
+ }) => {
12
+ error: OpenfortKitError;
13
+ };
@@ -0,0 +1,4 @@
1
+ export declare function useConnectWithSiwe(): ({ onError, onConnect, }: {
2
+ onError?: (error: string, status?: number) => void;
3
+ onConnect?: () => void;
4
+ }) => Promise<void>;