@b3dotfun/sdk 0.0.88-alpha.10 → 0.0.88-alpha.3

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 (263) hide show
  1. package/dist/cjs/anyspend/constants/index.d.ts +0 -2
  2. package/dist/cjs/anyspend/constants/index.js +1 -3
  3. package/dist/cjs/anyspend/index.d.ts +0 -2
  4. package/dist/cjs/anyspend/index.js +0 -3
  5. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +0 -6
  6. package/dist/cjs/anyspend/react/components/AnySpend.js +6 -9
  7. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
  8. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  9. package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  10. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +3 -3
  11. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
  12. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +20 -24
  13. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
  14. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +3 -3
  15. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
  16. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +1 -14
  17. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
  18. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +2 -3
  19. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +0 -4
  20. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -34
  21. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
  22. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -3
  23. package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +4 -3
  24. package/dist/cjs/anyspend/react/hooks/index.d.ts +0 -1
  25. package/dist/cjs/anyspend/react/hooks/index.js +0 -1
  26. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -1
  27. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -1
  28. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -1
  29. package/dist/cjs/anyspend/react/hooks/useValidatedClientReferenceId.js +1 -1
  30. package/dist/cjs/global-account/react/components/B3DynamicModal.js +3 -2
  31. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  32. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +57 -35
  33. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  34. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +35 -38
  35. package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +27 -0
  36. package/dist/cjs/global-account/react/components/B3Provider/types.js +24 -0
  37. package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  38. package/dist/cjs/global-account/react/components/B3Provider/useB3.js +11 -4
  39. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +2 -5
  40. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  41. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +17 -18
  42. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +2 -1
  43. package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +6 -6
  44. package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +7 -7
  45. package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +7 -7
  46. package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +5 -5
  47. package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +9 -8
  48. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  49. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +15 -11
  50. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  51. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +1 -1
  52. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +1 -1
  53. package/dist/cjs/global-account/react/components/StyleRoot.js +3 -3
  54. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +2 -1
  55. package/dist/cjs/global-account/react/components/index.d.ts +2 -1
  56. package/dist/cjs/global-account/react/components/index.js +6 -3
  57. package/dist/cjs/global-account/react/hooks/index.d.ts +0 -1
  58. package/dist/cjs/global-account/react/hooks/index.js +1 -3
  59. package/dist/cjs/global-account/react/hooks/useAuth.js +2 -1
  60. package/dist/cjs/global-account/react/hooks/useClient.js +1 -1
  61. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +1 -1
  62. package/dist/cjs/global-account/react/hooks/useNotifications.js +14 -14
  63. package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
  64. package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
  65. package/dist/cjs/global-account/react/hooks/useUserQuery.js +35 -9
  66. package/dist/cjs/global-account/react/index.native.d.ts +2 -0
  67. package/dist/cjs/global-account/react/index.native.js +5 -1
  68. package/dist/cjs/global-account/react/stores/index.d.ts +0 -1
  69. package/dist/cjs/global-account/react/stores/index.js +1 -3
  70. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +0 -10
  71. package/dist/esm/anyspend/constants/index.d.ts +0 -2
  72. package/dist/esm/anyspend/constants/index.js +0 -2
  73. package/dist/esm/anyspend/index.d.ts +0 -2
  74. package/dist/esm/anyspend/index.js +0 -3
  75. package/dist/esm/anyspend/react/components/AnySpend.d.ts +0 -6
  76. package/dist/esm/anyspend/react/components/AnySpend.js +8 -11
  77. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
  78. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  79. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  80. package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
  81. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
  82. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +4 -8
  83. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
  84. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
  85. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
  86. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +1 -14
  87. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
  88. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +2 -3
  89. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +0 -4
  90. package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -36
  91. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
  92. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -3
  93. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +4 -3
  94. package/dist/esm/anyspend/react/hooks/index.d.ts +0 -1
  95. package/dist/esm/anyspend/react/hooks/index.js +0 -1
  96. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -2
  97. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -2
  98. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +2 -2
  99. package/dist/esm/anyspend/react/hooks/useValidatedClientReferenceId.js +2 -2
  100. package/dist/esm/global-account/react/components/B3DynamicModal.js +4 -3
  101. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  102. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +58 -34
  103. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  104. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +36 -36
  105. package/dist/esm/global-account/react/components/B3Provider/types.d.ts +27 -0
  106. package/dist/esm/global-account/react/components/B3Provider/types.js +21 -0
  107. package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  108. package/dist/esm/global-account/react/components/B3Provider/useB3.js +11 -4
  109. package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +2 -5
  110. package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  111. package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +17 -18
  112. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +3 -2
  113. package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +2 -2
  114. package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +2 -2
  115. package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
  116. package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +2 -2
  117. package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +3 -2
  118. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
  119. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +16 -12
  120. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
  121. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  122. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  123. package/dist/esm/global-account/react/components/StyleRoot.js +3 -3
  124. package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +3 -2
  125. package/dist/esm/global-account/react/components/index.d.ts +2 -1
  126. package/dist/esm/global-account/react/components/index.js +2 -1
  127. package/dist/esm/global-account/react/hooks/index.d.ts +0 -1
  128. package/dist/esm/global-account/react/hooks/index.js +0 -1
  129. package/dist/esm/global-account/react/hooks/useAuth.js +3 -2
  130. package/dist/esm/global-account/react/hooks/useClient.js +2 -2
  131. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
  132. package/dist/esm/global-account/react/hooks/useNotifications.js +2 -2
  133. package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
  134. package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
  135. package/dist/esm/global-account/react/hooks/useUserQuery.js +27 -1
  136. package/dist/esm/global-account/react/index.native.d.ts +2 -0
  137. package/dist/esm/global-account/react/index.native.js +2 -0
  138. package/dist/esm/global-account/react/stores/index.d.ts +0 -1
  139. package/dist/esm/global-account/react/stores/index.js +0 -1
  140. package/dist/esm/global-account/react/stores/useModalStore.d.ts +0 -10
  141. package/dist/styles/index.css +1 -1
  142. package/dist/types/anyspend/constants/index.d.ts +0 -2
  143. package/dist/types/anyspend/index.d.ts +0 -2
  144. package/dist/types/anyspend/react/components/AnySpend.d.ts +0 -6
  145. package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
  146. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  147. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
  148. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
  149. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
  150. package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
  151. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +0 -4
  152. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
  153. package/dist/types/anyspend/react/hooks/index.d.ts +0 -1
  154. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  155. package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  156. package/dist/types/global-account/react/components/B3Provider/types.d.ts +27 -0
  157. package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  158. package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  159. package/dist/types/global-account/react/components/index.d.ts +2 -1
  160. package/dist/types/global-account/react/hooks/index.d.ts +0 -1
  161. package/dist/types/global-account/react/index.native.d.ts +2 -0
  162. package/dist/types/global-account/react/stores/index.d.ts +0 -1
  163. package/dist/types/global-account/react/stores/useModalStore.d.ts +0 -10
  164. package/package.json +1 -1
  165. package/src/anyspend/constants/index.ts +0 -3
  166. package/src/anyspend/index.ts +0 -4
  167. package/src/anyspend/react/components/AnySpend.tsx +2 -28
  168. package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +0 -6
  169. package/src/anyspend/react/components/AnySpendCustom.tsx +47 -52
  170. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +0 -23
  171. package/src/anyspend/react/components/AnySpendDeposit.tsx +1 -18
  172. package/src/anyspend/react/components/AnyspendDepositHype.tsx +0 -4
  173. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +1 -15
  174. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +1 -5
  175. package/src/anyspend/react/components/common/OrderDetails.tsx +42 -60
  176. package/src/anyspend/react/components/common/PanelOnramp.tsx +1 -5
  177. package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +4 -3
  178. package/src/anyspend/react/hooks/index.ts +0 -1
  179. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
  180. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -2
  181. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +2 -2
  182. package/src/anyspend/react/hooks/useValidatedClientReferenceId.ts +2 -2
  183. package/src/global-account/react/components/B3DynamicModal.tsx +4 -3
  184. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +54 -43
  185. package/src/global-account/react/components/B3Provider/B3Provider.tsx +117 -44
  186. package/src/global-account/react/components/B3Provider/types.ts +50 -0
  187. package/src/global-account/react/components/B3Provider/useB3.ts +13 -4
  188. package/src/global-account/react/components/B3Provider/useB3Account.ts +2 -6
  189. package/src/global-account/react/components/B3Provider/useB3Config.ts +31 -18
  190. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +4 -2
  191. package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +2 -2
  192. package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +2 -2
  193. package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +2 -2
  194. package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
  195. package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +4 -4
  196. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -2
  197. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -11
  198. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
  199. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
  200. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
  201. package/src/global-account/react/components/StyleRoot.tsx +3 -3
  202. package/src/global-account/react/components/custom/ManageAccountButton.tsx +3 -2
  203. package/src/global-account/react/components/index.ts +2 -1
  204. package/src/global-account/react/hooks/index.ts +0 -1
  205. package/src/global-account/react/hooks/useAuth.ts +3 -2
  206. package/src/global-account/react/hooks/useClient.ts +2 -2
  207. package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
  208. package/src/global-account/react/hooks/useNotifications.ts +2 -2
  209. package/src/global-account/react/hooks/useTokenBalance.tsx +7 -8
  210. package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +2 -4
  211. package/src/global-account/react/hooks/useUserQuery.ts +40 -1
  212. package/src/global-account/react/index.native.ts +2 -0
  213. package/src/global-account/react/stores/index.ts +0 -1
  214. package/src/global-account/react/stores/useModalStore.ts +0 -10
  215. package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  216. package/dist/cjs/anyspend/react/components/common/GasIndicator.js +0 -34
  217. package/dist/cjs/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  218. package/dist/cjs/anyspend/react/hooks/useGasPrice.js +0 -43
  219. package/dist/cjs/anyspend/services/gas.d.ts +0 -21
  220. package/dist/cjs/anyspend/services/gas.js +0 -65
  221. package/dist/cjs/anyspend/types/gas.d.ts +0 -61
  222. package/dist/cjs/anyspend/types/gas.js +0 -2
  223. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  224. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -12
  225. package/dist/cjs/global-account/react/hooks/useUser.d.ts +0 -60
  226. package/dist/cjs/global-account/react/hooks/useUser.js +0 -20
  227. package/dist/cjs/global-account/react/stores/configStore.d.ts +0 -24
  228. package/dist/cjs/global-account/react/stores/configStore.js +0 -30
  229. package/dist/cjs/global-account/react/stores/userStore.d.ts +0 -22
  230. package/dist/cjs/global-account/react/stores/userStore.js +0 -30
  231. package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  232. package/dist/esm/anyspend/react/components/common/GasIndicator.js +0 -31
  233. package/dist/esm/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  234. package/dist/esm/anyspend/react/hooks/useGasPrice.js +0 -40
  235. package/dist/esm/anyspend/services/gas.d.ts +0 -21
  236. package/dist/esm/anyspend/services/gas.js +0 -59
  237. package/dist/esm/anyspend/types/gas.d.ts +0 -61
  238. package/dist/esm/anyspend/types/gas.js +0 -1
  239. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  240. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -10
  241. package/dist/esm/global-account/react/hooks/useUser.d.ts +0 -60
  242. package/dist/esm/global-account/react/hooks/useUser.js +0 -17
  243. package/dist/esm/global-account/react/stores/configStore.d.ts +0 -24
  244. package/dist/esm/global-account/react/stores/configStore.js +0 -27
  245. package/dist/esm/global-account/react/stores/userStore.d.ts +0 -22
  246. package/dist/esm/global-account/react/stores/userStore.js +0 -27
  247. package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  248. package/dist/types/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  249. package/dist/types/anyspend/services/gas.d.ts +0 -21
  250. package/dist/types/anyspend/types/gas.d.ts +0 -61
  251. package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  252. package/dist/types/global-account/react/hooks/useUser.d.ts +0 -60
  253. package/dist/types/global-account/react/stores/configStore.d.ts +0 -24
  254. package/dist/types/global-account/react/stores/userStore.d.ts +0 -22
  255. package/src/anyspend/react/components/common/GasIndicator.tsx +0 -59
  256. package/src/anyspend/react/hooks/useGasPrice.ts +0 -70
  257. package/src/anyspend/services/gas.test.ts +0 -31
  258. package/src/anyspend/services/gas.ts +0 -73
  259. package/src/anyspend/types/gas.ts +0 -66
  260. package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +0 -19
  261. package/src/global-account/react/hooks/useUser.ts +0 -20
  262. package/src/global-account/react/stores/configStore.ts +0 -51
  263. package/src/global-account/react/stores/userStore.ts +0 -41
