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

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 +2 -0
  2. package/dist/cjs/anyspend/constants/index.js +3 -1
  3. package/dist/cjs/anyspend/index.d.ts +2 -0
  4. package/dist/cjs/anyspend/index.js +3 -0
  5. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +6 -0
  6. package/dist/cjs/anyspend/react/components/AnySpend.js +9 -6
  7. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  8. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  9. package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +1 -0
  10. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +3 -3
  11. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
  12. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +24 -20
  13. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
  14. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +3 -3
  15. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
  16. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +14 -1
  17. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  18. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +3 -2
  19. package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +6 -0
  20. package/dist/cjs/anyspend/react/components/common/GasIndicator.js +34 -0
  21. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +4 -0
  22. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +34 -6
  23. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  24. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +3 -2
  25. package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +3 -4
  26. package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -0
  27. package/dist/cjs/anyspend/react/hooks/index.js +1 -0
  28. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -1
  29. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -1
  30. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -1
  31. package/dist/cjs/anyspend/react/hooks/useGasPrice.d.ts +37 -0
  32. package/dist/cjs/anyspend/react/hooks/useGasPrice.js +43 -0
  33. package/dist/cjs/anyspend/react/hooks/useValidatedClientReferenceId.js +1 -1
  34. package/dist/cjs/anyspend/services/gas.d.ts +21 -0
  35. package/dist/cjs/anyspend/services/gas.js +65 -0
  36. package/dist/cjs/anyspend/types/gas.d.ts +61 -0
  37. package/dist/cjs/anyspend/types/gas.js +2 -0
  38. package/dist/cjs/global-account/react/components/B3DynamicModal.js +2 -3
  39. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
  40. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +12 -0
  41. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
  42. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +35 -52
  43. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  44. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +38 -35
  45. package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +3 -1
  46. package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +14 -4
  47. package/dist/cjs/global-account/react/components/B3Provider/useB3.js +4 -11
  48. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +5 -2
  49. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
  50. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +18 -17
  51. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +1 -2
  52. package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +6 -6
  53. package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +7 -7
  54. package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +7 -7
  55. package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +5 -5
  56. package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +8 -9
  57. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  58. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +76 -20
  59. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  60. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +1 -1
  61. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +1 -1
  62. package/dist/cjs/global-account/react/components/StyleRoot.js +3 -3
  63. package/dist/cjs/global-account/react/components/TurnkeyAuthModal.js +3 -1
  64. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -2
  65. package/dist/cjs/global-account/react/components/index.d.ts +1 -2
  66. package/dist/cjs/global-account/react/components/index.js +3 -6
  67. package/dist/cjs/global-account/react/hooks/index.d.ts +2 -0
  68. package/dist/cjs/global-account/react/hooks/index.js +5 -1
  69. package/dist/cjs/global-account/react/hooks/useAuth.d.ts +76 -0
  70. package/dist/cjs/global-account/react/hooks/useAuth.js +337 -0
  71. package/dist/cjs/global-account/react/hooks/useClient.js +1 -1
  72. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +1 -1
  73. package/dist/cjs/global-account/react/hooks/useNotifications.js +14 -14
  74. package/dist/cjs/global-account/react/hooks/useTWAuth.d.ts +3 -0
  75. package/dist/cjs/global-account/react/hooks/useTWAuth.js +8 -0
  76. package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
  77. package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +4 -2
  78. package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +50 -22
  79. package/dist/cjs/global-account/react/hooks/useUser.d.ts +60 -0
  80. package/dist/cjs/global-account/react/hooks/useUser.js +20 -0
  81. package/dist/cjs/global-account/react/hooks/useUserQuery.js +9 -35
  82. package/dist/cjs/global-account/react/index.native.d.ts +0 -2
  83. package/dist/cjs/global-account/react/index.native.js +1 -5
  84. package/dist/cjs/global-account/react/stores/configStore.d.ts +24 -0
  85. package/dist/cjs/global-account/react/stores/configStore.js +30 -0
  86. package/dist/cjs/global-account/react/stores/index.d.ts +1 -0
  87. package/dist/cjs/global-account/react/stores/index.js +3 -1
  88. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +10 -0
  89. package/dist/cjs/global-account/react/stores/userStore.d.ts +22 -0
  90. package/dist/cjs/global-account/react/stores/userStore.js +30 -0
  91. package/dist/esm/anyspend/constants/index.d.ts +2 -0
  92. package/dist/esm/anyspend/constants/index.js +2 -0
  93. package/dist/esm/anyspend/index.d.ts +2 -0
  94. package/dist/esm/anyspend/index.js +3 -0
  95. package/dist/esm/anyspend/react/components/AnySpend.d.ts +6 -0
  96. package/dist/esm/anyspend/react/components/AnySpend.js +11 -8
  97. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  98. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  99. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +1 -0
  100. package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
  101. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
  102. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +8 -4
  103. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
  104. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
  105. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
  106. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +14 -1
  107. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  108. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +3 -2
  109. package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +6 -0
  110. package/dist/esm/anyspend/react/components/common/GasIndicator.js +31 -0
  111. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +4 -0
  112. package/dist/esm/anyspend/react/components/common/OrderDetails.js +36 -8
  113. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  114. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +3 -2
  115. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +3 -4
  116. package/dist/esm/anyspend/react/hooks/index.d.ts +1 -0
  117. package/dist/esm/anyspend/react/hooks/index.js +1 -0
  118. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -2
  119. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -2
  120. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +2 -2
  121. package/dist/esm/anyspend/react/hooks/useGasPrice.d.ts +37 -0
  122. package/dist/esm/anyspend/react/hooks/useGasPrice.js +40 -0
  123. package/dist/esm/anyspend/react/hooks/useValidatedClientReferenceId.js +2 -2
  124. package/dist/esm/anyspend/services/gas.d.ts +21 -0
  125. package/dist/esm/anyspend/services/gas.js +59 -0
  126. package/dist/esm/anyspend/types/gas.d.ts +61 -0
  127. package/dist/esm/anyspend/types/gas.js +1 -0
  128. package/dist/esm/global-account/react/components/B3DynamicModal.js +3 -4
  129. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
  130. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +10 -0
  131. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
  132. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +34 -53
  133. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  134. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +36 -36
  135. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +3 -1
  136. package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +14 -4
  137. package/dist/esm/global-account/react/components/B3Provider/useB3.js +4 -11
  138. package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +5 -2
  139. package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
  140. package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +18 -17
  141. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +2 -3
  142. package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +2 -2
  143. package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +2 -2
  144. package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
  145. package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +2 -2
  146. package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +2 -3
  147. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
  148. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +76 -20
  149. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
  150. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  151. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  152. package/dist/esm/global-account/react/components/StyleRoot.js +3 -3
  153. package/dist/esm/global-account/react/components/TurnkeyAuthModal.js +5 -3
  154. package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +2 -3
  155. package/dist/esm/global-account/react/components/index.d.ts +1 -2
  156. package/dist/esm/global-account/react/components/index.js +1 -2
  157. package/dist/esm/global-account/react/hooks/index.d.ts +2 -0
  158. package/dist/esm/global-account/react/hooks/index.js +2 -0
  159. package/dist/esm/global-account/react/hooks/useAuth.d.ts +76 -0
  160. package/dist/esm/global-account/react/hooks/useAuth.js +331 -0
  161. package/dist/esm/global-account/react/hooks/useClient.js +2 -2
  162. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
  163. package/dist/esm/global-account/react/hooks/useNotifications.js +2 -2
  164. package/dist/esm/global-account/react/hooks/useTWAuth.d.ts +3 -0
  165. package/dist/esm/global-account/react/hooks/useTWAuth.js +8 -0
  166. package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
  167. package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +4 -2
  168. package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +50 -22
  169. package/dist/esm/global-account/react/hooks/useUser.d.ts +60 -0
  170. package/dist/esm/global-account/react/hooks/useUser.js +17 -0
  171. package/dist/esm/global-account/react/hooks/useUserQuery.js +1 -27
  172. package/dist/esm/global-account/react/index.native.d.ts +0 -2
  173. package/dist/esm/global-account/react/index.native.js +0 -2
  174. package/dist/esm/global-account/react/stores/configStore.d.ts +24 -0
  175. package/dist/esm/global-account/react/stores/configStore.js +27 -0
  176. package/dist/esm/global-account/react/stores/index.d.ts +1 -0
  177. package/dist/esm/global-account/react/stores/index.js +1 -0
  178. package/dist/esm/global-account/react/stores/useModalStore.d.ts +10 -0
  179. package/dist/esm/global-account/react/stores/userStore.d.ts +22 -0
  180. package/dist/esm/global-account/react/stores/userStore.js +27 -0
  181. package/dist/styles/index.css +1 -1
  182. package/dist/types/anyspend/constants/index.d.ts +2 -0
  183. package/dist/types/anyspend/index.d.ts +2 -0
  184. package/dist/types/anyspend/react/components/AnySpend.d.ts +6 -0
  185. package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  186. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +1 -0
  187. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
  188. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
  189. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
  190. package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  191. package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +6 -0
  192. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +4 -0
  193. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  194. package/dist/types/anyspend/react/hooks/index.d.ts +1 -0
  195. package/dist/types/anyspend/react/hooks/useGasPrice.d.ts +37 -0
  196. package/dist/types/anyspend/services/gas.d.ts +21 -0
  197. package/dist/types/anyspend/types/gas.d.ts +61 -0
  198. package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
  199. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
  200. package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
  201. package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +14 -4
  202. package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
  203. package/dist/types/global-account/react/components/index.d.ts +1 -2
  204. package/dist/types/global-account/react/hooks/index.d.ts +2 -0
  205. package/dist/types/global-account/react/hooks/useAuth.d.ts +76 -0
  206. package/dist/types/global-account/react/hooks/useTWAuth.d.ts +3 -0
  207. package/dist/types/global-account/react/hooks/useUser.d.ts +60 -0
  208. package/dist/types/global-account/react/index.native.d.ts +0 -2
  209. package/dist/types/global-account/react/stores/configStore.d.ts +24 -0
  210. package/dist/types/global-account/react/stores/index.d.ts +1 -0
  211. package/dist/types/global-account/react/stores/useModalStore.d.ts +10 -0
  212. package/dist/types/global-account/react/stores/userStore.d.ts +22 -0
  213. package/package.json +1 -1
  214. package/src/anyspend/constants/index.ts +3 -0
  215. package/src/anyspend/index.ts +4 -0
  216. package/src/anyspend/react/components/AnySpend.tsx +28 -2
  217. package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +6 -0
  218. package/src/anyspend/react/components/AnySpendCustom.tsx +52 -47
  219. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +23 -0
  220. package/src/anyspend/react/components/AnySpendDeposit.tsx +27 -18
  221. package/src/anyspend/react/components/AnyspendDepositHype.tsx +4 -0
  222. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +15 -1
  223. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +5 -1
  224. package/src/anyspend/react/components/common/GasIndicator.tsx +59 -0
  225. package/src/anyspend/react/components/common/OrderDetails.tsx +60 -42
  226. package/src/anyspend/react/components/common/PanelOnramp.tsx +5 -1
  227. package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +3 -4
  228. package/src/anyspend/react/hooks/index.ts +1 -0
  229. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
  230. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -2
  231. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +2 -2
  232. package/src/anyspend/react/hooks/useGasPrice.ts +70 -0
  233. package/src/anyspend/react/hooks/useValidatedClientReferenceId.ts +2 -2
  234. package/src/anyspend/services/gas.test.ts +31 -0
  235. package/src/anyspend/services/gas.ts +73 -0
  236. package/src/anyspend/types/gas.ts +66 -0
  237. package/src/global-account/react/components/B3DynamicModal.tsx +3 -4
  238. package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +19 -0
  239. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +43 -54
  240. package/src/global-account/react/components/B3Provider/B3Provider.tsx +44 -106
  241. package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +4 -1
  242. package/src/global-account/react/components/B3Provider/useB3.ts +4 -13
  243. package/src/global-account/react/components/B3Provider/useB3Account.ts +6 -2
  244. package/src/global-account/react/components/B3Provider/useB3Config.ts +18 -31
  245. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +2 -4
  246. package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +2 -2
  247. package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +2 -2
  248. package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +2 -2
  249. package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
  250. package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +4 -4
  251. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -2
  252. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +168 -100
  253. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
  254. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
  255. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
  256. package/src/global-account/react/components/StyleRoot.tsx +3 -3
  257. package/src/global-account/react/components/TurnkeyAuthModal.tsx +7 -4
  258. package/src/global-account/react/components/custom/ManageAccountButton.tsx +2 -3
  259. package/src/global-account/react/components/index.ts +1 -2
  260. package/src/global-account/react/hooks/index.ts +2 -0
  261. package/src/global-account/react/hooks/useAuth.ts +379 -0
  262. package/src/global-account/react/hooks/useClient.ts +2 -2
  263. package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
  264. package/src/global-account/react/hooks/useNotifications.ts +2 -2
  265. package/src/global-account/react/hooks/useTWAuth.tsx +10 -0
  266. package/src/global-account/react/hooks/useTokenBalance.tsx +8 -7
  267. package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +4 -2
  268. package/src/global-account/react/hooks/useTurnkeyAuth.ts +54 -23
  269. package/src/global-account/react/hooks/useUser.ts +20 -0
  270. package/src/global-account/react/hooks/useUserQuery.ts +1 -40
  271. package/src/global-account/react/index.native.ts +0 -2
  272. package/src/global-account/react/stores/configStore.ts +51 -0
  273. package/src/global-account/react/stores/index.ts +1 -0
  274. package/src/global-account/react/stores/useModalStore.ts +10 -0
  275. package/src/global-account/react/stores/userStore.ts +41 -0
  276. package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +0 -27
  277. package/dist/cjs/global-account/react/components/B3Provider/types.js +0 -24
  278. package/dist/esm/global-account/react/components/B3Provider/types.d.ts +0 -27
  279. package/dist/esm/global-account/react/components/B3Provider/types.js +0 -21
  280. package/dist/types/global-account/react/components/B3Provider/types.d.ts +0 -27
  281. package/src/global-account/react/components/B3Provider/types.ts +0 -50
