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

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 (281) 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/RelayKitProviderWrapper.js +1 -3
  36. package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +27 -0
  37. package/dist/cjs/global-account/react/components/B3Provider/types.js +24 -0
  38. package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  39. package/dist/cjs/global-account/react/components/B3Provider/useB3.js +11 -4
  40. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +2 -5
  41. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  42. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +17 -18
  43. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +2 -1
  44. package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +6 -6
  45. package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +7 -7
  46. package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +7 -7
  47. package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +5 -5
  48. package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +9 -8
  49. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  50. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +20 -76
  51. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  52. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +1 -1
  53. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +1 -1
  54. package/dist/cjs/global-account/react/components/StyleRoot.js +3 -3
  55. package/dist/cjs/global-account/react/components/TurnkeyAuthModal.js +1 -3
  56. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +2 -1
  57. package/dist/cjs/global-account/react/components/index.d.ts +2 -1
  58. package/dist/cjs/global-account/react/components/index.js +6 -3
  59. package/dist/cjs/global-account/react/hooks/index.d.ts +0 -2
  60. package/dist/cjs/global-account/react/hooks/index.js +1 -5
  61. package/dist/cjs/global-account/react/hooks/useClient.js +1 -1
  62. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +1 -1
  63. package/dist/cjs/global-account/react/hooks/useNotifications.js +14 -14
  64. package/dist/cjs/global-account/react/hooks/useTWAuth.d.ts +0 -3
  65. package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -8
  66. package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
  67. package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
  68. package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +22 -50
  69. package/dist/cjs/global-account/react/hooks/useUserQuery.js +35 -9
  70. package/dist/cjs/global-account/react/index.native.d.ts +2 -0
  71. package/dist/cjs/global-account/react/index.native.js +5 -1
  72. package/dist/cjs/global-account/react/stores/index.d.ts +0 -1
  73. package/dist/cjs/global-account/react/stores/index.js +1 -3
  74. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +0 -10
  75. package/dist/esm/anyspend/constants/index.d.ts +0 -2
  76. package/dist/esm/anyspend/constants/index.js +0 -2
  77. package/dist/esm/anyspend/index.d.ts +0 -2
  78. package/dist/esm/anyspend/index.js +0 -3
  79. package/dist/esm/anyspend/react/components/AnySpend.d.ts +0 -6
  80. package/dist/esm/anyspend/react/components/AnySpend.js +8 -11
  81. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
  82. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  83. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  84. package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
  85. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
  86. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +4 -8
  87. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
  88. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
  89. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
  90. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +1 -14
  91. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
  92. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +2 -3
  93. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +0 -4
  94. package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -36
  95. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
  96. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -3
  97. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +4 -3
  98. package/dist/esm/anyspend/react/hooks/index.d.ts +0 -1
  99. package/dist/esm/anyspend/react/hooks/index.js +0 -1
  100. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -2
  101. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -2
  102. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +2 -2
  103. package/dist/esm/anyspend/react/hooks/useValidatedClientReferenceId.js +2 -2
  104. package/dist/esm/global-account/react/components/B3DynamicModal.js +4 -3
  105. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  106. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +58 -34
  107. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  108. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +36 -36
  109. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +1 -3
  110. package/dist/esm/global-account/react/components/B3Provider/types.d.ts +27 -0
  111. package/dist/esm/global-account/react/components/B3Provider/types.js +21 -0
  112. package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  113. package/dist/esm/global-account/react/components/B3Provider/useB3.js +11 -4
  114. package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +2 -5
  115. package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  116. package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +17 -18
  117. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +3 -2
  118. package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +2 -2
  119. package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +2 -2
  120. package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
  121. package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +2 -2
  122. package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +3 -2
  123. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
  124. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +20 -76
  125. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
  126. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  127. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  128. package/dist/esm/global-account/react/components/StyleRoot.js +3 -3
  129. package/dist/esm/global-account/react/components/TurnkeyAuthModal.js +3 -5
  130. package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +3 -2
  131. package/dist/esm/global-account/react/components/index.d.ts +2 -1
  132. package/dist/esm/global-account/react/components/index.js +2 -1
  133. package/dist/esm/global-account/react/hooks/index.d.ts +0 -2
  134. package/dist/esm/global-account/react/hooks/index.js +0 -2
  135. package/dist/esm/global-account/react/hooks/useClient.js +2 -2
  136. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
  137. package/dist/esm/global-account/react/hooks/useNotifications.js +2 -2
  138. package/dist/esm/global-account/react/hooks/useTWAuth.d.ts +0 -3
  139. package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -8
  140. package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
  141. package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
  142. package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +22 -50
  143. package/dist/esm/global-account/react/hooks/useUserQuery.js +27 -1
  144. package/dist/esm/global-account/react/index.native.d.ts +2 -0
  145. package/dist/esm/global-account/react/index.native.js +2 -0
  146. package/dist/esm/global-account/react/stores/index.d.ts +0 -1
  147. package/dist/esm/global-account/react/stores/index.js +0 -1
  148. package/dist/esm/global-account/react/stores/useModalStore.d.ts +0 -10
  149. package/dist/styles/index.css +1 -1
  150. package/dist/types/anyspend/constants/index.d.ts +0 -2
  151. package/dist/types/anyspend/index.d.ts +0 -2
  152. package/dist/types/anyspend/react/components/AnySpend.d.ts +0 -6
  153. package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
  154. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  155. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
  156. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
  157. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
  158. package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
  159. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +0 -4
  160. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
  161. package/dist/types/anyspend/react/hooks/index.d.ts +0 -1
  162. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  163. package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  164. package/dist/types/global-account/react/components/B3Provider/types.d.ts +27 -0
  165. package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +4 -14
  166. package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  167. package/dist/types/global-account/react/components/index.d.ts +2 -1
  168. package/dist/types/global-account/react/hooks/index.d.ts +0 -2
  169. package/dist/types/global-account/react/hooks/useTWAuth.d.ts +0 -3
  170. package/dist/types/global-account/react/index.native.d.ts +2 -0
  171. package/dist/types/global-account/react/stores/index.d.ts +0 -1
  172. package/dist/types/global-account/react/stores/useModalStore.d.ts +0 -10
  173. package/package.json +1 -1
  174. package/src/anyspend/constants/index.ts +0 -3
  175. package/src/anyspend/index.ts +0 -4
  176. package/src/anyspend/react/components/AnySpend.tsx +2 -28
  177. package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +0 -6
  178. package/src/anyspend/react/components/AnySpendCustom.tsx +47 -52
  179. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +0 -23
  180. package/src/anyspend/react/components/AnySpendDeposit.tsx +1 -18
  181. package/src/anyspend/react/components/AnyspendDepositHype.tsx +0 -4
  182. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +1 -15
  183. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +1 -5
  184. package/src/anyspend/react/components/common/OrderDetails.tsx +42 -60
  185. package/src/anyspend/react/components/common/PanelOnramp.tsx +1 -5
  186. package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +4 -3
  187. package/src/anyspend/react/hooks/index.ts +0 -1
  188. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
  189. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -2
  190. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +2 -2
  191. package/src/anyspend/react/hooks/useValidatedClientReferenceId.ts +2 -2
  192. package/src/global-account/react/components/B3DynamicModal.tsx +4 -3
  193. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +54 -43
  194. package/src/global-account/react/components/B3Provider/B3Provider.tsx +117 -44
  195. package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +1 -4
  196. package/src/global-account/react/components/B3Provider/types.ts +50 -0
  197. package/src/global-account/react/components/B3Provider/useB3.ts +13 -4
  198. package/src/global-account/react/components/B3Provider/useB3Account.ts +2 -6
  199. package/src/global-account/react/components/B3Provider/useB3Config.ts +31 -18
  200. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +4 -2
  201. package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +2 -2
  202. package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +2 -2
  203. package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +2 -2
  204. package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
  205. package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +4 -4
  206. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -2
  207. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +100 -168
  208. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
  209. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
  210. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
  211. package/src/global-account/react/components/StyleRoot.tsx +3 -3
  212. package/src/global-account/react/components/TurnkeyAuthModal.tsx +4 -7
  213. package/src/global-account/react/components/custom/ManageAccountButton.tsx +3 -2
  214. package/src/global-account/react/components/index.ts +2 -1
  215. package/src/global-account/react/hooks/index.ts +0 -2
  216. package/src/global-account/react/hooks/useClient.ts +2 -2
  217. package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
  218. package/src/global-account/react/hooks/useNotifications.ts +2 -2
  219. package/src/global-account/react/hooks/useTWAuth.tsx +0 -10
  220. package/src/global-account/react/hooks/useTokenBalance.tsx +7 -8
  221. package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +2 -4
  222. package/src/global-account/react/hooks/useTurnkeyAuth.ts +23 -54
  223. package/src/global-account/react/hooks/useUserQuery.ts +40 -1
  224. package/src/global-account/react/index.native.ts +2 -0
  225. package/src/global-account/react/stores/index.ts +0 -1
  226. package/src/global-account/react/stores/useModalStore.ts +0 -10
  227. package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  228. package/dist/cjs/anyspend/react/components/common/GasIndicator.js +0 -34
  229. package/dist/cjs/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  230. package/dist/cjs/anyspend/react/hooks/useGasPrice.js +0 -43
  231. package/dist/cjs/anyspend/services/gas.d.ts +0 -21
  232. package/dist/cjs/anyspend/services/gas.js +0 -65
  233. package/dist/cjs/anyspend/types/gas.d.ts +0 -61
  234. package/dist/cjs/anyspend/types/gas.js +0 -2
  235. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  236. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -12
  237. package/dist/cjs/global-account/react/hooks/useAuth.d.ts +0 -76
  238. package/dist/cjs/global-account/react/hooks/useAuth.js +0 -337
  239. package/dist/cjs/global-account/react/hooks/useUser.d.ts +0 -60
  240. package/dist/cjs/global-account/react/hooks/useUser.js +0 -20
  241. package/dist/cjs/global-account/react/stores/configStore.d.ts +0 -24
  242. package/dist/cjs/global-account/react/stores/configStore.js +0 -30
  243. package/dist/cjs/global-account/react/stores/userStore.d.ts +0 -22
  244. package/dist/cjs/global-account/react/stores/userStore.js +0 -30
  245. package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  246. package/dist/esm/anyspend/react/components/common/GasIndicator.js +0 -31
  247. package/dist/esm/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  248. package/dist/esm/anyspend/react/hooks/useGasPrice.js +0 -40
  249. package/dist/esm/anyspend/services/gas.d.ts +0 -21
  250. package/dist/esm/anyspend/services/gas.js +0 -59
  251. package/dist/esm/anyspend/types/gas.d.ts +0 -61
  252. package/dist/esm/anyspend/types/gas.js +0 -1
  253. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  254. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -10
  255. package/dist/esm/global-account/react/hooks/useAuth.d.ts +0 -76
  256. package/dist/esm/global-account/react/hooks/useAuth.js +0 -331
  257. package/dist/esm/global-account/react/hooks/useUser.d.ts +0 -60
  258. package/dist/esm/global-account/react/hooks/useUser.js +0 -17
  259. package/dist/esm/global-account/react/stores/configStore.d.ts +0 -24
  260. package/dist/esm/global-account/react/stores/configStore.js +0 -27
  261. package/dist/esm/global-account/react/stores/userStore.d.ts +0 -22
  262. package/dist/esm/global-account/react/stores/userStore.js +0 -27
  263. package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +0 -6
  264. package/dist/types/anyspend/react/hooks/useGasPrice.d.ts +0 -37
  265. package/dist/types/anyspend/services/gas.d.ts +0 -21
  266. package/dist/types/anyspend/types/gas.d.ts +0 -61
  267. package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  268. package/dist/types/global-account/react/hooks/useAuth.d.ts +0 -76
  269. package/dist/types/global-account/react/hooks/useUser.d.ts +0 -60
  270. package/dist/types/global-account/react/stores/configStore.d.ts +0 -24
  271. package/dist/types/global-account/react/stores/userStore.d.ts +0 -22
  272. package/src/anyspend/react/components/common/GasIndicator.tsx +0 -59
  273. package/src/anyspend/react/hooks/useGasPrice.ts +0 -70
  274. package/src/anyspend/services/gas.test.ts +0 -31
  275. package/src/anyspend/services/gas.ts +0 -73
  276. package/src/anyspend/types/gas.ts +0 -66
  277. package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +0 -19
  278. package/src/global-account/react/hooks/useAuth.ts +0 -379
  279. package/src/global-account/react/hooks/useUser.ts +0 -20
  280. package/src/global-account/react/stores/configStore.ts +0 -51
  281. package/src/global-account/react/stores/userStore.ts +0 -41