@@ -1,8 +1,9 @@
1
1
  // TODO woj: Barrel file for all components, this might be reason of bundle size issues
2
2
  // Core Components
3
3
  export { B3DynamicModal } from "./B3DynamicModal";
4
- export { B3Provider } from "./B3Provider/B3Provider";
4
+ export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
5
5
  export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
6
+ export { B3Context, type B3ContextType } from "./B3Provider/types";
6
7
  export { useB3 } from "./B3Provider/useB3";
7
8
  export { useB3Account } from "./B3Provider/useB3Account";
8
9
  export { useB3Config } from "./B3Provider/useB3Config";
@@ -52,4 +52,3 @@ export { useTokensFromAddress } from "./useTokensFromAddress";
52
52
  export { useTurnkeyAuth } from "./useTurnkeyAuth";
53
53
  export { useUnifiedChainSwitchAndExecute } from "./useUnifiedChainSwitchAndExecute";
54
54
  export { useURLParams } from "./useURLParams";
55
- export { useUser } from "./useUser";
@@ -1,6 +1,6 @@
1
1
  import app from "@b3dotfun/sdk/global-account/app";
2
2
  import { authenticateWithB3JWT } from "@b3dotfun/sdk/global-account/bsmnt";
3
- import { useAuthStore, useB3Config } from "@b3dotfun/sdk/global-account/react";
3
+ import { useAuthStore } from "@b3dotfun/sdk/global-account/react";
4
4
  import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
