@b3dotfun/sdk 0.0.23 → 0.0.24-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.js +6 -9
  2. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
  3. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +35 -28
  4. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +5 -5
  5. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +35 -28
  6. package/dist/cjs/anyspend/react/components/common/Accordion.d.ts +7 -0
  7. package/dist/cjs/anyspend/react/components/common/Accordion.js +53 -0
  8. package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +3 -22
  9. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
  10. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +76 -83
  11. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +1 -1
  12. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +4 -3
  13. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +1 -5
  14. package/dist/cjs/anyspend/react/components/common/StepProgress.js +2 -2
  15. package/dist/cjs/anyspend/react/components/common/TokenBalance.js +1 -1
  16. package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.d.ts +0 -1
  17. package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -4
  18. package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +2 -2
  19. package/dist/cjs/anyspend/react/hooks/useStripeSupport.d.ts +0 -1
  20. package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +0 -1
  21. package/dist/cjs/anyspend/utils/chain.js +1 -1
  22. package/dist/cjs/bondkit/abis/BondkitTokenABI.d.ts +1020 -0
  23. package/dist/cjs/bondkit/abis/BondkitTokenABI.js +1332 -0
  24. package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.d.ts +391 -0
  25. package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.js +514 -0
  26. package/dist/cjs/bondkit/abis/index.d.ts +2 -0
  27. package/dist/cjs/bondkit/abis/index.js +18 -0
  28. package/dist/cjs/bondkit/bondkitToken.d.ts +68 -0
  29. package/dist/cjs/bondkit/bondkitToken.js +456 -0
  30. package/dist/cjs/bondkit/bondkitTokenFactory.d.ts +60 -0
  31. package/dist/cjs/bondkit/bondkitTokenFactory.js +274 -0
  32. package/dist/cjs/bondkit/components/TradingView.d.ts +3 -0
  33. package/dist/cjs/bondkit/components/TradingView.js +296 -0
  34. package/dist/cjs/bondkit/components/config/cdn.d.ts +42 -0
  35. package/dist/cjs/bondkit/components/config/cdn.js +63 -0
  36. package/dist/cjs/bondkit/components/index.d.ts +5 -0
  37. package/dist/cjs/bondkit/components/index.js +25 -0
  38. package/dist/cjs/bondkit/components/types.d.ts +8 -0
  39. package/dist/cjs/bondkit/components/types.js +5 -0
  40. package/dist/cjs/bondkit/components/utils/cdn-loader.d.ts +24 -0
  41. package/dist/cjs/bondkit/components/utils/cdn-loader.js +73 -0
  42. package/dist/cjs/bondkit/components/utils/format.d.ts +4 -0
  43. package/dist/cjs/bondkit/components/utils/format.js +31 -0
  44. package/dist/cjs/bondkit/config.d.ts +10 -0
  45. package/dist/cjs/bondkit/config.js +18 -0
  46. package/dist/cjs/bondkit/constants.d.ts +3 -0
  47. package/dist/cjs/bondkit/constants.js +5 -0
  48. package/dist/cjs/bondkit/index.d.ts +7 -0
  49. package/dist/cjs/bondkit/index.js +33 -0
  50. package/dist/cjs/bondkit/json_abis/BondkitABI.json +1329 -0
  51. package/dist/cjs/bondkit/json_abis/BondkitFactoryABI.json +511 -0
  52. package/dist/cjs/bondkit/json_abis/index.d.ts +3 -0
  53. package/dist/cjs/bondkit/json_abis/index.js +10 -0
  54. package/dist/cjs/bondkit/json_abis/index.ts +4 -0
  55. package/dist/cjs/bondkit/types.d.ts +77 -0
  56. package/dist/cjs/bondkit/types.js +11 -0
  57. package/dist/cjs/global-account/react/components/B3DynamicModal.js +14 -16
  58. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +31 -20
  59. package/dist/cjs/global-account/react/components/MintButton/MintButton.js +0 -1
  60. package/dist/cjs/global-account/react/components/SendERC20Button/SendERC20Button.d.ts +13 -0
  61. package/dist/cjs/global-account/react/components/SendERC20Button/SendERC20Button.js +33 -0
  62. package/dist/cjs/global-account/react/components/SendETHButton/SendETHButton.d.ts +12 -0
  63. package/dist/cjs/global-account/react/components/SendETHButton/SendETHButton.js +23 -0
  64. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +4 -2
  65. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +2 -2
  66. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  67. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +4 -4
  68. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  69. package/dist/cjs/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  70. package/dist/cjs/global-account/react/components/custom/CopyToClipboard.js +3 -2
  71. package/dist/cjs/global-account/react/components/icons/BankIcon.d.ts +9 -0
  72. package/dist/cjs/global-account/react/components/icons/BankIcon.js +8 -0
  73. package/dist/cjs/global-account/react/components/icons/EditIcon.d.ts +9 -0
  74. package/dist/cjs/global-account/react/components/icons/EditIcon.js +8 -0
  75. package/dist/cjs/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  76. package/dist/cjs/global-account/react/components/icons/SignOutIcon.js +8 -0
  77. package/dist/cjs/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  78. package/dist/cjs/global-account/react/components/icons/SwapIcon.js +8 -0
  79. package/dist/cjs/global-account/react/components/index.d.ts +2 -0
  80. package/dist/cjs/global-account/react/components/index.js +8 -2
  81. package/dist/cjs/global-account/react/components/ui/scroll-area.js +1 -1
  82. package/dist/cjs/global-account/react/components/ui/tooltip.d.ts +1 -1
  83. package/dist/cjs/global-account/react/hooks/index.d.ts +2 -1
  84. package/dist/cjs/global-account/react/hooks/index.js +18 -3
  85. package/dist/cjs/global-account/react/hooks/useAccountWallet.js +8 -0
  86. package/dist/cjs/global-account/react/hooks/useAuthentication.js +4 -4
  87. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  88. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +11 -0
  89. package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.d.ts +1 -2
  90. package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +2 -2
  91. package/dist/cjs/global-account/react/hooks/useFirstEOA.js +9 -7
  92. package/dist/cjs/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  93. package/dist/cjs/global-account/react/hooks/useNativeBalance.js +39 -6
  94. package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  95. package/dist/cjs/global-account/react/hooks/useTokenPrice.js +81 -2
  96. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +11 -0
  97. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +160 -0
  98. package/dist/cjs/shared/constants/chains/supported.d.ts +4 -0
  99. package/dist/cjs/shared/constants/chains/supported.js +11 -0
  100. package/dist/cjs/shared/generated/chain-networks.json +1 -1
  101. package/dist/esm/anyspend/react/components/AnySpend.js +6 -9
  102. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
  103. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +37 -30
  104. package/dist/esm/anyspend/react/components/AnySpendCustom.js +5 -5
  105. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +37 -30
  106. package/dist/esm/anyspend/react/components/common/Accordion.d.ts +7 -0
  107. package/dist/esm/anyspend/react/components/common/Accordion.js +14 -0
  108. package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +3 -22
  109. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
  110. package/dist/esm/anyspend/react/components/common/OrderDetails.js +79 -86
  111. package/dist/esm/anyspend/react/components/common/OrderStatus.js +1 -1
  112. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +5 -4
  113. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +1 -5
  114. package/dist/esm/anyspend/react/components/common/StepProgress.js +2 -2
  115. package/dist/esm/anyspend/react/components/common/TokenBalance.js +1 -1
  116. package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.d.ts +0 -1
  117. package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -4
  118. package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +2 -2
  119. package/dist/esm/anyspend/react/hooks/useStripeSupport.d.ts +0 -1
  120. package/dist/esm/anyspend/react/hooks/useStripeSupport.js +0 -1
  121. package/dist/esm/anyspend/utils/chain.js +1 -1
  122. package/dist/esm/bondkit/abis/BondkitTokenABI.d.ts +1020 -0
  123. package/dist/esm/bondkit/abis/BondkitTokenABI.js +1329 -0
  124. package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.d.ts +391 -0
  125. package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.js +511 -0
  126. package/dist/esm/bondkit/abis/index.d.ts +2 -0
  127. package/dist/esm/bondkit/abis/index.js +2 -0
  128. package/dist/esm/bondkit/bondkitToken.d.ts +68 -0
  129. package/dist/esm/bondkit/bondkitToken.js +452 -0
  130. package/dist/esm/bondkit/bondkitTokenFactory.d.ts +60 -0
  131. package/dist/esm/bondkit/bondkitTokenFactory.js +270 -0
  132. package/dist/esm/bondkit/components/TradingView.d.ts +3 -0
  133. package/dist/esm/bondkit/components/TradingView.js +294 -0
  134. package/dist/esm/bondkit/components/config/cdn.d.ts +42 -0
  135. package/dist/esm/bondkit/components/config/cdn.js +55 -0
  136. package/dist/esm/bondkit/components/index.d.ts +5 -0
  137. package/dist/esm/bondkit/components/index.js +4 -0
  138. package/dist/esm/bondkit/components/types.d.ts +8 -0
  139. package/dist/esm/bondkit/components/types.js +4 -0
  140. package/dist/esm/bondkit/components/utils/cdn-loader.d.ts +24 -0
  141. package/dist/esm/bondkit/components/utils/cdn-loader.js +66 -0
  142. package/dist/esm/bondkit/components/utils/format.d.ts +4 -0
  143. package/dist/esm/bondkit/components/utils/format.js +28 -0
  144. package/dist/esm/bondkit/config.d.ts +10 -0
  145. package/dist/esm/bondkit/config.js +14 -0
  146. package/dist/esm/bondkit/constants.d.ts +3 -0
  147. package/dist/esm/bondkit/constants.js +2 -0
  148. package/dist/esm/bondkit/index.d.ts +7 -0
  149. package/dist/esm/bondkit/index.js +12 -0
  150. package/dist/esm/bondkit/json_abis/BondkitABI.json +1329 -0
  151. package/dist/esm/bondkit/json_abis/BondkitFactoryABI.json +511 -0
  152. package/dist/esm/bondkit/json_abis/index.d.ts +3 -0
  153. package/dist/esm/bondkit/json_abis/index.js +3 -0
  154. package/dist/esm/bondkit/json_abis/index.ts +4 -0
  155. package/dist/esm/bondkit/types.d.ts +77 -0
  156. package/dist/esm/bondkit/types.js +8 -0
  157. package/dist/esm/global-account/react/components/B3DynamicModal.js +14 -16
  158. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +33 -22
  159. package/dist/esm/global-account/react/components/MintButton/MintButton.js +0 -1
  160. package/dist/esm/global-account/react/components/SendERC20Button/SendERC20Button.d.ts +13 -0
  161. package/dist/esm/global-account/react/components/SendERC20Button/SendERC20Button.js +30 -0
  162. package/dist/esm/global-account/react/components/SendETHButton/SendETHButton.d.ts +12 -0
  163. package/dist/esm/global-account/react/components/SendETHButton/SendETHButton.js +20 -0
  164. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +4 -2
  165. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +2 -2
  166. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  167. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +4 -4
  168. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  169. package/dist/esm/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  170. package/dist/esm/global-account/react/components/custom/CopyToClipboard.js +4 -3
  171. package/dist/esm/global-account/react/components/icons/BankIcon.d.ts +9 -0
  172. package/dist/esm/global-account/react/components/icons/BankIcon.js +5 -0
  173. package/dist/esm/global-account/react/components/icons/EditIcon.d.ts +9 -0
  174. package/dist/esm/global-account/react/components/icons/EditIcon.js +5 -0
  175. package/dist/esm/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  176. package/dist/esm/global-account/react/components/icons/SignOutIcon.js +5 -0
  177. package/dist/esm/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  178. package/dist/esm/global-account/react/components/icons/SwapIcon.js +5 -0
  179. package/dist/esm/global-account/react/components/index.d.ts +2 -0
  180. package/dist/esm/global-account/react/components/index.js +4 -0
  181. package/dist/esm/global-account/react/components/ui/scroll-area.js +1 -1
  182. package/dist/esm/global-account/react/components/ui/tooltip.d.ts +1 -1
  183. package/dist/esm/global-account/react/hooks/index.d.ts +2 -1
  184. package/dist/esm/global-account/react/hooks/index.js +2 -1
  185. package/dist/esm/global-account/react/hooks/useAccountWallet.js +8 -0
  186. package/dist/esm/global-account/react/hooks/useAuthentication.js +4 -4
  187. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  188. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +11 -0
  189. package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.d.ts +1 -2
  190. package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +2 -2
  191. package/dist/esm/global-account/react/hooks/useFirstEOA.js +9 -7
  192. package/dist/esm/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  193. package/dist/esm/global-account/react/hooks/useNativeBalance.js +39 -6
  194. package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  195. package/dist/esm/global-account/react/hooks/useTokenPrice.js +78 -3
  196. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +11 -0
  197. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +154 -0
  198. package/dist/esm/shared/constants/chains/supported.d.ts +4 -0
  199. package/dist/esm/shared/constants/chains/supported.js +10 -0
  200. package/dist/esm/shared/generated/chain-networks.json +1 -1
  201. package/dist/styles/index.css +1 -1
  202. package/dist/types/anyspend/react/components/common/Accordion.d.ts +7 -0
  203. package/dist/types/anyspend/react/hooks/useGeoOnrampOptions.d.ts +0 -1
  204. package/dist/types/anyspend/react/hooks/useSigMint.d.ts +2 -2
  205. package/dist/types/anyspend/react/hooks/useStripeSupport.d.ts +0 -1
  206. package/dist/types/bondkit/abis/BondkitTokenABI.d.ts +1020 -0
  207. package/dist/types/bondkit/abis/BondkitTokenFactoryABI.d.ts +391 -0
  208. package/dist/types/bondkit/abis/index.d.ts +2 -0
  209. package/dist/types/bondkit/bondkitToken.d.ts +68 -0
  210. package/dist/types/bondkit/bondkitTokenFactory.d.ts +60 -0
  211. package/dist/types/bondkit/components/TradingView.d.ts +3 -0
  212. package/dist/types/bondkit/components/config/cdn.d.ts +42 -0
  213. package/dist/types/bondkit/components/index.d.ts +5 -0
  214. package/dist/types/bondkit/components/types.d.ts +8 -0
  215. package/dist/types/bondkit/components/utils/cdn-loader.d.ts +24 -0
  216. package/dist/types/bondkit/components/utils/format.d.ts +4 -0
  217. package/dist/types/bondkit/config.d.ts +10 -0
  218. package/dist/types/bondkit/constants.d.ts +3 -0
  219. package/dist/types/bondkit/index.d.ts +7 -0
  220. package/dist/types/bondkit/json_abis/index.d.ts +3 -0
  221. package/dist/types/bondkit/types.d.ts +77 -0
  222. package/dist/types/global-account/react/components/SendERC20Button/SendERC20Button.d.ts +13 -0
  223. package/dist/types/global-account/react/components/SendETHButton/SendETHButton.d.ts +12 -0
  224. package/dist/types/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  225. package/dist/types/global-account/react/components/icons/BankIcon.d.ts +9 -0
  226. package/dist/types/global-account/react/components/icons/EditIcon.d.ts +9 -0
  227. package/dist/types/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  228. package/dist/types/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  229. package/dist/types/global-account/react/components/index.d.ts +2 -0
  230. package/dist/types/global-account/react/components/ui/tooltip.d.ts +1 -1
  231. package/dist/types/global-account/react/hooks/index.d.ts +2 -1
  232. package/dist/types/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  233. package/dist/types/global-account/react/hooks/useChainSwitchWithAction.d.ts +1 -2
  234. package/dist/types/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  235. package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  236. package/dist/types/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +11 -0
  237. package/dist/types/shared/constants/chains/supported.d.ts +4 -0
  238. package/package.json +43 -7
  239. package/src/anyspend/react/components/AnySpend.tsx +6 -24
  240. package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -2
  241. package/src/anyspend/react/components/AnySpendBuySpin.tsx +42 -32
  242. package/src/anyspend/react/components/AnySpendCustom.tsx +8 -14
  243. package/src/anyspend/react/components/AnySpendStakeB3.tsx +44 -34
  244. package/src/anyspend/react/components/common/Accordion.tsx +56 -0
  245. package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +0 -25
  246. package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +1 -2
  247. package/src/anyspend/react/components/common/OrderDetails.tsx +292 -260
  248. package/src/anyspend/react/components/common/OrderStatus.tsx +1 -1
  249. package/src/anyspend/react/components/common/PanelOnramp.tsx +7 -7
  250. package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +0 -6
  251. package/src/anyspend/react/components/common/StepProgress.tsx +2 -2
  252. package/src/anyspend/react/components/common/TokenBalance.tsx +3 -3
  253. package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +2 -4
  254. package/src/anyspend/react/hooks/useStripeSupport.ts +0 -1
  255. package/src/anyspend/utils/chain.ts +1 -1
  256. package/src/bondkit/abis/BondkitTokenABI.ts +1329 -0
  257. package/src/bondkit/abis/BondkitTokenFactoryABI.ts +511 -0
  258. package/src/bondkit/abis/index.ts +2 -0
  259. package/src/bondkit/bondkitToken.ts +539 -0
  260. package/src/bondkit/bondkitTokenFactory.ts +336 -0
  261. package/src/bondkit/components/TradingView.tsx +341 -0
  262. package/src/bondkit/components/config/cdn.ts +63 -0
  263. package/src/bondkit/components/index.ts +5 -0
  264. package/src/bondkit/components/types.ts +9 -0
  265. package/src/bondkit/components/utils/cdn-loader.ts +77 -0
  266. package/src/bondkit/components/utils/format.ts +36 -0
  267. package/src/bondkit/config.ts +26 -0
  268. package/src/bondkit/constants.ts +5 -0
  269. package/src/bondkit/index.ts +16 -0
  270. package/src/bondkit/json_abis/BondkitABI.json +1329 -0
  271. package/src/bondkit/json_abis/BondkitFactoryABI.json +511 -0
  272. package/src/bondkit/json_abis/index.ts +4 -0
  273. package/src/bondkit/types.ts +98 -0
  274. package/src/global-account/react/components/B3DynamicModal.tsx +68 -40
  275. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +308 -137
  276. package/src/global-account/react/components/MintButton/MintButton.tsx +0 -1
  277. package/src/global-account/react/components/SendERC20Button/SendERC20Button.tsx +57 -0
  278. package/src/global-account/react/components/SendETHButton/SendETHButton.tsx +37 -0
  279. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +21 -22
  280. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +2 -2
  281. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +1 -1
  282. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +4 -3
  283. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
  284. package/src/global-account/react/components/custom/CopyToClipboard.tsx +7 -4
  285. package/src/global-account/react/components/icons/BankIcon.tsx +38 -0
  286. package/src/global-account/react/components/icons/EditIcon.tsx +33 -0
  287. package/src/global-account/react/components/icons/SignOutIcon.tsx +28 -0
  288. package/src/global-account/react/components/icons/SwapIcon.tsx +41 -0
  289. package/src/global-account/react/components/index.ts +6 -0
  290. package/src/global-account/react/components/ui/scroll-area.tsx +2 -2
  291. package/src/global-account/react/components/ui/tooltip.tsx +1 -1
  292. package/src/global-account/react/hooks/index.ts +2 -1
  293. package/src/global-account/react/hooks/useAccountWallet.tsx +10 -1
  294. package/src/global-account/react/hooks/useAuthentication.ts +4 -4
  295. package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +18 -0
  296. package/src/global-account/react/hooks/useChainSwitchWithAction.ts +3 -4
  297. package/src/global-account/react/hooks/useFirstEOA.tsx +10 -7
  298. package/src/global-account/react/hooks/useNativeBalance.tsx +51 -6
  299. package/src/global-account/react/hooks/useTokenPrice.tsx +138 -3
  300. package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +186 -0
  301. package/src/shared/constants/chains/supported.ts +11 -0
  302. package/src/shared/generated/chain-networks.json +1 -1
  303. package/src/styles/index.css +345 -0