@@ -1,48 +1,9 @@
1
1
  import { Users } from "@b3dotfun/b3-api";
2
- import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
2
  import { useEffect } from "react";
4
- import { create } from "zustand";
5
- import { persist } from "zustand/middleware";
6
-
7
- const debug = debugB3React("useUserQuery");
3
+ import { useUserStore } from "../stores/userStore";
8
4
 
9
5
  const USER_QUERY_KEY = ["b3-user"];
10
6
 
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
-
46
7
  /**
47
8
  * NOTE: THIS IS ONLY MEANT FOR INTERNAL USE, from useOnConnect
48
9
  *
@@ -6,8 +6,6 @@
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";
11
9
  export { useAccountWallet } from "./hooks/useAccountWallet";
12
10
  export { useAuthentication } from "./hooks/useAuthentication";
13
11
  export { useProfile } from "./hooks/useProfile";
@@ -0,0 +1,51 @@
1
+ import { CreateOnrampOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOnrampOrder";
2
+ import { CreateOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOrder";
3
+ import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
4
+ import { Account } from "thirdweb/wallets";
5
+ import { create } from "zustand";
6
+ import { ClientType } from "../../client-manager";
7
+
8
+ /**
9
+ * Default permissions configuration for B3 provider
10
+ */
11
+ const DEFAULT_PERMISSIONS: PermissionsConfig = {
12
+ approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"],
13
+ nativeTokenLimitPerTransaction: 0.1,
14
+ startDate: new Date(),
15
+ endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
16
+ };
17
+
18
+ interface ConfigStore {
19
+ accountOverride?: Account;
20
+ automaticallySetFirstEoa: boolean;
21
+ environment: "development" | "production";
22
+ defaultPermissions: PermissionsConfig;
23
+ theme: "light" | "dark";
24
+ clientType: ClientType;
25
+ partnerId: string;
26
+ stripePublishableKey?: string;
27
+ createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
28
+ enableTurnkey: boolean;
29
+
30
+ // Actions
31
+ setConfig: (config: Partial<Omit<ConfigStore, "setConfig">>) => void;
32
+ }
33
+
34
+ /**
35
+ * Zustand store for B3 configuration
36
+ * NOT persisted - these are developer-set configuration values
37
+ */
38
+ export const useB3ConfigStore = create<ConfigStore>(set => ({
39
+ accountOverride: undefined,
40
+ automaticallySetFirstEoa: false,
41
+ environment: "development",
42
+ defaultPermissions: DEFAULT_PERMISSIONS,
43
+ theme: "light",
44
+ clientType: "rest",
45
+ partnerId: "",
46
+ stripePublishableKey: undefined,
47
+ createClientReferenceId: undefined,
48
+ enableTurnkey: false,
49
+
50
+ setConfig: config => set(state => ({ ...state, ...config })),
51
+ }));
@@ -1,4 +1,5 @@
1
1
  export { useAuthStore } from "./useAuthStore";