@@ -4,7 +4,7 @@ import { useCallback, useState } from "react";
4
4
  import app from "../../app";
5
5
  import { useB3Config } from "../components";
6
6
  import { useAuthStore } from "../stores";
7
- import { useAuth } from "./useAuth";
7
+ import { useAuthentication } from "./useAuthentication";
8
8
 
9
9
  const debug = debugB3React("useTurnkeyAuth");
10
10
 
@@ -34,15 +34,12 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
34
34
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
35
35
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
36
36
  const { partnerId } = useB3Config();
37
- const { authenticate } = useAuth();
37
+ const { user } = useAuthentication(partnerId);
38
38
 
39
39
  /**
40
40
  * Step 1: Initiate login with email
41
- * - Calls backend turnkey-jwt strategy (init action) to create sub-org (if needed) and send OTP
41
+ * - Calls backend to create sub-org (if needed) and send OTP
42
42
  * - Returns otpId to use in verification step
43
- *
44
- * Note: Uses the turnkey-jwt authentication strategy, not the service directly.
45
- * The turnkey-jwt strategy handles both OTP flow (init/verify) and final authentication.
46
43
  */
47
44
  const initiateLogin = useCallback(
48
45
  async (email: string): Promise<TurnkeyAuthInitResponse> => {
@@ -51,44 +48,20 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
51
48
  setIsAuthenticating(true);
52
49
 
53
50
  try {
51
+ if (!user?.userId) {
52
+ throw new Error("User ID is required to initiate Turnkey login.");
53
+ }
54
54
  debug(`Initiating login for: ${email}`);
55
55
 
56
- // Use authentication service with turnkey-jwt strategy (init action)
57
- // userId is resolved from authentication context on the backend (params.user.userId)
58
- // Backend will get userId from _params.user?.userId if authenticated, or handle unauthenticated case
59
- // So we only need to send email
60
- debug(`Calling app.authenticate with turnkey-jwt strategy (init action)`, { email });
61
-
62
- const response = await app.authenticate({
63
- strategy: "turnkey-jwt",
64
- action: "init",
65
- email,
66
- } as any);
67
-
68
- // The strategy returns the TurnkeyAuthInitResponse directly
69
- const data = response as unknown as TurnkeyAuthInitResponse;
56
+ // Call FeathersJS service to initialize OTP
57
+ const data: TurnkeyAuthInitResponse = await app.service("turnkey-auth").init({ email, userId: user.userId });
70
58
 
71
59
  debug(`OTP initialized successfully. OtpId: ${data.otpId}`);
72
60
 
73
61
  return data;
74
62
  } catch (err: any) {
75
63
  debug("Error initiating login:", err);
76
-
77
- // Provide more detailed error information
78
- let errorMessage = "Failed to send OTP email. Please try again.";
79
-
80
- if (err.message) {
81
- errorMessage = err.message;
82
- } else if (err.name === "TypeError" && err.message?.includes("fetch")) {
83
- errorMessage = "Network error: Unable to reach the server. Please check your connection and try again.";
84
- } else if (err.code === "ECONNREFUSED" || err.code === "ENOTFOUND") {
85
- errorMessage = "Connection error: Unable to reach the server. Please check your internet connection.";
86
- } else if (err.response) {
87
- // FeathersJS error response
88
- errorMessage = err.response.message || err.message || errorMessage;
89
- debug("FeathersJS error response:", err.response);
90
- }
91
-
64
+ const errorMessage = err.message || "Failed to send OTP email. Please try again.";
92
65
  setError(errorMessage);
93
66
  throw err;
94
67
  } finally {
@@ -96,13 +69,13 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
96
69
  setIsAuthenticating(false);
97
70
  }
98
71
  },
99
- [setIsAuthenticating],
72
+ [user, setIsAuthenticating],
100
73
  );
