@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.
Files changed (495) hide show
  1. package/LICENSE +31 -0
  2. package/README.md +248 -0
  3. package/dist/components/AI/ChatbotWidget.d.ts +53 -0
  4. package/dist/components/AI/ChatbotWidget.d.ts.map +1 -0
  5. package/dist/components/AI/ChatbotWidget.js +126 -0
  6. package/dist/components/AI/ChatbotWidget.js.map +1 -0
  7. package/dist/components/AI/InputBar.d.ts +25 -0
  8. package/dist/components/AI/InputBar.d.ts.map +1 -0
  9. package/dist/components/AI/InputBar.js +126 -0
  10. package/dist/components/AI/InputBar.js.map +1 -0
  11. package/dist/components/AI/MessageBubble.d.ts +37 -0
  12. package/dist/components/AI/MessageBubble.d.ts.map +1 -0
  13. package/dist/components/AI/MessageBubble.js +124 -0
  14. package/dist/components/AI/MessageBubble.js.map +1 -0
  15. package/dist/components/AI/index.d.ts +12 -0
  16. package/dist/components/AI/index.d.ts.map +1 -0
  17. package/dist/components/AI/index.js +9 -0
  18. package/dist/components/AI/index.js.map +1 -0
  19. package/dist/components/Analytics/AnalyticsCard.d.ts +48 -0
  20. package/dist/components/Analytics/AnalyticsCard.d.ts.map +1 -0
  21. package/dist/components/Analytics/AnalyticsCard.js +156 -0
  22. package/dist/components/Analytics/AnalyticsCard.js.map +1 -0
  23. package/dist/components/Analytics/ChartContainer.d.ts +53 -0
  24. package/dist/components/Analytics/ChartContainer.d.ts.map +1 -0
  25. package/dist/components/Analytics/ChartContainer.js +128 -0
  26. package/dist/components/Analytics/ChartContainer.js.map +1 -0
  27. package/dist/components/Analytics/DataTable.d.ts +62 -0
  28. package/dist/components/Analytics/DataTable.d.ts.map +1 -0
  29. package/dist/components/Analytics/DataTable.js +165 -0
  30. package/dist/components/Analytics/DataTable.js.map +1 -0
  31. package/dist/components/Analytics/MetricDisplay.d.ts +42 -0
  32. package/dist/components/Analytics/MetricDisplay.d.ts.map +1 -0
  33. package/dist/components/Analytics/MetricDisplay.js +110 -0
  34. package/dist/components/Analytics/MetricDisplay.js.map +1 -0
  35. package/dist/components/Analytics/index.d.ts +14 -0
  36. package/dist/components/Analytics/index.d.ts.map +1 -0
  37. package/dist/components/Analytics/index.js +10 -0
  38. package/dist/components/Analytics/index.js.map +1 -0
  39. package/dist/components/Branding/Attribution.d.ts +39 -0
  40. package/dist/components/Branding/Attribution.d.ts.map +1 -0
  41. package/dist/components/Branding/Attribution.js +124 -0
  42. package/dist/components/Branding/Attribution.js.map +1 -0
  43. package/dist/components/Branding/Logo.d.ts +39 -0
  44. package/dist/components/Branding/Logo.d.ts.map +1 -0
  45. package/dist/components/Branding/Logo.js +67 -0
  46. package/dist/components/Branding/Logo.js.map +1 -0
  47. package/dist/components/Branding/ThemeProvider.d.ts +85 -0
  48. package/dist/components/Branding/ThemeProvider.d.ts.map +1 -0
  49. package/dist/components/Branding/ThemeProvider.js +186 -0
  50. package/dist/components/Branding/ThemeProvider.js.map +1 -0
  51. package/dist/components/Branding/index.d.ts +12 -0
  52. package/dist/components/Branding/index.d.ts.map +1 -0
  53. package/dist/components/Branding/index.js +9 -0
  54. package/dist/components/Branding/index.js.map +1 -0
  55. package/dist/components/Dashboard/DashboardFooter.d.ts +30 -0
  56. package/dist/components/Dashboard/DashboardFooter.d.ts.map +1 -0
  57. package/dist/components/Dashboard/DashboardFooter.js +68 -0
  58. package/dist/components/Dashboard/DashboardFooter.js.map +1 -0
  59. package/dist/components/Dashboard/DashboardHeader.d.ts +24 -0
  60. package/dist/components/Dashboard/DashboardHeader.d.ts.map +1 -0
  61. package/dist/components/Dashboard/DashboardHeader.js +87 -0
  62. package/dist/components/Dashboard/DashboardHeader.js.map +1 -0
  63. package/dist/components/Dashboard/DashboardLayout.d.ts +71 -0
  64. package/dist/components/Dashboard/DashboardLayout.d.ts.map +1 -0
  65. package/dist/components/Dashboard/DashboardLayout.js +52 -0
  66. package/dist/components/Dashboard/DashboardLayout.js.map +1 -0
  67. package/dist/components/Dashboard/DashboardSidebar.d.ts +26 -0
  68. package/dist/components/Dashboard/DashboardSidebar.d.ts.map +1 -0
  69. package/dist/components/Dashboard/DashboardSidebar.js +146 -0
  70. package/dist/components/Dashboard/DashboardSidebar.js.map +1 -0
  71. package/dist/components/Dashboard/EmptyState.d.ts +84 -0
  72. package/dist/components/Dashboard/EmptyState.d.ts.map +1 -0
  73. package/dist/components/Dashboard/EmptyState.js +99 -0
  74. package/dist/components/Dashboard/EmptyState.js.map +1 -0
  75. package/dist/components/Dashboard/KPICard.d.ts +58 -0
  76. package/dist/components/Dashboard/KPICard.d.ts.map +1 -0
  77. package/dist/components/Dashboard/KPICard.js +82 -0
  78. package/dist/components/Dashboard/KPICard.js.map +1 -0
  79. package/dist/components/Dashboard/LoadingSkeleton.d.ts +58 -0
  80. package/dist/components/Dashboard/LoadingSkeleton.d.ts.map +1 -0
  81. package/dist/components/Dashboard/LoadingSkeleton.js +105 -0
  82. package/dist/components/Dashboard/LoadingSkeleton.js.map +1 -0
  83. package/dist/components/Dashboard/StatusBadge.d.ts +57 -0
  84. package/dist/components/Dashboard/StatusBadge.d.ts.map +1 -0
  85. package/dist/components/Dashboard/StatusBadge.js +149 -0
  86. package/dist/components/Dashboard/StatusBadge.js.map +1 -0
  87. package/dist/components/Dashboard/index.d.ts +19 -0
  88. package/dist/components/Dashboard/index.d.ts.map +1 -0
  89. package/dist/components/Dashboard/index.js +18 -0
  90. package/dist/components/Dashboard/index.js.map +1 -0
  91. package/dist/components/InAppWallet/EmailLoginButton.d.ts +27 -0
  92. package/dist/components/InAppWallet/EmailLoginButton.d.ts.map +1 -0
  93. package/dist/components/InAppWallet/EmailLoginButton.js +84 -0
  94. package/dist/components/InAppWallet/EmailLoginButton.js.map +1 -0
  95. package/dist/components/InAppWallet/InAppWalletProvider.d.ts +54 -0
  96. package/dist/components/InAppWallet/InAppWalletProvider.d.ts.map +1 -0
  97. package/dist/components/InAppWallet/InAppWalletProvider.js +238 -0
  98. package/dist/components/InAppWallet/InAppWalletProvider.js.map +1 -0
  99. package/dist/components/InAppWallet/OnboardingFlow.d.ts +25 -0
  100. package/dist/components/InAppWallet/OnboardingFlow.d.ts.map +1 -0
  101. package/dist/components/InAppWallet/OnboardingFlow.js +159 -0
  102. package/dist/components/InAppWallet/OnboardingFlow.js.map +1 -0
  103. package/dist/components/InAppWallet/SocialLoginButtons.d.ts +28 -0
  104. package/dist/components/InAppWallet/SocialLoginButtons.d.ts.map +1 -0
  105. package/dist/components/InAppWallet/SocialLoginButtons.js +128 -0
  106. package/dist/components/InAppWallet/SocialLoginButtons.js.map +1 -0
  107. package/dist/components/InAppWallet/index.d.ts +15 -0
  108. package/dist/components/InAppWallet/index.d.ts.map +1 -0
  109. package/dist/components/InAppWallet/index.js +14 -0
  110. package/dist/components/InAppWallet/index.js.map +1 -0
  111. package/dist/components/Onramp/BuyUSDCButton.d.ts +27 -0
  112. package/dist/components/Onramp/BuyUSDCButton.d.ts.map +1 -0
  113. package/dist/components/Onramp/BuyUSDCButton.js +70 -0
  114. package/dist/components/Onramp/BuyUSDCButton.js.map +1 -0
  115. package/dist/components/Onramp/OnrampWidget.d.ts +38 -0
  116. package/dist/components/Onramp/OnrampWidget.d.ts.map +1 -0
  117. package/dist/components/Onramp/OnrampWidget.js +105 -0
  118. package/dist/components/Onramp/OnrampWidget.js.map +1 -0
  119. package/dist/components/Onramp/index.d.ts +14 -0
  120. package/dist/components/Onramp/index.d.ts.map +1 -0
  121. package/dist/components/Onramp/index.js +12 -0
  122. package/dist/components/Onramp/index.js.map +1 -0
  123. package/dist/components/Payments/CheckoutModal.d.ts +19 -0
  124. package/dist/components/Payments/CheckoutModal.d.ts.map +1 -0
  125. package/dist/components/Payments/CheckoutModal.js +183 -0
  126. package/dist/components/Payments/CheckoutModal.js.map +1 -0
  127. package/dist/components/Payments/SubscriptionWidget.d.ts +17 -0
  128. package/dist/components/Payments/SubscriptionWidget.d.ts.map +1 -0
  129. package/dist/components/Payments/SubscriptionWidget.js +89 -0
  130. package/dist/components/Payments/SubscriptionWidget.js.map +1 -0
  131. package/dist/components/Payments/constants.d.ts +59 -0
  132. package/dist/components/Payments/constants.d.ts.map +1 -0
  133. package/dist/components/Payments/constants.js +145 -0
  134. package/dist/components/Payments/constants.js.map +1 -0
  135. package/dist/components/Payments/index.d.ts +10 -0
  136. package/dist/components/Payments/index.d.ts.map +1 -0
  137. package/dist/components/Payments/index.js +12 -0
  138. package/dist/components/Payments/index.js.map +1 -0
  139. package/dist/components/Payments/types.d.ts +119 -0
  140. package/dist/components/Payments/types.d.ts.map +1 -0
  141. package/dist/components/Payments/types.js +27 -0
  142. package/dist/components/Payments/types.js.map +1 -0
  143. package/dist/components/Payments/usePayments.d.ts +33 -0
  144. package/dist/components/Payments/usePayments.d.ts.map +1 -0
  145. package/dist/components/Payments/usePayments.js +249 -0
  146. package/dist/components/Payments/usePayments.js.map +1 -0
  147. package/dist/components/Privy/InitTimeoutScreen.d.ts +62 -0
  148. package/dist/components/Privy/InitTimeoutScreen.d.ts.map +1 -0
  149. package/dist/components/Privy/InitTimeoutScreen.js +64 -0
  150. package/dist/components/Privy/InitTimeoutScreen.js.map +1 -0
  151. package/dist/components/Privy/InitializingScreen.d.ts +56 -0
  152. package/dist/components/Privy/InitializingScreen.d.ts.map +1 -0
  153. package/dist/components/Privy/InitializingScreen.js +60 -0
  154. package/dist/components/Privy/InitializingScreen.js.map +1 -0
  155. package/dist/components/Privy/PrivyLoginButton.d.ts +27 -0
  156. package/dist/components/Privy/PrivyLoginButton.d.ts.map +1 -0
  157. package/dist/components/Privy/PrivyLoginButton.js +48 -0
  158. package/dist/components/Privy/PrivyLoginButton.js.map +1 -0
  159. package/dist/components/Privy/PrivyProtectedRoute.d.ts +22 -0
  160. package/dist/components/Privy/PrivyProtectedRoute.d.ts.map +1 -0
  161. package/dist/components/Privy/PrivyProtectedRoute.js +46 -0
  162. package/dist/components/Privy/PrivyProtectedRoute.js.map +1 -0
  163. package/dist/components/Privy/PrivyReadyGate.d.ts +69 -0
  164. package/dist/components/Privy/PrivyReadyGate.d.ts.map +1 -0
  165. package/dist/components/Privy/PrivyReadyGate.js +83 -0
  166. package/dist/components/Privy/PrivyReadyGate.js.map +1 -0
  167. package/dist/components/Privy/PrivyUserProfile.d.ts +25 -0
  168. package/dist/components/Privy/PrivyUserProfile.d.ts.map +1 -0
  169. package/dist/components/Privy/PrivyUserProfile.js +98 -0
  170. package/dist/components/Privy/PrivyUserProfile.js.map +1 -0
  171. package/dist/components/Privy/index.d.ts +21 -0
  172. package/dist/components/Privy/index.d.ts.map +1 -0
  173. package/dist/components/Privy/index.js +16 -0
  174. package/dist/components/Privy/index.js.map +1 -0
  175. package/dist/components/SIWE/AuthStatus.d.ts +15 -0
  176. package/dist/components/SIWE/AuthStatus.d.ts.map +1 -0
  177. package/dist/components/SIWE/AuthStatus.js +47 -0
  178. package/dist/components/SIWE/AuthStatus.js.map +1 -0
  179. package/dist/components/SIWE/ProtectedRoute.d.ts +17 -0
  180. package/dist/components/SIWE/ProtectedRoute.d.ts.map +1 -0
  181. package/dist/components/SIWE/ProtectedRoute.js +52 -0
  182. package/dist/components/SIWE/ProtectedRoute.js.map +1 -0
  183. package/dist/components/SIWE/SIWEButton.d.ts +22 -0
  184. package/dist/components/SIWE/SIWEButton.d.ts.map +1 -0
  185. package/dist/components/SIWE/SIWEButton.js +106 -0
  186. package/dist/components/SIWE/SIWEButton.js.map +1 -0
  187. package/dist/components/SIWE/SIWEModal.d.ts +19 -0
  188. package/dist/components/SIWE/SIWEModal.d.ts.map +1 -0
  189. package/dist/components/SIWE/SIWEModal.js +75 -0
  190. package/dist/components/SIWE/SIWEModal.js.map +1 -0
  191. package/dist/components/SIWE/SIWEProvider.d.ts +38 -0
  192. package/dist/components/SIWE/SIWEProvider.d.ts.map +1 -0
  193. package/dist/components/SIWE/SIWEProvider.js +227 -0
  194. package/dist/components/SIWE/SIWEProvider.js.map +1 -0
  195. package/dist/components/SIWE/index.d.ts +15 -0
  196. package/dist/components/SIWE/index.d.ts.map +1 -0
  197. package/dist/components/SIWE/index.js +10 -0
  198. package/dist/components/SIWE/index.js.map +1 -0
  199. package/dist/components/index.d.ts +11 -0
  200. package/dist/components/index.d.ts.map +1 -0
  201. package/dist/components/index.js +16 -0
  202. package/dist/components/index.js.map +1 -0
  203. package/dist/components/templates/Finance/FinanceDashboard.d.ts +15 -0
  204. package/dist/components/templates/Finance/FinanceDashboard.d.ts.map +1 -0
  205. package/dist/components/templates/Finance/FinanceDashboard.js +112 -0
  206. package/dist/components/templates/Finance/FinanceDashboard.js.map +1 -0
  207. package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts +15 -0
  208. package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts.map +1 -0
  209. package/dist/components/templates/Healthcare/HealthcareDashboard.js +121 -0
  210. package/dist/components/templates/Healthcare/HealthcareDashboard.js.map +1 -0
  211. package/dist/components/templates/ISO/ISODashboard.d.ts +15 -0
  212. package/dist/components/templates/ISO/ISODashboard.d.ts.map +1 -0
  213. package/dist/components/templates/ISO/ISODashboard.js +184 -0
  214. package/dist/components/templates/ISO/ISODashboard.js.map +1 -0
  215. package/dist/components/templates/Retail/RetailDashboard.d.ts +15 -0
  216. package/dist/components/templates/Retail/RetailDashboard.d.ts.map +1 -0
  217. package/dist/components/templates/Retail/RetailDashboard.js +151 -0
  218. package/dist/components/templates/Retail/RetailDashboard.js.map +1 -0
  219. package/dist/components/templates/index.d.ts +14 -0
  220. package/dist/components/templates/index.d.ts.map +1 -0
  221. package/dist/components/templates/index.js +14 -0
  222. package/dist/components/templates/index.js.map +1 -0
  223. package/dist/config/chains.d.ts +23 -0
  224. package/dist/config/chains.d.ts.map +1 -0
  225. package/dist/config/chains.js +55 -0
  226. package/dist/config/chains.js.map +1 -0
  227. package/dist/core/VarityClient.d.ts +76 -0
  228. package/dist/core/VarityClient.d.ts.map +1 -0
  229. package/dist/core/VarityClient.js +99 -0
  230. package/dist/core/VarityClient.js.map +1 -0
  231. package/dist/core/config.d.ts +136 -0
  232. package/dist/core/config.d.ts.map +1 -0
  233. package/dist/core/config.js +156 -0
  234. package/dist/core/config.js.map +1 -0
  235. package/dist/hooks/index.d.ts +17 -0
  236. package/dist/hooks/index.d.ts.map +1 -0
  237. package/dist/hooks/index.js +18 -0
  238. package/dist/hooks/index.js.map +1 -0
  239. package/dist/hooks/useAnalytics.d.ts +94 -0
  240. package/dist/hooks/useAnalytics.d.ts.map +1 -0
  241. package/dist/hooks/useAnalytics.js +116 -0
  242. package/dist/hooks/useAnalytics.js.map +1 -0
  243. package/dist/hooks/useAuth.d.ts +71 -0
  244. package/dist/hooks/useAuth.d.ts.map +1 -0
  245. package/dist/hooks/useAuth.js +198 -0
  246. package/dist/hooks/useAuth.js.map +1 -0
  247. package/dist/hooks/useDashboard.d.ts +110 -0
  248. package/dist/hooks/useDashboard.d.ts.map +1 -0
  249. package/dist/hooks/useDashboard.js +201 -0
  250. package/dist/hooks/useDashboard.js.map +1 -0
  251. package/dist/hooks/useVarityAPI.d.ts +88 -0
  252. package/dist/hooks/useVarityAPI.d.ts.map +1 -0
  253. package/dist/hooks/useVarityAPI.js +138 -0
  254. package/dist/hooks/useVarityAPI.js.map +1 -0
  255. package/dist/hooks/useWalletAuth.d.ts +108 -0
  256. package/dist/hooks/useWalletAuth.d.ts.map +1 -0
  257. package/dist/hooks/useWalletAuth.js +415 -0
  258. package/dist/hooks/useWalletAuth.js.map +1 -0
  259. package/dist/hooks/web3/index.d.ts +5 -0
  260. package/dist/hooks/web3/index.d.ts.map +1 -0
  261. package/dist/hooks/web3/index.js +6 -0
  262. package/dist/hooks/web3/index.js.map +1 -0
  263. package/dist/hooks/web3/useAddressValidation.d.ts +37 -0
  264. package/dist/hooks/web3/useAddressValidation.d.ts.map +1 -0
  265. package/dist/hooks/web3/useAddressValidation.js +59 -0
  266. package/dist/hooks/web3/useAddressValidation.js.map +1 -0
  267. package/dist/hooks/web3/useBlockExplorer.d.ts +37 -0
  268. package/dist/hooks/web3/useBlockExplorer.d.ts.map +1 -0
  269. package/dist/hooks/web3/useBlockExplorer.js +59 -0
  270. package/dist/hooks/web3/useBlockExplorer.js.map +1 -0
  271. package/dist/hooks/web3/useUSDCFormat.d.ts +34 -0
  272. package/dist/hooks/web3/useUSDCFormat.d.ts.map +1 -0
  273. package/dist/hooks/web3/useUSDCFormat.js +43 -0
  274. package/dist/hooks/web3/useUSDCFormat.js.map +1 -0
  275. package/dist/hooks/web3/useVarityWallet.d.ts +48 -0
  276. package/dist/hooks/web3/useVarityWallet.d.ts.map +1 -0
  277. package/dist/hooks/web3/useVarityWallet.js +70 -0
  278. package/dist/hooks/web3/useVarityWallet.js.map +1 -0
  279. package/dist/index.d.ts +55 -0
  280. package/dist/index.d.ts.map +1 -0
  281. package/dist/index.js +68 -0
  282. package/dist/index.js.map +1 -0
  283. package/dist/modules/analytics/AnalyticsClient.d.ts +72 -0
  284. package/dist/modules/analytics/AnalyticsClient.d.ts.map +1 -0
  285. package/dist/modules/analytics/AnalyticsClient.js +56 -0
  286. package/dist/modules/analytics/AnalyticsClient.js.map +1 -0
  287. package/dist/modules/analytics/index.d.ts +2 -0
  288. package/dist/modules/analytics/index.d.ts.map +1 -0
  289. package/dist/modules/analytics/index.js +2 -0
  290. package/dist/modules/analytics/index.js.map +1 -0
  291. package/dist/modules/auth/AuthClient.d.ts +41 -0
  292. package/dist/modules/auth/AuthClient.d.ts.map +1 -0
  293. package/dist/modules/auth/AuthClient.js +36 -0
  294. package/dist/modules/auth/AuthClient.js.map +1 -0
  295. package/dist/modules/auth/index.d.ts +2 -0
  296. package/dist/modules/auth/index.d.ts.map +1 -0
  297. package/dist/modules/auth/index.js +2 -0
  298. package/dist/modules/auth/index.js.map +1 -0
  299. package/dist/modules/cache/CacheClient.d.ts +48 -0
  300. package/dist/modules/cache/CacheClient.d.ts.map +1 -0
  301. package/dist/modules/cache/CacheClient.js +59 -0
  302. package/dist/modules/cache/CacheClient.js.map +1 -0
  303. package/dist/modules/cache/index.d.ts +2 -0
  304. package/dist/modules/cache/index.d.ts.map +1 -0
  305. package/dist/modules/cache/index.js +2 -0
  306. package/dist/modules/cache/index.js.map +1 -0
  307. package/dist/modules/compute/ComputeClient.d.ts +54 -0
  308. package/dist/modules/compute/ComputeClient.d.ts.map +1 -0
  309. package/dist/modules/compute/ComputeClient.js +39 -0
  310. package/dist/modules/compute/ComputeClient.js.map +1 -0
  311. package/dist/modules/compute/index.d.ts +2 -0
  312. package/dist/modules/compute/index.d.ts.map +1 -0
  313. package/dist/modules/compute/index.js +2 -0
  314. package/dist/modules/compute/index.js.map +1 -0
  315. package/dist/modules/export/ExportClient.d.ts +56 -0
  316. package/dist/modules/export/ExportClient.d.ts.map +1 -0
  317. package/dist/modules/export/ExportClient.js +42 -0
  318. package/dist/modules/export/ExportClient.js.map +1 -0
  319. package/dist/modules/export/index.d.ts +2 -0
  320. package/dist/modules/export/index.d.ts.map +1 -0
  321. package/dist/modules/export/index.js +2 -0
  322. package/dist/modules/export/index.js.map +1 -0
  323. package/dist/modules/forecasting/ForecastingClient.d.ts +112 -0
  324. package/dist/modules/forecasting/ForecastingClient.d.ts.map +1 -0
  325. package/dist/modules/forecasting/ForecastingClient.js +48 -0
  326. package/dist/modules/forecasting/ForecastingClient.js.map +1 -0
  327. package/dist/modules/forecasting/index.d.ts +2 -0
  328. package/dist/modules/forecasting/index.d.ts.map +1 -0
  329. package/dist/modules/forecasting/index.js +2 -0
  330. package/dist/modules/forecasting/index.js.map +1 -0
  331. package/dist/modules/monitoring/MonitoringClient.d.ts +67 -0
  332. package/dist/modules/monitoring/MonitoringClient.d.ts.map +1 -0
  333. package/dist/modules/monitoring/MonitoringClient.js +48 -0
  334. package/dist/modules/monitoring/MonitoringClient.js.map +1 -0
  335. package/dist/modules/monitoring/index.d.ts +2 -0
  336. package/dist/modules/monitoring/index.d.ts.map +1 -0
  337. package/dist/modules/monitoring/index.js +2 -0
  338. package/dist/modules/monitoring/index.js.map +1 -0
  339. package/dist/modules/notifications/NotificationsClient.d.ts +68 -0
  340. package/dist/modules/notifications/NotificationsClient.d.ts.map +1 -0
  341. package/dist/modules/notifications/NotificationsClient.js +50 -0
  342. package/dist/modules/notifications/NotificationsClient.js.map +1 -0
  343. package/dist/modules/notifications/index.d.ts +2 -0
  344. package/dist/modules/notifications/index.d.ts.map +1 -0
  345. package/dist/modules/notifications/index.js +2 -0
  346. package/dist/modules/notifications/index.js.map +1 -0
  347. package/dist/modules/oracle/OracleClient.d.ts +48 -0
  348. package/dist/modules/oracle/OracleClient.d.ts.map +1 -0
  349. package/dist/modules/oracle/OracleClient.js +34 -0
  350. package/dist/modules/oracle/OracleClient.js.map +1 -0
  351. package/dist/modules/oracle/index.d.ts +2 -0
  352. package/dist/modules/oracle/index.d.ts.map +1 -0
  353. package/dist/modules/oracle/index.js +2 -0
  354. package/dist/modules/oracle/index.js.map +1 -0
  355. package/dist/modules/storage/StorageClient.d.ts +44 -0
  356. package/dist/modules/storage/StorageClient.d.ts.map +1 -0
  357. package/dist/modules/storage/StorageClient.js +43 -0
  358. package/dist/modules/storage/StorageClient.js.map +1 -0
  359. package/dist/modules/storage/index.d.ts +2 -0
  360. package/dist/modules/storage/index.d.ts.map +1 -0
  361. package/dist/modules/storage/index.js +2 -0
  362. package/dist/modules/storage/index.js.map +1 -0
  363. package/dist/modules/templates/TemplateDeploymentClient.d.ts +208 -0
  364. package/dist/modules/templates/TemplateDeploymentClient.d.ts.map +1 -0
  365. package/dist/modules/templates/TemplateDeploymentClient.js +101 -0
  366. package/dist/modules/templates/TemplateDeploymentClient.js.map +1 -0
  367. package/dist/modules/templates/index.d.ts +8 -0
  368. package/dist/modules/templates/index.d.ts.map +1 -0
  369. package/dist/modules/templates/index.js +7 -0
  370. package/dist/modules/templates/index.js.map +1 -0
  371. package/dist/modules/webhooks/WebhooksClient.d.ts +85 -0
  372. package/dist/modules/webhooks/WebhooksClient.d.ts.map +1 -0
  373. package/dist/modules/webhooks/WebhooksClient.js +68 -0
  374. package/dist/modules/webhooks/WebhooksClient.js.map +1 -0
  375. package/dist/modules/webhooks/index.d.ts +2 -0
  376. package/dist/modules/webhooks/index.d.ts.map +1 -0
  377. package/dist/modules/webhooks/index.js +2 -0
  378. package/dist/modules/webhooks/index.js.map +1 -0
  379. package/dist/modules/zk/ZKClient.d.ts +67 -0
  380. package/dist/modules/zk/ZKClient.d.ts.map +1 -0
  381. package/dist/modules/zk/ZKClient.js +36 -0
  382. package/dist/modules/zk/ZKClient.js.map +1 -0
  383. package/dist/modules/zk/index.d.ts +2 -0
  384. package/dist/modules/zk/index.d.ts.map +1 -0
  385. package/dist/modules/zk/index.js +2 -0
  386. package/dist/modules/zk/index.js.map +1 -0
  387. package/dist/providers/ChainContext.d.ts +65 -0
  388. package/dist/providers/ChainContext.d.ts.map +1 -0
  389. package/dist/providers/ChainContext.js +92 -0
  390. package/dist/providers/ChainContext.js.map +1 -0
  391. package/dist/providers/PrivyProvider.d.ts +42 -0
  392. package/dist/providers/PrivyProvider.d.ts.map +1 -0
  393. package/dist/providers/PrivyProvider.js +131 -0
  394. package/dist/providers/PrivyProvider.js.map +1 -0
  395. package/dist/providers/PrivyStack.d.ts +165 -0
  396. package/dist/providers/PrivyStack.d.ts.map +1 -0
  397. package/dist/providers/PrivyStack.js +295 -0
  398. package/dist/providers/PrivyStack.js.map +1 -0
  399. package/dist/providers/VarityDashboardProvider.d.ts +90 -0
  400. package/dist/providers/VarityDashboardProvider.d.ts.map +1 -0
  401. package/dist/providers/VarityDashboardProvider.js +242 -0
  402. package/dist/providers/VarityDashboardProvider.js.map +1 -0
  403. package/dist/providers/VarityProvider.d.ts +32 -0
  404. package/dist/providers/VarityProvider.d.ts.map +1 -0
  405. package/dist/providers/VarityProvider.js +56 -0
  406. package/dist/providers/VarityProvider.js.map +1 -0
  407. package/dist/providers/WalletContext.d.ts +68 -0
  408. package/dist/providers/WalletContext.d.ts.map +1 -0
  409. package/dist/providers/WalletContext.js +98 -0
  410. package/dist/providers/WalletContext.js.map +1 -0
  411. package/dist/providers/WalletSyncProvider.d.ts +84 -0
  412. package/dist/providers/WalletSyncProvider.d.ts.map +1 -0
  413. package/dist/providers/WalletSyncProvider.js +132 -0
  414. package/dist/providers/WalletSyncProvider.js.map +1 -0
  415. package/dist/providers/index.d.ts +47 -0
  416. package/dist/providers/index.d.ts.map +1 -0
  417. package/dist/providers/index.js +51 -0
  418. package/dist/providers/index.js.map +1 -0
  419. package/dist/tests/mocks/httpClient.mock.d.ts +62 -0
  420. package/dist/tests/mocks/httpClient.mock.d.ts.map +1 -0
  421. package/dist/tests/mocks/httpClient.mock.js +108 -0
  422. package/dist/tests/mocks/httpClient.mock.js.map +1 -0
  423. package/dist/tests/setup.d.ts +6 -0
  424. package/dist/tests/setup.d.ts.map +1 -0
  425. package/dist/tests/setup.js +51 -0
  426. package/dist/tests/setup.js.map +1 -0
  427. package/dist/types/api-extensions.d.ts +92 -0
  428. package/dist/types/api-extensions.d.ts.map +1 -0
  429. package/dist/types/api-extensions.js +7 -0
  430. package/dist/types/api-extensions.js.map +1 -0
  431. package/dist/utils/http.d.ts +51 -0
  432. package/dist/utils/http.d.ts.map +1 -0
  433. package/dist/utils/http.js +104 -0
  434. package/dist/utils/http.js.map +1 -0
  435. package/dist/wallets/SimpleSmartWallet.d.ts +68 -0
  436. package/dist/wallets/SimpleSmartWallet.d.ts.map +1 -0
  437. package/dist/wallets/SimpleSmartWallet.js +74 -0
  438. package/dist/wallets/SimpleSmartWallet.js.map +1 -0
  439. package/dist/wallets/SmartWalletProvider.d.ts +217 -0
  440. package/dist/wallets/SmartWalletProvider.d.ts.map +1 -0
  441. package/dist/wallets/SmartWalletProvider.js +366 -0
  442. package/dist/wallets/SmartWalletProvider.js.map +1 -0
  443. package/dist/wallets/config.d.ts +199 -0
  444. package/dist/wallets/config.d.ts.map +1 -0
  445. package/dist/wallets/config.js +183 -0
  446. package/dist/wallets/config.js.map +1 -0
  447. package/dist/wallets/index.d.ts +9 -0
  448. package/dist/wallets/index.d.ts.map +1 -0
  449. package/dist/wallets/index.js +9 -0
  450. package/dist/wallets/index.js.map +1 -0
  451. package/dist/web3/AddressDisplay/AddressDisplay.d.ts +33 -0
  452. package/dist/web3/AddressDisplay/AddressDisplay.d.ts.map +1 -0
  453. package/dist/web3/AddressDisplay/AddressDisplay.js +42 -0
  454. package/dist/web3/AddressDisplay/AddressDisplay.js.map +1 -0
  455. package/dist/web3/AddressInput/AddressInput.d.ts +36 -0
  456. package/dist/web3/AddressInput/AddressInput.d.ts.map +1 -0
  457. package/dist/web3/AddressInput/AddressInput.js +54 -0
  458. package/dist/web3/AddressInput/AddressInput.js.map +1 -0
  459. package/dist/web3/AmountInput/AmountInput.d.ts +41 -0
  460. package/dist/web3/AmountInput/AmountInput.d.ts.map +1 -0
  461. package/dist/web3/AmountInput/AmountInput.js +74 -0
  462. package/dist/web3/AmountInput/AmountInput.js.map +1 -0
  463. package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts +30 -0
  464. package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts.map +1 -0
  465. package/dist/web3/BalanceDisplay/BalanceDisplay.js +35 -0
  466. package/dist/web3/BalanceDisplay/BalanceDisplay.js.map +1 -0
  467. package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts +41 -0
  468. package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts.map +1 -0
  469. package/dist/web3/BlockExplorerLink/BlockExplorerLink.js +46 -0
  470. package/dist/web3/BlockExplorerLink/BlockExplorerLink.js.map +1 -0
  471. package/dist/web3/ConnectWallet/ConnectWallet.d.ts +35 -0
  472. package/dist/web3/ConnectWallet/ConnectWallet.d.ts.map +1 -0
  473. package/dist/web3/ConnectWallet/ConnectWallet.js +58 -0
  474. package/dist/web3/ConnectWallet/ConnectWallet.js.map +1 -0
  475. package/dist/web3/DisconnectButton/DisconnectButton.d.ts +30 -0
  476. package/dist/web3/DisconnectButton/DisconnectButton.d.ts.map +1 -0
  477. package/dist/web3/DisconnectButton/DisconnectButton.js +48 -0
  478. package/dist/web3/DisconnectButton/DisconnectButton.js.map +1 -0
  479. package/dist/web3/WalletBalance/WalletBalance.d.ts +27 -0
  480. package/dist/web3/WalletBalance/WalletBalance.d.ts.map +1 -0
  481. package/dist/web3/WalletBalance/WalletBalance.js +49 -0
  482. package/dist/web3/WalletBalance/WalletBalance.js.map +1 -0
  483. package/dist/web3/WalletDropdown/WalletDropdown.d.ts +29 -0
  484. package/dist/web3/WalletDropdown/WalletDropdown.d.ts.map +1 -0
  485. package/dist/web3/WalletDropdown/WalletDropdown.js +93 -0
  486. package/dist/web3/WalletDropdown/WalletDropdown.js.map +1 -0
  487. package/dist/web3/WalletInfo/WalletInfo.d.ts +31 -0
  488. package/dist/web3/WalletInfo/WalletInfo.d.ts.map +1 -0
  489. package/dist/web3/WalletInfo/WalletInfo.js +41 -0
  490. package/dist/web3/WalletInfo/WalletInfo.js.map +1 -0
  491. package/dist/web3/index.d.ts +11 -0
  492. package/dist/web3/index.d.ts.map +1 -0
  493. package/dist/web3/index.js +14 -0
  494. package/dist/web3/index.js.map +1 -0
  495. package/package.json +105 -0
