@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,217 @@
1
+ /**
2
+ * Smart Wallet Provider - ERC-4337 Account Abstraction
3
+ *
4
+ * Provides gasless transactions and improved UX through smart contract wallets
5
+ * Powered by thirdweb's smart wallet infrastructure
6
+ *
7
+ * Features:
8
+ * - Gasless transactions (sponsored by app)
9
+ * - Social login recovery
10
+ * - Batch transactions
11
+ * - Session keys
12
+ * - Multi-sig support
13
+ * - Programmable wallet logic
14
+ */
15
+ import React, { type ReactNode } from 'react';
16
+ import type { ThirdwebClient, Chain } from 'thirdweb';
17
+ import type { Account } from 'thirdweb/wallets';
18
+ /**
19
+ * Smart Wallet configuration
20
+ */
21
+ export interface SmartWalletConfig {
22
+ /**
23
+ * thirdweb client instance
24
+ */
25
+ client: ThirdwebClient;
26
+ /**
27
+ * Chain to operate on
28
+ */
29
+ chain: Chain;
30
+ /**
31
+ * Gas sponsorship configuration
32
+ */
33
+ gasless?: {
34
+ /**
35
+ * Enable gas sponsorship
36
+ */
37
+ enabled: boolean;
38
+ /**
39
+ * Paymaster URL (optional - uses thirdweb's if not provided)
40
+ */
41
+ paymasterUrl?: string;
42
+ /**
43
+ * Gas policy (which operations to sponsor)
44
+ */
45
+ policy?: {
46
+ /**
47
+ * Sponsor all transactions
48
+ */
49
+ sponsorAll?: boolean;
50
+ /**
51
+ * Sponsor up to this gas limit
52
+ */
53
+ maxGasLimit?: string;
54
+ /**
55
+ * Whitelist of contract addresses to sponsor
56
+ */
57
+ allowedContracts?: string[];
58
+ };
59
+ };
60
+ /**
61
+ * Factory contract address (for deploying smart wallets)
62
+ */
63
+ factoryAddress?: string;
64
+ /**
65
+ * Account abstraction version
66
+ */
67
+ accountVersion?: '0.6' | '0.7';
68
+ /**
69
+ * App tracking for gas billing
70
+ *
71
+ * When provided, tracks gas usage per app for billing purposes.
72
+ * Required for production apps using Varity paymaster.
73
+ */
74
+ appIdentifier?: {
75
+ /**
76
+ * Unique app ID from Varity App Store
77
+ */
78
+ appId: string;
79
+ /**
80
+ * Developer's wallet address for billing
81
+ */
82
+ developerWallet: string;
83
+ /**
84
+ * App name (optional, for logging)
85
+ */
86
+ appName?: string;
87
+ };
88
+ /**
89
+ * Gas tracking configuration
90
+ */
91
+ gasTracking?: {
92
+ /**
93
+ * Enable/disable gas tracking (default: true if appIdentifier provided)
94
+ */
95
+ enabled?: boolean;
96
+ /**
97
+ * API endpoint for gas tracking (default: https://api.varity.so)
98
+ */
99
+ apiUrl?: string;
100
+ };
101
+ }
102
+ /**
103
+ * Smart Wallet context
104
+ */
105
+ interface SmartWalletContextType {
106
+ /**
107
+ * Smart wallet account
108
+ */
109
+ account?: Account;
110
+ /**
111
+ * Whether smart wallet is connected
112
+ */
113
+ isConnected: boolean;
114
+ /**
115
+ * Whether gasless transactions are enabled
116
+ */
117
+ isGasless: boolean;
118
+ /**
119
+ * Connect smart wallet
120
+ */
121
+ connect: (signer: Account) => Promise<void>;
122
+ /**
123
+ * Disconnect smart wallet
124
+ */
125
+ disconnect: () => void;
126
+ /**
127
+ * Send a gasless transaction
128
+ */
129
+ sendTransaction: (tx: {
130
+ to: string;
131
+ data: string;
132
+ value?: string;
133
+ }) => Promise<string>;
134
+ /**
135
+ * Send batch transactions
136
+ */
137
+ sendBatchTransaction: (txs: {
138
+ to: string;
139
+ data: string;
140
+ value?: string;
141
+ }[]) => Promise<string>;
142
+ /**
143
+ * Get smart wallet address
144
+ */
145
+ getAddress: () => string | undefined;
146
+ /**
147
+ * Check if wallet is deployed
148
+ */
149
+ isDeployed: boolean;
150
+ /**
151
+ * Deploy smart wallet
152
+ */
153
+ deployWallet: () => Promise<string>;
154
+ }
155
+ /**
156
+ * Smart Wallet Provider Props
157
+ */
158
+ export interface SmartWalletProviderProps {
159
+ /**
160
+ * Smart wallet configuration
161
+ */
162
+ config: SmartWalletConfig;
163
+ /**
164
+ * Children components
165
+ */
166
+ children: ReactNode;
167
+ }
168
+ /**
169
+ * Smart Wallet Provider Component
170
+ *
171
+ * Wrap your app with this provider to enable ERC-4337 smart wallets
172
+ *
173
+ * @example
174
+ * ```tsx
175
+ * <SmartWalletProvider config={{ client, chain, gasless: { enabled: true } }}>
176
+ * <App />
177
+ * </SmartWalletProvider>
178
+ * ```
179
+ */
180
+ export declare function SmartWalletProvider({ config, children }: SmartWalletProviderProps): React.JSX.Element;
181
+ /**
182
+ * Hook to use Smart Wallet context
183
+ *
184
+ * @example
185
+ * ```tsx
186
+ * function MyComponent() {
187
+ * const { sendTransaction, isGasless } = useSmartWallet();
188
+ *
189
+ * const handleClick = async () => {
190
+ * const txHash = await sendTransaction({
191
+ * to: '0x...',
192
+ * data: '0x...',
193
+ * });
194
+ * };
195
+ *
196
+ * return <div>Gasless: {isGasless ? 'Yes' : 'No'}</div>;
197
+ * }
198
+ * ```
199
+ */
200
+ export declare function useSmartWallet(): SmartWalletContextType;
201
+ /**
202
+ * Smart Wallet Connect Button Component
203
+ *
204
+ * Pre-built button to connect smart wallet
205
+ */
206
+ export declare function SmartWalletConnectButton({ onConnect, onError, }: {
207
+ onConnect?: () => void;
208
+ onError?: (error: Error) => void;
209
+ }): React.JSX.Element;
210
+ /**
211
+ * Gasless Badge Component
212
+ *
213
+ * Shows gasless transaction status
214
+ */
215
+ export declare function GaslessBadge(): React.JSX.Element | null;
216
+ export {};
217
+ //# sourceMappingURL=SmartWalletProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartWalletProvider.d.ts","sourceRoot":"","sources":["../../src/wallets/SmartWalletProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAuC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,MAAM,CAAC,EAAE;YACP;;eAEG;YACH,UAAU,CAAC,EAAE,OAAO,CAAC;YAErB;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,CAAC;YAErB;;eAEG;YACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;KACH,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAE/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE;QACd;;WAEG;QACH,KAA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ACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,wBAAwB,qBAiTjF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,IAAI,sBAAsB,CAQvD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,OAAO,GACR,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC,qBAqCA;AAED;;;;GAIG;AACH,wBAAgB,YAAY,6BAyB3B"}
@@ -0,0 +1,366 @@
1
+ /**
2
+ * Smart Wallet Provider - ERC-4337 Account Abstraction
3
+ *
4
+ * Provides gasless transactions and improved UX through smart contract wallets
5
+ * Powered by thirdweb's smart wallet infrastructure
6
+ *
7
+ * Features:
8
+ * - Gasless transactions (sponsored by app)
9
+ * - Social login recovery
10
+ * - Batch transactions
11
+ * - Session keys
12
+ * - Multi-sig support
13
+ * - Programmable wallet logic
14
+ */
15
+ import React, { createContext, useContext, useState } from 'react';
16
+ /**
17
+ * Smart Wallet context
18
+ */
19
+ const SmartWalletContext = createContext(undefined);
20
+ /**
21
+ * Smart Wallet Provider Component
22
+ *
23
+ * Wrap your app with this provider to enable ERC-4337 smart wallets
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <SmartWalletProvider config={{ client, chain, gasless: { enabled: true } }}>
28
+ * <App />
29
+ * </SmartWalletProvider>
30
+ * ```
31
+ */
32
+ export function SmartWalletProvider({ config, children }) {
33
+ const [account, setAccount] = useState();
34
+ const [isDeployed, setIsDeployed] = useState(false);
35
+ const isConnected = !!account;
36
+ const isGasless = config.gasless?.enabled || false;
37
+ /**
38
+ * Connect smart wallet
39
+ */
40
+ const connect = async (signer) => {
41
+ try {
42
+ console.log('Connecting smart wallet with signer:', signer.address);
43
+ // Import smart wallet functions dynamically to avoid issues
44
+ const { smartWallet } = await import('thirdweb/wallets');
45
+ // Create smart wallet instance
46
+ // Note: Conduit bundler handles paymaster automatically when sponsorGas is true
47
+ const wallet = smartWallet({
48
+ chain: config.chain,
49
+ factoryAddress: config.factoryAddress,
50
+ sponsorGas: config.gasless?.enabled || false,
51
+ ...(config.gasless?.paymasterUrl && {
52
+ overrides: {
53
+ bundlerUrl: config.gasless.paymasterUrl,
54
+ },
55
+ }),
56
+ });
57
+ // Connect with the provided signer as personal account
58
+ const smartAccount = await wallet.connect({
59
+ client: config.client,
60
+ personalAccount: signer,
61
+ });
62
+ // Check if the smart wallet is deployed on-chain
63
+ try {
64
+ // Get the smart wallet address
65
+ const smartWalletAddress = smartAccount.address;
66
+ // Check if there's code at the address (deployed contract)
67
+ const { eth_getCode, getRpcClient } = await import('thirdweb/rpc');
68
+ const rpcRequest = getRpcClient({ client: config.client, chain: config.chain });
69
+ const bytecode = await eth_getCode(rpcRequest, {
70
+ address: smartWalletAddress,
71
+ });
72
+ setIsDeployed(bytecode !== undefined && bytecode !== '0x' && bytecode !== '0x0');
73
+ console.log('Smart wallet deployed:', bytecode !== undefined && bytecode !== '0x');
74
+ }
75
+ catch (error) {
76
+ console.warn('Could not check wallet deployment status:', error);
77
+ setIsDeployed(false);
78
+ }
79
+ setAccount(smartAccount);
80
+ console.log('Smart wallet connected successfully:', smartAccount.address);
81
+ }
82
+ catch (error) {
83
+ console.error('Failed to connect smart wallet:', error);
84
+ throw new Error(`Smart wallet connection failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
85
+ }
86
+ };
87
+ /**
88
+ * Disconnect smart wallet
89
+ */
90
+ const disconnect = () => {
91
+ setAccount(undefined);
92
+ setIsDeployed(false);
93
+ };
94
+ /**
95
+ * Send a gasless transaction
96
+ */
97
+ const sendTransaction = async (tx) => {
98
+ if (!account) {
99
+ throw new Error('Smart wallet not connected');
100
+ }
101
+ try {
102
+ console.log('Sending transaction:', { to: tx.to, gasless: isGasless });
103
+ // Import thirdweb transaction functions
104
+ const { prepareTransaction, sendTransaction: send } = await import('thirdweb');
105
+ // Prepare the transaction (synchronous in thirdweb v5)
106
+ const transaction = prepareTransaction({
107
+ client: config.client,
108
+ chain: config.chain,
109
+ to: tx.to,
110
+ data: tx.data,
111
+ value: tx.value ? BigInt(tx.value) : 0n,
112
+ });
113
+ // Send transaction through smart account
114
+ // Gas sponsorship is automatically handled if sponsorGas was enabled
115
+ const result = await send({
116
+ transaction,
117
+ account,
118
+ });
119
+ // Wait for the transaction hash to be resolved
120
+ const txHash = await result.transactionHash;
121
+ console.log('Transaction sent successfully:', txHash);
122
+ // Track gas usage if app identifier is provided
123
+ if (config.appIdentifier && (config.gasTracking?.enabled !== false)) {
124
+ // Import gas tracking functions (don't await - track in background)
125
+ trackGasUsageInBackground(txHash);
126
+ }
127
+ return txHash;
128
+ }
129
+ catch (error) {
130
+ console.error('Transaction failed:', error);
131
+ throw new Error(`Transaction failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
132
+ }
133
+ };
134
+ /**
135
+ * Track gas usage in background (non-blocking)
136
+ */
137
+ const trackGasUsageInBackground = async (txHash) => {
138
+ try {
139
+ // Dynamically import gas tracking to avoid bundle bloat
140
+ const { trackTransactionGasUsage } = await import('@varity-labs/sdk');
141
+ if (!config.appIdentifier || !account) {
142
+ return;
143
+ }
144
+ // Track in background - don't wait for completion
145
+ trackTransactionGasUsage(config.client, config.chain, txHash, config.appIdentifier.appId, config.appIdentifier.developerWallet, account.address, {
146
+ apiUrl: config.gasTracking?.apiUrl,
147
+ enabled: config.gasTracking?.enabled !== false,
148
+ }).catch(error => {
149
+ // Log error but don't throw - tracking failure shouldn't affect user flow
150
+ console.warn('[SmartWallet] Failed to track gas usage:', error);
151
+ });
152
+ }
153
+ catch (error) {
154
+ console.warn('[SmartWallet] Gas tracking module not available:', error);
155
+ }
156
+ };
157
+ /**
158
+ * Send batch transactions
159
+ */
160
+ const sendBatchTransaction = async (txs) => {
161
+ if (!account) {
162
+ throw new Error('Smart wallet not connected');
163
+ }
164
+ try {
165
+ console.log('Sending batch transaction:', txs.length, 'operations');
166
+ // Import thirdweb functions
167
+ const { prepareTransaction, sendBatchTransaction: sendBatch } = await import('thirdweb');
168
+ // Prepare all transactions (synchronous in thirdweb v5)
169
+ const transactions = txs.map(tx => prepareTransaction({
170
+ client: config.client,
171
+ chain: config.chain,
172
+ to: tx.to,
173
+ data: tx.data,
174
+ value: tx.value ? BigInt(tx.value) : 0n,
175
+ }));
176
+ // Send batch through smart account
177
+ const result = await sendBatch({
178
+ transactions,
179
+ account,
180
+ });
181
+ // Wait for the transaction hash to be resolved
182
+ const txHash = await result.transactionHash;
183
+ console.log('Batch transaction sent successfully:', txHash);
184
+ // Track gas usage if app identifier is provided
185
+ if (config.appIdentifier && (config.gasTracking?.enabled !== false)) {
186
+ // Track in background
187
+ trackGasUsageInBackground(txHash);
188
+ }
189
+ return txHash;
190
+ }
191
+ catch (error) {
192
+ console.error('Batch transaction failed:', error);
193
+ throw new Error(`Batch transaction failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
194
+ }
195
+ };
196
+ /**
197
+ * Get smart wallet address
198
+ */
199
+ const getAddress = () => {
200
+ return account?.address;
201
+ };
202
+ /**
203
+ * Deploy smart wallet
204
+ */
205
+ const deployWallet = async () => {
206
+ if (!account) {
207
+ throw new Error('Smart wallet not connected');
208
+ }
209
+ if (isDeployed) {
210
+ console.log('Wallet already deployed');
211
+ return account.address;
212
+ }
213
+ try {
214
+ console.log('Deploying smart wallet...');
215
+ // Import thirdweb functions
216
+ const { prepareContractCall, sendTransaction: send, getContract } = await import('thirdweb');
217
+ // If factory address is provided, use it to deploy
218
+ if (config.factoryAddress) {
219
+ // Get the factory contract
220
+ const factory = getContract({
221
+ client: config.client,
222
+ chain: config.chain,
223
+ address: config.factoryAddress,
224
+ });
225
+ // Prepare deployment transaction
226
+ // Note: This assumes the factory has a deploy() or similar method
227
+ // Adjust based on actual VarityWalletFactory implementation
228
+ const deployTx = prepareContractCall({
229
+ contract: factory,
230
+ method: 'function createWallet(address owner, bytes32 salt) returns (address)',
231
+ params: [account.address, `0x${Date.now().toString(16).padStart(64, '0')}`],
232
+ });
233
+ // Send deployment transaction
234
+ const result = await send({
235
+ transaction: deployTx,
236
+ account,
237
+ });
238
+ console.log('Wallet deployed via factory:', result.transactionHash);
239
+ setIsDeployed(true);
240
+ return result.transactionHash;
241
+ }
242
+ else {
243
+ // Deploy by sending a simple transaction to trigger deployment
244
+ // Smart wallet will deploy on first transaction
245
+ const { prepareTransaction } = await import('thirdweb');
246
+ const deployTx = prepareTransaction({
247
+ client: config.client,
248
+ chain: config.chain,
249
+ to: account.address, // Send to self
250
+ value: 0n,
251
+ });
252
+ const result = await send({
253
+ transaction: deployTx,
254
+ account,
255
+ });
256
+ console.log('Wallet deployed via self-transaction:', result.transactionHash);
257
+ setIsDeployed(true);
258
+ return result.transactionHash;
259
+ }
260
+ }
261
+ catch (error) {
262
+ console.error('Wallet deployment failed:', error);
263
+ throw new Error(`Wallet deployment failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
264
+ }
265
+ };
266
+ const value = {
267
+ account,
268
+ isConnected,
269
+ isGasless,
270
+ connect,
271
+ disconnect,
272
+ sendTransaction,
273
+ sendBatchTransaction,
274
+ getAddress,
275
+ isDeployed,
276
+ deployWallet,
277
+ };
278
+ return (React.createElement(SmartWalletContext.Provider, { value: value }, children));
279
+ }
280
+ /**
281
+ * Hook to use Smart Wallet context
282
+ *
283
+ * @example
284
+ * ```tsx
285
+ * function MyComponent() {
286
+ * const { sendTransaction, isGasless } = useSmartWallet();
287
+ *
288
+ * const handleClick = async () => {
289
+ * const txHash = await sendTransaction({
290
+ * to: '0x...',
291
+ * data: '0x...',
292
+ * });
293
+ * };
294
+ *
295
+ * return <div>Gasless: {isGasless ? 'Yes' : 'No'}</div>;
296
+ * }
297
+ * ```
298
+ */
299
+ export function useSmartWallet() {
300
+ const context = useContext(SmartWalletContext);
301
+ if (!context) {
302
+ throw new Error('useSmartWallet must be used within SmartWalletProvider');
303
+ }
304
+ return context;
305
+ }
306
+ /**
307
+ * Smart Wallet Connect Button Component
308
+ *
309
+ * Pre-built button to connect smart wallet
310
+ */
311
+ export function SmartWalletConnectButton({ onConnect, onError, }) {
312
+ const { disconnect, isConnected, getAddress } = useSmartWallet();
313
+ const handleClick = async () => {
314
+ try {
315
+ if (isConnected) {
316
+ disconnect();
317
+ }
318
+ else {
319
+ // TODO: Trigger wallet connection flow
320
+ // This would integrate with Privy, thirdweb Connect, or other auth
321
+ console.log('Connect wallet...');
322
+ onConnect?.();
323
+ }
324
+ }
325
+ catch (error) {
326
+ console.error('Smart wallet connection error:', error);
327
+ onError?.(error);
328
+ }
329
+ };
330
+ return (React.createElement("button", { onClick: handleClick, style: {
331
+ padding: '12px 24px',
332
+ backgroundColor: isConnected ? '#ef4444' : '#3b82f6',
333
+ color: 'white',
334
+ border: 'none',
335
+ borderRadius: '8px',
336
+ fontSize: '16px',
337
+ fontWeight: '600',
338
+ cursor: 'pointer',
339
+ transition: 'all 0.2s',
340
+ } }, isConnected ? `Disconnect (${getAddress()?.slice(0, 6)}...)` : 'Connect Smart Wallet'));
341
+ }
342
+ /**
343
+ * Gasless Badge Component
344
+ *
345
+ * Shows gasless transaction status
346
+ */
347
+ export function GaslessBadge() {
348
+ const { isGasless } = useSmartWallet();
349
+ if (!isGasless) {
350
+ return null;
351
+ }
352
+ return (React.createElement("div", { style: {
353
+ display: 'inline-flex',
354
+ alignItems: 'center',
355
+ gap: '6px',
356
+ padding: '4px 12px',
357
+ backgroundColor: '#10b981',
358
+ color: 'white',
359
+ borderRadius: '9999px',
360
+ fontSize: '12px',
361
+ fontWeight: '600',
362
+ } },
363
+ React.createElement("span", { style: { fontSize: '10px' } }, "\u26A1"),
364
+ "Gasless"));
365
+ }
366
+ //# sourceMappingURL=SmartWalletProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartWalletProvider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