101
74
 
102
75
  /**
103
76
  * Step 2: Verify OTP and authenticate
104
- * - Verifies OTP with backend via turnkey-jwt strategy (verify action)
105
- * - Gets Turnkey session JWT from the verify response
77
+ * - Verifies OTP with backend
78
+ * - Gets Turnkey session JWT
106
79
  * - Authenticates with b3-api using "turnkey-jwt" strategy
107
80
  * - JWT automatically stored in cookies by SDK
108
81
  */
@@ -113,26 +86,22 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
113
86
  setIsAuthenticating(true);
114
87
 
115
88
  try {
116
- debug(`Verifying OTP...`, { otpId });
89
+ debug(`Verifying OTP...`, { userId: user?.userId });
117
90
 
118
- // Step 1: Verify OTP with backend using turnkey-jwt strategy (verify action)
119
- // This returns the Turnkey session JWT
120
- const response = await app.authenticate({
121
- strategy: "turnkey-jwt",
122
- action: "verify",
91
+ // Step 1: Verify OTP and get Turnkey session JWT
92
+ const { turnkeySessionJwt }: TurnkeyVerifyResponse = await app.service("turnkey-auth").verify({
123
93
  otpId,
124
94
  otpCode,
125
- } as any);
95
+ });
126
96
 
127
- // The strategy returns the TurnkeyAuthVerifyResponse directly
128
- const verifyResult = response as unknown as TurnkeyVerifyResponse;
129
- const { turnkeySessionJwt } = verifyResult;
130
-
131
- debug(`OTP verified! Got Turnkey session JWT. Authenticating with b3-api...`);
97
+ debug(`OTP verified! Authenticating with b3-api...`);
132
98
 
133
99
  // Step 2: Authenticate with b3-api using Turnkey JWT
134
- // Use the unified useAuth hook for authentication with "turnkey-jwt" strategy
135
- const authResult = await authenticate(turnkeySessionJwt, partnerId || "");
100
+ // The SDK will automatically store the b3-api JWT in cookies
101
+ const authResult = await app.authenticate({
102
+ strategy: "turnkey-jwt",
103
+ accessToken: turnkeySessionJwt,
104
+ } as any);
136
105
 
137
106
  debug(`Successfully authenticated with b3-api!`, authResult);
138
107
 
@@ -154,7 +123,7 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
154
123
  setIsAuthenticating(false);
155
124
  }