2
+ export { useB3ConfigStore } from "./configStore";
2
3
  export { useModalStore } from "./useModalStore";
3
4
  export { useRecentAddressesStore } from "./useRecentAddressesStore";
4
5
 
@@ -426,6 +426,12 @@ 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;
429
435
  }
430
436
 
431
437
  export interface AvatarEditorModalProps extends BaseModalProps {
@@ -499,6 +505,10 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
499
505
  vendingMachineId: string;
500
506
  /** The pack type */
501
507
  packType: string;
508
+ /** Active tab */
509
+ activeTab?: "crypto" | "fiat";
510
+ /** Force fiat payment */
511
+ forceFiatPayment?: boolean;
502
512
  }
503
513
 
504
514
  /**
@@ -0,0 +1,41 @@
1
+ import { Users } from "@b3dotfun/b3-api";
2
+ import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
+ import { create } from "zustand";
4
+ import { persist } from "zustand/middleware";
5
+
6
+ const debug = debugB3React("useUserQuery");
7
+
8
+ interface UserStore {
9
+ user: Users | null;
10
+ setUser: (user: Users | undefined) => void;
11
+ clearUser: () => void;
12
+ }
13
+
14
+ /**
15
+ * Zustand store for managing user state
16
+ * Persists user data to localStorage
17
+ */
18
+ export const useUserStore = create<UserStore>()(
19
+ persist(
20
+ set => ({
21
+ user: null,
22
+ setUser: (newUser: Users | undefined) => {
23
+ const userToSave = newUser ?? null;
24
+ set({ user: userToSave });
25
+ debug("User updated", userToSave);
26
+ },
27
+ clearUser: () => {
28
+ set({ user: null });
29
+ debug("User cleared");
30
+ },
31
+ }),
32
+ {
33
+ name: "b3-user",
34
+ onRehydrateStorage: () => (_, error) => {
35
+ if (error) {
36
+ console.warn("Failed to rehydrate user store:", error);
37
+ }
38
+ },
39
+ },
40
+ ),
41
+ );
@@ -1,27 +0,0 @@
1
- import { CreateOnrampOrderParams } from "../../../../anyspend/react/hooks/useAnyspendCreateOnrampOrder";
2
- import { CreateOrderParams } from "../../../../anyspend/react/hooks/useAnyspendCreateOrder";
3
- import { PermissionsConfig } from "../../../../global-account/types/permissions";
4
- import { Account, Wallet } from "thirdweb/wallets";
5
- import { ClientType } from "../../../client-manager";
6
- /**
7
- * Context type for B3Provider
8
- */
9
- export interface B3ContextType {
10
- account?: Account;
11
- automaticallySetFirstEoa: boolean;
12
- wallet?: Wallet;
13
- initialized: boolean;
14
- ready: boolean;
15
- environment?: "development" | "production";
16
- defaultPermissions?: PermissionsConfig;
17
- theme: "light" | "dark";
18
- clientType: ClientType;
19
- partnerId: string;
20
- stripePublishableKey?: string;
21
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
22
- enableTurnkey?: boolean;
23
- }
24
- /**
25
- * Context for B3 provider
26
- */
27
- export declare const B3Context: import("react").Context<B3ContextType>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.B3Context = void 0;
4
- const react_1 = require("react");
5
- /**
6
- * Context for B3 provider
7
- */
8
- exports.B3Context = (0, react_1.createContext)({
9
- account: undefined,
10
- automaticallySetFirstEoa: false,
11
- //user: undefined,
12
- //setWallet: () => {},
13
- wallet: undefined,
14
- //setUser: () => {},
15
- //refetchUser: async () => {},
16
- initialized: false,
17
- ready: false,
18
- environment: "development",
19
- theme: "light",
20
- clientType: "rest",
21
- partnerId: "",
22
- createClientReferenceId: undefined,
23
- enableTurnkey: false,
24
- });
@@ -1,27 +0,0 @@
1
- import { CreateOnrampOrderParams } from "../../../../anyspend/react/hooks/useAnyspendCreateOnrampOrder";
2
- import { CreateOrderParams } from "../../../../anyspend/react/hooks/useAnyspendCreateOrder";
3
- import { PermissionsConfig } from "../../../../global-account/types/permissions";
4
- import { Account, Wallet } from "thirdweb/wallets";
5
- import { ClientType } from "../../../client-manager";
6
- /**
7
- * Context type for B3Provider
8
- */
9
- export interface B3ContextType {
10
- account?: Account;
11
- automaticallySetFirstEoa: boolean;
12
- wallet?: Wallet;
13
- initialized: boolean;
14
- ready: boolean;
15
- environment?: "development" | "production";
16
- defaultPermissions?: PermissionsConfig;
17
- theme: "light" | "dark";
18
- clientType: ClientType;
19
- partnerId: string;
20
- stripePublishableKey?: string;
21
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
22
- enableTurnkey?: boolean;
23
- }
24
- /**
25
- * Context for B3 provider
26
- */
27
- export declare const B3Context: import("react").Context<B3ContextType>;
@@ -1,21 +0,0 @@
1
- import { createContext } from "react";
2
- /**
3
- * Context for B3 provider
4
- */
5
- export const B3Context = createContext({
6
- account: undefined,
7
- automaticallySetFirstEoa: false,
8
- //user: undefined,
9
- //setWallet: () => {},
10
- wallet: undefined,
11
- //setUser: () => {},
12
- //refetchUser: async () => {},
13
- initialized: false,
14
- ready: false,
15
- environment: "development",
16
- theme: "light",
17
- clientType: "rest",
18
- partnerId: "",
19
- createClientReferenceId: undefined,
20
- enableTurnkey: false,
21
- });
@@ -1,27 +0,0 @@
1
- import { CreateOnrampOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOnrampOrder";
2
- import { CreateOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOrder";
3
- import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
4
- import { Account, Wallet } from "thirdweb/wallets";
5
- import { ClientType } from "../../../client-manager";
6
- /**
7
- * Context type for B3Provider
8
- */
9
- export interface B3ContextType {
10
- account?: Account;
11
- automaticallySetFirstEoa: boolean;
12
- wallet?: Wallet;
13
- initialized: boolean;
14
- ready: boolean;
15
- environment?: "development" | "production";
16
- defaultPermissions?: PermissionsConfig;
17
- theme: "light" | "dark";
18
- clientType: ClientType;
19
- partnerId: string;
20
- stripePublishableKey?: string;
21
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
22
- enableTurnkey?: boolean;
23
- }
24
- /**
25
- * Context for B3 provider
26
- */
27
- export declare const B3Context: import("react").Context<B3ContextType>;
@@ -1,50 +0,0 @@
1
- import { CreateOnrampOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOnrampOrder";
2
- import { CreateOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOrder";
3
- import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
4
- import { createContext } from "react";
5
- import { Account, Wallet } from "thirdweb/wallets";
6
- import { ClientType } from "../../../client-manager";
7
-
8
- /**
9
- * Context type for B3Provider
10
- */
11
- export interface B3ContextType {
12
- account?: Account;
13
- automaticallySetFirstEoa: boolean;
14
- //user?: Users;
15
- //setWallet: (wallet: Wallet) => void;
16
- wallet?: Wallet;
17
- //setUser: (user?: Users) => void;
18
- //refetchUser: () => Promise<any>;
19
- initialized: boolean;
20
- ready: boolean;
21
- environment?: "development" | "production";
22
- defaultPermissions?: PermissionsConfig;
23
- theme: "light" | "dark";
24
- clientType: ClientType;
25
- partnerId: string;
26
- stripePublishableKey?: string;
27
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
28
- enableTurnkey?: boolean;
29
- }
30
-
31
- /**
32
- * Context for B3 provider
33
- */
34
- export const B3Context = createContext<B3ContextType>({
35
- account: undefined,
36
- automaticallySetFirstEoa: false,
37
- //user: undefined,
38
- //setWallet: () => {},
39
- wallet: undefined,
40
- //setUser: () => {},
41
- //refetchUser: async () => {},
42
- initialized: false,
43
- ready: false,
44
- environment: "development",
45
- theme: "light",
46
- clientType: "rest",
47
- partnerId: "",
48
- createClientReferenceId: undefined,
49
- enableTurnkey: false,
50
- });