@@ -0,0 +1,511 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_initialOwner",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_implementationAddress",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "stateMutability": "nonpayable",
16
+ "type": "constructor"
17
+ },
18
+ {
19
+ "inputs": [],
20
+ "name": "CloneInitializationReturnedFalse",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "string",
27
+ "name": "reason",
28
+ "type": "string"
29
+ }
30
+ ],
31
+ "name": "CloneInitializationReverted",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [],
36
+ "name": "FailedDeployment",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "balance",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "internalType": "uint256",
48
+ "name": "needed",
49
+ "type": "uint256"
50
+ }
51
+ ],
52
+ "name": "InsufficientBalance",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "providedAddress",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "name": "InvalidImplementationAddress",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "owner",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "OwnableInvalidOwner",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "account",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "name": "OwnableUnauthorizedAccount",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "value",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "name": "ValidationInvalidAggressivenessFactor",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [
101
+ {
102
+ "internalType": "address",
103
+ "name": "providedAddress",
104
+ "type": "address"
105
+ }
106
+ ],
107
+ "name": "ValidationInvalidFeeRecipientAddress",
108
+ "type": "error"
109
+ },
110
+ {
111
+ "inputs": [
112
+ {
113
+ "internalType": "uint256",
114
+ "name": "value",
115
+ "type": "uint256"
116
+ }
117
+ ],
118
+ "name": "ValidationInvalidFinalTokenSupply",
119
+ "type": "error"
120
+ },
121
+ {
122
+ "inputs": [
123
+ {
124
+ "internalType": "uint256",
125
+ "name": "value",
126
+ "type": "uint256"
127
+ }
128
+ ],
129
+ "name": "ValidationInvalidLPSplitRatio",
130
+ "type": "error"
131
+ },
132
+ {
133
+ "inputs": [
134
+ {
135
+ "internalType": "address",
136
+ "name": "providedAddress",
137
+ "type": "address"
138
+ }
139
+ ],
140
+ "name": "ValidationInvalidMigrationAdminAddress",
141
+ "type": "error"
142
+ },
143
+ {
144
+ "inputs": [
145
+ {
146
+ "internalType": "address",
147
+ "name": "providedAddress",
148
+ "type": "address"
149
+ }
150
+ ],
151
+ "name": "ValidationInvalidRouterAddress",
152
+ "type": "error"
153
+ },
154
+ {
155
+ "anonymous": false,
156
+ "inputs": [
157
+ {
158
+ "indexed": true,
159
+ "internalType": "address",
160
+ "name": "tokenAddress",
161
+ "type": "address"
162
+ },
163
+ {
164
+ "indexed": true,
165
+ "internalType": "address",
166
+ "name": "implementationAddress",
167
+ "type": "address"
168
+ },
169
+ {
170
+ "indexed": false,
171
+ "internalType": "string",
172
+ "name": "name",
173
+ "type": "string"
174
+ },
175
+ {
176
+ "indexed": false,
177
+ "internalType": "string",
178
+ "name": "symbol",
179
+ "type": "string"
180
+ },
181
+ {
182
+ "indexed": true,
183
+ "internalType": "address",
184
+ "name": "feeRecipient",
185
+ "type": "address"
186
+ },
187
+ {
188
+ "indexed": false,
189
+ "internalType": "address",
190
+ "name": "migrationAdmin",
191
+ "type": "address"
192
+ }
193
+ ],
194
+ "name": "BondkitTokenCreated",
195
+ "type": "event"
196
+ },
197
+ {
198
+ "anonymous": false,
199
+ "inputs": [
200
+ {
201
+ "indexed": true,
202
+ "internalType": "address",
203
+ "name": "cloneAddress",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "CloneInitializationFailed",
208
+ "type": "event"
209
+ },
210
+ {
211
+ "anonymous": false,
212
+ "inputs": [
213
+ {
214
+ "indexed": true,
215
+ "internalType": "address",
216
+ "name": "cloneAddress",
217
+ "type": "address"
218
+ }
219
+ ],
220
+ "name": "CloneInitializationSuccess",
221
+ "type": "event"
222
+ },
223
+ {
224
+ "anonymous": false,
225
+ "inputs": [
226
+ {
227
+ "indexed": true,
228
+ "internalType": "address",
229
+ "name": "previousOwner",
230
+ "type": "address"
231
+ },
232
+ {
233
+ "indexed": true,
234
+ "internalType": "address",
235
+ "name": "newOwner",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "OwnershipTransferred",
240
+ "type": "event"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "address",
246
+ "name": "",
247
+ "type": "address"
248
+ }
249
+ ],
250
+ "name": "bondkitTokenConfigs",
251
+ "outputs": [
252
+ {
253
+ "internalType": "string",
254
+ "name": "name",
255
+ "type": "string"
256
+ },
257
+ {
258
+ "internalType": "string",
259
+ "name": "symbol",
260
+ "type": "string"
261
+ },
262
+ {
263
+ "internalType": "address",
264
+ "name": "feeRecipient",
265
+ "type": "address"
266
+ },
267
+ {
268
+ "internalType": "uint256",
269
+ "name": "finalTokenSupply",
270
+ "type": "uint256"
271
+ },
272
+ {
273
+ "internalType": "uint8",
274
+ "name": "aggressivenessFactor",
275
+ "type": "uint8"
276
+ },
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "lpSplitRatioFeeRecipientBps",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "targetEth",
285
+ "type": "uint256"
286
+ },
287
+ {
288
+ "internalType": "address",
289
+ "name": "uniswapV2RouterAddress",
290
+ "type": "address"
291
+ },
292
+ {
293
+ "internalType": "address",
294
+ "name": "migrationAdminAddress",
295
+ "type": "address"
296
+ }
297
+ ],
298
+ "stateMutability": "view",
299
+ "type": "function"
300
+ },
301
+ {
302
+ "inputs": [],
303
+ "name": "bondkitTokenImplementation",
304
+ "outputs": [
305
+ {
306
+ "internalType": "address",
307
+ "name": "",
308
+ "type": "address"
309
+ }
310
+ ],
311
+ "stateMutability": "view",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [
316
+ {
317
+ "components": [
318
+ {
319
+ "internalType": "string",
320
+ "name": "name",
321
+ "type": "string"
322
+ },
323
+ {
324
+ "internalType": "string",
325
+ "name": "symbol",
326
+ "type": "string"
327
+ },
328
+ {
329
+ "internalType": "address",
330
+ "name": "feeRecipient",
331
+ "type": "address"
332
+ },
333
+ {
334
+ "internalType": "uint256",
335
+ "name": "finalTokenSupply",
336
+ "type": "uint256"
337
+ },
338
+ {
339
+ "internalType": "uint8",
340
+ "name": "aggressivenessFactor",
341
+ "type": "uint8"
342
+ },
343
+ {
344
+ "internalType": "uint256",
345
+ "name": "lpSplitRatioFeeRecipientBps",
346
+ "type": "uint256"
347
+ },
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "targetEth",
351
+ "type": "uint256"
352
+ },
353
+ {
354
+ "internalType": "address",
355
+ "name": "uniswapV2RouterAddress",
356
+ "type": "address"
357
+ },
358
+ {
359
+ "internalType": "address",
360
+ "name": "migrationAdminAddress",
361
+ "type": "address"
362
+ }
363
+ ],
364
+ "internalType": "struct BondkitTokenConfigLib.Config",
365
+ "name": "_config",
366
+ "type": "tuple"
367
+ }
368
+ ],
369
+ "name": "deployBondkitToken",
370
+ "outputs": [
371
+ {
372
+ "internalType": "address",
373
+ "name": "",
374
+ "type": "address"
375
+ }
376
+ ],
377
+ "stateMutability": "nonpayable",
378
+ "type": "function"
379
+ },
380
+ {
381
+ "inputs": [
382
+ {
383
+ "internalType": "uint256",
384
+ "name": "",
385
+ "type": "uint256"
386
+ }
387
+ ],
388
+ "name": "deployedBondkitTokens",
389
+ "outputs": [
390
+ {
391
+ "internalType": "address",
392
+ "name": "",
393
+ "type": "address"
394
+ }
395
+ ],
396
+ "stateMutability": "view",
397
+ "type": "function"
398
+ },
399
+ {
400
+ "inputs": [
401
+ {
402
+ "internalType": "address",
403
+ "name": "_tokenAddress",
404
+ "type": "address"
405
+ }
406
+ ],
407
+ "name": "getBondkitTokenConfig",
408
+ "outputs": [
409
+ {
410
+ "components": [
411
+ {
412
+ "internalType": "string",
413
+ "name": "name",
414
+ "type": "string"
415
+ },
416
+ {
417
+ "internalType": "string",
418
+ "name": "symbol",
419
+ "type": "string"
420
+ },
421
+ {
422
+ "internalType": "address",
423
+ "name": "feeRecipient",
424
+ "type": "address"
425
+ },
426
+ {
427
+ "internalType": "uint256",
428
+ "name": "finalTokenSupply",
429
+ "type": "uint256"
430
+ },
431
+ {
432
+ "internalType": "uint8",
433
+ "name": "aggressivenessFactor",
434
+ "type": "uint8"
435
+ },
436
+ {
437
+ "internalType": "uint256",
438
+ "name": "lpSplitRatioFeeRecipientBps",
439
+ "type": "uint256"
440
+ },
441
+ {
442
+ "internalType": "uint256",
443
+ "name": "targetEth",
444
+ "type": "uint256"
445
+ },
446
+ {
447
+ "internalType": "address",
448
+ "name": "uniswapV2RouterAddress",
449
+ "type": "address"
450
+ },
451
+ {
452
+ "internalType": "address",
453
+ "name": "migrationAdminAddress",
454
+ "type": "address"
455
+ }
456
+ ],
457
+ "internalType": "struct BondkitTokenConfigLib.Config",
458
+ "name": "",
459
+ "type": "tuple"
460
+ }
461
+ ],
462
+ "stateMutability": "view",
463
+ "type": "function"
464
+ },
465
+ {
466
+ "inputs": [],
467
+ "name": "getDeployedBondkitTokens",
468
+ "outputs": [
469
+ {
470
+ "internalType": "address[]",
471
+ "name": "",
472
+ "type": "address[]"
473
+ }
474
+ ],
475
+ "stateMutability": "view",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [],
480
+ "name": "owner",
481
+ "outputs": [
482
+ {
483
+ "internalType": "address",
484
+ "name": "",
485
+ "type": "address"
486
+ }
487
+ ],
488
+ "stateMutability": "view",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [],
493
+ "name": "renounceOwnership",
494
+ "outputs": [],
495
+ "stateMutability": "nonpayable",
496
+ "type": "function"
497
+ },
498
+ {
499
+ "inputs": [
500
+ {
501
+ "internalType": "address",
502
+ "name": "newOwner",
503
+ "type": "address"
504
+ }
505
+ ],
506
+ "name": "transferOwnership",
507
+ "outputs": [],
508
+ "stateMutability": "nonpayable",
509
+ "type": "function"
510
+ }
511
+ ]
@@ -0,0 +1,3 @@
1
+ import BondkitABI from "./BondkitABI.json";
2
+ import BondkitFactoryABI from "./BondkitFactoryABI.json";
3
+ export { BondkitABI, BondkitFactoryABI };
@@ -0,0 +1,3 @@
1
+ import BondkitABI from "./BondkitABI.json";
2
+ import BondkitFactoryABI from "./BondkitFactoryABI.json";
3
+ export { BondkitABI, BondkitFactoryABI };
@@ -0,0 +1,4 @@
1
+ import BondkitABI from "./BondkitABI.json";
2
+ import BondkitFactoryABI from "./BondkitFactoryABI.json";
3
+
4
+ export { BondkitABI, BondkitFactoryABI };
@@ -0,0 +1,77 @@
1
+ import type { Address, Hex } from "viem";
2
+ export type TokenDetails = {
3
+ name: string;
4
+ symbol: string;
5
+ decimals: number;
6
+ totalSupply: bigint;
7
+ owner: Address;
8
+ };
9
+ export type BondkitTokenConfig = {
10
+ name: string;
11
+ symbol: string;
12
+ feeRecipient: Address;
13
+ finalTokenSupply: bigint;
14
+ aggressivenessFactor: number;
15
+ lpSplitRatioFeeRecipientBps: bigint;
16
+ targetEth: bigint;
17
+ uniswapV2RouterAddress: Address;
18
+ migrationAdminAddress: Address;
19
+ };
20
+ export type BondkitTokenCreatedEventArgs = {
21
+ tokenAddress: Address;
22
+ implementationAddress: Address;
23
+ name: string;
24
+ symbol: string;
25
+ feeRecipient: Address;
26
+ migrationAdmin: Address;
27
+ };
28
+ export type BondkitTokenInitializationConfig = BondkitTokenConfig;
29
+ export type BoughtEventArgs = {
30
+ buyer: Address;
31
+ ethIn: bigint;
32
+ tokensOut: bigint;
33
+ feeRecipientFee: bigint;
34
+ };
35
+ export type SoldEventArgs = {
36
+ seller: Address;
37
+ tokensIn: bigint;
38
+ ethOut: bigint;
39
+ feeRecipientFee: bigint;
40
+ };
41
+ export type DexMigrationEventArgs = {
42
+ ethForLp: bigint;
43
+ tokensForLp: bigint;
44
+ ethForFeeRecipient: bigint;
45
+ };
46
+ export declare enum TokenStatus {
47
+ Inactive = 0,// Assuming mapping from ABI, verify actual enum values if specified elsewhere
48
+ BondingPhase = 1,
49
+ DexPhase = 2,
50
+ Migrated = 3
51
+ }
52
+ export interface GetTransactionHistoryOptions {
53
+ userAddress?: Address;
54
+ type?: "buy" | "sell";
55
+ from?: number;
56
+ to?: number;
57
+ limit?: number;
58
+ offset?: number;
59
+ }
60
+ export interface Transaction {
61
+ timestamp: number;
62
+ price: number;
63
+ amount: string;
64
+ type: "buy" | "sell";
65
+ userAddress: Address;
66
+ txHash: Hex;
67
+ chainId: number;
68
+ blockNumber?: number;
69
+ totalEthRaisedBonding?: string;
70
+ value?: string;
71
+ }
72
+ export interface TransactionResponse {
73
+ total: number;
74
+ limit: number;
75
+ skip: number;
76
+ data: Transaction[];
77
+ }
@@ -0,0 +1,8 @@
1
+ // Enum for Status (used in BondkitToken ABI)
2
+ export var TokenStatus;
3
+ (function (TokenStatus) {
4
+ TokenStatus[TokenStatus["Inactive"] = 0] = "Inactive";
5
+ TokenStatus[TokenStatus["BondingPhase"] = 1] = "BondingPhase";
6
+ TokenStatus[TokenStatus["DexPhase"] = 2] = "DexPhase";
7
+ TokenStatus[TokenStatus["Migrated"] = 3] = "Migrated";
8
+ })(TokenStatus || (TokenStatus = {}));
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AnySpend, AnySpendBondKit, AnySpendBuySpin, AnySpendNFT, AnyspendSignatureMint, AnySpendStakeB3, AnySpendTournament, OrderHistory, } from "../../../anyspend/react/index.js";
3
3
  import { useIsMobile, useModalStore } from "../../../global-account/react/index.js";