156
125
  },
157
- [partnerId, setIsAuthenticating, setIsAuthenticated, authenticate],
126
+ [user, setIsAuthenticating, setIsAuthenticated],
158
127
  );
159
128
 
160
129
  const clearError = useCallback(() => {
@@ -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,76 +0,0 @@
1
- import { Wallet } from "thirdweb/wallets";
2
- import { preAuthenticate } from "thirdweb/wallets/in-app";
3
- /**
4
- * Unified authentication hook that uses Turnkey for authentication
5
- * This replaces the previous Thirdweb-based authentication
6
- *
7
- * This hook provides 1:1 feature parity with useAuthentication.ts
8
- */
9
- export declare function useAuth(): {
10
- authenticate: (turnkeySessionJwt: string, partnerId: string) => Promise<import("@feathersjs/authentication").AuthenticationResult>;
11
- reAuthenticate: () => Promise<import("@feathersjs/authentication").AuthenticationResult>;
12
- logout: (callback?: () => void) => Promise<void>;
13
- isAuthenticated: boolean;
14
- isReady: boolean;
15
- isConnecting: boolean;
16
- isConnected: boolean;
17
- wallet: import("thirdweb/dist/types/wallets/in-app/core/wallet/types").EcosystemWallet;
18
- preAuthenticate: typeof preAuthenticate;
19
- connect: (_walleAutoConnectedWith: Wallet, allConnectedWallets: Wallet[]) => Promise<void>;
20
- isAuthenticating: boolean;
21
- onConnect: (_walleAutoConnectedWith: Wallet, allConnectedWallets: Wallet[]) => Promise<void>;
22
- user: {
23
- email?: string | undefined;
24
- username?: string | undefined;
25
- telNumber?: string | undefined;
26
- ens?: string | undefined;
27
- avatar?: string | undefined;
28
- preferences?: {} | undefined;
29
- referredBy?: string | {} | undefined;
30
- sourceApp?: string | undefined;
31
- referralCode?: string | undefined;
32
- userGroups?: number[] | undefined;
33
- isMigratedFromBSMNT?: boolean | undefined;
34
- privyLinkedAccounts?: {
35
- name?: string | undefined;
36
- address?: string | undefined;
37
- email?: string | undefined;
38
- chain_type?: string | undefined;
39
- lv?: number | undefined;
40
- wallet_client_type?: string | undefined;
41
- smart_wallet_type?: string | undefined;
42
- subject?: string | undefined;
43
- type: string;
44
- }[] | undefined;
45
- twProfiles?: {
46
- type: string;
47
- details: {
48
- id?: string | undefined;
49
- name?: string | undefined;
50
- address?: string | undefined;
51
- email?: string | undefined;
52
- username?: string | undefined;
53
- phone?: string | undefined;
54
- fid?: string | undefined;
55
- };
56
- }[] | undefined;
57
- turnkeySubOrgs?: {
58
- hasDelegatedUser?: boolean | undefined;
59
- subOrgId: string;
60
- accounts: Record<string, any>[];
61
- }[] | undefined;
62
- _id: string | {};
63
- userId: string;
64
- smartAccountAddress: string;
65
- createdAt: number;
66
- updatedAt: number;
67
- partnerIds: {
68
- privyId?: string | undefined;
69
- thirdwebId?: string | undefined;
70
- turnkeyId?: string | undefined;
71
- turnkeyOtpId?: string | undefined;
72
- };
73
- } | undefined;
74
- refetchUser: () => Promise<import("@feathersjs/authentication").AuthenticationResult>;
75
- setUser: (newUser?: import("@b3dotfun/b3-api").Users) => void;
76
- };