@@ -0,0 +1,74 @@
1
+ import React, { useState } from 'react';
2
+ import { parseUSDC, formatUSDC } from '../../config/chains';
3
+ /**
4
+ * Amount Input Component
5
+ *
6
+ * Input field for USDC amounts with proper 6-decimal handling:
7
+ * - Validates numeric input
8
+ * - Formats to 6 decimals
9
+ * - Max button for full balance
10
+ * - Error states
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * import { AmountInput } from '@varity-labs/ui-kit';
15
+ *
16
+ * function SendForm() {
17
+ * const [amount, setAmount] = useState('');
18
+ *
19
+ * return (
20
+ * <AmountInput
21
+ * value={amount}
22
+ * onChange={(value, valueBigInt) => setAmount(value)}
23
+ * max={BigInt(1000000000)} // 1000 USDC
24
+ * showMax
25
+ * label="Amount to send"
26
+ * placeholder="0.00"
27
+ * />
28
+ * );
29
+ * }
30
+ * ```
31
+ */
32
+ export function AmountInput({ value, onChange, max, showMax = true, label, placeholder = '0.00', error, className = '', }) {
33
+ const [isFocused, setIsFocused] = useState(false);
34
+ const handleChange = (e) => {
35
+ const inputValue = e.target.value;
36
+ // Allow empty string
37
+ if (inputValue === '') {
38
+ onChange('', BigInt(0));
39
+ return;
40
+ }
41
+ // Validate numeric input with up to 6 decimals
42
+ const regex = /^\d*\.?\d{0,6}$/;
43
+ if (!regex.test(inputValue)) {
44
+ return;
45
+ }
46
+ try {
47
+ const valueBigInt = parseUSDC(inputValue);
48
+ onChange(inputValue, valueBigInt);
49
+ }
50
+ catch (err) {
51
+ // Invalid input, don't update
52
+ }
53
+ };
54
+ const handleMax = () => {
55
+ if (max) {
56
+ const maxValue = formatUSDC(max, 6);
57
+ onChange(maxValue, max);
58
+ }
59
+ };
60
+ const isOverMax = max && value ? parseUSDC(value) > max : false;
61
+ return (React.createElement("div", { className: `space-y-2 ${className}` },
62
+ label && (React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300" }, label)),
63
+ React.createElement("div", { className: "relative" },
64
+ React.createElement("input", { type: "text", value: value, onChange: handleChange, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), placeholder: placeholder, className: `input pr-20 ${error || isOverMax ? 'border-red-500 focus:ring-red-500' : ''}` }),
65
+ React.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2" },
66
+ Boolean(showMax && max) && (React.createElement("button", { type: "button", onClick: handleMax, className: "text-xs text-varity-primary hover:text-varity-primary/80 font-medium" }, "MAX")),
67
+ React.createElement("span", { className: "text-sm text-gray-500" }, "USDC"))),
68
+ (error || isOverMax) && (React.createElement("p", { className: "text-sm text-red-500" }, error || 'Amount exceeds maximum')),
69
+ Boolean(max && value && !error && !isOverMax) && (React.createElement("p", { className: "text-xs text-gray-500" },
70
+ "Maximum: ",
71
+ max ? formatUSDC(max, 2).toString() : '',
72
+ " USDC"))));
73
+ }
74
+ //# sourceMappingURL=AmountInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmountInput.js","sourceRoot":"","sources":["../../../src/web3/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAa5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,EACH,OAAO,GAAG,IAAI,EACd,KAAK,EACL,WAAW,GAAG,MAAM,EACpB,KAAK,EACL,SAAS,GAAG,EAAE,GACG;IACjB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,YAAY,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC9D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAElC,qBAAqB;QACrB,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;YACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACxB,OAAO;QACT,CAAC;QAED,+CAA+C;QAC/C,MAAM,KAAK,GAAG,iBAAiB,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;YAC1C,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,8BAA8B;QAChC,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACpC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAEhE,OAAO,CACL,6BAAK,SAAS,EAAE,aAAa,SAAS,EAAE;QACrC,KAAK,IAAI,CACR,+BAAO,SAAS,EAAC,4DAA4D,IAC1E,KAAK,CACA,CACT;QAED,6BAAK,SAAS,EAAC,UAAU;YACvB,+BACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACjC,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EACjC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,eAAe,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,EAAE,GACzF;YAEF,6BAAK,SAAS,EAAC,mEAAmE;gBAC/E,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,CAC1B,gCACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAC,sEAAsE,UAGzE,CACV;gBACD,8BAAM,SAAS,EAAC,uBAAuB,WAAY,CAC/C,CACF;QAEL,CAAC,KAAK,IAAI,SAAS,CAAC,IAAI,CACvB,2BAAG,SAAS,EAAC,sBAAsB,IAChC,KAAK,IAAI,wBAAwB,CAChC,CACL;QAEA,OAAO,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAChD,2BAAG,SAAS,EAAC,uBAAuB;;YACxB,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE;oBAChD,CACL,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface BalanceDisplayProps {
2
+ balance: bigint | string | number;
3
+ showSymbol?: boolean;
4
+ decimals?: number;
5
+ className?: string;
6
+ size?: 'sm' | 'md' | 'lg';
7
+ }
8
+ /**
9
+ * Balance Display Component
10
+ *
11
+ * Formats and displays USDC balance with proper 6-decimal formatting
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { BalanceDisplay } from '@varity-labs/ui-kit';
16
+ *
17
+ * function Portfolio() {
18
+ * return (
19
+ * <BalanceDisplay
20
+ * balance={BigInt(1500000000)} // 1,500 USDC
21
+ * showSymbol
22
+ * decimals={2}
23
+ * size="lg"
24
+ * />
25
+ * );
26
+ * }
27
+ * ```
28
+ */
29
+ export declare function BalanceDisplay({ balance, showSymbol, decimals, className, size, }: BalanceDisplayProps): JSX.Element;
30
+ //# sourceMappingURL=BalanceDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BalanceDisplay.d.ts","sourceRoot":"","sources":["../../../src/web3/BalanceDisplay/BalanceDisplay.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,UAAiB,EACjB,QAAY,EACZ,SAAc,EACd,IAAW,GACZ,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAmBnC"}
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { formatUSDC } from '../../config/chains';
3
+ /**
4
+ * Balance Display Component
5
+ *
6
+ * Formats and displays USDC balance with proper 6-decimal formatting
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { BalanceDisplay } from '@varity-labs/ui-kit';
11
+ *
12
+ * function Portfolio() {
13
+ * return (
14
+ * <BalanceDisplay
15
+ * balance={BigInt(1500000000)} // 1,500 USDC
16
+ * showSymbol
17
+ * decimals={2}
18
+ * size="lg"
19
+ * />
20
+ * );
21
+ * }
22
+ * ```
23
+ */
24
+ export function BalanceDisplay({ balance, showSymbol = true, decimals = 2, className = '', size = 'md', }) {
25
+ const formattedBalance = formatUSDC(balance, decimals);
26
+ const sizeClasses = {
27
+ sm: 'text-sm',
28
+ md: 'text-base',
29
+ lg: 'text-2xl',
30
+ };
31
+ return (React.createElement("div", { className: `flex items-baseline gap-1 ${className}` },
32
+ React.createElement("span", { className: `font-semibold ${sizeClasses[size]}` }, formattedBalance),
33
+ showSymbol && (React.createElement("span", { className: "text-sm text-gray-600 dark:text-gray-400" }, "USDC"))));
34
+ }
35
+ //# sourceMappingURL=BalanceDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BalanceDisplay.js","sourceRoot":"","sources":["../../../src/web3/BalanceDisplay/BalanceDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,CAAC,EACZ,SAAS,GAAG,EAAE,EACd,IAAI,GAAG,IAAI,GACS;IACpB,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEvD,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,SAAS;QACb,EAAE,EAAE,WAAW;QACf,EAAE,EAAE,UAAU;KACf,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAE,6BAA6B,SAAS,EAAE;QACtD,8BAAM,SAAS,EAAE,iBAAiB,WAAW,CAAC,IAAI,CAAC,EAAE,IAClD,gBAAgB,CACZ;QACN,UAAU,IAAI,CACb,8BAAM,SAAS,EAAC,0CAA0C,WAAY,CACvE,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ export interface BlockExplorerLinkProps {
3
+ type: 'tx' | 'address' | 'block';
4
+ hash: string;
5
+ chainId?: number;
6
+ label?: string;
7
+ children?: React.ReactNode;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * Block Explorer Link Component
12
+ *
13
+ * Creates links to Arbiscan block explorer for transactions, addresses, or blocks
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { BlockExplorerLink } from '@varity-labs/ui-kit';
18
+ *
19
+ * function Transaction() {
20
+ * return (
21
+ * <>
22
+ * <BlockExplorerLink
23
+ * type="tx"
24
+ * hash="0xabc..."
25
+ * label="View Transaction"
26
+ * />
27
+ *
28
+ * <BlockExplorerLink
29
+ * type="address"
30
+ * hash="0x123..."
31
+ * >
32
+ * View on Explorer
33
+ * </BlockExplorerLink>
34
+ * </>
35
+ * );
36
+ * }
37
+ * ```
38
+ */
39
+ export declare function BlockExplorerLink({ type, hash, chainId, // Default to Arbitrum Sepolia
40
+ label, children, className, }: BlockExplorerLinkProps): JSX.Element;
41
+ //# sourceMappingURL=BlockExplorerLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockExplorerLink.d.ts","sourceRoot":"","sources":["../../../src/web3/BlockExplorerLink/BlockExplorerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAgB,EAAE,8BAA8B;AAChD,KAAK,EACL,QAAQ,EACR,SAAc,GACf,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAwBtC"}
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import { getBlockExplorerUrl } from '../../config/chains';
3
+ /**
4
+ * Block Explorer Link Component
5
+ *
6
+ * Creates links to Arbiscan block explorer for transactions, addresses, or blocks
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { BlockExplorerLink } from '@varity-labs/ui-kit';
11
+ *
12
+ * function Transaction() {
13
+ * return (
14
+ * <>
15
+ * <BlockExplorerLink
16
+ * type="tx"
17
+ * hash="0xabc..."
18
+ * label="View Transaction"
19
+ * />
20
+ *
21
+ * <BlockExplorerLink
22
+ * type="address"
23
+ * hash="0x123..."
24
+ * >
25
+ * View on Explorer
26
+ * </BlockExplorerLink>
27
+ * </>
28
+ * );
29
+ * }
30
+ * ```
31
+ */
32
+ export function BlockExplorerLink({ type, hash, chainId = 421614, // Default to Arbitrum Sepolia
33
+ label, children, className = '', }) {
34
+ const url = getBlockExplorerUrl(chainId, type, hash);
35
+ const defaultLabels = {
36
+ tx: 'View Transaction',
37
+ address: 'View Address',
38
+ block: 'View Block',
39
+ };
40
+ const displayText = children || label || defaultLabels[type];
41
+ return (React.createElement("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: `inline-flex items-center gap-1 text-varity-primary hover:text-varity-primary/80 underline ${className}` },
42
+ displayText,
43
+ React.createElement("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
44
+ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }))));
45
+ }
46
+ //# sourceMappingURL=BlockExplorerLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockExplorerLink.js","sourceRoot":"","sources":["../../../src/web3/BlockExplorerLink/BlockExplorerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAW1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,GAAG,MAAM,EAAE,8BAA8B;AAChD,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,EAAE,GACS;IACvB,MAAM,GAAG,GAAG,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAErD,MAAM,aAAa,GAAG;QACpB,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,YAAY;KACpB,CAAC;IAEF,MAAM,WAAW,GAAG,QAAQ,IAAI,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAE7D,OAAO,CACL,2BACE,IAAI,EAAE,GAAG,EACT,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,6FAA6F,SAAS,EAAE;QAElH,WAAW;QACZ,6BAAK,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW;YAC5E,8BAAM,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAE,CAAC,EAAE,CAAC,EAAC,8EAA8E,GAAG,CAClJ,CACJ,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,35 @@
1
+ export interface ConnectWalletProps {
2
+ variant?: 'primary' | 'secondary' | 'outline';
3
+ size?: 'sm' | 'md' | 'lg';
4
+ onConnect?: (address: string) => void;
5
+ onError?: (error: Error) => void;
6
+ className?: string;
7
+ label?: string;
8
+ }
9
+ /**
10
+ * Connect Wallet Button Component
11
+ *
12
+ * Displays a button that opens wallet connection modal with support for:
13
+ * - MetaMask
14
+ * - WalletConnect
15
+ * - Coinbase Wallet
16
+ * - Email/Social logins
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { ConnectWallet } from '@varity-labs/ui-kit';
21
+ *
22
+ * function Header() {
23
+ * return (
24
+ * <ConnectWallet
25
+ * variant="primary"
26
+ * size="md"
27
+ * onConnect={(address) => console.log('Connected:', address)}
28
+ * onError={(error) => console.error('Connection failed:', error)}
29
+ * />
30
+ * );
31
+ * }
32
+ * ```
33
+ */
34
+ export declare function ConnectWallet({ variant, size, onConnect, onError, className, label, }: ConnectWalletProps): JSX.Element;
35
+ //# sourceMappingURL=ConnectWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectWallet.d.ts","sourceRoot":"","sources":["../../../src/web3/ConnectWallet/ConnectWallet.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAmB,EACnB,IAAW,EACX,SAAS,EACT,OAAO,EACP,SAAc,EACd,KAAwB,GACzB,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA0ClC"}
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { ConnectButton } from 'thirdweb/react';
3
+ import { createWallet } from 'thirdweb/wallets';
4
+ import { createThirdwebClient } from 'thirdweb';
5
+ import { THIRDWEB_CLIENT_ID, DEFAULT_CHAIN } from '../../config/chains';
6
+ /**
7
+ * Connect Wallet Button Component
8
+ *
9
+ * Displays a button that opens wallet connection modal with support for:
10
+ * - MetaMask
11
+ * - WalletConnect
12
+ * - Coinbase Wallet
13
+ * - Email/Social logins
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { ConnectWallet } from '@varity-labs/ui-kit';
18
+ *
19
+ * function Header() {
20
+ * return (
21
+ * <ConnectWallet
22
+ * variant="primary"
23
+ * size="md"
24
+ * onConnect={(address) => console.log('Connected:', address)}
25
+ * onError={(error) => console.error('Connection failed:', error)}
26
+ * />
27
+ * );
28
+ * }
29
+ * ```
30
+ */
31
+ export function ConnectWallet({ variant = 'primary', size = 'md', onConnect, onError, className = '', label = 'Connect Wallet', }) {
32
+ const client = React.useMemo(() => createThirdwebClient({ clientId: THIRDWEB_CLIENT_ID }), []);
33
+ const wallets = React.useMemo(() => [
34
+ createWallet('io.metamask'),
35
+ createWallet('com.coinbase.wallet'),
36
+ createWallet('walletConnect'),
37
+ ], []);
38
+ const variantClasses = {
39
+ primary: 'btn btn-primary',
40
+ secondary: 'btn btn-secondary',
41
+ outline: 'btn btn-outline',
42
+ };
43
+ const sizeClasses = {
44
+ sm: 'btn-sm',
45
+ md: 'btn-md',
46
+ lg: 'btn-lg',
47
+ };
48
+ const buttonClasses = `${variantClasses[variant]} ${sizeClasses[size]} ${className}`;
49
+ return (React.createElement(ConnectButton, { client: client, wallets: wallets, chain: DEFAULT_CHAIN, connectButton: {
50
+ label: label,
51
+ className: buttonClasses,
52
+ }, onConnect: (wallet) => {
53
+ if (onConnect && wallet.getAccount()?.address) {
54
+ onConnect(wallet.getAccount().address);
55
+ }
56
+ } }));
57
+ }
58
+ //# sourceMappingURL=ConnectWallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectWallet.js","sourceRoot":"","sources":["../../../src/web3/ConnectWallet/ConnectWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAWxE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,SAAS,EACT,OAAO,EACP,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,gBAAgB,GACL;IACnB,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,EAC5D,EAAE,CACH,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,YAAY,CAAC,aAAa,CAAC;QAC3B,YAAY,CAAC,qBAAqB,CAAC;QACnC,YAAY,CAAC,eAAe,CAAC;KAC9B,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,cAAc,GAAG;QACrB,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,mBAAmB;QAC9B,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;KACb,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC;IAErF,OAAO,CACL,oBAAC,aAAa,IACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE;YACb,KAAK,EAAE,KAAK;YACZ,SAAS,EAAE,aAAa;SACzB,EACD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE;YACpB,IAAI,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC;gBAC9C,SAAS,CAAC,MAAM,CAAC,UAAU,EAAG,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface DisconnectButtonProps {
2
+ variant?: 'primary' | 'secondary' | 'outline';
3
+ size?: 'sm' | 'md' | 'lg';
4
+ onDisconnect?: () => void;
5
+ className?: string;
6
+ label?: string;
7
+ }
8
+ /**
9
+ * Disconnect Wallet Button Component
10
+ *
11
+ * Displays a button to disconnect the currently connected wallet
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { DisconnectButton } from '@varity-labs/ui-kit';
16
+ *
17
+ * function Settings() {
18
+ * return (
19
+ * <DisconnectButton
20
+ * variant="secondary"
21
+ * size="md"
22
+ * onDisconnect={() => console.log('Disconnected')}
23
+ * label="Disconnect Wallet"
24
+ * />
25
+ * );
26
+ * }
27
+ * ```
28
+ */
29
+ export declare function DisconnectButton({ variant, size, onDisconnect, className, label, }: DisconnectButtonProps): JSX.Element | null;
30
+ //# sourceMappingURL=DisconnectButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisconnectButton.d.ts","sourceRoot":"","sources":["../../../src/web3/DisconnectButton/DisconnectButton.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAqB,EACrB,IAAW,EACX,YAAY,EACZ,SAAc,EACd,KAAoB,GACrB,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAmC5C"}
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { useDisconnect, useActiveWallet } from 'thirdweb/react';
3
+ /**
4
+ * Disconnect Wallet Button Component
5
+ *
6
+ * Displays a button to disconnect the currently connected wallet
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { DisconnectButton } from '@varity-labs/ui-kit';
11
+ *
12
+ * function Settings() {
13
+ * return (
14
+ * <DisconnectButton
15
+ * variant="secondary"
16
+ * size="md"
17
+ * onDisconnect={() => console.log('Disconnected')}
18
+ * label="Disconnect Wallet"
19
+ * />
20
+ * );
21
+ * }
22
+ * ```
23
+ */
24
+ export function DisconnectButton({ variant = 'secondary', size = 'md', onDisconnect, className = '', label = 'Disconnect', }) {
25
+ const wallet = useActiveWallet();
26
+ const { disconnect } = useDisconnect();
27
+ if (!wallet) {
28
+ return null;
29
+ }
30
+ const variantClasses = {
31
+ primary: 'btn btn-primary',
32
+ secondary: 'btn btn-secondary',
33
+ outline: 'btn btn-outline',
34
+ };
35
+ const sizeClasses = {
36
+ sm: 'btn-sm',
37
+ md: 'btn-md',
38
+ lg: 'btn-lg',
39
+ };
40
+ const handleDisconnect = async () => {
41
+ await disconnect(wallet);
42
+ if (onDisconnect) {
43
+ onDisconnect();
44
+ }
45
+ };
46
+ return (React.createElement("button", { onClick: handleDisconnect, className: `${variantClasses[variant]} ${sizeClasses[size]} ${className}` }, label));
47
+ }
48
+ //# sourceMappingURL=DisconnectButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisconnectButton.js","sourceRoot":"","sources":["../../../src/web3/DisconnectButton/DisconnectButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,IAAI,EACX,YAAY,EACZ,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,YAAY,GACE;IACtB,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IAEvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,cAAc,GAAG;QACrB,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,mBAAmB;QAC9B,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;KACb,CAAC;IAEF,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;QAClC,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,gCACE,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,IAExE,KAAK,CACC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ export interface WalletBalanceProps {
2
+ showSymbol?: boolean;
3
+ decimals?: number;
4
+ className?: string;
5
+ loadingText?: string;
6
+ }
7
+ /**
8
+ * Wallet Balance Display Component
9
+ *
10
+ * Displays wallet USDC balance with automatic formatting (6 decimals)
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * import { WalletBalance } from '@varity-labs/ui-kit';
15
+ *
16
+ * function Balance() {
17
+ * return (
18
+ * <WalletBalance
19
+ * showSymbol
20
+ * decimals={2}
21
+ * />
22
+ * );
23
+ * }
24
+ * ```
25
+ */
26
+ export declare function WalletBalance({ showSymbol, decimals, className, loadingText, }: WalletBalanceProps): JSX.Element | null;
27
+ //# sourceMappingURL=WalletBalance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletBalance.d.ts","sourceRoot":"","sources":["../../../src/web3/WalletBalance/WalletBalance.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAiB,EACjB,QAAY,EACZ,SAAc,EACd,WAA0B,GAC3B,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA6CzC"}
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import { useActiveAccount, useWalletBalance } from 'thirdweb/react';
3
+ import { createThirdwebClient } from 'thirdweb';
4
+ import { THIRDWEB_CLIENT_ID, DEFAULT_CHAIN, formatUSDC } from '../../config/chains';
5
+ /**
6
+ * Wallet Balance Display Component
7
+ *
8
+ * Displays wallet USDC balance with automatic formatting (6 decimals)
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { WalletBalance } from '@varity-labs/ui-kit';
13
+ *
14
+ * function Balance() {
15
+ * return (
16
+ * <WalletBalance
17
+ * showSymbol
18
+ * decimals={2}
19
+ * />
20
+ * );
21
+ * }
22
+ * ```
23
+ */
24
+ export function WalletBalance({ showSymbol = true, decimals = 2, className = '', loadingText = 'Loading...', }) {
25
+ const account = useActiveAccount();
26
+ const client = React.useMemo(() => createThirdwebClient({ clientId: THIRDWEB_CLIENT_ID }), []);
27
+ const { data: balance, isLoading, error } = useWalletBalance({
28
+ client,
29
+ chain: DEFAULT_CHAIN,
30
+ address: account?.address,
31
+ });
32
+ if (!account) {
33
+ return null;
34
+ }
35
+ if (isLoading) {
36
+ return (React.createElement("div", { className: `flex items-center gap-2 ${className}` },
37
+ React.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-varity-primary" }),
38
+ React.createElement("span", { className: "text-sm text-gray-500" }, loadingText)));
39
+ }
40
+ if (error) {
41
+ return (React.createElement("div", { className: `text-sm text-red-500 ${className}` }, "Error loading balance"));
42
+ }
43
+ const balanceValue = balance?.value || BigInt(0);
44
+ const formattedBalance = formatUSDC(balanceValue, decimals);
45
+ return (React.createElement("div", { className: `flex items-center gap-1 ${className}` },
46
+ React.createElement("span", { className: "text-lg font-semibold" }, formattedBalance),
47
+ showSymbol && (React.createElement("span", { className: "text-sm text-gray-600 dark:text-gray-400" }, "USDC"))));
48
+ }
49
+ //# sourceMappingURL=WalletBalance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletBalance.js","sourceRoot":"","sources":["../../../src/web3/WalletBalance/WalletBalance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AASpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,CAAC,EACZ,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,YAAY,GACP;IACnB,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,EAC5D,EAAE,CACH,CAAC;IAEF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC;QAC3D,MAAM;QACN,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,OAAO,EAAE,OAAO;KAC1B,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,6BAAK,SAAS,EAAE,2BAA2B,SAAS,EAAE;YACpD,6BAAK,SAAS,EAAC,oEAAoE,GAAG;YACtF,8BAAM,SAAS,EAAC,uBAAuB,IAAE,WAAW,CAAQ,CACxD,CACP,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,6BAAK,SAAS,EAAE,wBAAwB,SAAS,EAAE,4BAE7C,CACP,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,gBAAgB,GAAG,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAE5D,OAAO,CACL,6BAAK,SAAS,EAAE,2BAA2B,SAAS,EAAE;QACpD,8BAAM,SAAS,EAAC,uBAAuB,IAAE,gBAAgB,CAAQ;QAChE,UAAU,IAAI,CACb,8BAAM,SAAS,EAAC,0CAA0C,WAAY,CACvE,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface WalletDropdownProps {
2
+ onDisconnect?: () => void;
3
+ className?: string;
4
+ }
5
+ /**
6
+ * Wallet Dropdown Menu Component
7
+ *
8
+ * Displays a dropdown menu with wallet information and actions:
9
+ * - Address
10
+ * - Balance
11
+ * - Copy address
12
+ * - View on explorer
13
+ * - Disconnect
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { WalletDropdown } from '@varity-labs/ui-kit';
18
+ *
19
+ * function Header() {
20
+ * return (
21
+ * <WalletDropdown
22
+ * onDisconnect={() => console.log('Disconnected')}
23
+ * />
24
+ * );
25
+ * }
26
+ * ```
27
+ */
28
+ export declare function WalletDropdown({ onDisconnect, className, }: WalletDropdownProps): JSX.Element | null;
29
+ //# sourceMappingURL=WalletDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletDropdown.d.ts","sourceRoot":"","sources":["../../../src/web3/WalletDropdown/WalletDropdown.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,SAAc,GACf,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAgH1C"}