@varity-labs/ui-kit 2.0.0-alpha.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/LICENSE +31 -0
- package/README.md +248 -0
- package/dist/components/AI/ChatbotWidget.d.ts +53 -0
- package/dist/components/AI/ChatbotWidget.d.ts.map +1 -0
- package/dist/components/AI/ChatbotWidget.js +126 -0
- package/dist/components/AI/ChatbotWidget.js.map +1 -0
- package/dist/components/AI/InputBar.d.ts +25 -0
- package/dist/components/AI/InputBar.d.ts.map +1 -0
- package/dist/components/AI/InputBar.js +126 -0
- package/dist/components/AI/InputBar.js.map +1 -0
- package/dist/components/AI/MessageBubble.d.ts +37 -0
- package/dist/components/AI/MessageBubble.d.ts.map +1 -0
- package/dist/components/AI/MessageBubble.js +124 -0
- package/dist/components/AI/MessageBubble.js.map +1 -0
- package/dist/components/AI/index.d.ts +12 -0
- package/dist/components/AI/index.d.ts.map +1 -0
- package/dist/components/AI/index.js +9 -0
- package/dist/components/AI/index.js.map +1 -0
- package/dist/components/Analytics/AnalyticsCard.d.ts +48 -0
- package/dist/components/Analytics/AnalyticsCard.d.ts.map +1 -0
- package/dist/components/Analytics/AnalyticsCard.js +156 -0
- package/dist/components/Analytics/AnalyticsCard.js.map +1 -0
- package/dist/components/Analytics/ChartContainer.d.ts +53 -0
- package/dist/components/Analytics/ChartContainer.d.ts.map +1 -0
- package/dist/components/Analytics/ChartContainer.js +128 -0
- package/dist/components/Analytics/ChartContainer.js.map +1 -0
- package/dist/components/Analytics/DataTable.d.ts +62 -0
- package/dist/components/Analytics/DataTable.d.ts.map +1 -0
- package/dist/components/Analytics/DataTable.js +165 -0
- package/dist/components/Analytics/DataTable.js.map +1 -0
- package/dist/components/Analytics/MetricDisplay.d.ts +42 -0
- package/dist/components/Analytics/MetricDisplay.d.ts.map +1 -0
- package/dist/components/Analytics/MetricDisplay.js +110 -0
- package/dist/components/Analytics/MetricDisplay.js.map +1 -0
- package/dist/components/Analytics/index.d.ts +14 -0
- package/dist/components/Analytics/index.d.ts.map +1 -0
- package/dist/components/Analytics/index.js +10 -0
- package/dist/components/Analytics/index.js.map +1 -0
- package/dist/components/Branding/Attribution.d.ts +39 -0
- package/dist/components/Branding/Attribution.d.ts.map +1 -0
- package/dist/components/Branding/Attribution.js +124 -0
- package/dist/components/Branding/Attribution.js.map +1 -0
- package/dist/components/Branding/Logo.d.ts +39 -0
- package/dist/components/Branding/Logo.d.ts.map +1 -0
- package/dist/components/Branding/Logo.js +67 -0
- package/dist/components/Branding/Logo.js.map +1 -0
- package/dist/components/Branding/ThemeProvider.d.ts +85 -0
- package/dist/components/Branding/ThemeProvider.d.ts.map +1 -0
- package/dist/components/Branding/ThemeProvider.js +186 -0
- package/dist/components/Branding/ThemeProvider.js.map +1 -0
- package/dist/components/Branding/index.d.ts +12 -0
- package/dist/components/Branding/index.d.ts.map +1 -0
- package/dist/components/Branding/index.js +9 -0
- package/dist/components/Branding/index.js.map +1 -0
- package/dist/components/Dashboard/DashboardFooter.d.ts +30 -0
- package/dist/components/Dashboard/DashboardFooter.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardFooter.js +68 -0
- package/dist/components/Dashboard/DashboardFooter.js.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts +24 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.js +87 -0
- package/dist/components/Dashboard/DashboardHeader.js.map +1 -0
- package/dist/components/Dashboard/DashboardLayout.d.ts +71 -0
- package/dist/components/Dashboard/DashboardLayout.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardLayout.js +52 -0
- package/dist/components/Dashboard/DashboardLayout.js.map +1 -0
- package/dist/components/Dashboard/DashboardSidebar.d.ts +26 -0
- package/dist/components/Dashboard/DashboardSidebar.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardSidebar.js +146 -0
- package/dist/components/Dashboard/DashboardSidebar.js.map +1 -0
- package/dist/components/Dashboard/EmptyState.d.ts +84 -0
- package/dist/components/Dashboard/EmptyState.d.ts.map +1 -0
- package/dist/components/Dashboard/EmptyState.js +99 -0
- package/dist/components/Dashboard/EmptyState.js.map +1 -0
- package/dist/components/Dashboard/KPICard.d.ts +58 -0
- package/dist/components/Dashboard/KPICard.d.ts.map +1 -0
- package/dist/components/Dashboard/KPICard.js +82 -0
- package/dist/components/Dashboard/KPICard.js.map +1 -0
- package/dist/components/Dashboard/LoadingSkeleton.d.ts +58 -0
- package/dist/components/Dashboard/LoadingSkeleton.d.ts.map +1 -0
- package/dist/components/Dashboard/LoadingSkeleton.js +105 -0
- package/dist/components/Dashboard/LoadingSkeleton.js.map +1 -0
- package/dist/components/Dashboard/StatusBadge.d.ts +57 -0
- package/dist/components/Dashboard/StatusBadge.d.ts.map +1 -0
- package/dist/components/Dashboard/StatusBadge.js +149 -0
- package/dist/components/Dashboard/StatusBadge.js.map +1 -0
- package/dist/components/Dashboard/index.d.ts +19 -0
- package/dist/components/Dashboard/index.d.ts.map +1 -0
- package/dist/components/Dashboard/index.js +18 -0
- package/dist/components/Dashboard/index.js.map +1 -0
- package/dist/components/InAppWallet/EmailLoginButton.d.ts +27 -0
- package/dist/components/InAppWallet/EmailLoginButton.d.ts.map +1 -0
- package/dist/components/InAppWallet/EmailLoginButton.js +84 -0
- package/dist/components/InAppWallet/EmailLoginButton.js.map +1 -0
- package/dist/components/InAppWallet/InAppWalletProvider.d.ts +54 -0
- package/dist/components/InAppWallet/InAppWalletProvider.d.ts.map +1 -0
- package/dist/components/InAppWallet/InAppWalletProvider.js +238 -0
- package/dist/components/InAppWallet/InAppWalletProvider.js.map +1 -0
- package/dist/components/InAppWallet/OnboardingFlow.d.ts +25 -0
- package/dist/components/InAppWallet/OnboardingFlow.d.ts.map +1 -0
- package/dist/components/InAppWallet/OnboardingFlow.js +159 -0
- package/dist/components/InAppWallet/OnboardingFlow.js.map +1 -0
- package/dist/components/InAppWallet/SocialLoginButtons.d.ts +28 -0
- package/dist/components/InAppWallet/SocialLoginButtons.d.ts.map +1 -0
- package/dist/components/InAppWallet/SocialLoginButtons.js +128 -0
- package/dist/components/InAppWallet/SocialLoginButtons.js.map +1 -0
- package/dist/components/InAppWallet/index.d.ts +15 -0
- package/dist/components/InAppWallet/index.d.ts.map +1 -0
- package/dist/components/InAppWallet/index.js +14 -0
- package/dist/components/InAppWallet/index.js.map +1 -0
- package/dist/components/Onramp/BuyUSDCButton.d.ts +27 -0
- package/dist/components/Onramp/BuyUSDCButton.d.ts.map +1 -0
- package/dist/components/Onramp/BuyUSDCButton.js +70 -0
- package/dist/components/Onramp/BuyUSDCButton.js.map +1 -0
- package/dist/components/Onramp/OnrampWidget.d.ts +38 -0
- package/dist/components/Onramp/OnrampWidget.d.ts.map +1 -0
- package/dist/components/Onramp/OnrampWidget.js +105 -0
- package/dist/components/Onramp/OnrampWidget.js.map +1 -0
- package/dist/components/Onramp/index.d.ts +14 -0
- package/dist/components/Onramp/index.d.ts.map +1 -0
- package/dist/components/Onramp/index.js +12 -0
- package/dist/components/Onramp/index.js.map +1 -0
- package/dist/components/Payments/CheckoutModal.d.ts +19 -0
- package/dist/components/Payments/CheckoutModal.d.ts.map +1 -0
- package/dist/components/Payments/CheckoutModal.js +183 -0
- package/dist/components/Payments/CheckoutModal.js.map +1 -0
- package/dist/components/Payments/SubscriptionWidget.d.ts +17 -0
- package/dist/components/Payments/SubscriptionWidget.d.ts.map +1 -0
- package/dist/components/Payments/SubscriptionWidget.js +89 -0
- package/dist/components/Payments/SubscriptionWidget.js.map +1 -0
- package/dist/components/Payments/constants.d.ts +59 -0
- package/dist/components/Payments/constants.d.ts.map +1 -0
- package/dist/components/Payments/constants.js +145 -0
- package/dist/components/Payments/constants.js.map +1 -0
- package/dist/components/Payments/index.d.ts +10 -0
- package/dist/components/Payments/index.d.ts.map +1 -0
- package/dist/components/Payments/index.js +12 -0
- package/dist/components/Payments/index.js.map +1 -0
- package/dist/components/Payments/types.d.ts +119 -0
- package/dist/components/Payments/types.d.ts.map +1 -0
- package/dist/components/Payments/types.js +27 -0
- package/dist/components/Payments/types.js.map +1 -0
- package/dist/components/Payments/usePayments.d.ts +33 -0
- package/dist/components/Payments/usePayments.d.ts.map +1 -0
- package/dist/components/Payments/usePayments.js +249 -0
- package/dist/components/Payments/usePayments.js.map +1 -0
- package/dist/components/Privy/InitTimeoutScreen.d.ts +62 -0
- package/dist/components/Privy/InitTimeoutScreen.d.ts.map +1 -0
- package/dist/components/Privy/InitTimeoutScreen.js +64 -0
- package/dist/components/Privy/InitTimeoutScreen.js.map +1 -0
- package/dist/components/Privy/InitializingScreen.d.ts +56 -0
- package/dist/components/Privy/InitializingScreen.d.ts.map +1 -0
- package/dist/components/Privy/InitializingScreen.js +60 -0
- package/dist/components/Privy/InitializingScreen.js.map +1 -0
- package/dist/components/Privy/PrivyLoginButton.d.ts +27 -0
- package/dist/components/Privy/PrivyLoginButton.d.ts.map +1 -0
- package/dist/components/Privy/PrivyLoginButton.js +48 -0
- package/dist/components/Privy/PrivyLoginButton.js.map +1 -0
- package/dist/components/Privy/PrivyProtectedRoute.d.ts +22 -0
- package/dist/components/Privy/PrivyProtectedRoute.d.ts.map +1 -0
- package/dist/components/Privy/PrivyProtectedRoute.js +46 -0
- package/dist/components/Privy/PrivyProtectedRoute.js.map +1 -0
- package/dist/components/Privy/PrivyReadyGate.d.ts +69 -0
- package/dist/components/Privy/PrivyReadyGate.d.ts.map +1 -0
- package/dist/components/Privy/PrivyReadyGate.js +83 -0
- package/dist/components/Privy/PrivyReadyGate.js.map +1 -0
- package/dist/components/Privy/PrivyUserProfile.d.ts +25 -0
- package/dist/components/Privy/PrivyUserProfile.d.ts.map +1 -0
- package/dist/components/Privy/PrivyUserProfile.js +98 -0
- package/dist/components/Privy/PrivyUserProfile.js.map +1 -0
- package/dist/components/Privy/index.d.ts +21 -0
- package/dist/components/Privy/index.d.ts.map +1 -0
- package/dist/components/Privy/index.js +16 -0
- package/dist/components/Privy/index.js.map +1 -0
- package/dist/components/SIWE/AuthStatus.d.ts +15 -0
- package/dist/components/SIWE/AuthStatus.d.ts.map +1 -0
- package/dist/components/SIWE/AuthStatus.js +47 -0
- package/dist/components/SIWE/AuthStatus.js.map +1 -0
- package/dist/components/SIWE/ProtectedRoute.d.ts +17 -0
- package/dist/components/SIWE/ProtectedRoute.d.ts.map +1 -0
- package/dist/components/SIWE/ProtectedRoute.js +52 -0
- package/dist/components/SIWE/ProtectedRoute.js.map +1 -0
- package/dist/components/SIWE/SIWEButton.d.ts +22 -0
- package/dist/components/SIWE/SIWEButton.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEButton.js +106 -0
- package/dist/components/SIWE/SIWEButton.js.map +1 -0
- package/dist/components/SIWE/SIWEModal.d.ts +19 -0
- package/dist/components/SIWE/SIWEModal.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEModal.js +75 -0
- package/dist/components/SIWE/SIWEModal.js.map +1 -0
- package/dist/components/SIWE/SIWEProvider.d.ts +38 -0
- package/dist/components/SIWE/SIWEProvider.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEProvider.js +227 -0
- package/dist/components/SIWE/SIWEProvider.js.map +1 -0
- package/dist/components/SIWE/index.d.ts +15 -0
- package/dist/components/SIWE/index.d.ts.map +1 -0
- package/dist/components/SIWE/index.js +10 -0
- package/dist/components/SIWE/index.js.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/templates/Finance/FinanceDashboard.d.ts +15 -0
- package/dist/components/templates/Finance/FinanceDashboard.d.ts.map +1 -0
- package/dist/components/templates/Finance/FinanceDashboard.js +112 -0
- package/dist/components/templates/Finance/FinanceDashboard.js.map +1 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts +15 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts.map +1 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.js +121 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.js.map +1 -0
- package/dist/components/templates/ISO/ISODashboard.d.ts +15 -0
- package/dist/components/templates/ISO/ISODashboard.d.ts.map +1 -0
- package/dist/components/templates/ISO/ISODashboard.js +184 -0
- package/dist/components/templates/ISO/ISODashboard.js.map +1 -0
- package/dist/components/templates/Retail/RetailDashboard.d.ts +15 -0
- package/dist/components/templates/Retail/RetailDashboard.d.ts.map +1 -0
- package/dist/components/templates/Retail/RetailDashboard.js +151 -0
- package/dist/components/templates/Retail/RetailDashboard.js.map +1 -0
- package/dist/components/templates/index.d.ts +14 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/components/templates/index.js +14 -0
- package/dist/components/templates/index.js.map +1 -0
- package/dist/config/chains.d.ts +23 -0
- package/dist/config/chains.d.ts.map +1 -0
- package/dist/config/chains.js +55 -0
- package/dist/config/chains.js.map +1 -0
- package/dist/core/VarityClient.d.ts +76 -0
- package/dist/core/VarityClient.d.ts.map +1 -0
- package/dist/core/VarityClient.js +99 -0
- package/dist/core/VarityClient.js.map +1 -0
- package/dist/core/config.d.ts +136 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +156 -0
- package/dist/core/config.js.map +1 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAnalytics.d.ts +94 -0
- package/dist/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/hooks/useAnalytics.js +116 -0
- package/dist/hooks/useAnalytics.js.map +1 -0
- package/dist/hooks/useAuth.d.ts +71 -0
- package/dist/hooks/useAuth.d.ts.map +1 -0
- package/dist/hooks/useAuth.js +198 -0
- package/dist/hooks/useAuth.js.map +1 -0
- package/dist/hooks/useDashboard.d.ts +110 -0
- package/dist/hooks/useDashboard.d.ts.map +1 -0
- package/dist/hooks/useDashboard.js +201 -0
- package/dist/hooks/useDashboard.js.map +1 -0
- package/dist/hooks/useVarityAPI.d.ts +88 -0
- package/dist/hooks/useVarityAPI.d.ts.map +1 -0
- package/dist/hooks/useVarityAPI.js +138 -0
- package/dist/hooks/useVarityAPI.js.map +1 -0
- package/dist/hooks/useWalletAuth.d.ts +108 -0
- package/dist/hooks/useWalletAuth.d.ts.map +1 -0
- package/dist/hooks/useWalletAuth.js +415 -0
- package/dist/hooks/useWalletAuth.js.map +1 -0
- package/dist/hooks/web3/index.d.ts +5 -0
- package/dist/hooks/web3/index.d.ts.map +1 -0
- package/dist/hooks/web3/index.js +6 -0
- package/dist/hooks/web3/index.js.map +1 -0
- package/dist/hooks/web3/useAddressValidation.d.ts +37 -0
- package/dist/hooks/web3/useAddressValidation.d.ts.map +1 -0
- package/dist/hooks/web3/useAddressValidation.js +59 -0
- package/dist/hooks/web3/useAddressValidation.js.map +1 -0
- package/dist/hooks/web3/useBlockExplorer.d.ts +37 -0
- package/dist/hooks/web3/useBlockExplorer.d.ts.map +1 -0
- package/dist/hooks/web3/useBlockExplorer.js +59 -0
- package/dist/hooks/web3/useBlockExplorer.js.map +1 -0
- package/dist/hooks/web3/useUSDCFormat.d.ts +34 -0
- package/dist/hooks/web3/useUSDCFormat.d.ts.map +1 -0
- package/dist/hooks/web3/useUSDCFormat.js +43 -0
- package/dist/hooks/web3/useUSDCFormat.js.map +1 -0
- package/dist/hooks/web3/useVarityWallet.d.ts +48 -0
- package/dist/hooks/web3/useVarityWallet.d.ts.map +1 -0
- package/dist/hooks/web3/useVarityWallet.js +70 -0
- package/dist/hooks/web3/useVarityWallet.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/analytics/AnalyticsClient.d.ts +72 -0
- package/dist/modules/analytics/AnalyticsClient.d.ts.map +1 -0
- package/dist/modules/analytics/AnalyticsClient.js +56 -0
- package/dist/modules/analytics/AnalyticsClient.js.map +1 -0
- package/dist/modules/analytics/index.d.ts +2 -0
- package/dist/modules/analytics/index.d.ts.map +1 -0
- package/dist/modules/analytics/index.js +2 -0
- package/dist/modules/analytics/index.js.map +1 -0
- package/dist/modules/auth/AuthClient.d.ts +41 -0
- package/dist/modules/auth/AuthClient.d.ts.map +1 -0
- package/dist/modules/auth/AuthClient.js +36 -0
- package/dist/modules/auth/AuthClient.js.map +1 -0
- package/dist/modules/auth/index.d.ts +2 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +2 -0
- package/dist/modules/auth/index.js.map +1 -0
- package/dist/modules/cache/CacheClient.d.ts +48 -0
- package/dist/modules/cache/CacheClient.d.ts.map +1 -0
- package/dist/modules/cache/CacheClient.js +59 -0
- package/dist/modules/cache/CacheClient.js.map +1 -0
- package/dist/modules/cache/index.d.ts +2 -0
- package/dist/modules/cache/index.d.ts.map +1 -0
- package/dist/modules/cache/index.js +2 -0
- package/dist/modules/cache/index.js.map +1 -0
- package/dist/modules/compute/ComputeClient.d.ts +54 -0
- package/dist/modules/compute/ComputeClient.d.ts.map +1 -0
- package/dist/modules/compute/ComputeClient.js +39 -0
- package/dist/modules/compute/ComputeClient.js.map +1 -0
- package/dist/modules/compute/index.d.ts +2 -0
- package/dist/modules/compute/index.d.ts.map +1 -0
- package/dist/modules/compute/index.js +2 -0
- package/dist/modules/compute/index.js.map +1 -0
- package/dist/modules/export/ExportClient.d.ts +56 -0
- package/dist/modules/export/ExportClient.d.ts.map +1 -0
- package/dist/modules/export/ExportClient.js +42 -0
- package/dist/modules/export/ExportClient.js.map +1 -0
- package/dist/modules/export/index.d.ts +2 -0
- package/dist/modules/export/index.d.ts.map +1 -0
- package/dist/modules/export/index.js +2 -0
- package/dist/modules/export/index.js.map +1 -0
- package/dist/modules/forecasting/ForecastingClient.d.ts +112 -0
- package/dist/modules/forecasting/ForecastingClient.d.ts.map +1 -0
- package/dist/modules/forecasting/ForecastingClient.js +48 -0
- package/dist/modules/forecasting/ForecastingClient.js.map +1 -0
- package/dist/modules/forecasting/index.d.ts +2 -0
- package/dist/modules/forecasting/index.d.ts.map +1 -0
- package/dist/modules/forecasting/index.js +2 -0
- package/dist/modules/forecasting/index.js.map +1 -0
- package/dist/modules/monitoring/MonitoringClient.d.ts +67 -0
- package/dist/modules/monitoring/MonitoringClient.d.ts.map +1 -0
- package/dist/modules/monitoring/MonitoringClient.js +48 -0
- package/dist/modules/monitoring/MonitoringClient.js.map +1 -0
- package/dist/modules/monitoring/index.d.ts +2 -0
- package/dist/modules/monitoring/index.d.ts.map +1 -0
- package/dist/modules/monitoring/index.js +2 -0
- package/dist/modules/monitoring/index.js.map +1 -0
- package/dist/modules/notifications/NotificationsClient.d.ts +68 -0
- package/dist/modules/notifications/NotificationsClient.d.ts.map +1 -0
- package/dist/modules/notifications/NotificationsClient.js +50 -0
- package/dist/modules/notifications/NotificationsClient.js.map +1 -0
- package/dist/modules/notifications/index.d.ts +2 -0
- package/dist/modules/notifications/index.d.ts.map +1 -0
- package/dist/modules/notifications/index.js +2 -0
- package/dist/modules/notifications/index.js.map +1 -0
- package/dist/modules/oracle/OracleClient.d.ts +48 -0
- package/dist/modules/oracle/OracleClient.d.ts.map +1 -0
- package/dist/modules/oracle/OracleClient.js +34 -0
- package/dist/modules/oracle/OracleClient.js.map +1 -0
- package/dist/modules/oracle/index.d.ts +2 -0
- package/dist/modules/oracle/index.d.ts.map +1 -0
- package/dist/modules/oracle/index.js +2 -0
- package/dist/modules/oracle/index.js.map +1 -0
- package/dist/modules/storage/StorageClient.d.ts +44 -0
- package/dist/modules/storage/StorageClient.d.ts.map +1 -0
- package/dist/modules/storage/StorageClient.js +43 -0
- package/dist/modules/storage/StorageClient.js.map +1 -0
- package/dist/modules/storage/index.d.ts +2 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +2 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/modules/templates/TemplateDeploymentClient.d.ts +208 -0
- package/dist/modules/templates/TemplateDeploymentClient.d.ts.map +1 -0
- package/dist/modules/templates/TemplateDeploymentClient.js +101 -0
- package/dist/modules/templates/TemplateDeploymentClient.js.map +1 -0
- package/dist/modules/templates/index.d.ts +8 -0
- package/dist/modules/templates/index.d.ts.map +1 -0
- package/dist/modules/templates/index.js +7 -0
- package/dist/modules/templates/index.js.map +1 -0
- package/dist/modules/webhooks/WebhooksClient.d.ts +85 -0
- package/dist/modules/webhooks/WebhooksClient.d.ts.map +1 -0
- package/dist/modules/webhooks/WebhooksClient.js +68 -0
- package/dist/modules/webhooks/WebhooksClient.js.map +1 -0
- package/dist/modules/webhooks/index.d.ts +2 -0
- package/dist/modules/webhooks/index.d.ts.map +1 -0
- package/dist/modules/webhooks/index.js +2 -0
- package/dist/modules/webhooks/index.js.map +1 -0
- package/dist/modules/zk/ZKClient.d.ts +67 -0
- package/dist/modules/zk/ZKClient.d.ts.map +1 -0
- package/dist/modules/zk/ZKClient.js +36 -0
- package/dist/modules/zk/ZKClient.js.map +1 -0
- package/dist/modules/zk/index.d.ts +2 -0
- package/dist/modules/zk/index.d.ts.map +1 -0
- package/dist/modules/zk/index.js +2 -0
- package/dist/modules/zk/index.js.map +1 -0
- package/dist/providers/ChainContext.d.ts +65 -0
- package/dist/providers/ChainContext.d.ts.map +1 -0
- package/dist/providers/ChainContext.js +92 -0
- package/dist/providers/ChainContext.js.map +1 -0
- package/dist/providers/PrivyProvider.d.ts +42 -0
- package/dist/providers/PrivyProvider.d.ts.map +1 -0
- package/dist/providers/PrivyProvider.js +131 -0
- package/dist/providers/PrivyProvider.js.map +1 -0
- package/dist/providers/PrivyStack.d.ts +165 -0
- package/dist/providers/PrivyStack.d.ts.map +1 -0
- package/dist/providers/PrivyStack.js +295 -0
- package/dist/providers/PrivyStack.js.map +1 -0
- package/dist/providers/VarityDashboardProvider.d.ts +90 -0
- package/dist/providers/VarityDashboardProvider.d.ts.map +1 -0
- package/dist/providers/VarityDashboardProvider.js +242 -0
- package/dist/providers/VarityDashboardProvider.js.map +1 -0
- package/dist/providers/VarityProvider.d.ts +32 -0
- package/dist/providers/VarityProvider.d.ts.map +1 -0
- package/dist/providers/VarityProvider.js +56 -0
- package/dist/providers/VarityProvider.js.map +1 -0
- package/dist/providers/WalletContext.d.ts +68 -0
- package/dist/providers/WalletContext.d.ts.map +1 -0
- package/dist/providers/WalletContext.js +98 -0
- package/dist/providers/WalletContext.js.map +1 -0
- package/dist/providers/WalletSyncProvider.d.ts +84 -0
- package/dist/providers/WalletSyncProvider.d.ts.map +1 -0
- package/dist/providers/WalletSyncProvider.js +132 -0
- package/dist/providers/WalletSyncProvider.js.map +1 -0
- package/dist/providers/index.d.ts +47 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +51 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/tests/mocks/httpClient.mock.d.ts +62 -0
- package/dist/tests/mocks/httpClient.mock.d.ts.map +1 -0
- package/dist/tests/mocks/httpClient.mock.js +108 -0
- package/dist/tests/mocks/httpClient.mock.js.map +1 -0
- package/dist/tests/setup.d.ts +6 -0
- package/dist/tests/setup.d.ts.map +1 -0
- package/dist/tests/setup.js +51 -0
- package/dist/tests/setup.js.map +1 -0
- package/dist/types/api-extensions.d.ts +92 -0
- package/dist/types/api-extensions.d.ts.map +1 -0
- package/dist/types/api-extensions.js +7 -0
- package/dist/types/api-extensions.js.map +1 -0
- package/dist/utils/http.d.ts +51 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +104 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/wallets/SimpleSmartWallet.d.ts +68 -0
- package/dist/wallets/SimpleSmartWallet.d.ts.map +1 -0
- package/dist/wallets/SimpleSmartWallet.js +74 -0
- package/dist/wallets/SimpleSmartWallet.js.map +1 -0
- package/dist/wallets/SmartWalletProvider.d.ts +217 -0
- package/dist/wallets/SmartWalletProvider.d.ts.map +1 -0
- package/dist/wallets/SmartWalletProvider.js +366 -0
- package/dist/wallets/SmartWalletProvider.js.map +1 -0
- package/dist/wallets/config.d.ts +199 -0
- package/dist/wallets/config.d.ts.map +1 -0
- package/dist/wallets/config.js +183 -0
- package/dist/wallets/config.js.map +1 -0
- package/dist/wallets/index.d.ts +9 -0
- package/dist/wallets/index.d.ts.map +1 -0
- package/dist/wallets/index.js +9 -0
- package/dist/wallets/index.js.map +1 -0
- package/dist/web3/AddressDisplay/AddressDisplay.d.ts +33 -0
- package/dist/web3/AddressDisplay/AddressDisplay.d.ts.map +1 -0
- package/dist/web3/AddressDisplay/AddressDisplay.js +42 -0
- package/dist/web3/AddressDisplay/AddressDisplay.js.map +1 -0
- package/dist/web3/AddressInput/AddressInput.d.ts +36 -0
- package/dist/web3/AddressInput/AddressInput.d.ts.map +1 -0
- package/dist/web3/AddressInput/AddressInput.js +54 -0
- package/dist/web3/AddressInput/AddressInput.js.map +1 -0
- package/dist/web3/AmountInput/AmountInput.d.ts +41 -0
- package/dist/web3/AmountInput/AmountInput.d.ts.map +1 -0
- package/dist/web3/AmountInput/AmountInput.js +74 -0
- package/dist/web3/AmountInput/AmountInput.js.map +1 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts +30 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts.map +1 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.js +35 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.js.map +1 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts +41 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts.map +1 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.js +46 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.js.map +1 -0
- package/dist/web3/ConnectWallet/ConnectWallet.d.ts +35 -0
- package/dist/web3/ConnectWallet/ConnectWallet.d.ts.map +1 -0
- package/dist/web3/ConnectWallet/ConnectWallet.js +58 -0
- package/dist/web3/ConnectWallet/ConnectWallet.js.map +1 -0
- package/dist/web3/DisconnectButton/DisconnectButton.d.ts +30 -0
- package/dist/web3/DisconnectButton/DisconnectButton.d.ts.map +1 -0
- package/dist/web3/DisconnectButton/DisconnectButton.js +48 -0
- package/dist/web3/DisconnectButton/DisconnectButton.js.map +1 -0
- package/dist/web3/WalletBalance/WalletBalance.d.ts +27 -0
- package/dist/web3/WalletBalance/WalletBalance.d.ts.map +1 -0
- package/dist/web3/WalletBalance/WalletBalance.js +49 -0
- package/dist/web3/WalletBalance/WalletBalance.js.map +1 -0
- package/dist/web3/WalletDropdown/WalletDropdown.d.ts +29 -0
- package/dist/web3/WalletDropdown/WalletDropdown.d.ts.map +1 -0
- package/dist/web3/WalletDropdown/WalletDropdown.js +93 -0
- package/dist/web3/WalletDropdown/WalletDropdown.js.map +1 -0
- package/dist/web3/WalletInfo/WalletInfo.d.ts +31 -0
- package/dist/web3/WalletInfo/WalletInfo.d.ts.map +1 -0
- package/dist/web3/WalletInfo/WalletInfo.js +41 -0
- package/dist/web3/WalletInfo/WalletInfo.js.map +1 -0
- package/dist/web3/index.d.ts +11 -0
- package/dist/web3/index.d.ts.map +1 -0
- package/dist/web3/index.js +14 -0
- package/dist/web3/index.js.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZK Client - Zero-knowledge proof operations
|
|
3
|
+
*
|
|
4
|
+
* Handles ZK proof generation/verification via API server (ZKML backend)
|
|
5
|
+
*/
|
|
6
|
+
export class ZKClient {
|
|
7
|
+
http;
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generate zero-knowledge proof for ML inference
|
|
13
|
+
*/
|
|
14
|
+
async prove(request) {
|
|
15
|
+
return this.http.post('/zkml/prove', request);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Verify zero-knowledge proof
|
|
19
|
+
*/
|
|
20
|
+
async verify(request) {
|
|
21
|
+
return this.http.post('/zkml/verify', request);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get ZKML statistics
|
|
25
|
+
*/
|
|
26
|
+
async stats() {
|
|
27
|
+
return this.http.get('/zkml/stats');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* List available circuits
|
|
31
|
+
*/
|
|
32
|
+
async circuits() {
|
|
33
|
+
return this.http.get('/zkml/circuits');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ZKClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZKClient.js","sourceRoot":"","sources":["../../../src/modules/zk/ZKClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkDH,MAAM,OAAO,QAAQ;IACC;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,OAAuB;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,aAAa,EAAE,OAAO,CAAC,CAAA;IAChE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAmB,cAAc,EAAE,OAAO,CAAC,CAAA;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAY,aAAa,CAAC,CAAA;IAChD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAW,gBAAgB,CAAC,CAAA;IAClD,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/zk/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/zk/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { Chain } from 'thirdweb/chains';
|
|
3
|
+
export interface ChainContextValue {
|
|
4
|
+
activeChain: Chain | undefined;
|
|
5
|
+
supportedChains: Chain[];
|
|
6
|
+
switchChain: (chainId: number) => Promise<void>;
|
|
7
|
+
isCorrectChain: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ChainProviderProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
supportedChains?: Chain[];
|
|
12
|
+
defaultChain?: Chain;
|
|
13
|
+
onChainChange?: (chainId: number) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Chain state management provider
|
|
17
|
+
*
|
|
18
|
+
* Manages blockchain network state and provides utilities for:
|
|
19
|
+
* - Accessing current chain
|
|
20
|
+
* - Switching between chains
|
|
21
|
+
* - Validating chain compatibility
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { ChainProvider } from '@varity-labs/ui-kit';
|
|
26
|
+
*
|
|
27
|
+
* function App() {
|
|
28
|
+
* return (
|
|
29
|
+
* <ChainProvider
|
|
30
|
+
* onChainChange={(chainId) => console.log('Chain changed to:', chainId)}
|
|
31
|
+
* >
|
|
32
|
+
* <YourApp />
|
|
33
|
+
* </ChainProvider>
|
|
34
|
+
* );
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function ChainProvider({ children, supportedChains, defaultChain, onChainChange, }: ChainProviderProps): JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Hook to access chain context
|
|
41
|
+
*
|
|
42
|
+
* @returns {ChainContextValue} Chain state and utilities
|
|
43
|
+
* @throws {Error} If used outside ChainProvider
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* import { useChain } from '@varity-labs/ui-kit';
|
|
48
|
+
*
|
|
49
|
+
* function MyComponent() {
|
|
50
|
+
* const { activeChain, switchChain, isCorrectChain } = useChain();
|
|
51
|
+
*
|
|
52
|
+
* if (!isCorrectChain) {
|
|
53
|
+
* return (
|
|
54
|
+
* <button onClick={() => switchChain(33529)}>
|
|
55
|
+
* Switch to Varity L3
|
|
56
|
+
* </button>
|
|
57
|
+
* );
|
|
58
|
+
* }
|
|
59
|
+
*
|
|
60
|
+
* return <p>Connected to: {activeChain?.name}</p>;
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function useChain(): ChainContextValue;
|
|
65
|
+
//# sourceMappingURL=ChainContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainContext.d.ts","sourceRoot":"","sources":["../../src/providers/ChainContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,KAAK,GAAG,SAAS,CAAC;IAC/B,eAAe,EAAE,KAAK,EAAE,CAAC;IACzB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,cAAc,EAAE,OAAO,CAAC;CACzB;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,eAAkC,EAClC,YAA4B,EAC5B,aAAa,GACd,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAqClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
|
+
import { useActiveWalletChain, useSwitchActiveWalletChain } from 'thirdweb/react';
|
|
3
|
+
import { DEFAULT_CHAIN, SUPPORTED_CHAINS } from '../config/chains';
|
|
4
|
+
const ChainContext = createContext(null);
|
|
5
|
+
/**
|
|
6
|
+
* Chain state management provider
|
|
7
|
+
*
|
|
8
|
+
* Manages blockchain network state and provides utilities for:
|
|
9
|
+
* - Accessing current chain
|
|
10
|
+
* - Switching between chains
|
|
11
|
+
* - Validating chain compatibility
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { ChainProvider } from '@varity-labs/ui-kit';
|
|
16
|
+
*
|
|
17
|
+
* function App() {
|
|
18
|
+
* return (
|
|
19
|
+
* <ChainProvider
|
|
20
|
+
* onChainChange={(chainId) => console.log('Chain changed to:', chainId)}
|
|
21
|
+
* >
|
|
22
|
+
* <YourApp />
|
|
23
|
+
* </ChainProvider>
|
|
24
|
+
* );
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function ChainProvider({ children, supportedChains = SUPPORTED_CHAINS, defaultChain = DEFAULT_CHAIN, onChainChange, }) {
|
|
29
|
+
const activeChain = useActiveWalletChain();
|
|
30
|
+
const switchChain = useSwitchActiveWalletChain();
|
|
31
|
+
const isCorrectChain = React.useMemo(() => {
|
|
32
|
+
if (!activeChain)
|
|
33
|
+
return false;
|
|
34
|
+
return supportedChains.some((chain) => chain.id === activeChain.id);
|
|
35
|
+
}, [activeChain, supportedChains]);
|
|
36
|
+
const handleSwitchChain = React.useCallback(async (chainId) => {
|
|
37
|
+
const targetChain = supportedChains.find((c) => c.id === chainId);
|
|
38
|
+
if (!targetChain) {
|
|
39
|
+
throw new Error(`Chain ${chainId} is not supported`);
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
await switchChain(targetChain);
|
|
43
|
+
if (onChainChange) {
|
|
44
|
+
onChainChange(chainId);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.error('Error switching chain:', error);
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}, [supportedChains, switchChain, onChainChange]);
|
|
52
|
+
const value = {
|
|
53
|
+
activeChain,
|
|
54
|
+
supportedChains,
|
|
55
|
+
switchChain: handleSwitchChain,
|
|
56
|
+
isCorrectChain,
|
|
57
|
+
};
|
|
58
|
+
return React.createElement(ChainContext.Provider, { value: value }, children);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Hook to access chain context
|
|
62
|
+
*
|
|
63
|
+
* @returns {ChainContextValue} Chain state and utilities
|
|
64
|
+
* @throws {Error} If used outside ChainProvider
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* import { useChain } from '@varity-labs/ui-kit';
|
|
69
|
+
*
|
|
70
|
+
* function MyComponent() {
|
|
71
|
+
* const { activeChain, switchChain, isCorrectChain } = useChain();
|
|
72
|
+
*
|
|
73
|
+
* if (!isCorrectChain) {
|
|
74
|
+
* return (
|
|
75
|
+
* <button onClick={() => switchChain(33529)}>
|
|
76
|
+
* Switch to Varity L3
|
|
77
|
+
* </button>
|
|
78
|
+
* );
|
|
79
|
+
* }
|
|
80
|
+
*
|
|
81
|
+
* return <p>Connected to: {activeChain?.name}</p>;
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export function useChain() {
|
|
86
|
+
const context = useContext(ChainContext);
|
|
87
|
+
if (!context) {
|
|
88
|
+
throw new Error('useChain must be used within ChainProvider');
|
|
89
|
+
}
|
|
90
|
+
return context;
|
|
91
|
+
}
|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AAC;QACvD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,WAAW,CAAC,CAAC;YAC/B,IAAI,aAAa,EAAE,CAAC;gBAClB,aAAa,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;YAC/C,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,EACD,CAAC,eAAe,EAAE,WAAW,EAAE,aAAa,CAAC,CAC9C,CAAC;IAEF,MAAM,KAAK,GAAsB;QAC/B,WAAW;QACX,eAAe;QACf,WAAW,EAAE,iBAAiB;QAC9B,cAAc;KACf,CAAC;IAEF,OAAO,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAyB,CAAC;AACjF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { User } from '@privy-io/react-auth';
|
|
3
|
+
export interface VarityPrivyProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
appId: string;
|
|
6
|
+
onLoginSuccess?: (user: User) => void;
|
|
7
|
+
onLoginError?: (error: Error) => void;
|
|
8
|
+
appearance?: {
|
|
9
|
+
theme?: 'light' | 'dark';
|
|
10
|
+
accentColor?: `#${string}`;
|
|
11
|
+
logo?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Varity Privy Provider
|
|
16
|
+
*
|
|
17
|
+
* Wraps Privy authentication with Varity L3 chain configuration.
|
|
18
|
+
* Provides email/social login for non-crypto native users.
|
|
19
|
+
*
|
|
20
|
+
* Features:
|
|
21
|
+
* - Email OTP authentication
|
|
22
|
+
* - Social logins (Google, Twitter, Discord, GitHub, etc.)
|
|
23
|
+
* - Embedded wallets (no MetaMask required)
|
|
24
|
+
* - SMS authentication
|
|
25
|
+
* - Fiat onramp integration
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { VarityPrivyProvider } from '@varity-labs/ui-kit';
|
|
30
|
+
*
|
|
31
|
+
* function App() {
|
|
32
|
+
* return (
|
|
33
|
+
* <VarityPrivyProvider appId="your-privy-app-id">
|
|
34
|
+
* <YourApp />
|
|
35
|
+
* </VarityPrivyProvider>
|
|
36
|
+
* );
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function VarityPrivyProvider({ children, appId, onLoginSuccess, onLoginError, appearance, }: VarityPrivyProviderProps): JSX.Element;
|
|
41
|
+
export default VarityPrivyProvider;
|
|
42
|
+
//# sourceMappingURL=PrivyProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivyProvider.d.ts","sourceRoot":"","sources":["../../src/providers/PrivyProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsDzC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,KAAK,EACL,cAAc,EACd,YAAY,EACZ,UAGC,GACF,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CA8CxC;AAmCD,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PrivyProvider as BasePrivyProvider, usePrivy } from '@privy-io/react-auth';
|
|
3
|
+
import { WagmiProvider } from '@privy-io/wagmi';
|
|
4
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
5
|
+
import { http } from 'viem';
|
|
6
|
+
import { arbitrumSepolia, arbitrum } from 'viem/chains';
|
|
7
|
+
import { createConfig } from 'wagmi';
|
|
8
|
+
/**
|
|
9
|
+
* Varity L3 Chain Configuration (Arbitrum Orbit Testnet)
|
|
10
|
+
* CRITICAL: Uses correct RPC URL for Conduit deployment
|
|
11
|
+
*
|
|
12
|
+
* Chain ID: 33529
|
|
13
|
+
* Native Token: USDC (6 decimals - NOT 18!)
|
|
14
|
+
*/
|
|
15
|
+
const varietyL3Testnet = {
|
|
16
|
+
id: 33529,
|
|
17
|
+
name: 'Varity L3 Testnet',
|
|
18
|
+
network: 'varity-testnet',
|
|
19
|
+
nativeCurrency: {
|
|
20
|
+
decimals: 6, // USDC has 6 decimals - NOT 18!
|
|
21
|
+
name: 'USDC',
|
|
22
|
+
symbol: 'USDC',
|
|
23
|
+
},
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
default: {
|
|
26
|
+
http: ['https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz'],
|
|
27
|
+
},
|
|
28
|
+
public: {
|
|
29
|
+
http: ['https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz'],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
blockExplorers: {
|
|
33
|
+
default: {
|
|
34
|
+
name: 'Varity Explorer',
|
|
35
|
+
url: 'https://explorer-varity-testnet-rroe52pwjp.t.conduit.xyz',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
testnet: true,
|
|
39
|
+
};
|
|
40
|
+
// Create Wagmi config for Privy
|
|
41
|
+
const config = createConfig({
|
|
42
|
+
chains: [varietyL3Testnet, arbitrumSepolia, arbitrum],
|
|
43
|
+
transports: {
|
|
44
|
+
[varietyL3Testnet.id]: http(),
|
|
45
|
+
[arbitrumSepolia.id]: http(),
|
|
46
|
+
[arbitrum.id]: http(),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
// Create React Query client
|
|
50
|
+
const queryClient = new QueryClient();
|
|
51
|
+
/**
|
|
52
|
+
* Varity Privy Provider
|
|
53
|
+
*
|
|
54
|
+
* Wraps Privy authentication with Varity L3 chain configuration.
|
|
55
|
+
* Provides email/social login for non-crypto native users.
|
|
56
|
+
*
|
|
57
|
+
* Features:
|
|
58
|
+
* - Email OTP authentication
|
|
59
|
+
* - Social logins (Google, Twitter, Discord, GitHub, etc.)
|
|
60
|
+
* - Embedded wallets (no MetaMask required)
|
|
61
|
+
* - SMS authentication
|
|
62
|
+
* - Fiat onramp integration
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* import { VarityPrivyProvider } from '@varity-labs/ui-kit';
|
|
67
|
+
*
|
|
68
|
+
* function App() {
|
|
69
|
+
* return (
|
|
70
|
+
* <VarityPrivyProvider appId="your-privy-app-id">
|
|
71
|
+
* <YourApp />
|
|
72
|
+
* </VarityPrivyProvider>
|
|
73
|
+
* );
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export function VarityPrivyProvider({ children, appId, onLoginSuccess, onLoginError, appearance = {
|
|
78
|
+
theme: 'light',
|
|
79
|
+
accentColor: '#6366f1',
|
|
80
|
+
}, }) {
|
|
81
|
+
return (React.createElement(BasePrivyProvider, { appId: appId, config: {
|
|
82
|
+
// Login methods
|
|
83
|
+
loginMethods: ['email', 'wallet', 'google', 'twitter', 'discord', 'github'],
|
|
84
|
+
// Appearance configuration
|
|
85
|
+
appearance: {
|
|
86
|
+
theme: appearance.theme,
|
|
87
|
+
accentColor: appearance.accentColor,
|
|
88
|
+
logo: appearance.logo,
|
|
89
|
+
showWalletLoginFirst: false, // Prioritize email/social
|
|
90
|
+
},
|
|
91
|
+
// Embedded wallet configuration
|
|
92
|
+
embeddedWallets: {
|
|
93
|
+
createOnLogin: 'users-without-wallets', // Auto-create wallet for email/social users
|
|
94
|
+
},
|
|
95
|
+
// Default chain
|
|
96
|
+
defaultChain: varietyL3Testnet,
|
|
97
|
+
// Supported chains
|
|
98
|
+
supportedChains: [varietyL3Testnet, arbitrumSepolia, arbitrum],
|
|
99
|
+
// MFA configuration
|
|
100
|
+
mfa: {
|
|
101
|
+
noPromptOnMfaRequired: false,
|
|
102
|
+
},
|
|
103
|
+
}, onSuccess: (user) => {
|
|
104
|
+
console.log('Privy login success:', user);
|
|
105
|
+
onLoginSuccess?.(user);
|
|
106
|
+
} },
|
|
107
|
+
React.createElement(QueryClientProvider, { client: queryClient },
|
|
108
|
+
React.createElement(WagmiProvider, { config: config },
|
|
109
|
+
React.createElement(PrivyAuthWrapper, { onLoginError: onLoginError }, children)))));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Internal wrapper to handle login errors
|
|
113
|
+
*/
|
|
114
|
+
function PrivyAuthWrapper({ children, onLoginError, }) {
|
|
115
|
+
const { ready } = usePrivy();
|
|
116
|
+
// Handle initialization errors
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
if (!ready) {
|
|
119
|
+
// You can add custom error handling here
|
|
120
|
+
}
|
|
121
|
+
}, [ready, onLoginError]);
|
|
122
|
+
if (!ready) {
|
|
123
|
+
return (React.createElement("div", { className: "flex items-center justify-center min-h-screen" },
|
|
124
|
+
React.createElement("div", { className: "text-center" },
|
|
125
|
+
React.createElement("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600 mx-auto" }),
|
|
126
|
+
React.createElement("p", { className: "mt-4 text-gray-600" }, "Initializing authentication..."))));
|
|
127
|
+
}
|
|
128
|
+
return React.createElement(React.Fragment, null, children);
|
|
129
|
+
}
|
|
130
|
+
export default VarityPrivyProvider;
|
|
131
|
+
//# sourceMappingURL=PrivyProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivyProvider.js","sourceRoot":"","sources":["../../src/providers/PrivyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG;IACvB,EAAE,EAAE,KAAK;IACT,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,gBAAgB;IACzB,cAAc,EAAE;QACd,QAAQ,EAAE,CAAC,EAAE,gCAAgC;QAC7C,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;KACf;IACD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,qDAAqD,CAAC;SAC9D;QACD,MAAM,EAAE;YACN,IAAI,EAAE,CAAC,qDAAqD,CAAC;SAC9D;KACF;IACD,cAAc,EAAE;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app ID from https://dashboard.privy.io
|
|
6
|
+
*
|
|
7
|
+
* Optional - defaults to secure server-side credentials via Varity Credential Proxy.
|
|
8
|
+
* For production, provide your own credentials OR use the proxy (recommended).
|
|
9
|
+
*
|
|
10
|
+
* @see https://dashboard.privy.io
|
|
11
|
+
*/
|
|
12
|
+
appId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Your thirdweb client ID from https://thirdweb.com/dashboard
|
|
15
|
+
*
|
|
16
|
+
* Optional - defaults to secure server-side credentials via Varity Credential Proxy.
|
|
17
|
+
* For production, provide your own credentials OR use the proxy (recommended).
|
|
18
|
+
*
|
|
19
|
+
* @see https://thirdweb.com/dashboard
|
|
20
|
+
*/
|
|
21
|
+
thirdwebClientId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Enable secure credential proxy (server-side credentials)
|
|
24
|
+
*
|
|
25
|
+
* When true, credentials are fetched from Varity Credential Proxy service.
|
|
26
|
+
* This is the RECOMMENDED approach for production as credentials never reach client bundles.
|
|
27
|
+
*
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
useCredentialProxy?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Credential proxy URL (only used if useCredentialProxy is true)
|
|
33
|
+
*
|
|
34
|
+
* @default "https://api.varity.so/credentials"
|
|
35
|
+
*/
|
|
36
|
+
credentialProxyUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Chains to support
|
|
39
|
+
* @default [varityL3Testnet]
|
|
40
|
+
*/
|
|
41
|
+
chains?: Chain[];
|
|
42
|
+
/**
|
|
43
|
+
* The children to render once providers are ready
|
|
44
|
+
*/
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Login methods to enable
|
|
48
|
+
* @default ['email', 'google', 'wallet']
|
|
49
|
+
*/
|
|
50
|
+
loginMethods?: Array<'email' | 'wallet' | 'google' | 'twitter' | 'discord' | 'github' | 'apple' | 'linkedin' | 'sms'>;
|
|
51
|
+
/**
|
|
52
|
+
* Appearance configuration
|
|
53
|
+
*/
|
|
54
|
+
appearance?: {
|
|
55
|
+
theme?: 'light' | 'dark';
|
|
56
|
+
accentColor?: string;
|
|
57
|
+
logo?: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Callback when wallet address changes
|
|
61
|
+
*/
|
|
62
|
+
onAddressChange?: (address: string | null) => void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* PrivyStack - All-in-one provider for Privy + thirdweb + Varity L3
|
|
66
|
+
*
|
|
67
|
+
* This component combines all necessary providers in the correct order:
|
|
68
|
+
* 1. QueryClientProvider - For React Query (required by Privy)
|
|
69
|
+
* 2. PrivyProvider - Authentication (email, social, wallet)
|
|
70
|
+
* 3. PrivyReadyGate - Prevents blank screen during initialization
|
|
71
|
+
* 4. ThirdwebProvider - Wallet management and contracts
|
|
72
|
+
* 5. WalletSyncProvider - Syncs Privy embedded wallets with thirdweb
|
|
73
|
+
*
|
|
74
|
+
* **Security**: By default, uses Varity Credential Proxy for server-side credential storage.
|
|
75
|
+
* Real credentials NEVER reach client bundles.
|
|
76
|
+
*
|
|
77
|
+
* **Key Features**:
|
|
78
|
+
* - Secure server-side credentials (via credential proxy)
|
|
79
|
+
* - No blank screen during initialization (PrivyReadyGate)
|
|
80
|
+
* - Seamless wallet sync between Privy and thirdweb
|
|
81
|
+
* - Support for email/social login (embedded wallets)
|
|
82
|
+
* - Support for external wallets (MetaMask, WalletConnect, etc.)
|
|
83
|
+
* - Optimized for Varity L3 by default
|
|
84
|
+
*
|
|
85
|
+
* **Stack Order** (critical - do not change):
|
|
86
|
+
* ```
|
|
87
|
+
* QueryClientProvider # React Query for data fetching
|
|
88
|
+
* └─ PrivyProvider # Authentication layer
|
|
89
|
+
* └─ PrivyReadyGate # Loading state management
|
|
90
|
+
* └─ ThirdwebProvider # Blockchain operations
|
|
91
|
+
* └─ WalletSyncProvider # Wallet synchronization
|
|
92
|
+
* └─ YourApp # Your application
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @example Zero-config setup (secure proxy credentials)
|
|
96
|
+
* ```tsx
|
|
97
|
+
* import { PrivyStack } from '@varity-labs/ui-kit';
|
|
98
|
+
*
|
|
99
|
+
* function App() {
|
|
100
|
+
* return (
|
|
101
|
+
* <PrivyStack>
|
|
102
|
+
* <YourApp />
|
|
103
|
+
* </PrivyStack>
|
|
104
|
+
* );
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @example Production with credential proxy (RECOMMENDED)
|
|
109
|
+
* ```tsx
|
|
110
|
+
* import { PrivyStack } from '@varity-labs/ui-kit';
|
|
111
|
+
*
|
|
112
|
+
* function App() {
|
|
113
|
+
* return (
|
|
114
|
+
* <PrivyStack useCredentialProxy={true}>
|
|
115
|
+
* <YourApp />
|
|
116
|
+
* </PrivyStack>
|
|
117
|
+
* );
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example Custom credentials (without proxy)
|
|
122
|
+
* ```tsx
|
|
123
|
+
* import { PrivyStack } from '@varity-labs/ui-kit';
|
|
124
|
+
*
|
|
125
|
+
* function App() {
|
|
126
|
+
* return (
|
|
127
|
+
* <PrivyStack
|
|
128
|
+
* useCredentialProxy={false}
|
|
129
|
+
* appId={process.env.PRIVY_APP_ID}
|
|
130
|
+
* thirdwebClientId={process.env.THIRDWEB_CLIENT_ID}
|
|
131
|
+
* >
|
|
132
|
+
* <YourApp />
|
|
133
|
+
* </PrivyStack>
|
|
134
|
+
* );
|
|
135
|
+
* }
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @example With custom chains and appearance
|
|
139
|
+
* ```tsx
|
|
140
|
+
* import { PrivyStack } from '@varity-labs/ui-kit';
|
|
141
|
+
* import { varityL3Testnet, arbitrumSepolia } from '@varity-labs/sdk';
|
|
142
|
+
*
|
|
143
|
+
* function App() {
|
|
144
|
+
* return (
|
|
145
|
+
* <PrivyStack
|
|
146
|
+
* chains={[varityL3Testnet, arbitrumSepolia]}
|
|
147
|
+
* loginMethods={['email', 'google', 'wallet']}
|
|
148
|
+
* appearance={{
|
|
149
|
+
* theme: 'light',
|
|
150
|
+
* accentColor: '#2563EB',
|
|
151
|
+
* logo: '/logo.png'
|
|
152
|
+
* }}
|
|
153
|
+
* onAddressChange={(address) => {
|
|
154
|
+
* console.log('Wallet connected:', address);
|
|
155
|
+
* }}
|
|
156
|
+
* >
|
|
157
|
+
* <YourApp />
|
|
158
|
+
* </PrivyStack>
|
|
159
|
+
* );
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export declare function PrivyStack({ appId, thirdwebClientId, useCredentialProxy, credentialProxyUrl, chains, children, loginMethods, appearance, onAddressChange, }: PrivyStackProps): JSX.Element;
|
|
164
|
+
export default PrivyStack;
|
|
165
|
+
//# sourceMappingURL=PrivyStack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivyStack.d.ts","sourceRoot":"","sources":["../../src/providers/PrivyStack.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAqF5D,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,S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