5
5
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
6
6
  import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
@@ -18,6 +18,7 @@ import { Wallet, ecosystemWallet } from "thirdweb/wallets";
18
18
  import { preAuthenticate } from "thirdweb/wallets/in-app";
19
19
  import { useAccount, useConnect, useSwitchAccount } from "wagmi";
20
20
  import { LocalSDKContext } from "../components/B3Provider/LocalSDKProvider";
21
+ import { useB3 } from "../components/B3Provider/useB3";
21
22
  import { createWagmiConfig } from "../utils/createWagmiConfig";
22
23
  import { useSearchParam } from "./useSearchParamsSSR";
23
24
  import { useUserQuery } from "./useUserQuery";
@@ -47,7 +48,7 @@ export function useAuth() {
47
48
  const hasStartedConnecting = useAuthStore(state => state.hasStartedConnecting);
48
49
  const useAutoConnectLoadingPrevious = useRef(false);
49
50
  const referralCode = useSearchParam("referralCode");
50
- const { partnerId } = useB3Config();
51
+ const { partnerId } = useB3();
51
52
  const wagmiConfig = createWagmiConfig({ partnerId });
52
53
  const { connect } = useConnect();
53
54
  const activeWagmiAccount = useAccount();
@@ -1,4 +1,4 @@
1
- import { useB3Config } from "@b3dotfun/sdk/global-account/react";
1
+ import { useB3 } from "@b3dotfun/sdk/global-account/react";
2
2
  import { useCallback } from "react";
3
3
  import {
4
4
  ClientType,
@@ -13,7 +13,7 @@ import {
13
13
  * Hook to access the current FeathersJS client and client management utilities
14
14
  */
15
15
  export function useClient() {
16
- const { clientType } = useB3Config();
16
+ const { clientType } = useB3();
17
17
 
18
18
  const getCurrentClient = useCallback(() => {
19
19
  return getClient();
@@ -1,4 +1,4 @@
1
- import { useB3Config, useConnect } from "@b3dotfun/sdk/global-account/react";
1
+ import { useB3, useConnect } from "@b3dotfun/sdk/global-account/react";
2
2
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
3
  import { useIdentityToken, usePrivy } from "@privy-io/react-auth";
4
4
  import { useCallback, useRef, useState } from "react";
@@ -11,7 +11,7 @@ const debug = debugB3React("@@b3:useHandleConnectWithPrivy");
11
11
  * Currently, this is for the basement-privy strategy
12
12
  */
13
13
  export function useHandleConnectWithPrivy(chain?: Chain, onSuccess?: (account: Account) => void) {
14
- const { partnerId } = useB3Config();
14
+ const { partnerId } = useB3();
15
15
  if (!chain) {
16
16
  throw new Error("Chain is required");
17
17
  }
@@ -1,7 +1,7 @@
1
- import { useB3Config } from "@b3dotfun/sdk/global-account/react";
2
1
  import { getAuthToken } from "@b3dotfun/sdk/shared/utils/auth-token";
3
2
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
4
3
  import { useCallback, useEffect, useState } from "react";
4
+ import { useB3 } from "../components";
5
5
  import { notificationsAPI, UserData } from "../utils/notificationsAPI";
6
6
  import { useUserQuery } from "./useUserQuery";
7
7
 
@@ -56,7 +56,7 @@ export interface UseNotificationsReturn {
56
56
  */
57
57
  export function useNotifications(): UseNotificationsReturn {
58
58
  const { user } = useUserQuery();
59
- const { partnerId } = useB3Config();
59
+ const { partnerId } = useB3();
60
60
  const [userData, setUserData] = useState<UserData | null>(null);
61
61
  const [loading, setLoading] = useState(true);
62
62
  const [error, setError] = useState<string | null>(null);
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  import { isNativeToken } from "@b3dotfun/sdk/anyspend";
4
- import { components } from "@b3dotfun/sdk/anyspend/types/api";
5
- import { useAccountWallet, useAuthStore } from "@b3dotfun/sdk/global-account/react";
4
+ import { useB3, useAccountWallet } from "@b3dotfun/sdk/global-account/react";
6
5
  import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
7
6
  import { getERC20Balances, getNativeTokenBalance } from "@b3dotfun/sdk/shared/utils/thirdweb-insights";
8
7
  import { useQuery } from "@tanstack/react-query";
9
8
  import { useEffect } from "react";
9
+ import { components } from "@b3dotfun/sdk/anyspend/types/api";
10
10
 
11
11
  interface UseTokenBalanceProps {
12
12
  token: components["schemas"]["Token"];
@@ -20,8 +20,7 @@ export interface TokenBalanceResult {
20
20
  }
21
21
 
22
22
  export function useTokenBalance({ token, address }: UseTokenBalanceProps): TokenBalanceResult {
23
- const isAuthenticated = useAuthStore(state => state.isAuthenticated);
24
-
23
+ const { ready } = useB3();
25
24
  const account = useAccountWallet();
26
25
 
27
26
  const effectiveAddress = address || account?.address;
@@ -61,7 +60,7 @@ export function useTokenBalance({ token, address }: UseTokenBalanceProps): Token
61
60
  }
62
61
  return { formatted: "0", raw: null };
63
62
  },
64
- enabled: isAuthenticated && !!effectiveAddress,
63
+ enabled: ready && !!effectiveAddress,
65
64
  staleTime: 30000,
66
65
  gcTime: 5 * 60 * 1000,
67
66
  retry: 2,
@@ -70,13 +69,13 @@ export function useTokenBalance({ token, address }: UseTokenBalanceProps): Token
70
69
 
71
70
  // Force a refetch when the wallet or token changes
72
71
  useEffect(() => {
73
- if (isAuthenticated && effectiveAddress) {
72
+ if (ready && effectiveAddress) {
74
73
  refetch();
75
74
  }
76
- }, [isAuthenticated, effectiveAddress, token.address, token.chainId, token.symbol, refetch]);
75
+ }, [ready, effectiveAddress, token.address, token.chainId, token.symbol, refetch]);
77
76
 
78
77
  // Determine if we're actually loading
79
- const isActuallyLoading = !isAuthenticated || !effectiveAddress || isLoading || (isFetching && !tokenBalance);
78
+ const isActuallyLoading = !ready || !effectiveAddress || isLoading || (isFetching && !tokenBalance);
80
79
 
81
80
  return {
82
81
  rawBalance: tokenBalance?.raw || BigInt(0),
@@ -6,8 +6,8 @@ import { useQuery } from "@tanstack/react-query";
6
6
  import { viemToThirdwebChain } from "@b3dotfun/sdk/shared/constants/chains/b3Chain";
7
7
  import { getChainById } from "@b3dotfun/sdk/shared/utils/chains";
8
8
  import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
9
- import invariant from "invariant";
10
9
  import { getWalletBalance } from "thirdweb/wallets";
10
+ import invariant from "invariant";
11
11
 
12
12
  type GetWalletBalanceResult = {
13
13
  value: bigint;
@@ -83,9 +83,7 @@ export function useTokenBalancesByChain({
83
83
  staleTime: 30000, // Consider data fresh for 30 seconds
84
84
  gcTime: 5 * 60 * 1000, // Keep in cache for 5 minutes
85
85
  retry: 2, // Limit retries on failure
86
- // Enable structural sharing to prevent infinite loops
87
- // This ensures we only get new references when data actually changes
88
- structuralSharing: true,
86
+ structuralSharing: false,
89
87
  });
90
88
 
91
89
  return {
@@ -1,9 +1,48 @@
1
1
  import { Users } from "@b3dotfun/b3-api";
2
+ import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
2
3
  import { useEffect } from "react";
3
- import { useUserStore } from "../stores/userStore";
4
+ import { create } from "zustand";
5
+ import { persist } from "zustand/middleware";
6
+
7
+ const debug = debugB3React("useUserQuery");
4
8
 
5
9
  const USER_QUERY_KEY = ["b3-user"];
6
10
 
11
+ interface UserStore {
12
+ user: Users | null;
13
+ setUser: (user: Users | undefined) => void;
14
+ clearUser: () => void;
15
+ }
16
+
17
+ /**
18
+ * Zustand store for managing user state
19
+ * Persists user data to localStorage
20
+ */
21
+ const useUserStore = create<UserStore>()(
22
+ persist(
23
+ set => ({
24
+ user: null,
25
+ setUser: (newUser: Users | undefined) => {
26
+ const userToSave = newUser ?? null;
27
+ set({ user: userToSave });
28
+ debug("User updated", userToSave);
29
+ },
30
+ clearUser: () => {
31
+ set({ user: null });
32
+ debug("User cleared");
33
+ },
34
+ }),
35
+ {
36
+ name: "b3-user",
37
+ onRehydrateStorage: () => (_, error) => {
38
+ if (error) {
39
+ console.warn("Failed to rehydrate user store:", error);
40
+ }
41
+ },
42
+ },
43
+ ),
44
+ );
45
+
7
46
  /**
8
47
  * NOTE: THIS IS ONLY MEANT FOR INTERNAL USE, from useOnConnect
9
48
  *
@@ -6,6 +6,8 @@
6
6
 
7
7
  export { B3Provider } from "./components/B3Provider/B3Provider.native";
8
8
 
9
+ export { B3Context, type B3ContextType } from "./components/B3Provider/types";
10
+ export { useB3 } from "./components/B3Provider/useB3";
9
11
  export { useAccountWallet } from "./hooks/useAccountWallet";
10
12
  export { useAuthentication } from "./hooks/useAuthentication";
11
13
  export { useProfile } from "./hooks/useProfile";
@@ -1,5 +1,4 @@
1
1
  export { useAuthStore } from "./useAuthStore";
2
- export { useB3ConfigStore } from "./configStore";
3
2
  export { useModalStore } from "./useModalStore";
4
3
  export { useRecentAddressesStore } from "./useRecentAddressesStore";
5
4
 
@@ -426,12 +426,6 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
426
426
  customUsdInputValues?: string[];
427
427
  /** prefer eoa wallet */
428
428
  preferEoa?: boolean;
429
- /** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
430
- returnToHomeUrl?: string;
431
- /** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
432
- customRecipientLabel?: string;
433
- /** Custom label for the return home button (overrides "Return to Home" / "Close") */
434
- returnHomeLabel?: string;
435
429
  }
436
430
 
437
431
  export interface AvatarEditorModalProps extends BaseModalProps {
@@ -505,10 +499,6 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
505
499
  vendingMachineId: string;
506
500
  /** The pack type */
507
501
  packType: string;
508
- /** Active tab */
509
- activeTab?: "crypto" | "fiat";
510
- /** Force fiat payment */
511
- forceFiatPayment?: boolean;
512
502
  }
513
503
 
514
504
  /**
@@ -1,6 +0,0 @@
1
- import type { GasPriceData } from "../../../types/gas";
2
- export interface GasIndicatorProps {
3
- gasPrice: GasPriceData;
4
- className?: string;
5
- }
6
- export declare function GasIndicator({ gasPrice, className }: GasIndicatorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.GasIndicator = GasIndicator;
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const cn_1 = require("../../../../shared/utils/cn");
7
- const react_1 = require("motion/react");
8
- const LEVEL_LABELS = {
9
- low: "Low",
10
- normal: "Normal",
11
- elevated: "Elevated",
12
- high: "High",
13
- spike: "Spike",
14
- };
15
- const LEVEL_STYLES = {
16
- low: "bg-green-500/20 text-green-500",
17
- normal: "bg-as-surface-tertiary text-as-secondary",
18
- elevated: "bg-yellow-500/20 text-yellow-600",
19
- high: "bg-orange-500/20 text-orange-500",
20
- spike: "bg-red-500/20 text-red-500",
21
- };
22
- function formatGasPrice(gweiString) {
23
- const gwei = parseFloat(gweiString);
24
- if (gwei < 0.001)
25
- return "<0.001";
26
- if (gwei < 1)
27
- return gwei.toFixed(3);
28
- if (gwei < 10)
29
- return gwei.toFixed(2);
30
- return gwei.toFixed(1);
31
- }
32
- function GasIndicator({ gasPrice, className }) {
33
- return ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2 }, className: (0, cn_1.cn)("flex items-center justify-between rounded-lg px-3 py-2", gasPrice.isSpike ? "bg-yellow-500/10" : "bg-as-surface-secondary", className), children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2", children: (0, jsx_runtime_1.jsxs)("span", { className: "text-as-secondary text-xs", children: ["Gas on ", gasPrice.chainName] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.cn)("rounded px-1.5 py-0.5 text-xs font-medium", LEVEL_STYLES[gasPrice.level]), children: LEVEL_LABELS[gasPrice.level] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-as-primary text-xs font-medium", children: [formatGasPrice(gasPrice.gasPriceGwei), " Gwei"] })] })] }));
34
- }
@@ -1,37 +0,0 @@
1
- import type { GasPriceData } from "../../types/gas";
2
- export interface UseGasPriceOptions {
3
- /** Refetch interval in ms (default: 10000 = 10s) */
4
- refetchInterval?: number;
5
- /** Whether to enable the query (default: true if chainId is supported) */
6
- enabled?: boolean;
7
- }
8
- export interface UseGasPriceResult {
9
- /** Gas price data */
10
- gasPrice: GasPriceData | undefined;
11
- /** Whether the query is loading */
12
- isLoading: boolean;
13
- /** Whether there's an error */
14
- isError: boolean;
15
- /** Error object if any */
16
- error: Error | null;
17
- /** Whether gas is currently spiking */
18
- isSpike: boolean;
19
- /** Refetch function */
20
- refetch: () => void;
21
- }
22
- /**
23
- * React hook to fetch current gas price for a chain.
24
- *
25
- * @param chainId - The chain ID to fetch gas price for
26
- * @param options - Optional configuration
27
- *
28
- * @example
29
- * ```tsx
30
- * const { gasPrice, isSpike, isLoading } = useGasPrice(8453); // Base
31
- *
32
- * if (isSpike) {
33
- * return <Warning>Gas prices are high: {gasPrice?.recommendation}</Warning>;
34
- * }
35
- * ```
36
- */
37
- export declare function useGasPrice(chainId: number | undefined, options?: UseGasPriceOptions): UseGasPriceResult;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useGasPrice = useGasPrice;
4
- const react_query_1 = require("@tanstack/react-query");
5
- const react_1 = require("react");
6
- const gas_1 = require("../../services/gas");
7
- /**
8
- * React hook to fetch current gas price for a chain.
9
- *
10
- * @param chainId - The chain ID to fetch gas price for
11
- * @param options - Optional configuration
12
- *
13
- * @example
14
- * ```tsx
15
- * const { gasPrice, isSpike, isLoading } = useGasPrice(8453); // Base
16
- *
17
- * if (isSpike) {
18
- * return <Warning>Gas prices are high: {gasPrice?.recommendation}</Warning>;
19
- * }
20
- * ```
21
- */
22
- function useGasPrice(chainId, options = {}) {
23
- const { refetchInterval = 10000, enabled } = options;
24
- const isSupported = chainId !== undefined && (0, gas_1.isGasOracleSupported)(chainId);
25
- const queryEnabled = enabled ?? isSupported;
26
- const { data, isLoading, isError, error, refetch } = (0, react_query_1.useQuery)({
27
- queryKey: ["gasPrice", chainId],
28
- queryFn: () => gas_1.gasService.fetch(chainId),
29
- enabled: queryEnabled && chainId !== undefined,
30
- refetchInterval,
31
- staleTime: 5000, // Consider data fresh for 5s
32
- retry: 2,
33
- refetchOnWindowFocus: true,
34
- });
35
- return (0, react_1.useMemo)(() => ({
36
- gasPrice: data,
37
- isLoading,
38
- isError,
39
- error: error,
40
- isSpike: data?.isSpike ?? false,
41
- refetch,
42
- }), [data, isLoading, isError, error, refetch]);
43
- }
@@ -1,21 +0,0 @@
1
- import type { GasOracleResponse, GasPriceData } from "../types/gas";
2
- /** Supported chain IDs for gas oracle */
3
- export declare const GAS_ORACLE_SUPPORTED_CHAINS: readonly [1, 137, 42161, 8453, 56, 10, 43114, 8333, 2741, 4689, 3338, 1329];
4
- export type GasOracleSupportedChainId = (typeof GAS_ORACLE_SUPPORTED_CHAINS)[number];
5
- /** Check if a chain is supported by the gas oracle */
6
- export declare function isGasOracleSupported(chainId: number): chainId is GasOracleSupportedChainId;
7
- /** Fetch gas price data from the gas oracle */
8
- export declare function fetchGasPrice(chainId: number): Promise<GasOracleResponse>;
9
- /** Transform raw oracle response to simplified UI data */
10
- export declare function toGasPriceData(response: GasOracleResponse): GasPriceData;
11
- /** Gas service for fetching and transforming gas data */
12
- export declare const gasService: {
13
- /** Fetch raw gas oracle response */
14
- fetchRaw: typeof fetchGasPrice;
15
- /** Fetch and transform to UI-friendly format */
16
- fetch: (chainId: number) => Promise<GasPriceData>;
17
- /** Check if chain is supported */
18
- isSupported: typeof isGasOracleSupported;
19
- /** List of supported chain IDs */
20
- supportedChains: readonly [1, 137, 42161, 8453, 56, 10, 43114, 8333, 2741, 4689, 3338, 1329];
21
- };
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gasService = exports.GAS_ORACLE_SUPPORTED_CHAINS = void 0;
4
- exports.isGasOracleSupported = isGasOracleSupported;
5
- exports.fetchGasPrice = fetchGasPrice;
6
- exports.toGasPriceData = toGasPriceData;
7
- const constants_1 = require("../constants");
8
- /** Supported chain IDs for gas oracle */
9
- exports.GAS_ORACLE_SUPPORTED_CHAINS = [
10
- 1, // Ethereum
11
- 137, // Polygon
12
- 42161, // Arbitrum
13
- 8453, // Base
14
- 56, // BSC
15
- 10, // Optimism
16
- 43114, // Avalanche
17
- 8333, // B3
18
- 2741, // Abstract
19
- 4689, // IoTeX
20
- 3338, // Peaq
21
- 1329, // Sei
22
- ];
23
- /** Check if a chain is supported by the gas oracle */
24
- function isGasOracleSupported(chainId) {
25
- return exports.GAS_ORACLE_SUPPORTED_CHAINS.includes(chainId);
26
- }
27
- /** Fetch gas price data from the gas oracle */
28
- async function fetchGasPrice(chainId) {
29
- const response = await fetch(`${constants_1.GAS_ORACLE_BASE_URL}/gas/${chainId}`);
30
- if (!response.ok) {
31
- throw new Error(`Failed to fetch gas price for chain ${chainId}: ${response.status}`);
32
- }
33
- return response.json();
34
- }
35
- /** Transform raw oracle response to simplified UI data */
36
- function toGasPriceData(response) {
37
- const { analysis } = response;
38
- const isSpike = analysis.level === "elevated" || analysis.level === "high" || analysis.level === "spike";
39
- return {
40
- chainId: response.chainId,
41
- chainName: response.chainName,
42
- gasPriceGwei: response.gasPrice.standard,
43
- baseFeeGwei: response.eip1559?.baseFee,
44
- level: analysis.level,
45
- isSpike,
46
- recommendation: analysis.recommendation,
47
- vsMedian: analysis.vs1h, // Use 1h as primary comparison
48
- source: response.source,
49
- timestamp: response.timestamp,
50
- };
51
- }
52
- /** Gas service for fetching and transforming gas data */
53
- exports.gasService = {
54
- /** Fetch raw gas oracle response */
55
- fetchRaw: fetchGasPrice,
56
- /** Fetch and transform to UI-friendly format */
57
- fetch: async (chainId) => {
58
- const response = await fetchGasPrice(chainId);
59
- return toGasPriceData(response);
60
- },
61
- /** Check if chain is supported */
62
- isSupported: isGasOracleSupported,
63
- /** List of supported chain IDs */
64
- supportedChains: exports.GAS_ORACLE_SUPPORTED_CHAINS,
65
- };
@@ -1,61 +0,0 @@
1
- /** Gas level classification based on historical percentiles */
2
- export type GasLevel = "low" | "normal" | "elevated" | "high" | "spike";
3
- /** Gas prices in Gwei for different speed tiers */
4
- export interface GasPrices {
5
- low: string;
6
- standard: string;
7
- fast: string;
8
- instant?: string;
9
- }
10
- /** EIP-1559 specific gas data */
11
- export interface Eip1559Data {
12
- baseFee: string;
13
- maxPriorityFee: GasPrices;
14
- maxFee: GasPrices;
15
- }
16
- /** Spike analysis comparing current gas to historical data */
17
- export interface GasSpikeAnalysis {
18
- level: GasLevel;
19
- percentile: number;
20
- /** Ratio to 1h median (primary spike detection) */
21
- vs1h: number;
22
- /** Ratio to 4h median (short-term context) */
23
- vs4h: number;
24
- /** Ratio to 24h median (daily context) */
25
- vs24h: number;
26
- recommendation: string;
27
- }
28
- /** Full gas response from the gas oracle */
29
- export interface GasOracleResponse {
30
- chainId: number;
31
- chainName: string;
32
- timestamp: string;
33
- blockNumber?: number;
34
- source: "blocknative" | "rpc";
35
- gasPrice: GasPrices;
36
- eip1559?: Eip1559Data;
37
- analysis: GasSpikeAnalysis;
38
- cached: boolean;
39
- cacheAge?: number;
40
- }
41
- /** Simplified gas data for UI display */
42
- export interface GasPriceData {
43
- chainId: number;
44
- chainName: string;
45
- /** Standard gas price in Gwei */
46
- gasPriceGwei: string;
47
- /** Base fee in Gwei (EIP-1559 chains) */
48
- baseFeeGwei?: string;
49
- /** Gas level classification */
50
- level: GasLevel;
51
- /** Whether gas is currently spiking (elevated, high, or spike) */
52
- isSpike: boolean;
53
- /** Human-readable recommendation */
54
- recommendation: string;
55
- /** Ratio to recent median (1 = normal, >1.5 = elevated) */
56
- vsMedian: number;
57
- /** Data source */
58
- source: "blocknative" | "rpc";
59
- /** Timestamp of the data */
60
- timestamp: string;
61
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- declare const AuthenticationProvider: ({ partnerId, automaticallySetFirstEoa, }: {
2
- partnerId: string;
3
- automaticallySetFirstEoa: boolean;
4
- }) => null;
5
- export default AuthenticationProvider;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const hooks_1 = require("../../hooks");
4
- const useAutoSelectWallet_1 = require("../../hooks/useAutoSelectWallet");
5
- const AuthenticationProvider = ({ partnerId, automaticallySetFirstEoa, }) => {
6
- (0, hooks_1.useAuthentication)(partnerId);
7
- (0, useAutoSelectWallet_1.useAutoSelectWallet)({
8
- enabled: automaticallySetFirstEoa,
9
- });
10
- return null;
11
- };
12
- exports.default = AuthenticationProvider;
@@ -1,60 +0,0 @@
1
- /**
2
- * Preferred Hook to get the user data
3
- */
4
- export declare function useUser(): {
5
- user: {
6
- email?: string | undefined;
7
- username?: string | undefined;
8
- telNumber?: string | undefined;
9
- ens?: string | undefined;
10
- avatar?: string | undefined;
11
- preferences?: {} | undefined;
12
- referredBy?: string | {} | undefined;
13
- sourceApp?: string | undefined;
14
- referralCode?: string | undefined;
15
- userGroups?: number[] | undefined;
16
- isMigratedFromBSMNT?: boolean | undefined;
17
- privyLinkedAccounts?: {
18
- name?: string | undefined;
19
- address?: string | undefined;
20
- email?: string | undefined;
21
- chain_type?: string | undefined;
22
- lv?: number | undefined;
23
- wallet_client_type?: string | undefined;
24
- smart_wallet_type?: string | undefined;
25
- subject?: string | undefined;
26
- type: string;
27
- }[] | undefined;
28
- twProfiles?: {
29
- type: string;
30
- details: {
31
- id?: string | undefined;
32
- name?: string | undefined;
33
- address?: string | undefined;
34
- email?: string | undefined;
35
- username?: string | undefined;
36
- phone?: string | undefined;
37
- fid?: string | undefined;
38
- };
39
- }[] | undefined;
40
- turnkeySubOrgs?: {
41
- hasDelegatedUser?: boolean | undefined;
42
- subOrgId: string;
43
- accounts: Record<string, any>[];
44
- }[] | undefined;
45
- _id: string | {};
46
- userId: string;
47
- smartAccountAddress: string;
48
- createdAt: number;
49
- updatedAt: number;
50
- partnerIds: {
51
- privyId?: string | undefined;
52
- thirdwebId?: string | undefined;
53
- turnkeyId?: string | undefined;
54
- turnkeyOtpId?: string | undefined;
55
- };
56
- } | null;
57
- isConnecting: boolean;
58
- isConnected: boolean;
59
- isAuthenticating: boolean;
60
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useUser = useUser;
4
- const react_1 = require("../../../global-account/react");
5
- const userStore_1 = require("../stores/userStore");
6
- /**
7
- * Preferred Hook to get the user data
8
- */
9
- function useUser() {
10
- const user = (0, userStore_1.useUserStore)(state => state.user);
11
- const isConnecting = (0, react_1.useAuthStore)(state => state.isConnecting);
12
- const isConnected = (0, react_1.useAuthStore)(state => state.isConnected);
13
- const isAuthenticating = (0, react_1.useAuthStore)(state => state.isAuthenticating);
14
- return {
15
- user,
16
- isConnecting,
17
- isConnected,
18
- isAuthenticating,
19
- };
20
- }