@microcosmmoney/portal-react 3.12.8 → 3.13.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.
- package/dist/index.d.ts +22 -0
- package/dist/index.js +48 -1
- package/dist/main-portal/components/auctions/AuctionsPage.d.ts +1 -0
- package/dist/main-portal/components/auctions/AuctionsPage.js +218 -0
- package/dist/main-portal/components/data/asset-stats.d.ts +1 -0
- package/dist/main-portal/components/data/asset-stats.js +33 -0
- package/dist/main-portal/components/data/charts/MCCSupplyChart.d.ts +7 -0
- package/dist/main-portal/components/data/charts/MCCSupplyChart.js +27 -0
- package/dist/main-portal/components/data/charts/MiningTrendChart.d.ts +7 -0
- package/dist/main-portal/components/data/charts/MiningTrendChart.js +39 -0
- package/dist/main-portal/components/data/charts/PriceChart.d.ts +5 -0
- package/dist/main-portal/components/data/charts/PriceChart.js +99 -0
- package/dist/main-portal/components/data/charts/TeamWalletChart.d.ts +7 -0
- package/dist/main-portal/components/data/charts/TeamWalletChart.js +33 -0
- package/dist/main-portal/components/data/charts/TerritoryProgressChart.d.ts +7 -0
- package/dist/main-portal/components/data/charts/TerritoryProgressChart.js +35 -0
- package/dist/main-portal/components/data/charts/UserLevelPieChart.d.ts +7 -0
- package/dist/main-portal/components/data/charts/UserLevelPieChart.js +34 -0
- package/dist/main-portal/components/data/charts/index.d.ts +5 -0
- package/dist/main-portal/components/data/charts/index.js +14 -0
- package/dist/main-portal/components/data/data-hero.d.ts +1 -0
- package/dist/main-portal/components/data/data-hero.js +81 -0
- package/dist/main-portal/components/data/mining-history-stats.d.ts +1 -0
- package/dist/main-portal/components/data/mining-history-stats.js +44 -0
- package/dist/main-portal/components/data/team-wallet-stats.d.ts +1 -0
- package/dist/main-portal/components/data/team-wallet-stats.js +34 -0
- package/dist/main-portal/components/data/territory-stats.d.ts +1 -0
- package/dist/main-portal/components/data/territory-stats.js +48 -0
- package/dist/main-portal/components/data/user-level-stats.d.ts +1 -0
- package/dist/main-portal/components/data/user-level-stats.js +36 -0
- package/dist/main-portal/components/fragment/FragmentPage.d.ts +1 -0
- package/dist/main-portal/components/fragment/FragmentPage.js +13 -0
- package/dist/main-portal/components/income/ManagerIncomePage.d.ts +1 -0
- package/dist/main-portal/components/income/ManagerIncomePage.js +147 -0
- package/dist/main-portal/components/layout/AppSidebar.d.ts +3 -0
- package/dist/main-portal/components/layout/AppSidebar.js +88 -0
- package/dist/main-portal/components/layout/DashboardHeader.d.ts +1 -0
- package/dist/main-portal/components/layout/DashboardHeader.js +121 -0
- package/dist/main-portal/components/layout/LocaleSwitcher.d.ts +1 -0
- package/dist/main-portal/components/layout/LocaleSwitcher.js +30 -0
- package/dist/main-portal/components/layout/MainFooter.d.ts +2 -0
- package/dist/main-portal/components/layout/MainFooter.js +50 -0
- package/dist/main-portal/components/layout/ShadcnNavbar.d.ts +1 -0
- package/dist/main-portal/components/layout/ShadcnNavbar.js +155 -0
- package/dist/main-portal/components/layout/TerminalSidebar.d.ts +1 -0
- package/dist/main-portal/components/layout/TerminalSidebar.js +110 -0
- package/dist/main-portal/components/lending/LendingPage.d.ts +1 -0
- package/dist/main-portal/components/lending/LendingPage.js +20 -0
- package/dist/main-portal/components/mcd/MCDPage.d.ts +1 -0
- package/dist/main-portal/components/mcd/MCDPage.js +125 -0
- package/dist/main-portal/components/messages/MessagesPage.d.ts +1 -0
- package/dist/main-portal/components/messages/MessagesPage.js +13 -0
- package/dist/main-portal/components/mining/MiningDistributionHistory.d.ts +11 -0
- package/dist/main-portal/components/mining/MiningDistributionHistory.js +84 -0
- package/dist/main-portal/components/mining/MiningModal.d.ts +12 -0
- package/dist/main-portal/components/mining/MiningModal.js +302 -0
- package/dist/main-portal/components/mining/MiningPage.d.ts +1 -0
- package/dist/main-portal/components/mining/MiningPage.js +237 -0
- package/dist/main-portal/components/mining/index.d.ts +1 -0
- package/dist/main-portal/components/mining/index.js +6 -0
- package/dist/main-portal/components/notifications/NotificationsPage.d.ts +1 -0
- package/dist/main-portal/components/notifications/NotificationsPage.js +13 -0
- package/dist/main-portal/components/organization/OrganizationPage.d.ts +1 -0
- package/dist/main-portal/components/organization/OrganizationPage.js +235 -0
- package/dist/main-portal/components/organization/connection-line.d.ts +12 -0
- package/dist/main-portal/components/organization/connection-line.js +38 -0
- package/dist/main-portal/components/organization/diagram-node.d.ts +17 -0
- package/dist/main-portal/components/organization/diagram-node.js +105 -0
- package/dist/main-portal/components/organization/system-panel.d.ts +11 -0
- package/dist/main-portal/components/organization/system-panel.js +72 -0
- package/dist/main-portal/components/profile/EmailChangeCard.d.ts +1 -0
- package/dist/main-portal/components/profile/EmailChangeCard.js +58 -0
- package/dist/main-portal/components/profile/ProfilePage.d.ts +1 -0
- package/dist/main-portal/components/profile/ProfilePage.js +263 -0
- package/dist/main-portal/components/profile/TwoFactorSettings.d.ts +1 -0
- package/dist/main-portal/components/profile/TwoFactorSettings.js +99 -0
- package/dist/main-portal/components/providers/ClientProviders.d.ts +6 -0
- package/dist/main-portal/components/providers/ClientProviders.js +17 -0
- package/dist/main-portal/components/providers/SolanaWalletProvider.d.ts +7 -0
- package/dist/main-portal/components/providers/SolanaWalletProvider.js +17 -0
- package/dist/main-portal/components/providers/theme-provider.d.ts +5 -0
- package/dist/main-portal/components/providers/theme-provider.js +10 -0
- package/dist/main-portal/components/queue/QueueStatusPage.d.ts +1 -0
- package/dist/main-portal/components/queue/QueueStatusPage.js +245 -0
- package/dist/main-portal/components/reincarnation/ReincarnationPage.d.ts +1 -0
- package/dist/main-portal/components/reincarnation/ReincarnationPage.js +87 -0
- package/dist/main-portal/components/resources/mcc-stats-section.d.ts +1 -0
- package/dist/main-portal/components/resources/mcc-stats-section.js +199 -0
- package/dist/main-portal/components/resources/mcd-stats-section.d.ts +1 -0
- package/dist/main-portal/components/resources/mcd-stats-section.js +76 -0
- package/dist/main-portal/components/resources/minting-entry-section.d.ts +1 -0
- package/dist/main-portal/components/resources/minting-entry-section.js +70 -0
- package/dist/main-portal/components/resources/public-mining-modal.d.ts +7 -0
- package/dist/main-portal/components/resources/public-mining-modal.js +239 -0
- package/dist/main-portal/components/resources/recycle-pool-section.d.ts +1 -0
- package/dist/main-portal/components/resources/recycle-pool-section.js +82 -0
- package/dist/main-portal/components/resources/registration-prompt.d.ts +8 -0
- package/dist/main-portal/components/resources/registration-prompt.js +13 -0
- package/dist/main-portal/components/rewards/RewardsPage.d.ts +1 -0
- package/dist/main-portal/components/rewards/RewardsPage.js +149 -0
- package/dist/main-portal/components/security/domain-verification-bar.d.ts +1 -0
- package/dist/main-portal/components/security/domain-verification-bar.js +32 -0
- package/dist/main-portal/components/stations/StationDetailPage.d.ts +5 -0
- package/dist/main-portal/components/stations/StationDetailPage.js +232 -0
- package/dist/main-portal/components/stations/StationIncomeChart.d.ts +11 -0
- package/dist/main-portal/components/stations/StationIncomeChart.js +57 -0
- package/dist/main-portal/components/stations/StationKPIHistory.d.ts +1 -0
- package/dist/main-portal/components/stations/StationKPIHistory.js +7 -0
- package/dist/main-portal/components/stations/StationListPage.d.ts +1 -0
- package/dist/main-portal/components/stations/StationListPage.js +341 -0
- package/dist/main-portal/components/stations/StationMemberRanking.d.ts +13 -0
- package/dist/main-portal/components/stations/StationMemberRanking.js +64 -0
- package/dist/main-portal/components/stations/StationSummaryCards.d.ts +13 -0
- package/dist/main-portal/components/stations/StationSummaryCards.js +30 -0
- package/dist/main-portal/components/stations/StationsPage.d.ts +1 -0
- package/dist/main-portal/components/stations/StationsPage.js +239 -0
- package/dist/main-portal/components/territory/TerritoryNFTBrowser.d.ts +1 -0
- package/dist/main-portal/components/territory/TerritoryNFTBrowser.js +147 -0
- package/dist/main-portal/components/ui/accordion.d.ts +7 -0
- package/dist/main-portal/components/ui/accordion.js +57 -0
- package/dist/main-portal/components/ui/alert-dialog.d.ts +14 -0
- package/dist/main-portal/components/ui/alert-dialog.js +85 -0
- package/dist/main-portal/components/ui/alert.d.ts +9 -0
- package/dist/main-portal/components/ui/alert.js +28 -0
- package/dist/main-portal/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/main-portal/components/ui/aspect-ratio.js +43 -0
- package/dist/main-portal/components/ui/avatar.d.ts +6 -0
- package/dist/main-portal/components/ui/avatar.js +52 -0
- package/dist/main-portal/components/ui/badge.d.ts +9 -0
- package/dist/main-portal/components/ui/badge.js +26 -0
- package/dist/main-portal/components/ui/breadcrumb.d.ts +11 -0
- package/dist/main-portal/components/ui/breadcrumb.js +35 -0
- package/dist/main-portal/components/ui/button-group.d.ts +11 -0
- package/dist/main-portal/components/ui/button-group.js +34 -0
- package/dist/main-portal/components/ui/button.d.ts +10 -0
- package/dist/main-portal/components/ui/button.js +35 -0
- package/dist/main-portal/components/ui/calendar.d.ts +8 -0
- package/dist/main-portal/components/ui/calendar.js +111 -0
- package/dist/main-portal/components/ui/card.d.ts +17 -0
- package/dist/main-portal/components/ui/card.js +41 -0
- package/dist/main-portal/components/ui/carousel.d.ts +19 -0
- package/dist/main-portal/components/ui/carousel.js +134 -0
- package/dist/main-portal/components/ui/chart.d.ts +40 -0
- package/dist/main-portal/components/ui/chart.js +168 -0
- package/dist/main-portal/components/ui/checkbox.d.ts +4 -0
- package/dist/main-portal/components/ui/checkbox.js +45 -0
- package/dist/main-portal/components/ui/collapsible.d.ts +5 -0
- package/dist/main-portal/components/ui/collapsible.js +51 -0
- package/dist/main-portal/components/ui/command.d.ts +18 -0
- package/dist/main-portal/components/ui/command.js +45 -0
- package/dist/main-portal/components/ui/context-menu.d.ts +25 -0
- package/dist/main-portal/components/ui/context-menu.js +101 -0
- package/dist/main-portal/components/ui/dialog.d.ts +15 -0
- package/dist/main-portal/components/ui/dialog.js +81 -0
- package/dist/main-portal/components/ui/drawer.d.ts +13 -0
- package/dist/main-portal/components/ui/drawer.js +47 -0
- package/dist/main-portal/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/main-portal/components/ui/dropdown-menu.js +101 -0
- package/dist/main-portal/components/ui/empty.d.ts +11 -0
- package/dist/main-portal/components/ui/empty.js +41 -0
- package/dist/main-portal/components/ui/field.d.ts +24 -0
- package/dist/main-portal/components/ui/field.js +85 -0
- package/dist/main-portal/components/ui/form.d.ts +24 -0
- package/dist/main-portal/components/ui/form.js +103 -0
- package/dist/main-portal/components/ui/hover-avatar.d.ts +10 -0
- package/dist/main-portal/components/ui/hover-avatar.js +70 -0
- package/dist/main-portal/components/ui/hover-card.d.ts +6 -0
- package/dist/main-portal/components/ui/hover-card.js +52 -0
- package/dist/main-portal/components/ui/input-group.d.ts +15 -0
- package/dist/main-portal/components/ui/input-group.js +65 -0
- package/dist/main-portal/components/ui/input-otp.d.ts +11 -0
- package/dist/main-portal/components/ui/input-otp.js +60 -0
- package/dist/main-portal/components/ui/input.d.ts +3 -0
- package/dist/main-portal/components/ui/input.js +8 -0
- package/dist/main-portal/components/ui/item.d.ts +23 -0
- package/dist/main-portal/components/ui/item.js +77 -0
- package/dist/main-portal/components/ui/kbd.d.ts +3 -0
- package/dist/main-portal/components/ui/kbd.js +13 -0
- package/dist/main-portal/components/ui/label.d.ts +4 -0
- package/dist/main-portal/components/ui/label.js +44 -0
- package/dist/main-portal/components/ui/menubar.d.ts +26 -0
- package/dist/main-portal/components/ui/menubar.js +105 -0
- package/dist/main-portal/components/ui/navigation-menu.d.ts +14 -0
- package/dist/main-portal/components/ui/navigation-menu.js +75 -0
- package/dist/main-portal/components/ui/pagination.d.ts +13 -0
- package/dist/main-portal/components/ui/pagination.js +37 -0
- package/dist/main-portal/components/ui/popover.d.ts +7 -0
- package/dist/main-portal/components/ui/popover.js +56 -0
- package/dist/main-portal/components/ui/progress.d.ts +4 -0
- package/dist/main-portal/components/ui/progress.js +44 -0
- package/dist/main-portal/components/ui/radio-group.d.ts +5 -0
- package/dist/main-portal/components/ui/radio-group.js +49 -0
- package/dist/main-portal/components/ui/resizable.d.ts +8 -0
- package/dist/main-portal/components/ui/resizable.js +53 -0
- package/dist/main-portal/components/ui/scroll-area.d.ts +5 -0
- package/dist/main-portal/components/ui/scroll-area.js +50 -0
- package/dist/main-portal/components/ui/select.d.ts +15 -0
- package/dist/main-portal/components/ui/select.js +83 -0
- package/dist/main-portal/components/ui/separator.d.ts +4 -0
- package/dist/main-portal/components/ui/separator.js +44 -0
- package/dist/main-portal/components/ui/sheet.d.ts +13 -0
- package/dist/main-portal/components/ui/sheet.js +83 -0
- package/dist/main-portal/components/ui/sidebar.d.ts +69 -0
- package/dist/main-portal/components/ui/sidebar.js +258 -0
- package/dist/main-portal/components/ui/skeleton.d.ts +2 -0
- package/dist/main-portal/components/ui/skeleton.js +9 -0
- package/dist/main-portal/components/ui/slider.d.ts +4 -0
- package/dist/main-portal/components/ui/slider.js +50 -0
- package/dist/main-portal/components/ui/sonner.d.ts +3 -0
- package/dist/main-portal/components/ui/sonner.js +17 -0
- package/dist/main-portal/components/ui/spinner.d.ts +2 -0
- package/dist/main-portal/components/ui/spinner.js +10 -0
- package/dist/main-portal/components/ui/switch.d.ts +4 -0
- package/dist/main-portal/components/ui/switch.js +44 -0
- package/dist/main-portal/components/ui/table.d.ts +10 -0
- package/dist/main-portal/components/ui/table.js +38 -0
- package/dist/main-portal/components/ui/tabs.d.ts +7 -0
- package/dist/main-portal/components/ui/tabs.js +53 -0
- package/dist/main-portal/components/ui/terminal.d.ts +49 -0
- package/dist/main-portal/components/ui/terminal.js +56 -0
- package/dist/main-portal/components/ui/textarea.d.ts +3 -0
- package/dist/main-portal/components/ui/textarea.js +8 -0
- package/dist/main-portal/components/ui/time-remaining.d.ts +54 -0
- package/dist/main-portal/components/ui/time-remaining.js +223 -0
- package/dist/main-portal/components/ui/toast.d.ts +15 -0
- package/dist/main-portal/components/ui/toast.js +77 -0
- package/dist/main-portal/components/ui/toaster.d.ts +1 -0
- package/dist/main-portal/components/ui/toaster.js +14 -0
- package/dist/main-portal/components/ui/toggle-group.d.ts +7 -0
- package/dist/main-portal/components/ui/toggle-group.js +58 -0
- package/dist/main-portal/components/ui/toggle.d.ts +9 -0
- package/dist/main-portal/components/ui/toggle.js +64 -0
- package/dist/main-portal/components/ui/tooltip.d.ts +7 -0
- package/dist/main-portal/components/ui/tooltip.js +56 -0
- package/dist/main-portal/components/ui/use-mobile.d.ts +1 -0
- package/dist/main-portal/components/ui/use-mobile.js +53 -0
- package/dist/main-portal/components/voting/VotingPage.d.ts +1 -0
- package/dist/main-portal/components/voting/VotingPage.js +14 -0
- package/dist/main-portal/components/wallet/MCCHistory.d.ts +9 -0
- package/dist/main-portal/components/wallet/MCCHistory.js +100 -0
- package/dist/main-portal/components/wallet/WalletManagement.d.ts +5 -0
- package/dist/main-portal/components/wallet/WalletManagement.js +144 -0
- package/dist/main-portal/components/wallet/WalletPage.d.ts +1 -0
- package/dist/main-portal/components/wallet/WalletPage.js +130 -0
- package/dist/main-portal/config/menu-config.d.ts +22 -0
- package/dist/main-portal/config/menu-config.js +167 -0
- package/dist/main-portal/contexts/MCCPriceContext.d.ts +38 -0
- package/dist/main-portal/contexts/MCCPriceContext.js +70 -0
- package/dist/main-portal/contexts/WalletContext.d.ts +48 -0
- package/dist/main-portal/contexts/WalletContext.js +94 -0
- package/dist/main-portal/hooks/index.d.ts +4 -0
- package/dist/main-portal/hooks/index.js +11 -0
- package/dist/main-portal/hooks/use-breakpoint.d.ts +45 -0
- package/dist/main-portal/hooks/use-breakpoint.js +91 -0
- package/dist/main-portal/hooks/use-mobile.d.ts +1 -0
- package/dist/main-portal/hooks/use-mobile.js +55 -0
- package/dist/main-portal/hooks/use-toast.d.ts +44 -0
- package/dist/main-portal/hooks/use-toast.js +164 -0
- package/dist/main-portal/hooks/useAuth.d.ts +30 -0
- package/dist/main-portal/hooks/useAuth.js +136 -0
- package/dist/main-portal/hooks/useMCC.d.ts +26 -0
- package/dist/main-portal/hooks/useMCC.js +148 -0
- package/dist/main-portal/hooks/useMCD.d.ts +17 -0
- package/dist/main-portal/hooks/useMCD.js +114 -0
- package/dist/main-portal/hooks/useMultiWalletBalance.d.ts +31 -0
- package/dist/main-portal/hooks/useMultiWalletBalance.js +65 -0
- package/dist/main-portal/hooks/useSolanaBalance.d.ts +21 -0
- package/dist/main-portal/hooks/useSolanaBalance.js +58 -0
- package/dist/main-portal/hooks/useSpeechRecognition.d.ts +6 -0
- package/dist/main-portal/hooks/useSpeechRecognition.js +82 -0
- package/dist/main-portal/hooks/useStats.d.ts +131 -0
- package/dist/main-portal/hooks/useStats.js +161 -0
- package/dist/main-portal/hooks/useStrategies.d.ts +134 -0
- package/dist/main-portal/hooks/useStrategies.js +28 -0
- package/dist/main-portal/hooks/useUserRank.d.ts +16 -0
- package/dist/main-portal/hooks/useUserRank.js +61 -0
- package/dist/main-portal/hooks/useWalletTokenBalances.d.ts +29 -0
- package/dist/main-portal/hooks/useWalletTokenBalances.js +106 -0
- package/dist/main-portal/i18n/navigation.d.ts +341 -0
- package/dist/main-portal/i18n/navigation.js +7 -0
- package/dist/main-portal/i18n/request.d.ts +2 -0
- package/dist/main-portal/i18n/request.js +47 -0
- package/dist/main-portal/i18n/routing.d.ts +18 -0
- package/dist/main-portal/i18n/routing.js +10 -0
- package/dist/main-portal/lib/ai-chat-config.d.ts +8 -0
- package/dist/main-portal/lib/ai-chat-config.js +144 -0
- package/dist/main-portal/lib/api/blockchain.d.ts +178 -0
- package/dist/main-portal/lib/api/blockchain.js +302 -0
- package/dist/main-portal/lib/api/core.d.ts +3 -0
- package/dist/main-portal/lib/api/core.js +47 -0
- package/dist/main-portal/lib/api/index.d.ts +9 -0
- package/dist/main-portal/lib/api/index.js +37 -0
- package/dist/main-portal/lib/api/services/ai.d.ts +139 -0
- package/dist/main-portal/lib/api/services/ai.js +214 -0
- package/dist/main-portal/lib/api/services/finance.d.ts +37 -0
- package/dist/main-portal/lib/api/services/finance.js +144 -0
- package/dist/main-portal/lib/api/services/index.d.ts +5 -0
- package/dist/main-portal/lib/api/services/index.js +21 -0
- package/dist/main-portal/lib/api/services/mining.d.ts +68 -0
- package/dist/main-portal/lib/api/services/mining.js +76 -0
- package/dist/main-portal/lib/api/services/organization.d.ts +161 -0
- package/dist/main-portal/lib/api/services/organization.js +139 -0
- package/dist/main-portal/lib/api/services/user.d.ts +90 -0
- package/dist/main-portal/lib/api/services/user.js +78 -0
- package/dist/main-portal/lib/api/services.d.ts +1 -0
- package/dist/main-portal/lib/api/services.js +17 -0
- package/dist/main-portal/lib/api-service.d.ts +1 -0
- package/dist/main-portal/lib/api-service.js +18 -0
- package/dist/main-portal/lib/auth-service.d.ts +65 -0
- package/dist/main-portal/lib/auth-service.js +382 -0
- package/dist/main-portal/lib/config/mainstream-tokens.d.ts +13 -0
- package/dist/main-portal/lib/config/mainstream-tokens.js +88 -0
- package/dist/main-portal/lib/docs-data.d.ts +36 -0
- package/dist/main-portal/lib/docs-data.js +108 -0
- package/dist/main-portal/lib/oauth-config.d.ts +12 -0
- package/dist/main-portal/lib/oauth-config.js +48 -0
- package/dist/main-portal/lib/order-id-generator.d.ts +19 -0
- package/dist/main-portal/lib/order-id-generator.js +97 -0
- package/dist/main-portal/lib/solana/reincarnation-client.d.ts +28 -0
- package/dist/main-portal/lib/solana/reincarnation-client.js +39 -0
- package/dist/main-portal/lib/solana/solana-pay.d.ts +31 -0
- package/dist/main-portal/lib/solana/solana-pay.js +85 -0
- package/dist/main-portal/lib/strategy/defaults.d.ts +2 -0
- package/dist/main-portal/lib/strategy/defaults.js +58 -0
- package/dist/main-portal/lib/strategy/index.d.ts +3 -0
- package/dist/main-portal/lib/strategy/index.js +20 -0
- package/dist/main-portal/lib/strategy/tooltips.d.ts +1 -0
- package/dist/main-portal/lib/strategy/tooltips.js +50 -0
- package/dist/main-portal/lib/strategy/types.d.ts +74 -0
- package/dist/main-portal/lib/strategy/types.js +2 -0
- package/dist/main-portal/lib/types/ai.types.d.ts +111 -0
- package/dist/main-portal/lib/types/ai.types.js +2 -0
- package/dist/main-portal/lib/types/api.d.ts +5 -0
- package/dist/main-portal/lib/types/api.js +21 -0
- package/dist/main-portal/lib/types/common.types.d.ts +168 -0
- package/dist/main-portal/lib/types/common.types.js +24 -0
- package/dist/main-portal/lib/types/finance.types.d.ts +267 -0
- package/dist/main-portal/lib/types/finance.types.js +2 -0
- package/dist/main-portal/lib/types/protocol.types.d.ts +216 -0
- package/dist/main-portal/lib/types/protocol.types.js +2 -0
- package/dist/main-portal/lib/types/user.types.d.ts +243 -0
- package/dist/main-portal/lib/types/user.types.js +12 -0
- package/dist/main-portal/lib/utils/territoryId.d.ts +75 -0
- package/dist/main-portal/lib/utils/territoryId.js +241 -0
- package/dist/main-portal/lib/utils.d.ts +4 -0
- package/dist/main-portal/lib/utils.js +24 -0
- package/dist/main-portal/lib/wallet-auth/api.d.ts +13 -0
- package/dist/main-portal/lib/wallet-auth/api.js +132 -0
- package/dist/main-portal/lib/wallet-auth/types.d.ts +87 -0
- package/dist/main-portal/lib/wallet-auth/types.js +58 -0
- package/package.json +55 -5
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const AUTH_FLAG_KEY = "mc_auth_flag";
|
|
2
|
+
export declare const getSessionToken: () => string | null;
|
|
3
|
+
export declare const setSessionToken: (token: string) => void;
|
|
4
|
+
export declare const getNativeUid: () => string | null;
|
|
5
|
+
export declare const setAuthFlag: () => void;
|
|
6
|
+
export declare const clearAuthFlag: () => void;
|
|
7
|
+
export declare const isAuthenticatedSync: () => boolean;
|
|
8
|
+
export declare const clearTokenCache: () => void;
|
|
9
|
+
export declare const getCurrentUserToken: () => Promise<string | null>;
|
|
10
|
+
export interface LoginResult {
|
|
11
|
+
uid?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
emailVerified?: boolean;
|
|
14
|
+
verificationRequired?: boolean;
|
|
15
|
+
loginToken?: string;
|
|
16
|
+
verificationMethods?: string[];
|
|
17
|
+
emailHint?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const signInWithEmail: (email: string, password: string) => Promise<LoginResult>;
|
|
20
|
+
export declare const verifyLogin: (loginToken: string, totpCode?: string, emailCode?: string, backupCode?: string) => Promise<LoginResult>;
|
|
21
|
+
export declare const resendLoginCode: (loginToken: string) => Promise<void>;
|
|
22
|
+
export declare const signUpWithEmail: (email: string, password: string) => Promise<{
|
|
23
|
+
uid: any;
|
|
24
|
+
email: string;
|
|
25
|
+
emailVerified: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const logOut: () => Promise<void>;
|
|
28
|
+
export interface NativeUser {
|
|
29
|
+
uid: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const onAuthChange: (callback: (user: NativeUser | null) => void) => () => void;
|
|
32
|
+
export declare const handleAuthFailure: (status: number) => Promise<void>;
|
|
33
|
+
export declare const guardAuthResponse: (response: Response) => Response;
|
|
34
|
+
export declare const checkEmailVerified: () => Promise<boolean>;
|
|
35
|
+
export declare const getCurrentUser: () => Promise<{
|
|
36
|
+
uid: any;
|
|
37
|
+
email: any;
|
|
38
|
+
displayName: null;
|
|
39
|
+
emailVerified: any;
|
|
40
|
+
} | null>;
|
|
41
|
+
export declare const sendPasswordResetEmail: (email?: string) => Promise<void>;
|
|
42
|
+
export declare const resendVerificationEmail: () => Promise<void>;
|
|
43
|
+
export declare const requestEmailChange: (newEmail: string, password: string) => Promise<void>;
|
|
44
|
+
export declare const verifyEmailChange: (newEmail: string, code: string) => Promise<{
|
|
45
|
+
email: string;
|
|
46
|
+
email_verified: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const setup2FA: () => Promise<{
|
|
49
|
+
secret: string;
|
|
50
|
+
qr_code: string;
|
|
51
|
+
uri: string;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const verifyAndEnable2FA: (code: string) => Promise<{
|
|
54
|
+
backup_codes: string[];
|
|
55
|
+
message: string;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const disable2FA: (password: string) => Promise<void>;
|
|
58
|
+
export declare const get2FAStatus: () => Promise<{
|
|
59
|
+
totp_enabled: boolean;
|
|
60
|
+
has_backup_codes: boolean;
|
|
61
|
+
setup_at: string | null;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const isNativeAuth: () => boolean;
|
|
64
|
+
export declare const sendEmailVerification: () => Promise<void>;
|
|
65
|
+
export declare const getEmailVerificationStatus: () => boolean;
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
// Native Auth — Argon2id + Session Token (Firebase 已于 2026-03-16 清理)
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getEmailVerificationStatus = exports.sendEmailVerification = exports.isNativeAuth = exports.get2FAStatus = exports.disable2FA = exports.verifyAndEnable2FA = exports.setup2FA = exports.verifyEmailChange = exports.requestEmailChange = exports.resendVerificationEmail = exports.sendPasswordResetEmail = exports.getCurrentUser = exports.checkEmailVerified = exports.guardAuthResponse = exports.handleAuthFailure = exports.onAuthChange = exports.logOut = exports.signUpWithEmail = exports.resendLoginCode = exports.verifyLogin = exports.signInWithEmail = exports.getCurrentUserToken = exports.clearTokenCache = exports.isAuthenticatedSync = exports.clearAuthFlag = exports.setAuthFlag = exports.getNativeUid = exports.setSessionToken = exports.getSessionToken = exports.AUTH_FLAG_KEY = void 0;
|
|
6
|
+
const SESSION_TOKEN_KEY = 'mc_session_token';
|
|
7
|
+
const NATIVE_UID_KEY = 'mc_native_uid';
|
|
8
|
+
exports.AUTH_FLAG_KEY = 'mc_auth_flag';
|
|
9
|
+
// ── Session Storage ──
|
|
10
|
+
const getSessionToken = () => {
|
|
11
|
+
try {
|
|
12
|
+
return sessionStorage.getItem(SESSION_TOKEN_KEY);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.getSessionToken = getSessionToken;
|
|
19
|
+
const setSessionToken = (token) => {
|
|
20
|
+
try {
|
|
21
|
+
sessionStorage.setItem(SESSION_TOKEN_KEY, token);
|
|
22
|
+
}
|
|
23
|
+
catch { }
|
|
24
|
+
};
|
|
25
|
+
exports.setSessionToken = setSessionToken;
|
|
26
|
+
const clearSessionToken = () => {
|
|
27
|
+
try {
|
|
28
|
+
sessionStorage.removeItem(SESSION_TOKEN_KEY);
|
|
29
|
+
}
|
|
30
|
+
catch { }
|
|
31
|
+
try {
|
|
32
|
+
sessionStorage.removeItem(NATIVE_UID_KEY);
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
};
|
|
36
|
+
const getNativeUid = () => {
|
|
37
|
+
try {
|
|
38
|
+
return sessionStorage.getItem(NATIVE_UID_KEY);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.getNativeUid = getNativeUid;
|
|
45
|
+
const setNativeUid = (uid) => {
|
|
46
|
+
try {
|
|
47
|
+
sessionStorage.setItem(NATIVE_UID_KEY, uid);
|
|
48
|
+
}
|
|
49
|
+
catch { }
|
|
50
|
+
};
|
|
51
|
+
// ── Auth Flag ──
|
|
52
|
+
const setAuthFlag = () => {
|
|
53
|
+
try {
|
|
54
|
+
sessionStorage.setItem(exports.AUTH_FLAG_KEY, '1');
|
|
55
|
+
}
|
|
56
|
+
catch { }
|
|
57
|
+
};
|
|
58
|
+
exports.setAuthFlag = setAuthFlag;
|
|
59
|
+
const clearAuthFlag = () => {
|
|
60
|
+
try {
|
|
61
|
+
sessionStorage.removeItem(exports.AUTH_FLAG_KEY);
|
|
62
|
+
}
|
|
63
|
+
catch { }
|
|
64
|
+
try {
|
|
65
|
+
localStorage.removeItem(exports.AUTH_FLAG_KEY);
|
|
66
|
+
}
|
|
67
|
+
catch { }
|
|
68
|
+
};
|
|
69
|
+
exports.clearAuthFlag = clearAuthFlag;
|
|
70
|
+
const isAuthenticatedSync = () => {
|
|
71
|
+
return !!(0, exports.getSessionToken)();
|
|
72
|
+
};
|
|
73
|
+
exports.isAuthenticatedSync = isAuthenticatedSync;
|
|
74
|
+
// ── Token ──
|
|
75
|
+
const clearTokenCache = () => {
|
|
76
|
+
clearSessionToken();
|
|
77
|
+
try {
|
|
78
|
+
sessionStorage.removeItem('mc_user_info');
|
|
79
|
+
}
|
|
80
|
+
catch { }
|
|
81
|
+
};
|
|
82
|
+
exports.clearTokenCache = clearTokenCache;
|
|
83
|
+
const getCurrentUserToken = async () => {
|
|
84
|
+
return (0, exports.getSessionToken)();
|
|
85
|
+
};
|
|
86
|
+
exports.getCurrentUserToken = getCurrentUserToken;
|
|
87
|
+
const signInWithEmail = async (email, password) => {
|
|
88
|
+
const response = await fetch('/api/auth/native/login', {
|
|
89
|
+
method: 'POST',
|
|
90
|
+
headers: { 'Content-Type': 'application/json' },
|
|
91
|
+
body: JSON.stringify({ email, password }),
|
|
92
|
+
});
|
|
93
|
+
const data = await response.json();
|
|
94
|
+
if (!data.success) {
|
|
95
|
+
if (data.error === 'password_not_set') {
|
|
96
|
+
throw new Error('系统已升级,请通过邮件重置密码后登录。');
|
|
97
|
+
}
|
|
98
|
+
throw new Error(data.error || '登录失败');
|
|
99
|
+
}
|
|
100
|
+
// Multi-step verification required
|
|
101
|
+
if (data.data.verification_required) {
|
|
102
|
+
return {
|
|
103
|
+
verificationRequired: true,
|
|
104
|
+
loginToken: data.data.login_token,
|
|
105
|
+
verificationMethods: data.data.verification_methods,
|
|
106
|
+
emailHint: data.data.email_hint,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
(0, exports.setSessionToken)(data.data.session_token);
|
|
110
|
+
setNativeUid(data.data.uid);
|
|
111
|
+
return { uid: data.data.uid, email, emailVerified: data.data.email_verified };
|
|
112
|
+
};
|
|
113
|
+
exports.signInWithEmail = signInWithEmail;
|
|
114
|
+
const verifyLogin = async (loginToken, totpCode, emailCode, backupCode) => {
|
|
115
|
+
const response = await fetch('/api/auth/native/verify-login', {
|
|
116
|
+
method: 'POST',
|
|
117
|
+
headers: { 'Content-Type': 'application/json' },
|
|
118
|
+
body: JSON.stringify({
|
|
119
|
+
login_token: loginToken,
|
|
120
|
+
totp_code: totpCode || undefined,
|
|
121
|
+
email_code: emailCode || undefined,
|
|
122
|
+
backup_code: backupCode || undefined,
|
|
123
|
+
}),
|
|
124
|
+
});
|
|
125
|
+
const data = await response.json();
|
|
126
|
+
if (!data.success) {
|
|
127
|
+
throw new Error(data.error || '验证失败');
|
|
128
|
+
}
|
|
129
|
+
// Still need more verification
|
|
130
|
+
if (data.data.verification_required) {
|
|
131
|
+
return {
|
|
132
|
+
verificationRequired: true,
|
|
133
|
+
loginToken,
|
|
134
|
+
verificationMethods: [],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
(0, exports.setSessionToken)(data.data.session_token);
|
|
138
|
+
setNativeUid(data.data.uid);
|
|
139
|
+
return { uid: data.data.uid, emailVerified: data.data.email_verified };
|
|
140
|
+
};
|
|
141
|
+
exports.verifyLogin = verifyLogin;
|
|
142
|
+
const resendLoginCode = async (loginToken) => {
|
|
143
|
+
const response = await fetch('/api/auth/native/resend-login-code', {
|
|
144
|
+
method: 'POST',
|
|
145
|
+
headers: { 'Content-Type': 'application/json' },
|
|
146
|
+
body: JSON.stringify({ login_token: loginToken }),
|
|
147
|
+
});
|
|
148
|
+
const data = await response.json();
|
|
149
|
+
if (!data.success) {
|
|
150
|
+
throw new Error(data.error || '发送失败');
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
exports.resendLoginCode = resendLoginCode;
|
|
154
|
+
const signUpWithEmail = async (email, password) => {
|
|
155
|
+
const response = await fetch('/api/auth/native/register', {
|
|
156
|
+
method: 'POST',
|
|
157
|
+
headers: { 'Content-Type': 'application/json' },
|
|
158
|
+
body: JSON.stringify({ email, password }),
|
|
159
|
+
});
|
|
160
|
+
const data = await response.json();
|
|
161
|
+
if (!data.success) {
|
|
162
|
+
throw new Error(data.error || '注册失败');
|
|
163
|
+
}
|
|
164
|
+
(0, exports.setSessionToken)(data.data.session_token);
|
|
165
|
+
setNativeUid(data.data.uid);
|
|
166
|
+
return { uid: data.data.uid, email, emailVerified: false };
|
|
167
|
+
};
|
|
168
|
+
exports.signUpWithEmail = signUpWithEmail;
|
|
169
|
+
const logOut = async () => {
|
|
170
|
+
try {
|
|
171
|
+
const token = (0, exports.getSessionToken)();
|
|
172
|
+
if (token) {
|
|
173
|
+
fetch('/api/auth/native/logout', {
|
|
174
|
+
method: 'POST',
|
|
175
|
+
headers: { 'Authorization': `Bearer ${token}` },
|
|
176
|
+
}).catch(() => { });
|
|
177
|
+
}
|
|
178
|
+
clearSessionToken();
|
|
179
|
+
(0, exports.clearAuthFlag)();
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
console.error('Logout error:', error);
|
|
183
|
+
}
|
|
184
|
+
window.location.href = `${getLocalePrefix()}/`;
|
|
185
|
+
};
|
|
186
|
+
exports.logOut = logOut;
|
|
187
|
+
// ── Locale 感知跳转 ──
|
|
188
|
+
const getLocalePrefix = () => {
|
|
189
|
+
if (typeof window === 'undefined')
|
|
190
|
+
return '';
|
|
191
|
+
const match = window.location.pathname.match(/^\/(en|zh|ja|ko)(\/|$)/);
|
|
192
|
+
return match ? `/${match[1]}` : '';
|
|
193
|
+
};
|
|
194
|
+
const onAuthChange = (callback) => {
|
|
195
|
+
const token = (0, exports.getSessionToken)();
|
|
196
|
+
const uid = (0, exports.getNativeUid)() || 'native-user';
|
|
197
|
+
callback(token ? { uid } : null);
|
|
198
|
+
return () => { };
|
|
199
|
+
};
|
|
200
|
+
exports.onAuthChange = onAuthChange;
|
|
201
|
+
// ── 401/403 强制登出 ──
|
|
202
|
+
let isForceLoggingOut = false;
|
|
203
|
+
const handleAuthFailure = async (status) => {
|
|
204
|
+
if (status !== 401 && status !== 403)
|
|
205
|
+
return;
|
|
206
|
+
if (isForceLoggingOut)
|
|
207
|
+
return;
|
|
208
|
+
isForceLoggingOut = true;
|
|
209
|
+
console.warn(`[Auth] 服务端返回 ${status},强制登出`);
|
|
210
|
+
clearSessionToken();
|
|
211
|
+
(0, exports.clearAuthFlag)();
|
|
212
|
+
window.location.href = `${getLocalePrefix()}/login`;
|
|
213
|
+
};
|
|
214
|
+
exports.handleAuthFailure = handleAuthFailure;
|
|
215
|
+
const guardAuthResponse = (response) => {
|
|
216
|
+
if (response.status === 401 || response.status === 403) {
|
|
217
|
+
(0, exports.handleAuthFailure)(response.status);
|
|
218
|
+
}
|
|
219
|
+
return response;
|
|
220
|
+
};
|
|
221
|
+
exports.guardAuthResponse = guardAuthResponse;
|
|
222
|
+
// ── 邮件验证/密码重置 ──
|
|
223
|
+
const checkEmailVerified = async () => {
|
|
224
|
+
const token = (0, exports.getSessionToken)();
|
|
225
|
+
if (!token)
|
|
226
|
+
return false;
|
|
227
|
+
try {
|
|
228
|
+
const resp = await fetch('/api/auth/native/session', {
|
|
229
|
+
headers: { 'Authorization': `Bearer ${token}` },
|
|
230
|
+
});
|
|
231
|
+
const data = await resp.json();
|
|
232
|
+
return data.success ? data.data.email_verified : false;
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
exports.checkEmailVerified = checkEmailVerified;
|
|
239
|
+
const getCurrentUser = async () => {
|
|
240
|
+
const token = (0, exports.getSessionToken)();
|
|
241
|
+
if (!token)
|
|
242
|
+
return null;
|
|
243
|
+
try {
|
|
244
|
+
const resp = await fetch('/api/auth/native/session', {
|
|
245
|
+
headers: { 'Authorization': `Bearer ${token}` },
|
|
246
|
+
});
|
|
247
|
+
const data = await resp.json();
|
|
248
|
+
if (!data.success)
|
|
249
|
+
return null;
|
|
250
|
+
return {
|
|
251
|
+
uid: data.data.uid,
|
|
252
|
+
email: data.data.email,
|
|
253
|
+
displayName: null,
|
|
254
|
+
emailVerified: data.data.email_verified,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
exports.getCurrentUser = getCurrentUser;
|
|
262
|
+
const sendPasswordResetEmail = async (email) => {
|
|
263
|
+
if (!email)
|
|
264
|
+
throw new Error('请提供邮箱地址');
|
|
265
|
+
const response = await fetch('/api/auth/native/forgot-password', {
|
|
266
|
+
method: 'POST',
|
|
267
|
+
headers: { 'Content-Type': 'application/json' },
|
|
268
|
+
body: JSON.stringify({ email }),
|
|
269
|
+
});
|
|
270
|
+
const data = await response.json();
|
|
271
|
+
if (!data.success) {
|
|
272
|
+
throw new Error(data.error || '发送失败');
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
exports.sendPasswordResetEmail = sendPasswordResetEmail;
|
|
276
|
+
const resendVerificationEmail = async () => {
|
|
277
|
+
const token = (0, exports.getSessionToken)();
|
|
278
|
+
if (!token)
|
|
279
|
+
throw new Error('Not authenticated');
|
|
280
|
+
const response = await fetch('/api/auth/native/resend-verification', {
|
|
281
|
+
method: 'POST',
|
|
282
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
283
|
+
});
|
|
284
|
+
const data = await response.json();
|
|
285
|
+
if (!data.success)
|
|
286
|
+
throw new Error(data.error || 'Failed to send verification email');
|
|
287
|
+
};
|
|
288
|
+
exports.resendVerificationEmail = resendVerificationEmail;
|
|
289
|
+
// ── Email Change ──
|
|
290
|
+
const requestEmailChange = async (newEmail, password) => {
|
|
291
|
+
const token = (0, exports.getSessionToken)();
|
|
292
|
+
if (!token)
|
|
293
|
+
throw new Error('Not authenticated');
|
|
294
|
+
const response = await fetch('/api/auth/native/change-email', {
|
|
295
|
+
method: 'POST',
|
|
296
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
297
|
+
body: JSON.stringify({ new_email: newEmail, password }),
|
|
298
|
+
});
|
|
299
|
+
const data = await response.json();
|
|
300
|
+
if (!data.success)
|
|
301
|
+
throw new Error(data.error || 'Failed to send verification code');
|
|
302
|
+
};
|
|
303
|
+
exports.requestEmailChange = requestEmailChange;
|
|
304
|
+
const verifyEmailChange = async (newEmail, code) => {
|
|
305
|
+
const token = (0, exports.getSessionToken)();
|
|
306
|
+
if (!token)
|
|
307
|
+
throw new Error('Not authenticated');
|
|
308
|
+
const response = await fetch('/api/auth/native/verify-change-email', {
|
|
309
|
+
method: 'POST',
|
|
310
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
311
|
+
body: JSON.stringify({ new_email: newEmail, code }),
|
|
312
|
+
});
|
|
313
|
+
const data = await response.json();
|
|
314
|
+
if (!data.success)
|
|
315
|
+
throw new Error(data.error || 'Verification failed');
|
|
316
|
+
return data.data;
|
|
317
|
+
};
|
|
318
|
+
exports.verifyEmailChange = verifyEmailChange;
|
|
319
|
+
// ── 2FA Management ──
|
|
320
|
+
const setup2FA = async () => {
|
|
321
|
+
const token = (0, exports.getSessionToken)();
|
|
322
|
+
if (!token)
|
|
323
|
+
throw new Error('Not authenticated');
|
|
324
|
+
const response = await fetch('/api/auth/native/2fa/setup', {
|
|
325
|
+
method: 'POST',
|
|
326
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
327
|
+
});
|
|
328
|
+
const data = await response.json();
|
|
329
|
+
if (!data.success)
|
|
330
|
+
throw new Error(data.error || 'Failed to setup 2FA');
|
|
331
|
+
return data.data;
|
|
332
|
+
};
|
|
333
|
+
exports.setup2FA = setup2FA;
|
|
334
|
+
const verifyAndEnable2FA = async (code) => {
|
|
335
|
+
const token = (0, exports.getSessionToken)();
|
|
336
|
+
if (!token)
|
|
337
|
+
throw new Error('Not authenticated');
|
|
338
|
+
const response = await fetch('/api/auth/native/2fa/verify-setup', {
|
|
339
|
+
method: 'POST',
|
|
340
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
341
|
+
body: JSON.stringify({ code }),
|
|
342
|
+
});
|
|
343
|
+
const data = await response.json();
|
|
344
|
+
if (!data.success)
|
|
345
|
+
throw new Error(data.error || 'Invalid code');
|
|
346
|
+
return data.data;
|
|
347
|
+
};
|
|
348
|
+
exports.verifyAndEnable2FA = verifyAndEnable2FA;
|
|
349
|
+
const disable2FA = async (password) => {
|
|
350
|
+
const token = (0, exports.getSessionToken)();
|
|
351
|
+
if (!token)
|
|
352
|
+
throw new Error('Not authenticated');
|
|
353
|
+
const response = await fetch('/api/auth/native/2fa/disable', {
|
|
354
|
+
method: 'POST',
|
|
355
|
+
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
356
|
+
body: JSON.stringify({ password }),
|
|
357
|
+
});
|
|
358
|
+
const data = await response.json();
|
|
359
|
+
if (!data.success)
|
|
360
|
+
throw new Error(data.error || 'Failed to disable 2FA');
|
|
361
|
+
};
|
|
362
|
+
exports.disable2FA = disable2FA;
|
|
363
|
+
const get2FAStatus = async () => {
|
|
364
|
+
const token = (0, exports.getSessionToken)();
|
|
365
|
+
if (!token)
|
|
366
|
+
throw new Error('Not authenticated');
|
|
367
|
+
const response = await fetch('/api/auth/native/2fa/status', {
|
|
368
|
+
headers: { 'Authorization': `Bearer ${token}` },
|
|
369
|
+
});
|
|
370
|
+
const data = await response.json();
|
|
371
|
+
if (!data.success)
|
|
372
|
+
throw new Error(data.error || 'Failed to get 2FA status');
|
|
373
|
+
return data.data;
|
|
374
|
+
};
|
|
375
|
+
exports.get2FAStatus = get2FAStatus;
|
|
376
|
+
// 兼容旧代码引用
|
|
377
|
+
const isNativeAuth = () => true;
|
|
378
|
+
exports.isNativeAuth = isNativeAuth;
|
|
379
|
+
const sendEmailVerification = async () => { };
|
|
380
|
+
exports.sendEmailVerification = sendEmailVerification;
|
|
381
|
+
const getEmailVerificationStatus = () => false;
|
|
382
|
+
exports.getEmailVerificationStatus = getEmailVerificationStatus;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface MainstreamToken {
|
|
2
|
+
symbol: string;
|
|
3
|
+
name: string;
|
|
4
|
+
mint: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
color: string;
|
|
7
|
+
isStablecoin: boolean;
|
|
8
|
+
isNative?: boolean;
|
|
9
|
+
logoURI?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const MAINSTREAM_TOKENS: MainstreamToken[];
|
|
12
|
+
export declare const TOKEN_BY_MINT: Map<string, MainstreamToken>;
|
|
13
|
+
export declare const TOKEN_BY_SYMBOL: Map<string, MainstreamToken>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOKEN_BY_SYMBOL = exports.TOKEN_BY_MINT = exports.MAINSTREAM_TOKENS = void 0;
|
|
4
|
+
const T = '/assets/tokens';
|
|
5
|
+
exports.MAINSTREAM_TOKENS = [
|
|
6
|
+
{ symbol: "SOL", name: "Solana", mint: "So11111111111111111111111111111111111111112", decimals: 9, color: "bg-purple-500", isStablecoin: false, isNative: true, logoURI: `${T}/sol.png` },
|
|
7
|
+
{ symbol: "MCC", name: "Microcosm Coin", mint: "MCCn6eqiTGzaiPKECg3viPmkdkS9YmkguqKvRcTxCsb", decimals: 9, color: "bg-cyan-500", isStablecoin: false, logoURI: `${T}/mcc.jpg` },
|
|
8
|
+
{ symbol: "MCD", name: "Microcosm Dollar", mint: "MCDAhpfpKrsvXd1i95jToVd5SRL2xrZbeEriBbBJAn2", decimals: 9, color: "bg-amber-500", isStablecoin: true, logoURI: `${T}/mcd.jpg` },
|
|
9
|
+
{ symbol: "USDC", name: "USD Coin", mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", decimals: 6, color: "bg-blue-500", isStablecoin: true, logoURI: `${T}/usdc.png` },
|
|
10
|
+
{ symbol: "USDT", name: "Tether USD", mint: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", decimals: 6, color: "bg-green-500", isStablecoin: true, logoURI: `${T}/usdt.png` },
|
|
11
|
+
{ symbol: "WBTC", name: "Wrapped Bitcoin", mint: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", decimals: 8, color: "bg-orange-500", isStablecoin: false, logoURI: `${T}/wbtc.png` },
|
|
12
|
+
{ symbol: "WETH", name: "Wrapped Ether", mint: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", decimals: 8, color: "bg-blue-400", isStablecoin: false, logoURI: `${T}/weth.png` },
|
|
13
|
+
{ symbol: "JUP", name: "Jupiter", mint: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", decimals: 6, color: "bg-lime-500", isStablecoin: false, logoURI: `${T}/jup.png` },
|
|
14
|
+
{ symbol: "RAY", name: "Raydium", mint: "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", decimals: 6, color: "bg-cyan-500", isStablecoin: false, logoURI: `${T}/ray.png` },
|
|
15
|
+
{ symbol: "ORCA", name: "Orca", mint: "orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE", decimals: 6, color: "bg-yellow-500", isStablecoin: false, logoURI: `${T}/orca.png` },
|
|
16
|
+
{ symbol: "PYTH", name: "Pyth Network", mint: "HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3", decimals: 6, color: "bg-violet-500", isStablecoin: false, logoURI: `${T}/pyth.png` },
|
|
17
|
+
{ symbol: "JTO", name: "Jito", mint: "jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL", decimals: 9, color: "bg-emerald-500", isStablecoin: false, logoURI: `${T}/jto.png` },
|
|
18
|
+
{ symbol: "BONK", name: "Bonk", mint: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", decimals: 5, color: "bg-orange-400", isStablecoin: false, logoURI: `${T}/bonk.png` },
|
|
19
|
+
{ symbol: "WIF", name: "dogwifhat", mint: "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm", decimals: 6, color: "bg-pink-500", isStablecoin: false, logoURI: `${T}/wif.png` },
|
|
20
|
+
{ symbol: "RENDER", name: "Render", mint: "rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof", decimals: 8, color: "bg-teal-500", isStablecoin: false, logoURI: `${T}/render.png` },
|
|
21
|
+
{ symbol: "HNT", name: "Helium", mint: "hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux", decimals: 8, color: "bg-sky-500", isStablecoin: false, logoURI: `${T}/hnt.png` },
|
|
22
|
+
{ symbol: "W", name: "Wormhole", mint: "85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ", decimals: 6, color: "bg-slate-500", isStablecoin: false, logoURI: `${T}/w.png` },
|
|
23
|
+
{ symbol: "MSOL", name: "Marinade SOL", mint: "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So", decimals: 9, color: "bg-rose-500", isStablecoin: false, logoURI: `${T}/msol.png` },
|
|
24
|
+
{ symbol: "JITOSOL", name: "Jito Staked SOL", mint: "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn", decimals: 9, color: "bg-emerald-400", isStablecoin: false, logoURI: `${T}/jitosol.png` },
|
|
25
|
+
{ symbol: "BSOL", name: "BlazeStake SOL", mint: "bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", decimals: 9, color: "bg-orange-300", isStablecoin: false, logoURI: `${T}/bsol.png` },
|
|
26
|
+
{ symbol: "INF", name: "Infinity", mint: "5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm", decimals: 9, color: "bg-indigo-500", isStablecoin: false, logoURI: `${T}/inf.png` },
|
|
27
|
+
{ symbol: "JUPSOL", name: "Jupiter Staked SOL", mint: "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", decimals: 9, color: "bg-lime-400", isStablecoin: false, logoURI: `${T}/jupsol.png` },
|
|
28
|
+
{ symbol: "TRUMP", name: "Official Trump", mint: "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN", decimals: 6, color: "bg-red-500", isStablecoin: false, logoURI: `${T}/trump.png` },
|
|
29
|
+
{ symbol: "POPCAT", name: "Popcat", mint: "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr", decimals: 9, color: "bg-orange-300", isStablecoin: false, logoURI: `${T}/popcat.png` },
|
|
30
|
+
{ symbol: "MEW", name: "Cat in a Dogs World", mint: "MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5", decimals: 5, color: "bg-stone-500", isStablecoin: false, logoURI: `${T}/mew.png` },
|
|
31
|
+
{ symbol: "FARTCOIN", name: "Fartcoin", mint: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump", decimals: 6, color: "bg-green-400", isStablecoin: false, logoURI: `${T}/fartcoin.png` },
|
|
32
|
+
{ symbol: "PNUT", name: "Peanut the Squirrel", mint: "2qEHjDLDLbuBgRYvsxhc5D6uDWAivNFZGan56P1tpump", decimals: 6, color: "bg-amber-400", isStablecoin: false, logoURI: `${T}/pnut.png` },
|
|
33
|
+
{ symbol: "GOAT", name: "Goatseus Maximus", mint: "CzLSujWBLFsSjncfkh59rUFqvafWcY5tzedWJSuypump", decimals: 6, color: "bg-zinc-500", isStablecoin: false, logoURI: `${T}/goat.png` },
|
|
34
|
+
{ symbol: "MICHI", name: "michi", mint: "5mbK36SZ7J19An8jFochhQS4of8g6BwUjbeCSxBSoWdp", decimals: 6, color: "bg-yellow-400", isStablecoin: false, logoURI: `${T}/michi.png` },
|
|
35
|
+
{ symbol: "GIGA", name: "Gigachad", mint: "63LfDmNb3MQ8mw9MtZ2To9bEA2M71kZUUGq5tiJxcqj9", decimals: 5, color: "bg-stone-400", isStablecoin: false, logoURI: `${T}/giga.png` },
|
|
36
|
+
{ symbol: "MOTHER", name: "Mother Iggy", mint: "3S8qX1MsMqRbiwKg2cQyx7nis1oHMgaCuc9c4VfvVdPN", decimals: 6, color: "bg-pink-400", isStablecoin: false, logoURI: `${T}/mother.png` },
|
|
37
|
+
{ symbol: "SLERF", name: "Slerf", mint: "7BgBvyjrZX1YKz4oh9mjb8ZScatkkwb8DzFx7LoiVkM3", decimals: 9, color: "bg-amber-500", isStablecoin: false, logoURI: `${T}/slerf.png` },
|
|
38
|
+
{ symbol: "MOODENG", name: "Moo Deng", mint: "ED5nyyWEzpPPiWimP8vYm7sD7TD3LAt3Q3gRTWHzPJBY", decimals: 6, color: "bg-red-400", isStablecoin: false, logoURI: `${T}/moodeng.png` },
|
|
39
|
+
{ symbol: "AI16Z", name: "ai16z", mint: "HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC", decimals: 9, color: "bg-purple-400", isStablecoin: false, logoURI: `${T}/ai16z.png` },
|
|
40
|
+
{ symbol: "ARC", name: "AI Rig Complex", mint: "61V8vBaqAGMpgDQi4JcAwo1dmBGHsyhzodcPqnEVpump", decimals: 6, color: "bg-cyan-400", isStablecoin: false, logoURI: `${T}/arc.png` },
|
|
41
|
+
{ symbol: "GRIFFAIN", name: "GRIFFAIN", mint: "KENJSUYLASHUMfHyy5o4Hp2FdNqZg1AsUPhfH2kYvEP", decimals: 6, color: "bg-teal-400", isStablecoin: false, logoURI: `${T}/griffain.png` },
|
|
42
|
+
{ symbol: "ZEREBRO", name: "Zerebro", mint: "8x5VqbHA8D7NkD52uNuS5nnt3PwA8pLD34ymskeSo2Wn", decimals: 6, color: "bg-indigo-400", isStablecoin: false, logoURI: `${T}/zerebro.png` },
|
|
43
|
+
{ symbol: "LUCE", name: "Luce", mint: "CBdCxKo9QavR9hfShgpEBG3zekorAeD7W1jfq2o3pump", decimals: 6, color: "bg-yellow-300", isStablecoin: false, logoURI: `${T}/luce.png` },
|
|
44
|
+
{ symbol: "DRIFT", name: "Drift", mint: "DriFtupJYLTosbwoN8koMbEYSx54aFAVLddWsbksjwg7", decimals: 6, color: "bg-violet-400", isStablecoin: false, logoURI: `${T}/drift.png` },
|
|
45
|
+
{ symbol: "KMNO", name: "Kamino", mint: "KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS", decimals: 6, color: "bg-fuchsia-500", isStablecoin: false, logoURI: `${T}/kmno.png` },
|
|
46
|
+
{ symbol: "MNGO", name: "Mango", mint: "MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac", decimals: 6, color: "bg-orange-500", isStablecoin: false, logoURI: `${T}/mngo.png` },
|
|
47
|
+
{ symbol: "FIDA", name: "Bonfida", mint: "EchesyfXePKdLtoiZSL8pBe8Myagyy8ZRqsACNCFGnvp", decimals: 6, color: "bg-blue-400", isStablecoin: false, logoURI: `${T}/fida.png` },
|
|
48
|
+
{ symbol: "SRM", name: "Serum", mint: "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt", decimals: 6, color: "bg-cyan-300", isStablecoin: false, logoURI: `${T}/srm.png` },
|
|
49
|
+
{ symbol: "STEP", name: "Step", mint: "StepAscQoEioFxxWGnh2sLBDFp9d8rvKz2Yp39iDpyT", decimals: 9, color: "bg-amber-400", isStablecoin: false, logoURI: `${T}/step.png` },
|
|
50
|
+
{ symbol: "MAPS", name: "Maps", mint: "MAPS41MDahZ9QdKXhVa4dWB9RuyfV4XqhyAZ8XcYepb", decimals: 6, color: "bg-rose-400", isStablecoin: false, logoURI: `${T}/maps.png` },
|
|
51
|
+
{ symbol: "OXY", name: "Oxygen", mint: "z3dn17yLaGMKffVogeFHQ9zWVcXgqgf3PQnDsNs2g6M", decimals: 6, color: "bg-purple-300", isStablecoin: false, logoURI: `${T}/oxy.png` },
|
|
52
|
+
{ symbol: "DUST", name: "DUST Protocol", mint: "DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ", decimals: 9, color: "bg-stone-500", isStablecoin: false, logoURI: `${T}/dust.png` },
|
|
53
|
+
{ symbol: "FORGE", name: "Forge", mint: "FoRGERiW7odcCBGU1bztZi16osPBHjxharvDathL5eds", decimals: 9, color: "bg-orange-500", isStablecoin: false, logoURI: `${T}/forge.png` },
|
|
54
|
+
{ symbol: "AURY", name: "Aurory", mint: "AURYydfxJib1ZkTir1Jn1J9ECYUtjb6rKQVmtYaixWPP", decimals: 9, color: "bg-yellow-500", isStablecoin: false, logoURI: `${T}/aury.png` },
|
|
55
|
+
{ symbol: "PORT", name: "Port Finance", mint: "PoRTjZMPXb9T7dyU7tpLEZRQj7e6ssfAE62j2oQuc6y", decimals: 6, color: "bg-blue-300", isStablecoin: false, logoURI: `${T}/port.png` },
|
|
56
|
+
{ symbol: "LIQ", name: "LIQ", mint: "4wjPQJ6PrkC4dHhYghwJzGBVP78DkBzA2U3kHoFNBuhj", decimals: 6, color: "bg-emerald-300", isStablecoin: false, logoURI: `${T}/liq.png` },
|
|
57
|
+
{ symbol: "SUNNY", name: "Sunny", mint: "SUNNYWgPQmFxe9wTZzNK7iPnJ3vYDrkgnxJRJm1s3ag", decimals: 6, color: "bg-yellow-300", isStablecoin: false, logoURI: `${T}/sunny.png` },
|
|
58
|
+
{ symbol: "SAMO", name: "Samoyedcoin", mint: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", decimals: 9, color: "bg-orange-400", isStablecoin: false, logoURI: `${T}/samo.png` },
|
|
59
|
+
{ symbol: "SHDW", name: "Shadow Token", mint: "SHDWyBxihqiCj6YekG2GUr7wqKLeLAMK1gHZck9pL6y", decimals: 9, color: "bg-zinc-500", isStablecoin: false, logoURI: `${T}/shdw.png` },
|
|
60
|
+
{ symbol: "ATLAS", name: "Star Atlas", mint: "ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx", decimals: 8, color: "bg-indigo-300", isStablecoin: false, logoURI: `${T}/atlas.png` },
|
|
61
|
+
{ symbol: "POLIS", name: "Star Atlas DAO", mint: "poLisWXnNRwC6oBu1vHiuKQzFjGL4XDSu4g9qjz9qVk", decimals: 8, color: "bg-indigo-500", isStablecoin: false, logoURI: `${T}/polis.png` },
|
|
62
|
+
{ symbol: "BNB", name: "BNB", mint: "9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa", decimals: 8, color: "bg-yellow-500", isStablecoin: false, logoURI: `${T}/bnb.png` },
|
|
63
|
+
{ symbol: "SLND", name: "Solend", mint: "SLNDpmoWTVADgEdndyvWzroNL7zSi1dF9PC3xHGtPwp", decimals: 6, color: "bg-cyan-500", isStablecoin: false, logoURI: `${T}/slnd.png` },
|
|
64
|
+
{ symbol: "BLOCK", name: "Block", mint: "NFTUkR4u7wKxy9QLaX2TGvd9oZSWoMo4jqSJqdMb7Nk", decimals: 0, color: "bg-stone-400", isStablecoin: false, logoURI: `${T}/block.png` },
|
|
65
|
+
{ symbol: "GUAC", name: "Guacamole", mint: "AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR", decimals: 5, color: "bg-green-500", isStablecoin: false, logoURI: `${T}/guac.png` },
|
|
66
|
+
{ symbol: "SILLY", name: "Silly Dragon", mint: "7EYnhQoR9YM3N7UoaKRoA44Uy8JeaZV3qyouov87awMs", decimals: 9, color: "bg-pink-300", isStablecoin: false, logoURI: `${T}/silly.png` },
|
|
67
|
+
{ symbol: "CWIF", name: "Catwifhat", mint: "7atgF8KQo4wJrD5ATGX7t1V2zVvykPJbFfNeVf1icFv1", decimals: 2, color: "bg-stone-400", isStablecoin: false, logoURI: `${T}/cwif.png` },
|
|
68
|
+
{ symbol: "MYRO", name: "Myro", mint: "HhJpBhRRn4g56VsyLuT8DL5Bv31HkXqsrahTTUCZeZg4", decimals: 9, color: "bg-amber-400", isStablecoin: false, logoURI: `${T}/myro.png` },
|
|
69
|
+
{ symbol: "BOME", name: "BOOK OF MEME", mint: "ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82", decimals: 6, color: "bg-orange-400", isStablecoin: false, logoURI: `${T}/bome.png` },
|
|
70
|
+
{ symbol: "WEN", name: "Wen", mint: "WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk", decimals: 5, color: "bg-yellow-400", isStablecoin: false, logoURI: `${T}/wen.png` },
|
|
71
|
+
{ symbol: "SHIB", name: "Shiba Inu", mint: "CiKu4eHsVrc1eueVQeHn7qhXTcVu95gSQmBpX4utjL9z", decimals: 8, color: "bg-orange-500", isStablecoin: false, logoURI: `${T}/shib.png` },
|
|
72
|
+
{ symbol: "LDO", name: "Lido DAO", mint: "HZRCwxP2Vq9PCpPXooayhJ2bxTpo5xfpQrwB1svh332p", decimals: 8, color: "bg-cyan-400", isStablecoin: false, logoURI: `${T}/ldo.png` },
|
|
73
|
+
{ symbol: "UNI", name: "Uniswap", mint: "8FU95xFJhUUkyyCLU13HSzDLs7oC4QZdXQHL6SCeab36", decimals: 8, color: "bg-pink-500", isStablecoin: false, logoURI: `${T}/uni.png` },
|
|
74
|
+
{ symbol: "LINK", name: "Chainlink", mint: "2wpTofQ8SkACrkZWrZDjXPitYa8AwWgX8AfxdeBRRVLX", decimals: 8, color: "bg-blue-500", isStablecoin: false, logoURI: `${T}/link.png` },
|
|
75
|
+
{ symbol: "AVAX", name: "Avalanche", mint: "KgV1GvrHQmRBY8sHQQeUKwTm2r2h8t4C8qt12Cw1HVE", decimals: 8, color: "bg-red-500", isStablecoin: false, logoURI: `${T}/avax.png` },
|
|
76
|
+
{ symbol: "FTM", name: "Fantom", mint: "EsPKhGTMf3bGoy4Qm7pCv3UCcWqAmbC1UGHBTDxRjjD4", decimals: 8, color: "bg-blue-400", isStablecoin: false, logoURI: `${T}/ftm.png` },
|
|
77
|
+
{ symbol: "MATIC", name: "Polygon", mint: "Gz7VkD4MacbEB6yC5XD3HcumEiYx2EtDYYrfikGsvopG", decimals: 8, color: "bg-purple-500", isStablecoin: false, logoURI: `${T}/matic.png` },
|
|
78
|
+
{ symbol: "BAT", name: "Basic Attention", mint: "EPeUFDgHRxs9xxEPVaL6kfGQvCon7jmAWKVUHuux1Tpz", decimals: 8, color: "bg-orange-500", isStablecoin: false, logoURI: `${T}/bat.png` },
|
|
79
|
+
{ symbol: "GMT", name: "STEPN", mint: "7i5KKsX2weiTkry7jA4ZwSuXGhs5eJBEjY8vVxR4pfRx", decimals: 9, color: "bg-emerald-500", isStablecoin: false, logoURI: `${T}/gmt.png` },
|
|
80
|
+
{ symbol: "GST", name: "GST", mint: "AFbX8oGjGpmVFywbVouvhQSRmiW2aR1mohfahi4Y2AdB", decimals: 9, color: "bg-green-400", isStablecoin: false, logoURI: `${T}/gst.png` },
|
|
81
|
+
{ symbol: "STARS", name: "StarLaunch", mint: "HCgybxq5Upy8Mccihrp7EsmwwFqYZtrHrsmsKwtGXLgW", decimals: 6, color: "bg-violet-500", isStablecoin: false, logoURI: `${T}/stars.png` },
|
|
82
|
+
{ symbol: "FOXY", name: "Famous Fox", mint: "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq", decimals: 0, color: "bg-orange-400", isStablecoin: false, logoURI: `${T}/foxy.png` },
|
|
83
|
+
{ symbol: "GENE", name: "Genopets", mint: "GENEtH5amGSi8kHAtQoezp1XEXwZJ8vcuePYnXdKrMYz", decimals: 9, color: "bg-pink-500", isStablecoin: false, logoURI: `${T}/gene.png` },
|
|
84
|
+
{ symbol: "SNY", name: "Synthetify", mint: "4dmKkXNHdgYsXqBHCuMikNQWwVomZURhYvkkX5c4pQ7y", decimals: 6, color: "bg-cyan-400", isStablecoin: false, logoURI: `${T}/sny.png` },
|
|
85
|
+
{ symbol: "PRT", name: "Parrot", mint: "PRT88RkA4Kg5z7pKnezeNH4mafTvtQdfFgpQTGRjz44", decimals: 6, color: "bg-emerald-500", isStablecoin: false, logoURI: `${T}/prt.png` },
|
|
86
|
+
];
|
|
87
|
+
exports.TOKEN_BY_MINT = new Map(exports.MAINSTREAM_TOKENS.map(t => [t.mint, t]));
|
|
88
|
+
exports.TOKEN_BY_SYMBOL = new Map(exports.MAINSTREAM_TOKENS.map(t => [t.symbol, t]));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface DocItem {
|
|
2
|
+
slug: string;
|
|
3
|
+
titleKey: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
file: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DocCategory {
|
|
8
|
+
id: string;
|
|
9
|
+
titleKey: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
items: DocItem[];
|
|
12
|
+
}
|
|
13
|
+
export declare const docsCategories: DocCategory[];
|
|
14
|
+
export declare function getAllDocs(): (DocItem & {
|
|
15
|
+
categoryId: string;
|
|
16
|
+
categoryTitleKey: string;
|
|
17
|
+
})[];
|
|
18
|
+
export declare function getDocBySlug(slug: string): {
|
|
19
|
+
categoryId: string;
|
|
20
|
+
categoryTitleKey: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
titleKey: string;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
file: string;
|
|
25
|
+
} | null;
|
|
26
|
+
export declare function getCategoryById(id: string): DocCategory | undefined;
|
|
27
|
+
export declare function getAdjacentDocs(slug: string): {
|
|
28
|
+
prev: (DocItem & {
|
|
29
|
+
categoryId: string;
|
|
30
|
+
categoryTitleKey: string;
|
|
31
|
+
}) | null;
|
|
32
|
+
next: (DocItem & {
|
|
33
|
+
categoryId: string;
|
|
34
|
+
categoryTitleKey: string;
|
|
35
|
+
}) | null;
|
|
36
|
+
};
|