@oxyhq/services 5.26.3 → 5.27.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.
- package/dist/web/oxy-services.esm.js +2 -0
- package/dist/web/oxy-services.esm.js.map +1 -0
- package/dist/web/types/assets/icons/OxyServices.d.ts +28 -0
- package/dist/web/types/assets/illustrations/HighFive.d.ts +8 -0
- package/dist/web/types/constants/version.d.ts +13 -0
- package/dist/web/types/core/AuthManager.d.ts +143 -0
- package/dist/web/types/core/CrossDomainAuth.d.ts +160 -0
- package/dist/web/types/core/HttpService.d.ts +163 -0
- package/dist/web/types/core/OxyServices.base.d.ts +126 -0
- package/dist/web/types/core/OxyServices.d.ts +81 -0
- package/dist/web/types/core/OxyServices.errors.d.ts +11 -0
- package/dist/web/types/core/index.d.ts +20 -0
- package/dist/web/types/core/mixins/OxyServices.analytics.d.ts +66 -0
- package/dist/web/types/core/mixins/OxyServices.assets.d.ts +135 -0
- package/dist/web/types/core/mixins/OxyServices.auth.d.ts +186 -0
- package/dist/web/types/core/mixins/OxyServices.developer.d.ts +99 -0
- package/dist/web/types/core/mixins/OxyServices.devices.d.ts +96 -0
- package/dist/web/types/core/mixins/OxyServices.features.d.ts +228 -0
- package/dist/web/types/core/mixins/OxyServices.fedcm.d.ts +200 -0
- package/dist/web/types/core/mixins/OxyServices.karma.d.ts +85 -0
- package/dist/web/types/core/mixins/OxyServices.language.d.ts +81 -0
- package/dist/web/types/core/mixins/OxyServices.location.d.ts +64 -0
- package/dist/web/types/core/mixins/OxyServices.payment.d.ts +111 -0
- package/dist/web/types/core/mixins/OxyServices.popup.d.ts +205 -0
- package/dist/web/types/core/mixins/OxyServices.privacy.d.ts +122 -0
- package/dist/web/types/core/mixins/OxyServices.redirect.d.ts +245 -0
- package/dist/web/types/core/mixins/OxyServices.security.d.ts +78 -0
- package/dist/web/types/core/mixins/OxyServices.user.d.ts +184 -0
- package/dist/web/types/core/mixins/OxyServices.utility.d.ts +93 -0
- package/dist/web/types/core/mixins/index.d.ts +30 -0
- package/dist/web/types/core/mixins/mixinHelpers.d.ts +31 -0
- package/dist/web/types/crypto/index.d.ts +11 -0
- package/dist/web/types/crypto/keyManager.d.ts +189 -0
- package/dist/web/types/crypto/polyfill.d.ts +12 -0
- package/dist/web/types/crypto/recoveryPhrase.d.ts +58 -0
- package/dist/web/types/crypto/signatureService.d.ts +86 -0
- package/dist/web/types/i18n/index.d.ts +3 -0
- package/dist/web/types/index.d.ts +62 -0
- package/dist/web/types/lib/sonner-safe.d.ts +8 -0
- package/dist/web/types/lib/sonner.d.ts +11 -0
- package/dist/web/types/lib/sonner.web.d.ts +14 -0
- package/dist/web/types/models/interfaces.d.ts +415 -0
- package/dist/web/types/models/session.d.ts +27 -0
- package/dist/web/types/node/index.d.ts +9 -0
- package/dist/web/types/shared/index.d.ts +28 -0
- package/dist/web/types/shared/utils/colorUtils.d.ts +104 -0
- package/dist/web/types/shared/utils/debugUtils.d.ts +48 -0
- package/dist/web/types/shared/utils/errorUtils.d.ts +97 -0
- package/dist/web/types/shared/utils/index.d.ts +13 -0
- package/dist/web/types/shared/utils/networkUtils.d.ts +139 -0
- package/dist/web/types/shared/utils/themeUtils.d.ts +90 -0
- package/dist/web/types/ui/client.d.ts +33 -0
- package/dist/web/types/ui/components/ActivityIndicator.d.ts +44 -0
- package/dist/web/types/ui/components/AnimationExample.d.ts +3 -0
- package/dist/web/types/ui/components/AutoHeightScrollView.d.ts +22 -0
- package/dist/web/types/ui/components/Avatar.d.ts +60 -0
- package/dist/web/types/ui/components/BottomSheet.d.ts +28 -0
- package/dist/web/types/ui/components/BottomSheetRouter.d.ts +8 -0
- package/dist/web/types/ui/components/CrossFadeIcon.d.ts +26 -0
- package/dist/web/types/ui/components/EmptyState.d.ts +7 -0
- package/dist/web/types/ui/components/ErrorBoundary.d.ts +30 -0
- package/dist/web/types/ui/components/FollowButton.d.ts +17 -0
- package/dist/web/types/ui/components/FontLoader.d.ts +14 -0
- package/dist/web/types/ui/components/GroupedItem.d.ts +23 -0
- package/dist/web/types/ui/components/GroupedSection.d.ts +24 -0
- package/dist/web/types/ui/components/Header.d.ts +37 -0
- package/dist/web/types/ui/components/HelperText.d.ts +46 -0
- package/dist/web/types/ui/components/Icon.d.ts +59 -0
- package/dist/web/types/ui/components/IconButton/IconButton.d.ts +98 -0
- package/dist/web/types/ui/components/IconButton/utils.d.ts +18 -0
- package/dist/web/types/ui/components/LoadingState.d.ts +8 -0
- package/dist/web/types/ui/components/OxyLogo.d.ts +28 -0
- package/dist/web/types/ui/components/OxyPayButton.d.ts +28 -0
- package/dist/web/types/ui/components/OxyProvider.d.ts +33 -0
- package/dist/web/types/ui/components/OxySignInButton.d.ts +64 -0
- package/dist/web/types/ui/components/ProfileCard.d.ts +17 -0
- package/dist/web/types/ui/components/QuickActions.d.ts +14 -0
- package/dist/web/types/ui/components/Section.d.ts +11 -0
- package/dist/web/types/ui/components/SectionTitle.d.ts +9 -0
- package/dist/web/types/ui/components/SettingRow.d.ts +19 -0
- package/dist/web/types/ui/components/SignInModal.d.ts +17 -0
- package/dist/web/types/ui/components/StepBasedScreen.d.ts +25 -0
- package/dist/web/types/ui/components/Surface.d.ts +75 -0
- package/dist/web/types/ui/components/TextField/Addons/Outline.d.ts +15 -0
- package/dist/web/types/ui/components/TextField/Addons/Underline.d.ts +18 -0
- package/dist/web/types/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +44 -0
- package/dist/web/types/ui/components/TextField/Adornment/TextFieldAffix.d.ts +72 -0
- package/dist/web/types/ui/components/TextField/Adornment/TextFieldIcon.d.ts +77 -0
- package/dist/web/types/ui/components/TextField/Adornment/enums.d.ts +12 -0
- package/dist/web/types/ui/components/TextField/Adornment/types.d.ts +11 -0
- package/dist/web/types/ui/components/TextField/Adornment/utils.d.ts +11 -0
- package/dist/web/types/ui/components/TextField/Label/InputLabel.d.ts +4 -0
- package/dist/web/types/ui/components/TextField/Label/LabelBackground.d.ts +3 -0
- package/dist/web/types/ui/components/TextField/TextFieldFlat.d.ts +3 -0
- package/dist/web/types/ui/components/TextField/TextFieldOutlined.d.ts +3 -0
- package/dist/web/types/ui/components/TextField/constants.d.ts +31 -0
- package/dist/web/types/ui/components/TextField/helpers.d.ts +96 -0
- package/dist/web/types/ui/components/TextField/types.d.ts +155 -0
- package/dist/web/types/ui/components/TextField.d.ts +191 -0
- package/dist/web/types/ui/components/TouchableRipple/Pressable.d.ts +12 -0
- package/dist/web/types/ui/components/TouchableRipple/TouchableRipple.d.ts +61 -0
- package/dist/web/types/ui/components/TouchableRipple/utils.d.ts +10 -0
- package/dist/web/types/ui/components/Typography/AnimatedText.d.ts +34 -0
- package/dist/web/types/ui/components/Typography/types.d.ts +18 -0
- package/dist/web/types/ui/components/WebOxyProvider.d.ts +51 -0
- package/dist/web/types/ui/components/feedback/FormInput.d.ts +19 -0
- package/dist/web/types/ui/components/feedback/ProgressIndicator.d.ts +10 -0
- package/dist/web/types/ui/components/feedback/constants.d.ts +4 -0
- package/dist/web/types/ui/components/feedback/feedbackStyles.d.ts +279 -0
- package/dist/web/types/ui/components/feedback/index.d.ts +6 -0
- package/dist/web/types/ui/components/feedback/types.d.ts +45 -0
- package/dist/web/types/ui/components/feedback/useFeedbackForm.d.ts +8 -0
- package/dist/web/types/ui/components/fileManagement/AnimatedButton.d.ts +15 -0
- package/dist/web/types/ui/components/fileManagement/FileDetailsModal.d.ts +14 -0
- package/dist/web/types/ui/components/fileManagement/FileViewer.d.ts +17 -0
- package/dist/web/types/ui/components/fileManagement/UploadPreview.d.ts +20 -0
- package/dist/web/types/ui/components/fileManagement/styles.d.ts +859 -0
- package/dist/web/types/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/dist/web/types/ui/components/icon/OxyIcon.d.ts +9 -0
- package/dist/web/types/ui/components/icon/index.d.ts +3 -0
- package/dist/web/types/ui/components/index.d.ts +16 -0
- package/dist/web/types/ui/components/internal/GroupedPillButtons.d.ts +17 -0
- package/dist/web/types/ui/components/internal/PinInput.d.ts +22 -0
- package/dist/web/types/ui/components/modals/DeleteAccountModal.d.ts +18 -0
- package/dist/web/types/ui/components/modals/index.d.ts +1 -0
- package/dist/web/types/ui/components/payment/PaymentDetailsStep.d.ts +20 -0
- package/dist/web/types/ui/components/payment/PaymentMethodStep.d.ts +13 -0
- package/dist/web/types/ui/components/payment/PaymentReviewStep.d.ts +15 -0
- package/dist/web/types/ui/components/payment/PaymentSuccessStep.d.ts +9 -0
- package/dist/web/types/ui/components/payment/PaymentSummaryStep.d.ts +14 -0
- package/dist/web/types/ui/components/payment/constants.d.ts +6 -0
- package/dist/web/types/ui/components/payment/index.d.ts +8 -0
- package/dist/web/types/ui/components/payment/paymentStyles.d.ts +395 -0
- package/dist/web/types/ui/components/payment/types.d.ts +39 -0
- package/dist/web/types/ui/components/photogrid/JustifiedPhotoGrid.d.ts +26 -0
- package/dist/web/types/ui/components/styles/overlay.d.ts +3 -0
- package/dist/web/types/ui/components/styles/shadow.d.ts +2 -0
- package/dist/web/types/ui/components/theming.d.ts +7 -0
- package/dist/web/types/ui/components/types.d.ts +79 -0
- package/dist/web/types/ui/components/utils/forwardRef.d.ts +11 -0
- package/dist/web/types/ui/components/utils/hasTouchHandler.d.ts +5 -0
- package/dist/web/types/ui/components/utils/roundLayoutSize.d.ts +1 -0
- package/dist/web/types/ui/components/utils/splitStyles.d.ts +19 -0
- package/dist/web/types/ui/constants/iconColors.d.ts +129 -0
- package/dist/web/types/ui/constants/spacing.d.ts +32 -0
- package/dist/web/types/ui/constants/theme.d.ts +96 -0
- package/dist/web/types/ui/context/OxyContext.d.ts +74 -0
- package/dist/web/types/ui/context/ThemeContext.d.ts +18 -0
- package/dist/web/types/ui/context/hooks/useAuthOperations.d.ts +39 -0
- package/dist/web/types/ui/context/hooks/useDeviceManagement.d.ts +26 -0
- package/dist/web/types/ui/context/hooks/useLanguageManagement.d.ts +24 -0
- package/dist/web/types/ui/context/hooks/useSessionManagement.d.ts +40 -0
- package/dist/web/types/ui/hooks/index.d.ts +6 -0
- package/dist/web/types/ui/hooks/mutations/index.d.ts +8 -0
- package/dist/web/types/ui/hooks/mutations/mutationFactory.d.ts +75 -0
- package/dist/web/types/ui/hooks/mutations/useAccountMutations.d.ts +68 -0
- package/dist/web/types/ui/hooks/mutations/useServicesMutations.d.ts +22 -0
- package/dist/web/types/ui/hooks/queries/index.d.ts +10 -0
- package/dist/web/types/ui/hooks/queries/queryKeys.d.ts +64 -0
- package/dist/web/types/ui/hooks/queries/useAccountQueries.d.ts +42 -0
- package/dist/web/types/ui/hooks/queries/useSecurityQueries.d.ts +14 -0
- package/dist/web/types/ui/hooks/queries/useServicesQueries.d.ts +31 -0
- package/dist/web/types/ui/hooks/queryClient.d.ts +18 -0
- package/dist/web/types/ui/hooks/useAssets.d.ts +34 -0
- package/dist/web/types/ui/hooks/useAsyncAction.d.ts +50 -0
- package/dist/web/types/ui/hooks/useAuth.d.ts +73 -0
- package/dist/web/types/ui/hooks/useColorScheme.d.ts +7 -0
- package/dist/web/types/ui/hooks/useDeviceManagement.d.ts +26 -0
- package/dist/web/types/ui/hooks/useFileDownloadUrl.d.ts +18 -0
- package/dist/web/types/ui/hooks/useFileFiltering.d.ts +28 -0
- package/dist/web/types/ui/hooks/useFollow.d.ts +61 -0
- package/dist/web/types/ui/hooks/useFollow.types.d.ts +32 -0
- package/dist/web/types/ui/hooks/useI18n.d.ts +4 -0
- package/dist/web/types/ui/hooks/useLanguageManagement.d.ts +24 -0
- package/dist/web/types/ui/hooks/useProfileEditing.d.ts +35 -0
- package/dist/web/types/ui/hooks/useQueryClient.d.ts +6 -0
- package/dist/web/types/ui/hooks/useSessionManagement.d.ts +40 -0
- package/dist/web/types/ui/hooks/useSessionSocket.d.ts +13 -0
- package/dist/web/types/ui/hooks/useSettingToggle.d.ts +56 -0
- package/dist/web/types/ui/hooks/useStorage.d.ts +15 -0
- package/dist/web/types/ui/hooks/useThemeColors.d.ts +93 -0
- package/dist/web/types/ui/hooks/useThemeStyles.d.ts +44 -0
- package/dist/web/types/ui/hooks/useWebSSO.d.ts +57 -0
- package/dist/web/types/ui/index.d.ts +7 -0
- package/dist/web/types/ui/isFrontend.d.ts +2 -0
- package/dist/web/types/ui/navigation/bottomSheetManager.d.ts +26 -0
- package/dist/web/types/ui/navigation/routes.d.ts +5 -0
- package/dist/web/types/ui/screens/AccountCenterScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/AccountOverviewScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/AccountSettingsScreen.d.ts +7 -0
- package/dist/web/types/ui/screens/AccountSwitcherScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/AccountVerificationScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/AppInfoScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/EditProfileFieldScreen.d.ts +12 -0
- package/dist/web/types/ui/screens/FAQScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/FeedbackScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/FileManagementScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/FollowersListScreen.d.ts +8 -0
- package/dist/web/types/ui/screens/FollowingListScreen.d.ts +8 -0
- package/dist/web/types/ui/screens/HelpSupportScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/HistoryViewScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/LanguageSelectorScreen.d.ts +6 -0
- package/dist/web/types/ui/screens/LearnMoreUsernamesScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/LegalDocumentsScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/OxyAuthScreen.d.ts +16 -0
- package/dist/web/types/ui/screens/PaymentGatewayScreen.d.ts +14 -0
- package/dist/web/types/ui/screens/PremiumSubscriptionScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/PrivacySettingsScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/ProfileScreen.d.ts +8 -0
- package/dist/web/types/ui/screens/SavesCollectionsScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/SearchSettingsScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/SessionManagementScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/UserLinksScreen.d.ts +14 -0
- package/dist/web/types/ui/screens/UserListScreen.d.ts +10 -0
- package/dist/web/types/ui/screens/WelcomeNewUserScreen.d.ts +12 -0
- package/dist/web/types/ui/screens/karma/KarmaAboutScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/karma/KarmaCenterScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/karma/KarmaFAQScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/karma/KarmaLeaderboardScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/karma/KarmaRewardsScreen.d.ts +4 -0
- package/dist/web/types/ui/screens/karma/KarmaRulesScreen.d.ts +4 -0
- package/dist/web/types/ui/server.d.ts +42 -0
- package/dist/web/types/ui/stores/accountStore.d.ts +33 -0
- package/dist/web/types/ui/stores/assetStore.d.ts +53 -0
- package/dist/web/types/ui/stores/authStore.d.ts +16 -0
- package/dist/web/types/ui/stores/fileStore.d.ts +30 -0
- package/dist/web/types/ui/stores/followStore.d.ts +24 -0
- package/dist/web/types/ui/styles/authStyles.d.ts +331 -0
- package/dist/web/types/ui/styles/fonts.d.ts +20 -0
- package/dist/web/types/ui/styles/index.d.ts +4 -0
- package/dist/web/types/ui/styles/spacing.d.ts +48 -0
- package/dist/web/types/ui/styles/theme.d.ts +67 -0
- package/dist/web/types/ui/types/fileManagement.d.ts +40 -0
- package/dist/web/types/ui/types/navigation.d.ts +36 -0
- package/dist/web/types/ui/utils/authHelpers.d.ts +98 -0
- package/dist/web/types/ui/utils/avatarUtils.d.ts +33 -0
- package/dist/web/types/ui/utils/colorUtils.d.ts +9 -0
- package/dist/web/types/ui/utils/confirmAction.d.ts +6 -0
- package/dist/web/types/ui/utils/errorHandlers.d.ts +34 -0
- package/dist/web/types/ui/utils/fileManagement.d.ts +86 -0
- package/dist/web/types/ui/utils/iconNames.d.ts +111 -0
- package/dist/web/types/ui/utils/sessionHelpers.d.ts +63 -0
- package/dist/web/types/ui/utils/storageHelpers.d.ts +27 -0
- package/dist/web/types/ui/utils/themeUtils.d.ts +10 -0
- package/dist/web/types/ui/utils/userUtils.d.ts +28 -0
- package/dist/web/types/utils/apiUtils.d.ts +53 -0
- package/dist/web/types/utils/asyncUtils.d.ts +58 -0
- package/dist/web/types/utils/cache.d.ts +127 -0
- package/dist/web/types/utils/deviceManager.d.ts +65 -0
- package/dist/web/types/utils/errorUtils.d.ts +46 -0
- package/dist/web/types/utils/hookUtils.d.ts +101 -0
- package/dist/web/types/utils/index.d.ts +6 -0
- package/dist/web/types/utils/languageUtils.d.ts +37 -0
- package/dist/web/types/utils/loggerUtils.d.ts +48 -0
- package/dist/web/types/utils/platform.d.ts +40 -0
- package/dist/web/types/utils/platformInit.d.ts +8 -0
- package/dist/web/types/utils/requestUtils.d.ts +123 -0
- package/dist/web/types/utils/sessionUtils.d.ts +54 -0
- package/dist/web/types/utils/validationUtils.d.ts +85 -0
- package/dist/web/types/web/WebOxyContext.d.ts +151 -0
- package/dist/web/types/web/index.d.ts +52 -0
- package/dist/web/types/web.d.ts +53 -0
- package/package.json +77 -35
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Key Manager - ECDSA secp256k1 Key Generation and Storage
|
|
3
|
+
*
|
|
4
|
+
* Handles secure generation, storage, and retrieval of cryptographic keys.
|
|
5
|
+
* Private keys are stored securely using expo-secure-store and never leave the device.
|
|
6
|
+
*/
|
|
7
|
+
import type { ECKeyPair } from 'elliptic';
|
|
8
|
+
export interface KeyPair {
|
|
9
|
+
publicKey: string;
|
|
10
|
+
privateKey: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class KeyManager {
|
|
13
|
+
private static cachedPublicKey;
|
|
14
|
+
private static cachedHasIdentity;
|
|
15
|
+
private static cachedSharedPublicKey;
|
|
16
|
+
private static cachedHasSharedIdentity;
|
|
17
|
+
/**
|
|
18
|
+
* Invalidate cached identity state
|
|
19
|
+
* Called internally when identity is created/deleted/imported
|
|
20
|
+
*/
|
|
21
|
+
private static invalidateCache;
|
|
22
|
+
/**
|
|
23
|
+
* Invalidate cached shared identity state
|
|
24
|
+
* Called internally when shared identity is created/deleted/imported
|
|
25
|
+
*/
|
|
26
|
+
private static invalidateSharedCache;
|
|
27
|
+
/**
|
|
28
|
+
* Generate a new ECDSA secp256k1 key pair
|
|
29
|
+
* Returns the keys in hexadecimal format
|
|
30
|
+
*/
|
|
31
|
+
static generateKeyPairSync(): KeyPair;
|
|
32
|
+
/**
|
|
33
|
+
* Generate a new key pair using secure random bytes
|
|
34
|
+
*/
|
|
35
|
+
static generateKeyPair(): Promise<KeyPair>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a shared identity accessible across all Oxy apps
|
|
38
|
+
*
|
|
39
|
+
* iOS: Stores in shared keychain group (requires entitlement configuration)
|
|
40
|
+
* Android: Stores in Account Manager (requires sharedUserId in manifest)
|
|
41
|
+
*
|
|
42
|
+
* This enables true cross-app SSO - when user signs in to one Oxy app,
|
|
43
|
+
* they're automatically signed in to all other Oxy apps.
|
|
44
|
+
*
|
|
45
|
+
* @returns Public key of the shared identity
|
|
46
|
+
* @throws Error if not on native platform or if sharing is not configured
|
|
47
|
+
*/
|
|
48
|
+
static createSharedIdentity(): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Get the shared public key (accessible across all Oxy apps)
|
|
51
|
+
*
|
|
52
|
+
* @returns Shared public key or null if no shared identity exists
|
|
53
|
+
*/
|
|
54
|
+
static getSharedPublicKey(): Promise<string | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Get the shared private key (for signing operations)
|
|
57
|
+
*
|
|
58
|
+
* WARNING: Only use this for signing operations within the app.
|
|
59
|
+
* The private key should NEVER be transmitted or exposed.
|
|
60
|
+
*
|
|
61
|
+
* @returns Shared private key or null if no shared identity exists
|
|
62
|
+
*/
|
|
63
|
+
static getSharedPrivateKey(): Promise<string | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Check if a shared identity exists (accessible across all Oxy apps)
|
|
66
|
+
*
|
|
67
|
+
* @returns True if shared identity exists, false otherwise
|
|
68
|
+
*/
|
|
69
|
+
static hasSharedIdentity(): Promise<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Import an existing key pair as shared identity
|
|
72
|
+
*
|
|
73
|
+
* This is used when:
|
|
74
|
+
* 1. User signs in to a new Oxy app for the first time
|
|
75
|
+
* 2. User has existing identity on another Oxy app
|
|
76
|
+
* 3. We want to sync the identity across apps
|
|
77
|
+
*
|
|
78
|
+
* @param privateKey - Private key in hex format
|
|
79
|
+
* @returns Public key
|
|
80
|
+
*/
|
|
81
|
+
static importSharedIdentity(privateKey: string): Promise<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Store session information in shared storage
|
|
84
|
+
*
|
|
85
|
+
* This allows all Oxy apps to access the same session without
|
|
86
|
+
* re-authenticating. When user signs in to one app, all apps
|
|
87
|
+
* get the session automatically.
|
|
88
|
+
*
|
|
89
|
+
* @param sessionId - Session ID from authentication
|
|
90
|
+
* @param accessToken - Access token for API calls
|
|
91
|
+
*/
|
|
92
|
+
static storeSharedSession(sessionId: string, accessToken: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Get shared session information
|
|
95
|
+
*
|
|
96
|
+
* This allows any Oxy app to check if user is already signed in
|
|
97
|
+
* via another Oxy app. Enables instant cross-app SSO.
|
|
98
|
+
*
|
|
99
|
+
* @returns Session data or null if no shared session exists
|
|
100
|
+
*/
|
|
101
|
+
static getSharedSession(): Promise<{
|
|
102
|
+
sessionId: string;
|
|
103
|
+
accessToken: string;
|
|
104
|
+
} | null>;
|
|
105
|
+
/**
|
|
106
|
+
* Clear shared session (on logout)
|
|
107
|
+
*
|
|
108
|
+
* This signs out the user from ALL Oxy apps simultaneously.
|
|
109
|
+
* Call this when user explicitly logs out.
|
|
110
|
+
*/
|
|
111
|
+
static clearSharedSession(): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Migrate local identity to shared identity
|
|
114
|
+
*
|
|
115
|
+
* Call this when upgrading existing apps to use shared identities.
|
|
116
|
+
* Copies the device-specific identity to shared storage so it can
|
|
117
|
+
* be accessed by other Oxy apps.
|
|
118
|
+
*
|
|
119
|
+
* @returns True if migration was successful, false if no local identity exists
|
|
120
|
+
*/
|
|
121
|
+
static migrateToSharedIdentity(): Promise<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Generate and securely store a new key pair on the device
|
|
124
|
+
* Returns only the public key (private key is stored securely)
|
|
125
|
+
*/
|
|
126
|
+
static createIdentity(): Promise<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Import an existing key pair (e.g., from recovery phrase)
|
|
129
|
+
*/
|
|
130
|
+
static importKeyPair(privateKey: string): Promise<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Get the stored private key
|
|
133
|
+
* WARNING: Only use this for signing operations within the app
|
|
134
|
+
*/
|
|
135
|
+
static getPrivateKey(): Promise<string | null>;
|
|
136
|
+
/**
|
|
137
|
+
* Get the stored public key (cached for performance)
|
|
138
|
+
*/
|
|
139
|
+
static getPublicKey(): Promise<string | null>;
|
|
140
|
+
/**
|
|
141
|
+
* Check if an identity (key pair) exists on this device (cached for performance)
|
|
142
|
+
*/
|
|
143
|
+
static hasIdentity(): Promise<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete the stored identity (both keys)
|
|
146
|
+
* Use with EXTREME caution - this is irreversible without a recovery phrase
|
|
147
|
+
* This should ONLY be called when explicitly requested by the user
|
|
148
|
+
* @param skipBackup - If true, skip backup before deletion (default: false)
|
|
149
|
+
* @param force - If true, skip confirmation checks (default: false)
|
|
150
|
+
* @param userConfirmed - If true, user has explicitly confirmed deletion (default: false)
|
|
151
|
+
*/
|
|
152
|
+
static deleteIdentity(skipBackup?: boolean, force?: boolean, userConfirmed?: boolean): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Backup identity to SecureStore (separate backup storage)
|
|
155
|
+
* This provides a recovery mechanism if primary storage fails
|
|
156
|
+
*/
|
|
157
|
+
static backupIdentity(): Promise<boolean>;
|
|
158
|
+
/**
|
|
159
|
+
* Verify identity integrity - checks if keys are valid and accessible
|
|
160
|
+
*/
|
|
161
|
+
static verifyIdentityIntegrity(): Promise<boolean>;
|
|
162
|
+
/**
|
|
163
|
+
* Restore identity from backup if primary storage is corrupted
|
|
164
|
+
*/
|
|
165
|
+
static restoreIdentityFromBackup(): Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Get the elliptic curve key object from the stored private key
|
|
168
|
+
* Used internally for signing operations
|
|
169
|
+
*/
|
|
170
|
+
static getKeyPairObject(): Promise<ECKeyPair | null>;
|
|
171
|
+
/**
|
|
172
|
+
* Derive public key from a private key (without storing)
|
|
173
|
+
*/
|
|
174
|
+
static derivePublicKey(privateKey: string): string;
|
|
175
|
+
/**
|
|
176
|
+
* Validate that a string is a valid public key
|
|
177
|
+
*/
|
|
178
|
+
static isValidPublicKey(publicKey: string): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Validate that a string is a valid private key
|
|
181
|
+
*/
|
|
182
|
+
static isValidPrivateKey(privateKey: string): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Get a shortened version of the public key for display
|
|
185
|
+
* Format: first 8 chars...last 8 chars
|
|
186
|
+
*/
|
|
187
|
+
static shortenPublicKey(publicKey: string): string;
|
|
188
|
+
}
|
|
189
|
+
export default KeyManager;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crypto Polyfills for React Native
|
|
3
|
+
*
|
|
4
|
+
* This file ensures that required polyfills are available
|
|
5
|
+
* before any crypto operations are performed.
|
|
6
|
+
*
|
|
7
|
+
* Polyfills included:
|
|
8
|
+
* - Buffer: Required by bip39 and other crypto libraries
|
|
9
|
+
* - crypto.getRandomValues: Required by bip39 for secure random number generation
|
|
10
|
+
*/
|
|
11
|
+
import { Buffer } from 'buffer';
|
|
12
|
+
export { Buffer };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Phrase Service - BIP39 Mnemonic Generation
|
|
3
|
+
*
|
|
4
|
+
* Handles generation and restoration of recovery phrases (mnemonic seeds)
|
|
5
|
+
* for backing up and restoring user identities.
|
|
6
|
+
*
|
|
7
|
+
* Note: This module requires the polyfill to be loaded first (done via crypto/index.ts)
|
|
8
|
+
*/
|
|
9
|
+
export interface RecoveryPhraseResult {
|
|
10
|
+
phrase: string;
|
|
11
|
+
words: string[];
|
|
12
|
+
publicKey: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class RecoveryPhraseService {
|
|
15
|
+
/**
|
|
16
|
+
* Generate a new identity with a recovery phrase
|
|
17
|
+
* Returns the mnemonic phrase (should only be shown once to the user)
|
|
18
|
+
*/
|
|
19
|
+
static generateIdentityWithRecovery(): Promise<RecoveryPhraseResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Generate a 24-word recovery phrase for higher security
|
|
22
|
+
*/
|
|
23
|
+
static generateIdentityWithRecovery24(): Promise<RecoveryPhraseResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Restore an identity from a recovery phrase
|
|
26
|
+
*/
|
|
27
|
+
static restoreFromPhrase(phrase: string): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Validate a recovery phrase without importing it
|
|
30
|
+
*/
|
|
31
|
+
static validatePhrase(phrase: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get the word list for autocomplete/validation
|
|
34
|
+
*/
|
|
35
|
+
static getWordList(): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Check if a word is valid in the BIP39 word list
|
|
38
|
+
*/
|
|
39
|
+
static isValidWord(word: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Get suggestions for a partial word
|
|
42
|
+
*/
|
|
43
|
+
static getSuggestions(partial: string, limit?: number): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Derive the public key from a phrase without storing
|
|
46
|
+
* Useful for verification before importing
|
|
47
|
+
*/
|
|
48
|
+
static derivePublicKeyFromPhrase(phrase: string): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Convert a phrase to its word array
|
|
51
|
+
*/
|
|
52
|
+
static phraseToWords(phrase: string): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Convert a word array to a phrase string
|
|
55
|
+
*/
|
|
56
|
+
static wordsToPhrase(words: string[]): string;
|
|
57
|
+
}
|
|
58
|
+
export default RecoveryPhraseService;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signature Service - ECDSA Digital Signatures
|
|
3
|
+
*
|
|
4
|
+
* Handles signing and verification of messages using ECDSA secp256k1.
|
|
5
|
+
* Used for authenticating requests and proving identity ownership.
|
|
6
|
+
*/
|
|
7
|
+
export interface SignedMessage {
|
|
8
|
+
message: string;
|
|
9
|
+
signature: string;
|
|
10
|
+
publicKey: string;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthChallenge {
|
|
14
|
+
challenge: string;
|
|
15
|
+
publicKey: string;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class SignatureService {
|
|
19
|
+
/**
|
|
20
|
+
* Generate a random challenge string (for offline use)
|
|
21
|
+
* Uses expo-crypto in React Native, crypto.randomBytes in Node.js
|
|
22
|
+
*/
|
|
23
|
+
static generateChallenge(): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Hash a message using SHA-256
|
|
26
|
+
*/
|
|
27
|
+
static hashMessage(message: string): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Sign a message using the stored private key
|
|
30
|
+
* Returns the signature in DER format (hex encoded)
|
|
31
|
+
*/
|
|
32
|
+
static sign(message: string): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Sign a message with an explicit private key (without storing)
|
|
35
|
+
* Useful for one-time operations or testing
|
|
36
|
+
*/
|
|
37
|
+
static signWithKey(message: string, privateKey: string): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Verify a signature against a message and public key
|
|
40
|
+
*/
|
|
41
|
+
static verify(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Synchronous verification (for Node.js backend)
|
|
44
|
+
* Uses crypto module directly for hashing
|
|
45
|
+
* Note: This method should only be used in Node.js environments
|
|
46
|
+
*/
|
|
47
|
+
static verifySync(message: string, signature: string, publicKey: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Create a signed message object with metadata
|
|
50
|
+
*/
|
|
51
|
+
static createSignedMessage(message: string): Promise<SignedMessage>;
|
|
52
|
+
/**
|
|
53
|
+
* Verify a signed message object
|
|
54
|
+
* Checks both signature validity and timestamp freshness
|
|
55
|
+
*/
|
|
56
|
+
static verifySignedMessage(signedMessage: SignedMessage, maxAgeMs?: number): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Create a signed authentication challenge response
|
|
59
|
+
* Used for challenge-response authentication
|
|
60
|
+
*/
|
|
61
|
+
static signChallenge(challenge: string): Promise<AuthChallenge>;
|
|
62
|
+
/**
|
|
63
|
+
* Verify a challenge response
|
|
64
|
+
*/
|
|
65
|
+
static verifyChallengeResponse(originalChallenge: string, response: AuthChallenge, maxAgeMs?: number): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Create a registration signature
|
|
68
|
+
* Used when registering a new identity with the server
|
|
69
|
+
* Format matches server expectation: oxy:register:{publicKey}:{timestamp}
|
|
70
|
+
*/
|
|
71
|
+
static createRegistrationSignature(): Promise<{
|
|
72
|
+
signature: string;
|
|
73
|
+
publicKey: string;
|
|
74
|
+
timestamp: number;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Sign arbitrary data for API requests
|
|
78
|
+
* Creates a canonical string representation and signs it
|
|
79
|
+
*/
|
|
80
|
+
static signRequestData(data: Record<string, unknown>): Promise<{
|
|
81
|
+
signature: string;
|
|
82
|
+
publicKey: string;
|
|
83
|
+
timestamp: number;
|
|
84
|
+
}>;
|
|
85
|
+
}
|
|
86
|
+
export default SignatureService;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OxyHQServices Main Export File - Universal (Frontend + Backend)
|
|
3
|
+
*
|
|
4
|
+
* This exports everything but uses environment detection to avoid crashes.
|
|
5
|
+
* - Frontend: Full UI + Core functionality
|
|
6
|
+
* - Backend: Core functionality only (UI components are no-ops)
|
|
7
|
+
*/
|
|
8
|
+
import './utils/platformInit';
|
|
9
|
+
import './crypto/polyfill';
|
|
10
|
+
export { KeyManager, SignatureService, RecoveryPhraseService } from './crypto';
|
|
11
|
+
export { OxyServices, OxyAuthenticationError, OxyAuthenticationTimeoutError } from './core';
|
|
12
|
+
export { OXY_CLOUD_URL, oxyClient } from './core';
|
|
13
|
+
export { CrossDomainAuth, createCrossDomainAuth } from './core';
|
|
14
|
+
export type { CrossDomainAuthOptions } from './core';
|
|
15
|
+
export type { KeyPair, SignedMessage, AuthChallenge, RecoveryPhraseResult } from './crypto';
|
|
16
|
+
export { useOxy } from './ui/context/OxyContext';
|
|
17
|
+
export { useAuth } from './ui/hooks/useAuth';
|
|
18
|
+
export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth';
|
|
19
|
+
export { default as OxyProvider } from './ui/components/OxyProvider';
|
|
20
|
+
export { FontLoader } from './ui/components/FontLoader';
|
|
21
|
+
export { default as WebOxyProvider } from './ui/components/WebOxyProvider';
|
|
22
|
+
export { DeviceManager } from './utils/deviceManager';
|
|
23
|
+
export type { DeviceFingerprint, StoredDeviceInfo } from './utils/deviceManager';
|
|
24
|
+
export { SUPPORTED_LANGUAGES, getLanguageMetadata, getLanguageName, getNativeLanguageName, normalizeLanguageCode } from './utils/languageUtils';
|
|
25
|
+
export type { LanguageMetadata } from './utils/languageUtils';
|
|
26
|
+
export type { OxyConfig, User, LoginResponse, Notification, Wallet, Transaction, TransferFundsRequest, PurchaseRequest, WithdrawalRequest, TransactionResponse, KarmaRule, KarmaHistory, KarmaLeaderboardEntry, KarmaAwardRequest, ApiError, PaymentMethod, PaymentRequest, PaymentResponse, AnalyticsData, FollowerDetails, ContentViewer, FileMetadata, FileUploadResponse, FileListResponse, FileUpdateRequest, FileDeleteResponse, DeviceSession, DeviceSessionsResponse, DeviceSessionLogoutResponse, UpdateDeviceNameResponse, BlockedUser, RestrictedUser, FileVisibility, AssetLink, AssetVariant, Asset, AssetInitRequest, AssetInitResponse, AssetCompleteRequest, AssetLinkRequest, AssetUnlinkRequest, AssetUrlResponse, AssetDeleteSummary, AssetUploadProgress, AssetUpdateVisibilityRequest, AssetUpdateVisibilityResponse, AccountStorageCategoryUsage, AccountStorageUsageResponse, SecurityEventType, SecurityEventSeverity, SecurityActivity, SecurityActivityResponse, } from './models/interfaces';
|
|
27
|
+
export { SECURITY_EVENT_SEVERITY_MAP } from './models/interfaces';
|
|
28
|
+
export type { SessionLoginResponse, ClientSession, MinimalUserData } from './models/session';
|
|
29
|
+
export { useAuthStore } from './ui/stores/authStore';
|
|
30
|
+
export { useAssetStore, useAssets as useAssetsStore, useAsset, useUploadProgress, useAssetLoading, useAssetErrors, useAssetsByApp, useAssetsByEntity, useAssetUsageCount, useIsAssetLinked } from './ui/stores/assetStore';
|
|
31
|
+
export { useSessionSocket } from './ui/hooks/useSessionSocket';
|
|
32
|
+
export { useAssets, setOxyAssetInstance } from './ui/hooks/useAssets';
|
|
33
|
+
export { useFileDownloadUrl, setOxyFileUrlInstance } from './ui/hooks/useFileDownloadUrl';
|
|
34
|
+
export { useFollow, useFollowerCounts } from './ui/hooks/useFollow';
|
|
35
|
+
export { useUserProfile, useUserProfiles, useCurrentUser, useUserById, useUserByUsername, useUsersBySessions, usePrivacySettings, useSessions, useSession, useDeviceSessions, useUserDevices, useSecurityInfo, useSecurityActivity, useRecentSecurityActivity, } from './ui/hooks/queries';
|
|
36
|
+
export { useUpdateProfile, useUploadAvatar, useUpdateAccountSettings, useUpdatePrivacySettings, useUploadFile, useSwitchSession, useLogoutSession, useLogoutAll, useUpdateDeviceName, useRemoveDevice, } from './ui/hooks/mutations';
|
|
37
|
+
export { createProfileMutation, createGenericMutation, } from './ui/hooks/mutations/mutationFactory';
|
|
38
|
+
export type { ProfileMutationConfig, GenericMutationConfig, } from './ui/hooks/mutations/mutationFactory';
|
|
39
|
+
export { ensureValidToken, withAuthErrorHandling, authenticatedApiCall, isAuthenticationError, SessionSyncRequiredError, AuthenticationFailedError, } from './ui/utils/authHelpers';
|
|
40
|
+
export type { HandleApiErrorOptions } from './ui/utils/authHelpers';
|
|
41
|
+
export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extractErrorMessage } from './ui/utils/errorHandlers';
|
|
42
|
+
export type { HandleAuthErrorOptions } from './ui/utils/errorHandlers';
|
|
43
|
+
export { useFileFiltering } from './ui/hooks/useFileFiltering';
|
|
44
|
+
export type { ViewMode, SortBy, SortOrder } from './ui/hooks/useFileFiltering';
|
|
45
|
+
export { OxySignInButton } from './ui/components/OxySignInButton';
|
|
46
|
+
export { OxyLogo, FollowButton } from './ui';
|
|
47
|
+
export { darkenColor, lightenColor, hexToRgb, rgbToHex, withOpacity, isLightColor, getContrastTextColor, } from './shared/utils/colorUtils';
|
|
48
|
+
export { normalizeTheme, normalizeColorScheme, getOppositeTheme, systemPrefersDarkMode, getSystemColorScheme, } from './shared/utils/themeUtils';
|
|
49
|
+
export type { ThemeValue } from './shared/utils/themeUtils';
|
|
50
|
+
export { HttpStatus, getErrorStatus, getErrorMessage, isAlreadyRegisteredError, isUnauthorizedError, isForbiddenError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, isRetryableError, } from './shared/utils/errorUtils';
|
|
51
|
+
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, createCircuitBreakerState, calculateBackoffInterval, recordFailure, recordSuccess, shouldAllowRequest, delay, withRetry, } from './shared/utils/networkUtils';
|
|
52
|
+
export type { CircuitBreakerState, CircuitBreakerConfig } from './shared/utils/networkUtils';
|
|
53
|
+
export * from './utils/apiUtils';
|
|
54
|
+
export { ErrorCodes, createApiError, handleHttpError, validateRequiredFields, } from './utils/errorUtils';
|
|
55
|
+
export { retryAsync } from './utils/asyncUtils';
|
|
56
|
+
export * from './utils/validationUtils';
|
|
57
|
+
export { logger, LogLevel, LogContext, logAuth, logApi, logSession, logUser, logDevice, logPayment, logPerformance } from './utils/loggerUtils';
|
|
58
|
+
export * from './utils/asyncUtils';
|
|
59
|
+
export * from './utils/hookUtils';
|
|
60
|
+
export { showBottomSheet, closeBottomSheet } from './ui/navigation/bottomSheetManager';
|
|
61
|
+
export type { RouteName } from './ui/navigation/routes';
|
|
62
|
+
export { showSignInModal, hideSignInModal } from './ui/components/SignInModal';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe sonner export that works in both frontend and backend
|
|
3
|
+
* In frontend: exports the actual toast function
|
|
4
|
+
* In backend: exports a no-op function
|
|
5
|
+
*/
|
|
6
|
+
type ToastFunction = (message: string, options?: Record<string, unknown>) => void;
|
|
7
|
+
declare let toast: ToastFunction;
|
|
8
|
+
export { toast };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sonner Toast - Platform-Agnostic Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Bundlers resolve platform-specific implementations:
|
|
5
|
+
* - Metro (React Native): resolves to sonner.native.ts
|
|
6
|
+
* - Vite/Webpack (Web): resolves to sonner.web.ts
|
|
7
|
+
* - Node.js/SSR: uses this file (web fallback)
|
|
8
|
+
*
|
|
9
|
+
* This file exports web as the default for /core and /web entry points.
|
|
10
|
+
*/
|
|
11
|
+
export { toast, Toaster, type ToastT } from './sonner.web';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ToastFunction {
|
|
2
|
+
(message: string, options?: Record<string, unknown>): void;
|
|
3
|
+
success: (message: string, options?: Record<string, unknown>) => void;
|
|
4
|
+
error: (message: string, options?: Record<string, unknown>) => void;
|
|
5
|
+
info: (message: string, options?: Record<string, unknown>) => void;
|
|
6
|
+
warning: (message: string, options?: Record<string, unknown>) => void;
|
|
7
|
+
loading: (message: string, options?: Record<string, unknown>) => void;
|
|
8
|
+
}
|
|
9
|
+
type ToasterComponent = (props?: Record<string, unknown>) => React.ReactElement | null;
|
|
10
|
+
declare const webToast: ToastFunction;
|
|
11
|
+
export declare const toast: ToastFunction;
|
|
12
|
+
export declare const Toaster: ToasterComponent;
|
|
13
|
+
export type ToastT = typeof webToast;
|
|
14
|
+
export {};
|