4
+ import { cn } from "../../../shared/utils/cn.js";
4
5
  import { debugB3React } from "../../../shared/utils/debug.js";
5
6
  import { useB3 } from "./B3Provider/useB3.js";
6
7
  import { ManageAccount } from "./ManageAccount/ManageAccount.js";
@@ -14,9 +15,9 @@ export function B3DynamicModal() {
14
15
  const { isOpen, setB3ModalOpen, contentType, history, navigateBack } = useModalStore();
15
16
  const { theme } = useB3();
16
17
  const isMobile = useIsMobile();
17
- let contentClass = `b3-modal ${theme === "dark" ? "dark" : ""}`;
18
18
  let hideCloseButton = false;
19
- if ([
19
+ // Define arrays for different modal type groups
20
+ const fullWidthTypes = [
20
21
  "anySpend",
21
22
  "anySpendNft",
22
23
  "anySpendJoinTournament",
@@ -27,10 +28,8 @@ export function B3DynamicModal() {
27
28
  "signInWithB3",
28
29
  "anySpendSignatureMint",
29
30
  "anySpendBondKit",
30
- ].find(type => contentType?.type === type)) {
31
- contentClass += " w-full";
32
- }
33
- if ([
31
+ ];
32
+ const freestyleTypes = [
34
33
  "anySpendNft",
35
34
  "anySpendJoinTournament",
36
35
  "anySpendFundTournament",
@@ -38,17 +37,16 @@ export function B3DynamicModal() {
38
37
  "anySpendBuySpin",
39
38
  "anySpendSignatureMint",
40
39
  "anySpendBondKit",
41
- ].find(type => contentType?.type === type)) {
42
- // Due to the dynamic of (Pay with crypto),(Pay with fiat), we want the height fixed to 90dvh but still scrollable.
43
- // NOTE: Just leave it here in case we want the fixed height
44
- // contentClass += " min-h-[90dvh] b3-modal-freestyle";
45
- contentClass += " b3-modal-freestyle";
40
+ ];
41
+ // Check if current content type is in freestyle types
42
+ const isFreestyleType = freestyleTypes.includes(contentType?.type);
43
+ if (isFreestyleType) {
46
44
  hideCloseButton = true;
47
45
  }
48
- if (contentType?.type === "transak") {
49
- contentClass += " transak-modal";
50
- }
51
- debug("@@DynamicModal:contentType", contentType);
46
+ // Build content class using cn utility
47
+ // eslint-disable-next-line tailwindcss/no-custom-classname
48
+ const contentClass = cn("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:px-6", contentType?.type === "transak" && "transak-modal");
49
+ debug("contentType", contentType);
52
50
  const renderContent = () => {
53
51
  if (!contentType)
54
52
  return null;
@@ -90,5 +88,5 @@ export function B3DynamicModal() {
90
88
  const ModalContent = isMobile ? DrawerContent : DialogContent;
91
89
  const ModalTitle = isMobile ? DrawerTitle : DialogTitle;
92
90
  const ModalDescription = isMobile ? DrawerDescription : DialogDescription;
93
- return (_jsx(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: _jsxs(ModalContent, { className: contentClass, hideCloseButton: hideCloseButton, children: [_jsx(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), _jsx(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), _jsxs("div", { className: "no-scrollbar max-h-[90dvh] overflow-auto sm:max-h-[80dvh]", children: [history.length > 0 && contentType?.showBackButton && (_jsxs("button", { onClick: navigateBack, className: "b3-modal-back-button mb-4 flex items-center gap-2 transition-colors hover:text-white", children: [_jsx("span", { children: "\u2190" }), _jsx("span", { className: "text-sm", children: "Back" })] })), renderContent()] })] }) }));
91
+ return (_jsx(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: _jsxs(ModalContent, { className: cn(contentClass, "rounded-2xl bg-white shadow-xl dark:bg-gray-900", "border border-gray-200 dark:border-gray-800", "mx-auto w-full max-w-md", "sm:max-w-lg"), hideCloseButton: hideCloseButton, children: [_jsx(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), _jsx(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), _jsxs("div", { className: "no-scrollbar max-h-[90dvh] overflow-auto sm:max-h-[80dvh]", children: [history.length > 0 && contentType?.showBackButton && (_jsxs("button", { onClick: navigateBack, className: "flex items-center gap-2 px-6 py-4 text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white", children: [_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M15.8337 10H4.16699", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M10.0003 15.8334L4.16699 10L10.0003 4.16669", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), _jsx("span", { className: "text-sm font-medium", children: "Back" })] })), renderContent()] })] }) }));
94
92
  }