@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,24 +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 } from "thirdweb/wallets";
5
- import { ClientType } from "../../client-manager";
6
- interface ConfigStore {
7
- accountOverride?: Account;
8
- automaticallySetFirstEoa: boolean;
9
- environment: "development" | "production";
10
- defaultPermissions: PermissionsConfig;
11
- theme: "light" | "dark";
12
- clientType: ClientType;
13
- partnerId: string;
14
- stripePublishableKey?: string;
15
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
16
- enableTurnkey: boolean;
17
- setConfig: (config: Partial<Omit<ConfigStore, "setConfig">>) => void;
18
- }
19
- /**
20
- * Zustand store for B3 configuration
21
- * NOT persisted - these are developer-set configuration values
22
- */
23
- export declare const useB3ConfigStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConfigStore>>;
24
- export {};
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useB3ConfigStore = void 0;
4
- const zustand_1 = require("zustand");
5
- /**
6
- * Default permissions configuration for B3 provider
7
- */
8
- const DEFAULT_PERMISSIONS = {
9
- approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"],
10
- nativeTokenLimitPerTransaction: 0.1,
11
- startDate: new Date(),
12
- endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
13
- };
14
- /**
15
- * Zustand store for B3 configuration
16
- * NOT persisted - these are developer-set configuration values
17
- */
18
- exports.useB3ConfigStore = (0, zustand_1.create)(set => ({
19
- accountOverride: undefined,
20
- automaticallySetFirstEoa: false,
21
- environment: "development",
22
- defaultPermissions: DEFAULT_PERMISSIONS,
23
- theme: "light",
24
- clientType: "rest",
25
- partnerId: "",
26
- stripePublishableKey: undefined,
27
- createClientReferenceId: undefined,
28
- enableTurnkey: false,
29
- setConfig: config => set(state => ({ ...state, ...config })),
30
- }));
@@ -1,22 +0,0 @@
1
- import { Users } from "@b3dotfun/b3-api";
2
- interface UserStore {
3
- user: Users | null;
4
- setUser: (user: Users | undefined) => void;
5
- clearUser: () => void;
6
- }
7
- /**
8
- * Zustand store for managing user state
9
- * Persists user data to localStorage
10
- */
11
- export declare const useUserStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UserStore>, "persist"> & {
12
- persist: {
13
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>) => void;
14
- clearStorage: () => void;
15
- rehydrate: () => Promise<void> | void;
16
- hasHydrated: () => boolean;
17
- onHydrate: (fn: (state: UserStore) => void) => () => void;
18
- onFinishHydration: (fn: (state: UserStore) => void) => () => void;
19
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>;
20
- };
21
- }>;
22
- export {};
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useUserStore = void 0;
4
- const debug_1 = require("../../../shared/utils/debug");
5
- const zustand_1 = require("zustand");
6
- const middleware_1 = require("zustand/middleware");
7
- const debug = (0, debug_1.debugB3React)("useUserQuery");
8
- /**
9
- * Zustand store for managing user state
10
- * Persists user data to localStorage
11
- */
12
- exports.useUserStore = (0, zustand_1.create)()((0, middleware_1.persist)(set => ({
13
- user: null,
14
- setUser: (newUser) => {
15
- const userToSave = newUser ?? null;
16
- set({ user: userToSave });
17
- debug("User updated", userToSave);
18
- },
19
- clearUser: () => {
20
- set({ user: null });
21
- debug("User cleared");
22
- },
23
- }), {
24
- name: "b3-user",
25
- onRehydrateStorage: () => (_, error) => {
26
- if (error) {
27
- console.warn("Failed to rehydrate user store:", error);
28
- }
29
- },
30
- }));
@@ -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,31 +0,0 @@
1
- "use client";
2
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from "../../../../shared/utils/cn.js";
4
- import { motion } from "motion/react";
5
- const LEVEL_LABELS = {
6
- low: "Low",
7
- normal: "Normal",
8
- elevated: "Elevated",
9
- high: "High",
10
- spike: "Spike",
11
- };
12
- const LEVEL_STYLES = {
13
- low: "bg-green-500/20 text-green-500",
14
- normal: "bg-as-surface-tertiary text-as-secondary",
15
- elevated: "bg-yellow-500/20 text-yellow-600",
16
- high: "bg-orange-500/20 text-orange-500",
17
- spike: "bg-red-500/20 text-red-500",
18
- };
19
- function formatGasPrice(gweiString) {
20
- const gwei = parseFloat(gweiString);
21
- if (gwei < 0.001)
22
- return "<0.001";
23
- if (gwei < 1)
24
- return gwei.toFixed(3);
25
- if (gwei < 10)
26
- return gwei.toFixed(2);
27
- return gwei.toFixed(1);
28
- }
29
- export function GasIndicator({ gasPrice, className }) {
30
- return (_jsxs(motion.div, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2 }, className: cn("flex items-center justify-between rounded-lg px-3 py-2", gasPrice.isSpike ? "bg-yellow-500/10" : "bg-as-surface-secondary", className), children: [_jsx("div", { className: "flex items-center gap-2", children: _jsxs("span", { className: "text-as-secondary text-xs", children: ["Gas on ", gasPrice.chainName] }) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: cn("rounded px-1.5 py-0.5 text-xs font-medium", LEVEL_STYLES[gasPrice.level]), children: LEVEL_LABELS[gasPrice.level] }), _jsxs("span", { className: "text-as-primary text-xs font-medium", children: [formatGasPrice(gasPrice.gasPriceGwei), " Gwei"] })] })] }));
31
- }
@@ -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,40 +0,0 @@
1
- import { useQuery } from "@tanstack/react-query";
2
- import { useMemo } from "react";
3
- import { gasService, isGasOracleSupported } from "../../services/gas.js";
4
- /**
5
- * React hook to fetch current gas price for a chain.
6
- *
7
- * @param chainId - The chain ID to fetch gas price for
8
- * @param options - Optional configuration
9
- *
10
- * @example
11
- * ```tsx
12
- * const { gasPrice, isSpike, isLoading } = useGasPrice(8453); // Base
13
- *
14
- * if (isSpike) {
15
- * return <Warning>Gas prices are high: {gasPrice?.recommendation}</Warning>;
16
- * }
17
- * ```
18
- */
19
- export function useGasPrice(chainId, options = {}) {
20
- const { refetchInterval = 10000, enabled } = options;
21
- const isSupported = chainId !== undefined && isGasOracleSupported(chainId);
22
- const queryEnabled = enabled ?? isSupported;
23
- const { data, isLoading, isError, error, refetch } = useQuery({
24
- queryKey: ["gasPrice", chainId],
25
- queryFn: () => gasService.fetch(chainId),
26
- enabled: queryEnabled && chainId !== undefined,
27
- refetchInterval,
28
- staleTime: 5000, // Consider data fresh for 5s
29
- retry: 2,
30
- refetchOnWindowFocus: true,
31
- });
32
- return useMemo(() => ({
33
- gasPrice: data,
34
- isLoading,
35
- isError,
36
- error: error,
37
- isSpike: data?.isSpike ?? false,
38
- refetch,
39
- }), [data, isLoading, isError, error, refetch]);
40
- }
@@ -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,59 +0,0 @@
1
- import { GAS_ORACLE_BASE_URL } from "../constants/index.js";
2
- /** Supported chain IDs for gas oracle */
3
- export const GAS_ORACLE_SUPPORTED_CHAINS = [
4
- 1, // Ethereum
5
- 137, // Polygon
6
- 42161, // Arbitrum
7
- 8453, // Base
8
- 56, // BSC
9
- 10, // Optimism
10
- 43114, // Avalanche
11
- 8333, // B3
12
- 2741, // Abstract
13
- 4689, // IoTeX
14
- 3338, // Peaq
15
- 1329, // Sei
16
- ];
17
- /** Check if a chain is supported by the gas oracle */
18
- export function isGasOracleSupported(chainId) {
19
- return GAS_ORACLE_SUPPORTED_CHAINS.includes(chainId);
20
- }
21
- /** Fetch gas price data from the gas oracle */
22
- export async function fetchGasPrice(chainId) {
23
- const response = await fetch(`${GAS_ORACLE_BASE_URL}/gas/${chainId}`);
24
- if (!response.ok) {
25
- throw new Error(`Failed to fetch gas price for chain ${chainId}: ${response.status}`);
26
- }
27
- return response.json();
28
- }
29
- /** Transform raw oracle response to simplified UI data */
30
- export function toGasPriceData(response) {
31
- const { analysis } = response;
32
- const isSpike = analysis.level === "elevated" || analysis.level === "high" || analysis.level === "spike";
33
- return {
34
- chainId: response.chainId,
35
- chainName: response.chainName,
36
- gasPriceGwei: response.gasPrice.standard,
37
- baseFeeGwei: response.eip1559?.baseFee,
38
- level: analysis.level,
39
- isSpike,
40
- recommendation: analysis.recommendation,
41
- vsMedian: analysis.vs1h, // Use 1h as primary comparison
42
- source: response.source,
43
- timestamp: response.timestamp,
44
- };
45
- }
46
- /** Gas service for fetching and transforming gas data */
47
- export const gasService = {
48
- /** Fetch raw gas oracle response */
49
- fetchRaw: fetchGasPrice,
50
- /** Fetch and transform to UI-friendly format */
51
- fetch: async (chainId) => {
52
- const response = await fetchGasPrice(chainId);
53
- return toGasPriceData(response);
54
- },
55
- /** Check if chain is supported */
56
- isSupported: isGasOracleSupported,
57
- /** List of supported chain IDs */
58
- supportedChains: GAS_ORACLE_SUPPORTED_CHAINS,
59
- };
@@ -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 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- declare const AuthenticationProvider: ({ partnerId, automaticallySetFirstEoa, }: {
2
- partnerId: string;
3
- automaticallySetFirstEoa: boolean;
4
- }) => null;
5
- export default AuthenticationProvider;
@@ -1,10 +0,0 @@
1
- import { useAuthentication } from "../../hooks/index.js";
2
- import { useAutoSelectWallet } from "../../hooks/useAutoSelectWallet.js";
3
- const AuthenticationProvider = ({ partnerId, automaticallySetFirstEoa, }) => {
4
- useAuthentication(partnerId);
5
- useAutoSelectWallet({
6
- enabled: automaticallySetFirstEoa,
7
- });
8
- return null;
9
- };
10
- export 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,17 +0,0 @@
1
- import { useAuthStore } from "../../../global-account/react/index.js";
2
- import { useUserStore } from "../stores/userStore.js";
3
- /**
4
- * Preferred Hook to get the user data
5
- */
6
- export function useUser() {
7
- const user = useUserStore(state => state.user);
8
- const isConnecting = useAuthStore(state => state.isConnecting);
9
- const isConnected = useAuthStore(state => state.isConnected);
10
- const isAuthenticating = useAuthStore(state => state.isAuthenticating);
11
- return {
12
- user,
13
- isConnecting,
14
- isConnected,
15
- isAuthenticating,
16
- };
17
- }
@@ -1,24 +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 } from "thirdweb/wallets";
5
- import { ClientType } from "../../client-manager";
6
- interface ConfigStore {
7
- accountOverride?: Account;
8
- automaticallySetFirstEoa: boolean;
9
- environment: "development" | "production";
10
- defaultPermissions: PermissionsConfig;
11
- theme: "light" | "dark";
12
- clientType: ClientType;
13
- partnerId: string;
14
- stripePublishableKey?: string;
15
- createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
16
- enableTurnkey: boolean;
17
- setConfig: (config: Partial<Omit<ConfigStore, "setConfig">>) => void;
18
- }
19
- /**
20
- * Zustand store for B3 configuration
21
- * NOT persisted - these are developer-set configuration values
22
- */
23
- export declare const useB3ConfigStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConfigStore>>;
24
- export {};
@@ -1,27 +0,0 @@
1
- import { create } from "zustand";
2
- /**
3
- * Default permissions configuration for B3 provider
4
- */
5
- const DEFAULT_PERMISSIONS = {
6
- approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"],
7
- nativeTokenLimitPerTransaction: 0.1,
8
- startDate: new Date(),
9
- endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
10
- };
11
- /**
12
- * Zustand store for B3 configuration
13
- * NOT persisted - these are developer-set configuration values
14
- */
15
- export const useB3ConfigStore = create(set => ({
16
- accountOverride: undefined,
17
- automaticallySetFirstEoa: false,
18
- environment: "development",
19
- defaultPermissions: DEFAULT_PERMISSIONS,
20
- theme: "light",
21
- clientType: "rest",
22
- partnerId: "",
23
- stripePublishableKey: undefined,
24
- createClientReferenceId: undefined,
25
- enableTurnkey: false,
26
- setConfig: config => set(state => ({ ...state, ...config })),
27
- }));
@@ -1,22 +0,0 @@
1
- import { Users } from "@b3dotfun/b3-api";
2
- interface UserStore {
3
- user: Users | null;
4
- setUser: (user: Users | undefined) => void;
5
- clearUser: () => void;
6
- }
7
- /**
8
- * Zustand store for managing user state
9
- * Persists user data to localStorage
10
- */
11
- export declare const useUserStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UserStore>, "persist"> & {
12
- persist: {
13
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>) => void;
14
- clearStorage: () => void;
15
- rehydrate: () => Promise<void> | void;
16
- hasHydrated: () => boolean;
17
- onHydrate: (fn: (state: UserStore) => void) => () => void;
18
- onFinishHydration: (fn: (state: UserStore) => void) => () => void;
19
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>;
20
- };
21
- }>;
22
- export {};
@@ -1,27 +0,0 @@
1
- import { debugB3React } from "../../../shared/utils/debug.js";
2
- import { create } from "zustand";
3
- import { persist } from "zustand/middleware";
4
- const debug = debugB3React("useUserQuery");
5
- /**
6
- * Zustand store for managing user state
7
- * Persists user data to localStorage
8
- */
9
- export const useUserStore = create()(persist(set => ({
10
- user: null,
11
- setUser: (newUser) => {
12
- const userToSave = newUser ?? null;
13
- set({ user: userToSave });
14
- debug("User updated", userToSave);
15
- },
16
- clearUser: () => {
17
- set({ user: null });
18
- debug("User cleared");
19
- },
20
- }), {
21
- name: "b3-user",
22
- onRehydrateStorage: () => (_, error) => {
23
- if (error) {
24
- console.warn("Failed to rehydrate user store:", error);
25
- }
26
- },
27
- }));
@@ -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,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,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
- };