@microcosmmoney/portal-react 3.12.8 → 3.13.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/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 +135 -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/useMarketData.d.ts +9 -0
- package/dist/main-portal/hooks/useMarketData.js +32 -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/usePriceHistory.d.ts +9 -0
- package/dist/main-portal/hooks/usePriceHistory.js +36 -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/analytics/hooks.d.ts +139 -0
- package/dist/main-portal/lib/analytics/hooks.js +277 -0
- package/dist/main-portal/lib/analytics/index.d.ts +2 -0
- package/dist/main-portal/lib/analytics/index.js +19 -0
- package/dist/main-portal/lib/analytics/types.d.ts +611 -0
- package/dist/main-portal/lib/analytics/types.js +2 -0
- package/dist/main-portal/lib/api/account.d.ts +39 -0
- package/dist/main-portal/lib/api/account.js +86 -0
- package/dist/main-portal/lib/api/admin.d.ts +78 -0
- package/dist/main-portal/lib/api/admin.js +195 -0
- package/dist/main-portal/lib/api/analytics.d.ts +217 -0
- package/dist/main-portal/lib/api/analytics.js +55 -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/dexscreener.d.ts +126 -0
- package/dist/main-portal/lib/api/dexscreener.js +139 -0
- package/dist/main-portal/lib/api/geckoterminal.d.ts +10 -0
- package/dist/main-portal/lib/api/geckoterminal.js +43 -0
- package/dist/main-portal/lib/api/index.d.ts +16 -0
- package/dist/main-portal/lib/api/index.js +230 -0
- package/dist/main-portal/lib/api/mcc-holders.d.ts +130 -0
- package/dist/main-portal/lib/api/mcc-holders.js +47 -0
- package/dist/main-portal/lib/api/org-service-proxy.d.ts +7 -0
- package/dist/main-portal/lib/api/org-service-proxy.js +55 -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/strategies.d.ts +101 -0
- package/dist/main-portal/lib/api/strategies.js +87 -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/exchanges/config.d.ts +34 -0
- package/dist/main-portal/lib/exchanges/config.js +185 -0
- package/dist/main-portal/lib/exchanges/hooks/index.d.ts +5 -0
- package/dist/main-portal/lib/exchanges/hooks/index.js +10 -0
- package/dist/main-portal/lib/exchanges/hooks/useBinanceData.d.ts +15 -0
- package/dist/main-portal/lib/exchanges/hooks/useBinanceData.js +216 -0
- package/dist/main-portal/lib/exchanges/hooks/useBinanceDialogs.d.ts +32 -0
- package/dist/main-portal/lib/exchanges/hooks/useBinanceDialogs.js +395 -0
- package/dist/main-portal/lib/exchanges/hooks/useUserExchanges.d.ts +15 -0
- package/dist/main-portal/lib/exchanges/hooks/useUserExchanges.js +51 -0
- package/dist/main-portal/lib/exchanges/index.d.ts +4 -0
- package/dist/main-portal/lib/exchanges/index.js +21 -0
- package/dist/main-portal/lib/exchanges/types.d.ts +102 -0
- package/dist/main-portal/lib/exchanges/types.js +2 -0
- package/dist/main-portal/lib/exchanges/utils.d.ts +1 -0
- package/dist/main-portal/lib/exchanges/utils.js +10 -0
- package/dist/main-portal/lib/gcp-secrets.d.ts +7 -0
- package/dist/main-portal/lib/gcp-secrets.js +45 -0
- package/dist/main-portal/lib/mockWallet.d.ts +130 -0
- package/dist/main-portal/lib/mockWallet.js +284 -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,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
"use client";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MCCStatsSection = MCCStatsSection;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const recharts_1 = require("recharts");
|
|
9
|
+
const card_1 = require("../ui/card");
|
|
10
|
+
const chart_1 = require("../ui/chart");
|
|
11
|
+
const useStats_1 = require("../../hooks/useStats");
|
|
12
|
+
const MCCPriceContext_1 = require("../../contexts/MCCPriceContext");
|
|
13
|
+
const lucide_react_1 = require("lucide-react");
|
|
14
|
+
const next_intl_1 = require("next-intl");
|
|
15
|
+
// Labels are static English — ChartLegend/Tooltip uses i18n overrides in MCCChart
|
|
16
|
+
const chartConfig = {
|
|
17
|
+
mcc: {
|
|
18
|
+
label: "MCC",
|
|
19
|
+
color: "hsl(221, 83%, 53%)",
|
|
20
|
+
},
|
|
21
|
+
usdc: {
|
|
22
|
+
label: "Stablecoin",
|
|
23
|
+
color: "hsl(212, 95%, 68%)",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const numberFormatter = new Intl.NumberFormat("zh-CN", {
|
|
27
|
+
notation: "compact",
|
|
28
|
+
compactDisplay: "short",
|
|
29
|
+
maximumFractionDigits: 1,
|
|
30
|
+
});
|
|
31
|
+
const priceFormatter = new Intl.NumberFormat("zh-CN", {
|
|
32
|
+
minimumFractionDigits: 2,
|
|
33
|
+
maximumFractionDigits: 4,
|
|
34
|
+
});
|
|
35
|
+
const percentFormatter = new Intl.NumberFormat("zh-CN", {
|
|
36
|
+
style: "percent",
|
|
37
|
+
minimumFractionDigits: 1,
|
|
38
|
+
});
|
|
39
|
+
function MCCStatsSection() {
|
|
40
|
+
const t = (0, next_intl_1.useTranslations)("resources");
|
|
41
|
+
const { data: mccData, loading: mccLoading } = (0, useStats_1.useMCCStats)();
|
|
42
|
+
const [chartDays, setChartDays] = (0, react_1.useState)(30);
|
|
43
|
+
const { data: miningData, loading: miningLoading } = (0, useStats_1.useMiningHistory)(chartDays);
|
|
44
|
+
const ticker = (0, MCCPriceContext_1.useMCCPrice)();
|
|
45
|
+
const [rangeSummaries, setRangeSummaries] = (0, react_1.useState)({});
|
|
46
|
+
(0, react_1.useEffect)(() => {
|
|
47
|
+
const rangeDays = [30, 180, 365];
|
|
48
|
+
rangeDays.forEach(async (d) => {
|
|
49
|
+
try {
|
|
50
|
+
const res = await fetch(`/api/stats/mining-history?days=${d}`);
|
|
51
|
+
const json = await res.json();
|
|
52
|
+
if (json.success && json.data?.summary) {
|
|
53
|
+
setRangeSummaries(prev => ({
|
|
54
|
+
...prev,
|
|
55
|
+
[d]: {
|
|
56
|
+
total_mcc: json.data.summary.total_mcc,
|
|
57
|
+
total_stablecoin: json.data.summary.total_stablecoin,
|
|
58
|
+
},
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch { }
|
|
63
|
+
});
|
|
64
|
+
}, []);
|
|
65
|
+
const stats = {
|
|
66
|
+
totalSupply: 1000000000,
|
|
67
|
+
minted: mccData?.circulating_supply ?? 0,
|
|
68
|
+
currentPhase: (mccData?.current_phase ?? 0) + 1,
|
|
69
|
+
marketPrice: ticker.price ?? 0,
|
|
70
|
+
mintPrice: ticker.miningPrice ?? 0,
|
|
71
|
+
};
|
|
72
|
+
const mintedPercent = stats.minted / stats.totalSupply;
|
|
73
|
+
const loading = mccLoading || miningLoading;
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)("section", { id: "mcc", "aria-labelledby": "mcc-title", className: "min-h-screen bg-background py-20 md:py-24 px-4 sm:px-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-[1400px] mx-auto", children: [(0, jsx_runtime_1.jsxs)("header", { className: "text-center mb-12 md:mb-16", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm uppercase tracking-widest text-[#5EEAD4] mb-3 md:mb-4", children: "MCC STATISTICS" }), (0, jsx_runtime_1.jsx)("h2", { id: "mcc-title", className: "font-sans font-bold text-3xl sm:text-4xl md:text-5xl text-foreground mb-3 md:mb-4 text-balance", children: t("mccStatsTitle") }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-sm sm:text-base text-foreground/60 max-w-2xl mx-auto leading-relaxed", children: t("mccStatsSubtitle") })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-5 gap-3 md:gap-4 mb-12 md:mb-16", role: "list", "aria-label": t("mccStatsAriaLabel"), children: [(0, jsx_runtime_1.jsx)(StatCard, { label: t("totalSupply"), value: numberFormatter.format(stats.totalSupply), sublabel: t("neverInflate") }), (0, jsx_runtime_1.jsx)(StatCard, { label: t("minted"), value: numberFormatter.format(stats.minted), sublabel: percentFormatter.format(mintedPercent), highlight: true }), (0, jsx_runtime_1.jsx)(StatCard, { label: t("currentPhase"), value: t("phaseN", { phase: stats.currentPhase }), sublabel: t("halvingCycle") }), (0, jsx_runtime_1.jsx)(StatCard, { label: t("marketPrice"), value: stats.marketPrice > 0 ? `$${priceFormatter.format(stats.marketPrice)}` : "...", sublabel: t("realTimePrice"), highlightColor: "blue" }), (0, jsx_runtime_1.jsx)(StatCard, { label: t("mintPrice"), value: stats.mintPrice > 0 ? `$${priceFormatter.format(stats.mintPrice)}` : "...", sublabel: t("currentMint"), highlight: true })] }), (0, jsx_runtime_1.jsx)(MCCChart, { chartData: miningData?.history ?? [], loading: loading, totalTx: miningData?.summary?.total_tx ?? 0, rangeSummaries: rangeSummaries, activeDays: chartDays, onDaysChange: setChartDays }), (0, jsx_runtime_1.jsx)(StreamFlowLockSection, {})] }) }));
|
|
75
|
+
}
|
|
76
|
+
function StatCard({ label, value, sublabel, highlight = false, highlightColor, }) {
|
|
77
|
+
const colorClass = highlightColor === "blue"
|
|
78
|
+
? "text-[#5EBCD4]"
|
|
79
|
+
: highlight
|
|
80
|
+
? "text-[#5EEAD4]"
|
|
81
|
+
: "text-foreground";
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)("article", { role: "listitem", className: "border border-border/30 bg-background/50 rounded-lg p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs uppercase tracking-widest text-foreground/50 mb-1.5 md:mb-2", children: label }), (0, jsx_runtime_1.jsx)("p", { className: `font-sans font-bold text-xl sm:text-2xl md:text-3xl tabular-nums ${colorClass}`, children: value }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/40 mt-1 tabular-nums", children: sublabel })] }));
|
|
83
|
+
}
|
|
84
|
+
const TIME_RANGES = [
|
|
85
|
+
{ days: 30, labelKey: "range30d" },
|
|
86
|
+
{ days: 180, labelKey: "range180d" },
|
|
87
|
+
{ days: 365, labelKey: "range1y" },
|
|
88
|
+
];
|
|
89
|
+
function MCCChart({ chartData, loading, totalTx, rangeSummaries, activeDays, onDaysChange, }) {
|
|
90
|
+
const t = (0, next_intl_1.useTranslations)("resources");
|
|
91
|
+
const filled = (() => {
|
|
92
|
+
if (chartData.length === 0)
|
|
93
|
+
return [];
|
|
94
|
+
const sorted = [...chartData].sort((a, b) => a.date.localeCompare(b.date));
|
|
95
|
+
const map = new Map(sorted.map(d => [d.date, d]));
|
|
96
|
+
const start = new Date(sorted[0].date);
|
|
97
|
+
const end = new Date();
|
|
98
|
+
const result = [];
|
|
99
|
+
for (let d = new Date(start); d <= end; d.setDate(d.getDate() + 1)) {
|
|
100
|
+
const key = d.toISOString().slice(0, 10);
|
|
101
|
+
const row = map.get(key);
|
|
102
|
+
result.push({
|
|
103
|
+
date: key,
|
|
104
|
+
mcc: row ? row.total_mcc : 0,
|
|
105
|
+
usdc: row ? row.usdc_amount + row.usdt_amount : 0,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
|
+
})();
|
|
110
|
+
const fmtCompact = (n) => {
|
|
111
|
+
if (n >= 1000000000)
|
|
112
|
+
return `${(n / 1000000000).toFixed(2)}B`;
|
|
113
|
+
if (n >= 1000000)
|
|
114
|
+
return `${(n / 1000000).toFixed(2)}M`;
|
|
115
|
+
if (n >= 1000)
|
|
116
|
+
return `${(n / 1000).toFixed(2)}K`;
|
|
117
|
+
return n.toLocaleString();
|
|
118
|
+
};
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-background/50 border-border/30 blockchain-card py-0", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "flex flex-col items-stretch border-b border-border/30 p-0 sm:flex-row", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-foreground", children: t("dailyMintOutput") }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-foreground/60", children: t("dailyMintDesc", { count: totalTx }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex", children: TIME_RANGES.map((range) => {
|
|
120
|
+
const isActive = activeDays === range.days;
|
|
121
|
+
const s = rangeSummaries[range.days];
|
|
122
|
+
return ((0, jsx_runtime_1.jsxs)("button", { "data-active": isActive, className: "relative z-10 flex flex-1 flex-col justify-center gap-1 border-t border-border/30 px-4 py-3 text-left even:border-l even:border-border/30 data-[active=true]:bg-muted/50 sm:border-t-0 sm:border-l sm:border-border/30 sm:px-6 sm:py-4", onClick: () => onDaysChange(range.days), children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-foreground/50", children: t(range.labelKey) }), !s ? ((0, jsx_runtime_1.jsx)("span", { className: "text-lg font-bold leading-none text-foreground/30 sm:text-2xl", children: "..." })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-lg font-bold leading-none tabular-nums sm:text-2xl", style: { color: "hsl(221, 83%, 53%)" }, children: fmtCompact(s.total_mcc) }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-semibold leading-none tabular-nums mt-1", style: { color: "hsl(212, 95%, 68%)" }, children: fmtCompact(s.total_stablecoin) })] }))] }, range.days));
|
|
123
|
+
}) })] }), (0, jsx_runtime_1.jsx)(card_1.CardContent, { className: "px-2 pt-4 pb-6 sm:px-6 sm:pt-6 sm:pb-8", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center h-[250px]", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "w-6 h-6 animate-spin text-[#5EEAD4]" }) })) : ((0, jsx_runtime_1.jsx)(chart_1.ChartContainer, { config: chartConfig, className: "aspect-auto h-[250px] w-full", children: (0, jsx_runtime_1.jsxs)(recharts_1.AreaChart, { data: filled, margin: { bottom: 20 }, children: [(0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: "fillMCC", x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: "var(--color-mcc)", stopOpacity: 0.8 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: "var(--color-mcc)", stopOpacity: 0.1 })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: "fillUSDC", x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: "var(--color-usdc)", stopOpacity: 0.8 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: "var(--color-usdc)", stopOpacity: 0.1 })] })] }), (0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { vertical: false }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "date", tickLine: false, axisLine: false, tickMargin: 8, minTickGap: 32, tickFormatter: (value) => {
|
|
124
|
+
const date = new Date(value);
|
|
125
|
+
return date.toLocaleDateString("zh-CN", {
|
|
126
|
+
month: "short",
|
|
127
|
+
day: "numeric",
|
|
128
|
+
});
|
|
129
|
+
} }), (0, jsx_runtime_1.jsx)(chart_1.ChartTooltip, { cursor: false, content: (0, jsx_runtime_1.jsx)(chart_1.ChartTooltipContent, { labelFormatter: (value) => {
|
|
130
|
+
return new Date(value).toLocaleDateString("zh-CN", {
|
|
131
|
+
month: "short",
|
|
132
|
+
day: "numeric",
|
|
133
|
+
});
|
|
134
|
+
}, indicator: "dot" }) }), (0, jsx_runtime_1.jsx)(recharts_1.Area, { dataKey: "usdc", type: "natural", fill: "url(#fillUSDC)", stroke: "var(--color-usdc)", stackId: "a" }), (0, jsx_runtime_1.jsx)(recharts_1.Area, { dataKey: "mcc", type: "natural", fill: "url(#fillMCC)", stroke: "var(--color-mcc)", stackId: "a" }), (0, jsx_runtime_1.jsx)(chart_1.ChartLegend, { content: (0, jsx_runtime_1.jsx)(chart_1.ChartLegendContent, {}) })] }) })) })] }));
|
|
135
|
+
}
|
|
136
|
+
const STREAMFLOW_LOCKS = [
|
|
137
|
+
{ name: "Y1", stream: "DH1WCckEtdxZJPD588oQEfb4wHXoaxqJ19MpUE2Jbhyf", total: 1200000, monthly: 100000, periods: 12, cliffMonths: 0, year: "2026" },
|
|
138
|
+
{ name: "Y2", stream: "2TnJxCfxbFxeiJV1eUimi9PFsQgLRHBPV4P7JqZSPf6a", total: 2400000, monthly: 200000, periods: 12, cliffMonths: 12, year: "2027" },
|
|
139
|
+
{ name: "Y3", stream: "Fj262ioHH3gt23WAeW1HTLJmg9qPhjv4D8oeqMnJzyRb", total: 4800000, monthly: 400000, periods: 12, cliffMonths: 24, year: "2028" },
|
|
140
|
+
{ name: "Y4", stream: "69Yshu5JgxceqE6aLrkLEz5PQuFeLnP46xFd2nCFzQWY", total: 9600000, monthly: 800000, periods: 12, cliffMonths: 36, year: "2029" },
|
|
141
|
+
{ name: "Y5", stream: "BUYad5uqQTGB5kGEQreoxnQ432XVaYcqgJSCL8v1AHYU", total: 19200000, monthly: 1600000, periods: 12, cliffMonths: 48, year: "2030" },
|
|
142
|
+
{ name: "Y6", stream: "CKCD19Q41yM4ULeoWWvfiHkFsCBRZ2zrq5fWQS8NAw7F", total: 38400000, monthly: 3200000, periods: 12, cliffMonths: 60, year: "2031" },
|
|
143
|
+
{ name: "Y7", stream: "DErJ2g3X3stH2jkeAuracUutfNQQ5gfwHPaysUbvjGsn", total: 76800000, monthly: 6400000, periods: 12, cliffMonths: 72, year: "2032" },
|
|
144
|
+
{ name: "Y8", stream: "93e1DnLwvHjWhmntggm9vSz9bbc25MiNWFZmscKXdPpy", total: 153600000, monthly: 12800000, periods: 12, cliffMonths: 84, year: "2033" },
|
|
145
|
+
{ name: "Y9", stream: "5isyXJXWJTAdrSacPkmgYL9eHzfdUvqKTwF4Lgra13r", total: 307200000, monthly: 25600000, periods: 12, cliffMonths: 96, year: "2034" },
|
|
146
|
+
{ name: "Y10", stream: "DeWpZu5YVkBckEQNVwToW3R286biv5Cs5p68rMhZkuyk", total: 386700000, monthly: 48337500, periods: 8, cliffMonths: 108, year: "2035-36" },
|
|
147
|
+
];
|
|
148
|
+
const LOCK_START = new Date("2026-03-01T17:32:00Z");
|
|
149
|
+
const TOTAL_LOCKED = 999900000;
|
|
150
|
+
const POOL_PDA = "GSBWtaX9WcBh8jUcmbXtQ1afQPHKSUKvsTxkqpJU3G9S";
|
|
151
|
+
function getReleasedAmount() {
|
|
152
|
+
const now = Date.now();
|
|
153
|
+
const elapsed = now - LOCK_START.getTime();
|
|
154
|
+
if (elapsed <= 0)
|
|
155
|
+
return { released: 0, currentTranche: "Y1" };
|
|
156
|
+
const PERIOD_MS = 30 * 24 * 3600 * 1000;
|
|
157
|
+
let totalReleased = 0;
|
|
158
|
+
let currentTranche = "Y1";
|
|
159
|
+
for (const lock of STREAMFLOW_LOCKS) {
|
|
160
|
+
const cliffMs = lock.cliffMonths * PERIOD_MS;
|
|
161
|
+
if (elapsed <= cliffMs)
|
|
162
|
+
continue;
|
|
163
|
+
const timeSinceCliff = elapsed - cliffMs;
|
|
164
|
+
const periodsElapsed = Math.min(Math.floor(timeSinceCliff / PERIOD_MS), lock.periods);
|
|
165
|
+
const released = periodsElapsed * lock.monthly;
|
|
166
|
+
totalReleased += Math.min(released, lock.total);
|
|
167
|
+
if (periodsElapsed > 0 && periodsElapsed < lock.periods) {
|
|
168
|
+
currentTranche = lock.name;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return { released: totalReleased, currentTranche };
|
|
172
|
+
}
|
|
173
|
+
function StreamFlowLockSection() {
|
|
174
|
+
const t = (0, next_intl_1.useTranslations)("resources");
|
|
175
|
+
const { released, currentTranche } = getReleasedAmount();
|
|
176
|
+
const releasedPct = (released / TOTAL_LOCKED) * 100;
|
|
177
|
+
const [miningVaultMcc, setMiningVaultMcc] = (0, react_1.useState)(null);
|
|
178
|
+
(0, react_1.useEffect)(() => {
|
|
179
|
+
fetch("/api/blockchain-service/blockchain/balance/pool/reincarnation")
|
|
180
|
+
.then(r => r.json())
|
|
181
|
+
.then(res => {
|
|
182
|
+
if (res?.success && res?.data?.mining_vault_mcc != null) {
|
|
183
|
+
setMiningVaultMcc(Number(res.data.mining_vault_mcc));
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
.catch(() => { });
|
|
187
|
+
}, []);
|
|
188
|
+
const fmtAmount = (n) => {
|
|
189
|
+
if (n >= 1000000)
|
|
190
|
+
return `${(n / 1000000).toFixed(1)}M`;
|
|
191
|
+
if (n >= 1000)
|
|
192
|
+
return `${(n / 1000).toFixed(0)}K`;
|
|
193
|
+
return n.toLocaleString();
|
|
194
|
+
};
|
|
195
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "mt-12 md:mt-16", children: (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-background/50 border-border/30 blockchain-card", children: [(0, jsx_runtime_1.jsx)(card_1.CardHeader, { className: "border-b border-border/30 py-5", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Lock, { className: "w-5 h-5 text-[#5EEAD4]" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-foreground", children: t("streamflowTitle") }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-foreground/60", children: t("streamflowDesc") })] })] }) }), (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-4 sm:p-6 space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] uppercase tracking-widest text-foreground/50 mb-1", children: t("totalLocked") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-lg text-[#5EEAD4] tabular-nums", children: "999.9M" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] uppercase tracking-widest text-foreground/50 mb-1", children: t("released") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-lg text-foreground tabular-nums", children: fmtAmount(released) }), (0, jsx_runtime_1.jsxs)("p", { className: "font-mono text-[10px] text-foreground/40", children: [releasedPct.toFixed(2), "%"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] uppercase tracking-widest text-foreground/50 mb-1", children: t("currentTranche") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-lg text-foreground", children: currentTranche }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40", children: t("releasing") })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] uppercase tracking-widest text-foreground/50 mb-1", children: t("receiverAddress") }), (0, jsx_runtime_1.jsxs)("p", { className: "font-sans font-bold text-sm text-foreground truncate", title: POOL_PDA, children: [POOL_PDA.slice(0, 8), "...", POOL_PDA.slice(-4)] }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40", children: "Pool PDA" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between text-xs font-mono text-foreground/50", children: [(0, jsx_runtime_1.jsx)("span", { children: t("releaseProgress") }), (0, jsx_runtime_1.jsxs)("span", { children: [fmtAmount(released), " / ", fmtAmount(TOTAL_LOCKED)] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-border/30 rounded-full h-2.5", children: (0, jsx_runtime_1.jsx)("div", { className: "bg-[#5EEAD4] h-2.5 rounded-full transition-all duration-700", style: { width: `${Math.max(releasedPct, 0.5)}%` } }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-border/30", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pr-6", children: t("lockTablePeriod") }), (0, jsx_runtime_1.jsx)("th", { className: "text-left font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pr-6", children: t("lockTableYear") }), (0, jsx_runtime_1.jsx)("th", { className: "text-right font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pr-6", children: t("lockTableTotal") }), (0, jsx_runtime_1.jsx)("th", { className: "text-right font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pr-6", children: t("lockTableMonthly") }), (0, jsx_runtime_1.jsx)("th", { className: "text-right font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pr-6", children: t("lockTableVault") }), (0, jsx_runtime_1.jsx)("th", { className: "text-left font-mono text-[10px] uppercase tracking-widest text-foreground/50 py-2 pl-2", children: t("lockTableAddress") })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: STREAMFLOW_LOCKS.map((lock) => {
|
|
196
|
+
const isActive = lock.name === currentTranche;
|
|
197
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { className: `border-b border-border/20 ${isActive ? "bg-[#5EEAD4]/5" : ""}`, children: [(0, jsx_runtime_1.jsxs)("td", { className: `py-2.5 pr-6 font-mono text-sm ${isActive ? "text-[#5EEAD4] font-bold" : "text-foreground/70"}`, children: [lock.name, isActive && (0, jsx_runtime_1.jsx)("span", { className: "ml-1.5 inline-block w-1.5 h-1.5 rounded-full bg-[#5EEAD4] animate-pulse" })] }), (0, jsx_runtime_1.jsx)("td", { className: "py-2.5 pr-6 font-mono text-sm text-foreground/60", children: lock.year }), (0, jsx_runtime_1.jsx)("td", { className: "py-2.5 pr-6 font-mono text-sm text-foreground tabular-nums text-right", children: fmtAmount(lock.total) }), (0, jsx_runtime_1.jsxs)("td", { className: "py-2.5 pr-6 font-mono text-sm text-foreground/60 tabular-nums text-right", children: [fmtAmount(lock.monthly), t("perMonth")] }), (0, jsx_runtime_1.jsx)("td", { className: "py-2.5 pr-6 font-mono text-sm tabular-nums text-right", children: isActive && miningVaultMcc !== null ? ((0, jsx_runtime_1.jsxs)("span", { className: "text-[#5EEAD4] font-bold", children: [fmtAmount(Math.round(miningVaultMcc)), " MCC"] })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-foreground/20", children: "\u2014" })) }), (0, jsx_runtime_1.jsx)("td", { className: "py-2.5 pl-2", children: (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${lock.stream}`, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 font-mono text-xs text-[#5EEAD4]/70 hover:text-[#5EEAD4] transition-colors", children: [lock.stream.slice(0, 8), "...", lock.stream.slice(-4), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "w-3 h-3" })] }) })] }, lock.name));
|
|
198
|
+
}) })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-2 text-[10px] font-mono text-foreground/40", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded bg-border/20", children: "cancelable = false" }), (0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded bg-border/20", children: "transferable = false" }), (0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded bg-border/20", children: t("lockCreated") }), (0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded bg-border/20", children: "MCC Mint: MCCn6eq...Csb" })] })] })] }) }));
|
|
199
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MCDStatsSection(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
"use client";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MCDStatsSection = MCDStatsSection;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const recharts_1 = require("recharts");
|
|
8
|
+
const card_1 = require("../ui/card");
|
|
9
|
+
const chart_1 = require("../ui/chart");
|
|
10
|
+
const lucide_react_1 = require("lucide-react");
|
|
11
|
+
const useStats_1 = require("../../hooks/useStats");
|
|
12
|
+
const next_intl_1 = require("next-intl");
|
|
13
|
+
const compactFormatter = new Intl.NumberFormat("en-US", {
|
|
14
|
+
notation: "compact",
|
|
15
|
+
compactDisplay: "short",
|
|
16
|
+
maximumFractionDigits: 2,
|
|
17
|
+
});
|
|
18
|
+
const percentFormatter = new Intl.NumberFormat("en-US", {
|
|
19
|
+
style: "percent",
|
|
20
|
+
minimumFractionDigits: 1,
|
|
21
|
+
maximumFractionDigits: 1,
|
|
22
|
+
});
|
|
23
|
+
const numberFormatter = new Intl.NumberFormat("en-US");
|
|
24
|
+
// distributionData will be built dynamically from API
|
|
25
|
+
const pieChartColors = {
|
|
26
|
+
genesis: "hsl(168, 80%, 40%)",
|
|
27
|
+
vaults: "hsl(166, 76%, 64%)",
|
|
28
|
+
users: "hsl(190, 62%, 60%)",
|
|
29
|
+
developer: "hsl(190, 62%, 60%)",
|
|
30
|
+
};
|
|
31
|
+
function MCDStatsSection() {
|
|
32
|
+
const t = (0, next_intl_1.useTranslations)("resources");
|
|
33
|
+
const { data: mcdData, loading } = (0, useStats_1.useMCDStats)();
|
|
34
|
+
const pieChartConfig = {
|
|
35
|
+
genesis: { label: t("genesisPool"), color: pieChartColors.genesis },
|
|
36
|
+
vaults: { label: t("territoryVaultsLabel"), color: pieChartColors.vaults },
|
|
37
|
+
users: { label: t("userHoldingLabel"), color: pieChartColors.users },
|
|
38
|
+
};
|
|
39
|
+
const stats = {
|
|
40
|
+
totalSupply: 10000000000,
|
|
41
|
+
genesisPool: mcdData?.genesis_pool_balance ?? 10000000000,
|
|
42
|
+
stationVaults: mcdData?.total_vault_balance ?? 0,
|
|
43
|
+
userBalances: mcdData?.user_balance ?? 0,
|
|
44
|
+
dailyDistribution: mcdData?.daily_distribution ?? 0,
|
|
45
|
+
secondaryMarket: 0,
|
|
46
|
+
mcdMiningUsed: 0,
|
|
47
|
+
activeStations: mcdData?.active_vaults ?? 0,
|
|
48
|
+
activeMiner: mcdData?.holders_count ?? 0,
|
|
49
|
+
};
|
|
50
|
+
const distributionData = [
|
|
51
|
+
{ name: "Genesis Pool", value: stats.genesisPool, color: "hsl(168, 80%, 40%)" },
|
|
52
|
+
{ name: "Station Vaults", value: stats.stationVaults, color: "hsl(166, 76%, 64%)" },
|
|
53
|
+
{ name: "User Balances", value: stats.userBalances, color: "hsl(195, 54%, 53%)" },
|
|
54
|
+
];
|
|
55
|
+
const formatNumber = (num) => compactFormatter.format(num);
|
|
56
|
+
const formatFullNumber = (num) => numberFormatter.format(num);
|
|
57
|
+
const totalDistributed = stats.stationVaults + stats.userBalances;
|
|
58
|
+
const distributionRatio = totalDistributed / stats.totalSupply;
|
|
59
|
+
const distributionPercent = percentFormatter.format(distributionRatio);
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)("section", { id: "mcd", "aria-labelledby": "mcd-title", className: "min-h-screen bg-background py-20 md:py-24 px-4 sm:px-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-[1400px] mx-auto", children: [(0, jsx_runtime_1.jsxs)("header", { className: "text-center mb-12 md:mb-16", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm uppercase tracking-widest text-[#5EEAD4] mb-3 md:mb-4", children: "MCD CREDITS" }), (0, jsx_runtime_1.jsx)("h2", { id: "mcd-title", className: "font-sans font-bold text-3xl sm:text-4xl md:text-5xl text-foreground mb-4 md:mb-5 text-balance", children: t("mcdTitle") }), (0, jsx_runtime_1.jsxs)("div", { className: "max-w-3xl mx-auto space-y-2", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-sm sm:text-base text-foreground/60 text-balance", children: t("mcdDesc1") }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-foreground/40 text-balance", children: t("mcdDesc2") })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3 md:gap-4 mb-8", role: "list", "aria-label": t("mcdStatsAriaLabel"), children: [(0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Coins, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#5EEAD4]" }), label: t("totalSupply"), value: formatNumber(stats.totalSupply), sublabel: t("fixedIssuance") }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Vault, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#5EEAD4]" }), label: t("vaultStorage"), value: formatNumber(stats.stationVaults), sublabel: t("nStations", { count: formatFullNumber(stats.activeStations) }), highlight: true }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#5EBCD4]" }), label: t("userHolding"), value: formatNumber(stats.userBalances), sublabel: t("nMiners", { count: formatFullNumber(stats.activeMiner) }), highlightColor: "blue" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.CalendarDays, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#5EBCD4]" }), label: t("dailyDistributionLabel"), value: formatNumber(stats.dailyDistribution), sublabel: t("dailyToMiners"), highlightColor: "blue" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.BarChart3, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#2DD4BF]" }), label: t("secondaryMarket"), value: formatNumber(stats.secondaryMarket), sublabel: t("onchainCirculation") }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pickaxe, { className: "w-4 h-4 sm:w-5 sm:h-5 text-[#2DD4BF]" }), label: t("mcdMinting"), value: formatNumber(stats.mcdMiningUsed), sublabel: t("usedForMCCMint") })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 md:gap-8 mb-8", children: [(0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-background/50 border-border/30 rounded-lg blockchain-card", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "p-4 sm:p-6", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-foreground text-lg sm:text-xl", children: t("mcdDistribution") }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-foreground/60 text-sm", children: t("mcdDistributionDesc") })] }), (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-4 sm:p-6 pt-0", children: [(0, jsx_runtime_1.jsx)(chart_1.ChartContainer, { config: pieChartConfig, className: "h-[240px] sm:h-[280px] w-full", "aria-label": t("mcdDistributionChartLabel"), children: (0, jsx_runtime_1.jsx)(recharts_1.ResponsiveContainer, { width: "100%", height: "100%", children: (0, jsx_runtime_1.jsxs)(recharts_1.PieChart, { children: [(0, jsx_runtime_1.jsx)(recharts_1.Pie, { data: distributionData, cx: "50%", cy: "50%", innerRadius: 50, outerRadius: 85, paddingAngle: 2, dataKey: "value", children: distributionData.map((entry, index) => ((0, jsx_runtime_1.jsx)(recharts_1.Cell, { fill: entry.color }, `cell-${index}`))) }), (0, jsx_runtime_1.jsx)(chart_1.ChartTooltip, { content: (0, jsx_runtime_1.jsx)(chart_1.ChartTooltipContent, { formatter: (value) => formatNumber(Number(value)) }) })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 gap-3 sm:gap-4 mt-4", role: "list", "aria-label": t("distributionLegendLabel"), children: distributionData.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", role: "listitem", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-3 h-3 rounded-full flex-shrink-0", style: { backgroundColor: item.color }, "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/60", children: item.name }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-foreground tabular-nums", children: formatNumber(item.value) })] })] }, item.name))) })] })] }), (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-background/50 border-border/30 rounded-lg blockchain-card", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "p-4 sm:p-6", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-foreground text-lg sm:text-xl", children: t("mcdCurrentStatus") }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-foreground/60 text-sm", children: t("mcdCurrentStatusDesc") })] }), (0, jsx_runtime_1.jsx)(card_1.CardContent, { className: "p-4 sm:p-6 pt-0", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-16", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "w-6 h-6 animate-spin text-[#5EEAD4]" }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-4 text-center blockchain-card", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/50 uppercase tracking-widest mb-1", children: t("vaultStorageLabel") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-2xl text-[#5EEAD4] tabular-nums", children: formatNumber(stats.stationVaults) }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40 mt-1", children: t("activeVaults", { count: stats.activeStations }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-4 text-center blockchain-card", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/50 uppercase tracking-widest mb-1", children: t("userHoldingLabel") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-2xl text-[#5EBCD4] tabular-nums", children: formatNumber(stats.userBalances) }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40 mt-1", children: t("nHolders", { count: stats.activeMiner }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-4 text-center blockchain-card", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/50 uppercase tracking-widest mb-1", children: t("dailyDistributionRate") }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-bold text-xl text-foreground tabular-nums", children: mcdData?.daily_distribution_rate ? `${(mcdData.daily_distribution_rate * 100).toFixed(1)}%` : "1.0%" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-foreground/40 mt-1", children: t("vaultDistributeToMiner") })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: "hsl(166, 76%, 64%)" } }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-[10px] sm:text-xs text-foreground/60", children: t("vaultStorageLabel") })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: "hsl(190, 62%, 60%)" } }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-[10px] sm:text-xs text-foreground/60", children: t("userHoldingLabel") })] })] })] })) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 md:gap-5 mb-8", children: [(0, jsx_runtime_1.jsx)(FlowStep, { number: 1, title: t("companionMining"), description: t("companionMiningDesc"), color: "green" }), (0, jsx_runtime_1.jsx)(FlowStep, { number: 2, title: t("vaultAccumulation"), description: t("vaultAccumulationDesc"), color: "green" }), (0, jsx_runtime_1.jsx)(FlowStep, { number: 3, title: t("dailyDistribution"), description: t("dailyDistributionDesc"), color: "blue" })] }), (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-background/50 border-border/30 rounded-lg blockchain-card", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "p-4 sm:p-6", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-foreground text-lg sm:text-xl", children: t("distributionProgress") }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-foreground/60 text-sm", children: t("distributionProgressDesc") })] }), (0, jsx_runtime_1.jsx)(card_1.CardContent, { className: "p-4 sm:p-6 pt-0", children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row justify-between gap-1 sm:gap-0 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-foreground/60", children: t("distributed") }), (0, jsx_runtime_1.jsxs)("span", { className: "font-mono text-foreground tabular-nums", children: [formatNumber(totalDistributed), " / ", formatNumber(stats.totalSupply), " (", distributionPercent, ")"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "h-3 sm:h-4 bg-muted rounded-full overflow-hidden", role: "progressbar", "aria-valuenow": Math.round(distributionRatio * 100), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": `${t("distributionProgress")} ${distributionPercent}`, children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-gradient-to-r from-[#14B8A6] to-[#5EEAD4] transition-all duration-500 ease-out", style: { width: `${distributionRatio * 100}%` } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-3 gap-2 sm:gap-4 text-center", role: "list", "aria-label": t("mcdDistributionDetails"), children: [(0, jsx_runtime_1.jsxs)("div", { role: "listitem", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/40", children: t("genesisPoolRemaining") }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-[#14B8A6] tabular-nums", children: formatNumber(stats.genesisPool) })] }), (0, jsx_runtime_1.jsxs)("div", { role: "listitem", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/40", children: t("territoryVaultsLabel") }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-[#5EEAD4] tabular-nums", children: formatNumber(stats.stationVaults) })] }), (0, jsx_runtime_1.jsxs)("div", { role: "listitem", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/40", children: t("userHoldingLabel") }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-[#5EBCD4] tabular-nums", children: formatNumber(stats.userBalances) })] })] })] }) })] })] }) }));
|
|
61
|
+
}
|
|
62
|
+
function StatCard({ icon, label, value, sublabel, highlight = false, highlightColor, }) {
|
|
63
|
+
const colorClass = highlightColor === "blue"
|
|
64
|
+
? "text-[#5EBCD4]"
|
|
65
|
+
: highlight
|
|
66
|
+
? "text-[#5EEAD4]"
|
|
67
|
+
: "text-foreground";
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-background/50 border-border/30 rounded-lg blockchain-card", role: "listitem", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-4 sm:pt-6 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 sm:gap-2 mb-1.5 sm:mb-2", children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: icon }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[9px] sm:text-[10px] uppercase tracking-widest text-foreground/50", children: label })] }), (0, jsx_runtime_1.jsx)("p", { className: `font-sans font-bold text-xl sm:text-2xl tabular-nums ${colorClass}`, children: value }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/40 mt-1 tabular-nums", children: sublabel })] }) }));
|
|
69
|
+
}
|
|
70
|
+
function FlowStep({ number, title, description, color, }) {
|
|
71
|
+
const colorClasses = {
|
|
72
|
+
green: "bg-[#5EEAD4]/15 text-[#5EEAD4] border-[#5EEAD4]/25",
|
|
73
|
+
blue: "bg-[#5EBCD4]/15 text-[#5EBCD4] border-[#5EBCD4]/25",
|
|
74
|
+
};
|
|
75
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "border border-border/30 bg-background/50 rounded-lg p-5 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: `w-8 h-8 rounded-full flex items-center justify-center border mb-3 ${colorClasses[color]}`, "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-sm font-bold", children: number }) }), (0, jsx_runtime_1.jsx)("p", { className: "font-sans font-medium text-sm sm:text-base text-foreground mb-1.5", children: title }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] sm:text-xs text-foreground/50 leading-relaxed", children: description })] }));
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MintingEntrySection(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AI-generated · AI-managed · AI-maintained
|
|
3
|
+
"use client";
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.MintingEntrySection = MintingEntrySection;
|
|
9
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const card_1 = require("../ui/card");
|
|
12
|
+
const lucide_react_1 = require("lucide-react");
|
|
13
|
+
const wallet_adapter_react_1 = require("@solana/wallet-adapter-react");
|
|
14
|
+
const wallet_adapter_react_ui_1 = require("@solana/wallet-adapter-react-ui");
|
|
15
|
+
const api_1 = require("../../lib/api");
|
|
16
|
+
const blockchain_1 = require("../../lib/api/blockchain");
|
|
17
|
+
const registration_prompt_1 = __importDefault(require("./registration-prompt"));
|
|
18
|
+
const public_mining_modal_1 = __importDefault(require("./public-mining-modal"));
|
|
19
|
+
function MintingEntrySection() {
|
|
20
|
+
const { connected, publicKey } = (0, wallet_adapter_react_1.useWallet)();
|
|
21
|
+
const [ratioInfo, setRatioInfo] = (0, react_1.useState)(null);
|
|
22
|
+
const [showRegistrationPrompt, setShowRegistrationPrompt] = (0, react_1.useState)(false);
|
|
23
|
+
const [showMiningModal, setShowMiningModal] = (0, react_1.useState)(false);
|
|
24
|
+
const [showConnectWalletStep, setShowConnectWalletStep] = (0, react_1.useState)(false);
|
|
25
|
+
const [activeTokenType, setActiveTokenType] = (0, react_1.useState)('mcc');
|
|
26
|
+
const loadRatioInfo = (0, react_1.useCallback)(async () => {
|
|
27
|
+
try {
|
|
28
|
+
const response = await (0, api_1.getMiningRatio)();
|
|
29
|
+
if (response.success && response.data) {
|
|
30
|
+
setRatioInfo(response.data);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
console.error("Failed to load mining ratio:", err);
|
|
35
|
+
}
|
|
36
|
+
}, []);
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
38
|
+
loadRatioInfo();
|
|
39
|
+
}, [loadRatioInfo]);
|
|
40
|
+
const handleMintClick = (tokenType) => {
|
|
41
|
+
setActiveTokenType(tokenType);
|
|
42
|
+
setShowRegistrationPrompt(true);
|
|
43
|
+
};
|
|
44
|
+
const handleRegistrationSkip = () => {
|
|
45
|
+
setShowRegistrationPrompt(false);
|
|
46
|
+
setShowMiningModal(true);
|
|
47
|
+
};
|
|
48
|
+
const handleRegistrationRegister = () => {
|
|
49
|
+
setShowRegistrationPrompt(false);
|
|
50
|
+
window.open("/login", "_blank");
|
|
51
|
+
};
|
|
52
|
+
const handleStartMining = () => {
|
|
53
|
+
setShowConnectWalletStep(false);
|
|
54
|
+
setShowMiningModal(true);
|
|
55
|
+
};
|
|
56
|
+
const mccPrice = ratioInfo
|
|
57
|
+
? (ratioInfo.usdc_per_mcc * 4).toFixed(2)
|
|
58
|
+
: "—";
|
|
59
|
+
return ((0, jsx_runtime_1.jsxs)("section", { id: "minting", "aria-labelledby": "minting-title", className: "bg-neutral-900/30 py-20 md:py-24 px-4 sm:px-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "max-w-[1400px] mx-auto", children: [(0, jsx_runtime_1.jsxs)("header", { className: "text-center mb-12 md:mb-16", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm uppercase tracking-widest text-cyan-400 mb-3 md:mb-4", children: "X402 MINTING" }), (0, jsx_runtime_1.jsx)("h2", { id: "minting-title", className: "font-sans font-bold text-3xl sm:text-4xl md:text-5xl text-white mb-4 md:mb-5 text-balance", children: "\u94F8\u9020 MCC / MCD" }), (0, jsx_runtime_1.jsxs)("div", { className: "max-w-3xl mx-auto space-y-2", children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-sm sm:text-base text-neutral-400 text-balance", children: "\u57FA\u4E8E X402 \u534F\u8BAE\u7684\u65E0\u9700\u767B\u5F55\u94F8\u9020 \u2014 \u8FDE\u63A5\u94B1\u5305\u5373\u53EF\u94F8\u9020\uFF0C\u94FE\u4E0A\u76F4\u63A5\u7ED3\u7B97" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-neutral-500 text-balance", children: "\u9996\u6B21\u94F8\u9020\u5C06\u81EA\u52A8\u9884\u6CE8\u518C\u4E3A\u5E73\u53F0\u7528\u6237\uFF08\u63A2\u77FF\u8005\u7EA7\u522B\uFF09\uFF0C\u540E\u7EED\u767B\u5F55\u65F6\u7ED1\u5B9A\u540C\u4E00\u94B1\u5305\u5373\u53EF\u7EE7\u627F\u8EAB\u4EFD\u4E0E\u8D44\u4EA7" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 rounded-lg blockchain-card", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)(card_1.CardTitle, { className: "text-white flex items-center gap-2 text-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Pickaxe, { className: "w-5 h-5 text-cyan-400", "aria-hidden": "true" }), "\u94F8\u9020 MCC"] }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-neutral-400 text-sm", children: "Microcosm Coin \u00B7 X402 \u534F\u8BAE\u652F\u4ED8 \u00B7 \u5E02\u573A\u5B9A\u4EF7" })] }), (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "space-y-4 p-4 sm:p-6 pt-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u5F53\u524D\u94F8\u9020\u4EF7" }), (0, jsx_runtime_1.jsxs)("span", { className: "font-mono text-sm text-cyan-400 tabular-nums font-bold", children: [mccPrice, " USD/MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u5B9A\u4EF7\u65B9\u5F0F" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "base_price \u00D7 4" })] }), ratioInfo && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u5F53\u524D\u9636\u6BB5" }), (0, jsx_runtime_1.jsxs)("span", { className: "font-mono text-xs text-neutral-400", children: ["Phase ", ratioInfo.current_stage, " \u00B7 \u6548\u7387 ", ratioInfo.ratio, "%"] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u79D1\u6280\u52A0\u6210" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-cyan-400", children: "10% ~ 100%" })] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => handleMintClick('mcc'), className: "w-full py-3 rounded-lg font-mono text-sm font-medium transition-colors duration-200 bg-cyan-400/20 text-cyan-400 border border-cyan-400/40 hover:bg-cyan-400/30 hover:border-cyan-400/60 cursor-pointer", children: "\u94F8\u9020 MCC" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-neutral-500 text-center", children: "X402 \u534F\u8BAE \u00B7 100% \u8D44\u91D1\u6CE8\u5165\u8F6E\u56DE\u6C60 \u00B7 \u4F34\u751F\u77FF\u540C\u6B65\u8FDB\u884C" })] })] }), (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 rounded-lg blockchain-card", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)(card_1.CardTitle, { className: "text-white flex items-center gap-2 text-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Coins, { className: "w-5 h-5 text-cyan-300", "aria-hidden": "true" }), "\u94F8\u9020 MCD"] }), (0, jsx_runtime_1.jsx)(card_1.CardDescription, { className: "text-neutral-400 text-sm", children: "Microcosm Dollar \u00B7 X402 \u534F\u8BAE\u652F\u4ED8 \u00B7 \u56FA\u5B9A\u6C47\u7387" })] }), (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "space-y-4 p-4 sm:p-6 pt-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u5F53\u524D\u94F8\u9020\u4EF7" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-sm text-cyan-300 tabular-nums font-bold", children: "1.00 USD/MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u5B9A\u4EF7\u65B9\u5F0F" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u56FA\u5B9A\u6C47\u7387 (1:1)" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u7528\u9014" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u767D\u540D\u5355\u9879\u76EE\u6D88\u8D39" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-400", children: "\u52A0\u6210" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs text-neutral-500", children: "\u65E0\u52A0\u6210" })] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => alert('MCD 暂未开放公共铸造。\n\nMCD 目前通过领地金库每日免费发放给矿工。\n加入领地成为矿工(Miner),即可每天免费获得 MCD 分配。'), className: "w-full py-3 rounded-lg font-mono text-sm font-medium transition-colors duration-200 bg-neutral-700/50 text-neutral-500 border border-neutral-600/40 cursor-pointer hover:bg-neutral-700/70", children: "\u6682\u672A\u5F00\u653E" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-neutral-500 text-center", children: "MCD \u901A\u8FC7\u9886\u5730\u91D1\u5E93\u6BCF\u65E5\u514D\u8D39\u53D1\u653E \u00B7 \u52A0\u5165\u9886\u5730\u6210\u4E3A\u77FF\u5DE5\u5373\u53EF\u83B7\u5F97" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "border border-neutral-700 bg-neutral-900 rounded-lg p-5 md:p-6 blockchain-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 rounded-full flex items-center justify-center bg-cyan-400/10 border border-cyan-400/20 flex-shrink-0", children: (0, jsx_runtime_1.jsx)(lucide_react_1.UserPlus, { className: "w-5 h-5 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "font-sans font-medium text-base text-white mb-1", children: "X402 \u9884\u6CE8\u518C\u673A\u5236" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs sm:text-sm text-neutral-400 leading-relaxed", children: "\u65E0\u9700\u6CE8\u518C\u5373\u53EF\u94F8\u9020 \u2014 \u7CFB\u7EDF\u81EA\u52A8\u4E3A\u9996\u6B21\u94F8\u9020\u7684\u94B1\u5305\u521B\u5EFA\u5E73\u53F0\u8EAB\u4EFD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-2.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center bg-cyan-400/15 border border-cyan-400/25 flex-shrink-0 mt-0.5", children: (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs font-bold text-cyan-400", children: "1" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs text-neutral-300 font-medium", children: "\u94B1\u5305\u76F4\u8FDE" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-neutral-500 mt-0.5", children: "\u8FDE\u63A5 Solana \u94B1\u5305\u5373\u53EF\u94F8\u9020\uFF0C\u94F8\u9020\u8BB0\u5F55\u81EA\u52A8\u4FDD\u5B58" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-2.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center bg-cyan-400/15 border border-cyan-400/25 flex-shrink-0 mt-0.5", children: (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs font-bold text-cyan-400", children: "2" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs text-neutral-300 font-medium", children: "Miner" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-neutral-500 mt-0.5", children: "Registration = Miner" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-2.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center bg-cyan-300/15 border border-cyan-300/25 flex-shrink-0 mt-0.5", children: (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-xs font-bold text-cyan-300", children: "3" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "font-mono text-xs text-neutral-300 font-medium", children: "\u8EAB\u4EFD\u7EE7\u627F" }), (0, jsx_runtime_1.jsx)("p", { className: "font-mono text-[10px] text-neutral-500 mt-0.5", children: "\u540E\u7EED\u767B\u5F55\u6CE8\u518C\u65F6\u7ED1\u5B9A\u540C\u4E00\u94B1\u5305\uFF0C\u7EE7\u627F\u8EAB\u4EFD\u4E0E\u8D44\u4EA7" })] })] })] })] })] }) })] }), (0, jsx_runtime_1.jsx)(registration_prompt_1.default, { isOpen: showRegistrationPrompt, onClose: () => setShowRegistrationPrompt(false), onRegister: handleRegistrationRegister, onSkip: handleRegistrationSkip }), showConnectWalletStep && ((0, jsx_runtime_1.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm font-mono", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative w-full max-w-sm mx-4 bg-neutral-900 border border-neutral-700 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 rounded-full flex items-center justify-center bg-cyan-400/20 border border-cyan-400/50", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Wallet, { className: "w-5 h-5 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-bold text-white", children: "\u8FDE\u63A5\u94B1\u5305" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: "\u94F8\u9020\u524D\u9700\u8981\u8FDE\u63A5 Solana \u94B1\u5305" })] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowConnectWalletStep(false), className: "text-neutral-400 hover:text-white transition-colors", children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "w-5 h-5" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 rounded-lg p-3 border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Link2, { className: `w-4 h-4 ${connected ? "text-white" : "text-neutral-500"}` }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm text-neutral-300", children: connected && publicKey
|
|
60
|
+
? `已连接: ${publicKey.toBase58().slice(0, 6)}...${publicKey.toBase58().slice(-4)}`
|
|
61
|
+
: "未连接" })] }), (0, jsx_runtime_1.jsx)(wallet_adapter_react_ui_1.WalletMultiButton, { className: "!bg-cyan-700 hover:!bg-cyan-600 !h-9 !rounded-md !text-sm" })] }), (0, jsx_runtime_1.jsx)("button", { onClick: handleStartMining, disabled: !connected || !publicKey, className: `w-full py-3 rounded-lg text-sm font-medium transition-colors duration-200 ${connected && publicKey
|
|
62
|
+
? "bg-cyan-700 hover:bg-cyan-600 text-white cursor-pointer"
|
|
63
|
+
: "bg-neutral-800 text-neutral-500 cursor-not-allowed"}`, children: connected && publicKey ? "开始铸造" : "请先连接钱包" }), !connected && ((0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-500 text-center", children: "\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\u9009\u62E9\u94B1\u5305\uFF0C\u5728\u5F39\u51FA\u7A97\u53E3\u4E2D\u786E\u8BA4\u8FDE\u63A5" }))] })] }) })), (0, jsx_runtime_1.jsx)(public_mining_modal_1.default, { isOpen: showMiningModal, onClose: () => setShowMiningModal(false), onSuccess: async () => {
|
|
64
|
+
loadRatioInfo();
|
|
65
|
+
const wallet = publicKey?.toBase58();
|
|
66
|
+
if (wallet) {
|
|
67
|
+
(0, blockchain_1.invalidateWalletCache)(wallet, 'mining').catch(() => { });
|
|
68
|
+
}
|
|
69
|
+
} })] }));
|
|
70
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface PublicMiningModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onSuccess?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export default function PublicMiningModal({ isOpen, onClose, onSuccess }: PublicMiningModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|