@b3dotfun/sdk 0.1.66 → 0.1.68

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 (365) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +9 -0
  2. package/dist/cjs/anyspend/react/components/AnySpend.js +40 -11
  3. package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
  4. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
  5. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
  6. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
  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 +9 -0
  10. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +16 -14
  11. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
  12. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +40 -10
  13. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
  14. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +5 -4
  15. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
  16. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  17. package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +7 -1
  18. package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
  19. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
  20. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
  21. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
  22. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  23. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
  24. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
  25. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
  26. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  27. package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +11 -0
  28. package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -2
  29. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
  30. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
  31. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
  32. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  33. package/dist/cjs/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
  34. package/dist/cjs/anyspend/react/components/checkout/AddressForm.js +14 -0
  35. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
  36. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +158 -0
  37. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
  38. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +61 -0
  39. package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
  40. package/dist/cjs/anyspend/react/components/checkout/CartItemRow.js +9 -0
  41. package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
  42. package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +20 -0
  43. package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
  44. package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +27 -0
  45. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
  46. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.js +31 -0
  47. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
  48. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +75 -0
  49. package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
  50. package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.js +13 -0
  51. package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
  52. package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.js +65 -0
  53. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
  54. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +64 -0
  55. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
  56. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +31 -0
  57. package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
  58. package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +170 -0
  59. package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
  60. package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +324 -0
  61. package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
  62. package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +62 -0
  63. package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
  64. package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +269 -0
  65. package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
  66. package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.js +9 -0
  67. package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
  68. package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +20 -0
  69. package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
  70. package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +1 -1
  71. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
  72. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
  73. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
  74. package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -1
  75. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +93 -19
  76. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +4 -4
  77. package/dist/cjs/anyspend/react/components/common/PaySection.js +1 -1
  78. package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +5 -1
  79. package/dist/cjs/anyspend/react/components/common/StepProgress.js +6 -11
  80. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
  81. package/dist/cjs/anyspend/react/components/common/TransferResultScreen.js +5 -1
  82. package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
  83. package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.js +92 -0
  84. package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
  85. package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.js +71 -0
  86. package/dist/cjs/anyspend/react/components/index.d.ts +8 -1
  87. package/dist/cjs/anyspend/react/components/index.js +10 -1
  88. package/dist/cjs/anyspend/react/components/types/classes.d.ts +50 -0
  89. package/dist/cjs/anyspend/react/components/types/customization.d.ts +75 -0
  90. package/dist/cjs/anyspend/react/components/types/customization.js +2 -0
  91. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
  92. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
  93. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
  94. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +3 -2
  95. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
  96. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
  97. package/dist/cjs/anyspend/services/anyspend.d.ts +1 -0
  98. package/dist/cjs/anyspend/services/anyspend.js +17 -2
  99. package/dist/cjs/anyspend/types/forms.d.ts +92 -0
  100. package/dist/cjs/anyspend/types/forms.js +8 -0
  101. package/dist/cjs/anyspend/utils/format.js +12 -3
  102. package/dist/cjs/app.shared.js +8 -0
  103. package/dist/cjs/global-account/react/components/B3DynamicModal.js +9 -3
  104. package/dist/cjs/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
  105. package/dist/cjs/global-account/react/components/ui/command.d.ts +7 -7
  106. package/dist/cjs/global-account/react/components/ui/dialog.d.ts +2 -0
  107. package/dist/cjs/global-account/react/components/ui/dialog.js +2 -2
  108. package/dist/cjs/global-account/react/components/ui/drawer.d.ts +3 -1
  109. package/dist/cjs/global-account/react/components/ui/drawer.js +1 -1
  110. package/dist/cjs/global-account/react/hooks/useAuth.d.ts +1 -1
  111. package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
  112. package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +4 -4
  113. package/dist/cjs/global-account/react/hooks/useUser.d.ts +1 -1
  114. package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +1 -1
  115. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +53 -1
  116. package/dist/cjs/shared/constants/chains/b3Chain.d.ts +2 -2
  117. package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
  118. package/dist/cjs/shared/utils/number.d.ts +5 -0
  119. package/dist/cjs/shared/utils/number.js +13 -0
  120. package/dist/esm/anyspend/react/components/AnySpend.d.ts +9 -0
  121. package/dist/esm/anyspend/react/components/AnySpend.js +41 -12
  122. package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
  123. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
  124. package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
  125. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
  126. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  127. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  128. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +9 -0
  129. package/dist/esm/anyspend/react/components/AnySpendCustom.js +16 -14
  130. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
  131. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +42 -12
  132. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
  133. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +5 -4
  134. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
  135. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  136. package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +7 -1
  137. package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
  138. package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
  139. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
  140. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
  141. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  142. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
  143. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
  144. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
  145. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  146. package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +11 -0
  147. package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -2
  148. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
  149. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
  150. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
  151. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  152. package/dist/esm/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
  153. package/dist/esm/anyspend/react/components/checkout/AddressForm.js +11 -0
  154. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
  155. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +155 -0
  156. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
  157. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +58 -0
  158. package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
  159. package/dist/esm/anyspend/react/components/checkout/CartItemRow.js +6 -0
  160. package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
  161. package/dist/esm/anyspend/react/components/checkout/CartSummary.js +17 -0
  162. package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
  163. package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +24 -0
  164. package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
  165. package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.js +28 -0
  166. package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
  167. package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +72 -0
  168. package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
  169. package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.js +10 -0
  170. package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
  171. package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.js +62 -0
  172. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
  173. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +61 -0
  174. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
  175. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +28 -0
  176. package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
  177. package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +167 -0
  178. package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
  179. package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +321 -0
  180. package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
  181. package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +59 -0
  182. package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
  183. package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +266 -0
  184. package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
  185. package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.js +6 -0
  186. package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
  187. package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +17 -0
  188. package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
  189. package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +1 -1
  190. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
  191. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
  192. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
  193. package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -1
  194. package/dist/esm/anyspend/react/components/common/OrderStatus.js +96 -22
  195. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +4 -4
  196. package/dist/esm/anyspend/react/components/common/PaySection.js +1 -1
  197. package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +5 -1
  198. package/dist/esm/anyspend/react/components/common/StepProgress.js +6 -11
  199. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
  200. package/dist/esm/anyspend/react/components/common/TransferResultScreen.js +7 -3
  201. package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
  202. package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.js +88 -0
  203. package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
  204. package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.js +68 -0
  205. package/dist/esm/anyspend/react/components/index.d.ts +8 -1
  206. package/dist/esm/anyspend/react/components/index.js +5 -0
  207. package/dist/esm/anyspend/react/components/types/classes.d.ts +50 -0
  208. package/dist/esm/anyspend/react/components/types/customization.d.ts +75 -0
  209. package/dist/esm/anyspend/react/components/types/customization.js +1 -0
  210. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
  211. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
  212. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
  213. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +3 -2
  214. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
  215. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
  216. package/dist/esm/anyspend/services/anyspend.d.ts +1 -0
  217. package/dist/esm/anyspend/services/anyspend.js +17 -2
  218. package/dist/esm/anyspend/types/forms.d.ts +92 -0
  219. package/dist/esm/anyspend/types/forms.js +7 -0
  220. package/dist/esm/anyspend/utils/format.js +12 -3
  221. package/dist/esm/app.shared.js +8 -0
  222. package/dist/esm/global-account/react/components/B3DynamicModal.js +9 -3
  223. package/dist/esm/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
  224. package/dist/esm/global-account/react/components/ui/command.d.ts +7 -7
  225. package/dist/esm/global-account/react/components/ui/dialog.d.ts +2 -0
  226. package/dist/esm/global-account/react/components/ui/dialog.js +2 -2
  227. package/dist/esm/global-account/react/components/ui/drawer.d.ts +3 -1
  228. package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
  229. package/dist/esm/global-account/react/hooks/useAuth.d.ts +1 -1
  230. package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
  231. package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +4 -4
  232. package/dist/esm/global-account/react/hooks/useUser.d.ts +1 -1
  233. package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +1 -1
  234. package/dist/esm/global-account/react/stores/useModalStore.d.ts +53 -1
  235. package/dist/esm/shared/constants/chains/b3Chain.d.ts +2 -2
  236. package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
  237. package/dist/esm/shared/utils/number.d.ts +5 -0
  238. package/dist/esm/shared/utils/number.js +12 -0
  239. package/dist/styles/index.css +1 -1
  240. package/dist/types/anyspend/react/components/AnySpend.d.ts +9 -0
  241. package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
  242. package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
  243. package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  244. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +9 -0
  245. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
  246. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
  247. package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
  248. package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +7 -1
  249. package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
  250. package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
  251. package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
  252. package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
  253. package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +11 -0
  254. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
  255. package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
  256. package/dist/types/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
  257. package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
  258. package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
  259. package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
  260. package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
  261. package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
  262. package/dist/types/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
  263. package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
  264. package/dist/types/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
  265. package/dist/types/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
  266. package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
  267. package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
  268. package/dist/types/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
  269. package/dist/types/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
  270. package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
  271. package/dist/types/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
  272. package/dist/types/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
  273. package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
  274. package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -1
  275. package/dist/types/anyspend/react/components/common/StepProgress.d.ts +5 -1
  276. package/dist/types/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
  277. package/dist/types/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
  278. package/dist/types/anyspend/react/components/index.d.ts +8 -1
  279. package/dist/types/anyspend/react/components/types/classes.d.ts +50 -0
  280. package/dist/types/anyspend/react/components/types/customization.d.ts +75 -0
  281. package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
  282. package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
  283. package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
  284. package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
  285. package/dist/types/anyspend/services/anyspend.d.ts +1 -0
  286. package/dist/types/anyspend/types/forms.d.ts +92 -0
  287. package/dist/types/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
  288. package/dist/types/global-account/react/components/ui/command.d.ts +7 -7
  289. package/dist/types/global-account/react/components/ui/dialog.d.ts +2 -0
  290. package/dist/types/global-account/react/components/ui/drawer.d.ts +3 -1
  291. package/dist/types/global-account/react/hooks/useAuth.d.ts +1 -1
  292. package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
  293. package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +4 -4
  294. package/dist/types/global-account/react/hooks/useUser.d.ts +1 -1
  295. package/dist/types/global-account/react/hooks/useUserQuery.d.ts +1 -1
  296. package/dist/types/global-account/react/stores/useModalStore.d.ts +53 -1
  297. package/dist/types/shared/constants/chains/b3Chain.d.ts +2 -2
  298. package/dist/types/shared/constants/chains/supported.d.ts +3 -3
  299. package/dist/types/shared/utils/number.d.ts +5 -0
  300. package/package.json +1 -1
  301. package/src/anyspend/react/components/AnySpend.tsx +84 -37
  302. package/src/anyspend/react/components/AnySpendBondKit.tsx +12 -1
  303. package/src/anyspend/react/components/AnySpendBuySpin.tsx +14 -0
  304. package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +10 -0
  305. package/src/anyspend/react/components/AnySpendCustom.tsx +38 -20
  306. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +82 -35
  307. package/src/anyspend/react/components/AnySpendDeposit.tsx +24 -2
  308. package/src/anyspend/react/components/AnySpendDepositUpside.tsx +14 -0
  309. package/src/anyspend/react/components/AnySpendNFT.tsx +14 -0
  310. package/src/anyspend/react/components/AnySpendStakeB3.tsx +14 -0
  311. package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +14 -0
  312. package/src/anyspend/react/components/AnySpendStakeUpside.tsx +14 -0
  313. package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +14 -0
  314. package/src/anyspend/react/components/AnySpendTournament.tsx +19 -0
  315. package/src/anyspend/react/components/AnyspendDepositHype.tsx +14 -0
  316. package/src/anyspend/react/components/AnyspendSignatureMint.tsx +10 -0
  317. package/src/anyspend/react/components/checkout/AddressForm.tsx +98 -0
  318. package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +398 -0
  319. package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +221 -0
  320. package/src/anyspend/react/components/checkout/CartItemRow.tsx +58 -0
  321. package/src/anyspend/react/components/checkout/CartSummary.tsx +158 -0
  322. package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +98 -0
  323. package/src/anyspend/react/components/checkout/CheckoutFormField.tsx +129 -0
  324. package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +241 -0
  325. package/src/anyspend/react/components/checkout/CheckoutLayout.tsx +52 -0
  326. package/src/anyspend/react/components/checkout/CheckoutOrderStatus.tsx +224 -0
  327. package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +341 -0
  328. package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +110 -0
  329. package/src/anyspend/react/components/checkout/CoinbaseCheckoutPanel.tsx +279 -0
  330. package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +630 -0
  331. package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +127 -0
  332. package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +612 -0
  333. package/src/anyspend/react/components/checkout/PoweredByBranding.tsx +42 -0
  334. package/src/anyspend/react/components/checkout/ShippingSelector.tsx +73 -0
  335. package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +29 -7
  336. package/src/anyspend/react/components/common/CryptoPaySection.tsx +1 -1
  337. package/src/anyspend/react/components/common/CryptoPaymentMethodDisplay.tsx +1 -1
  338. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +2 -2
  339. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +5 -5
  340. package/src/anyspend/react/components/common/OrderStatus.tsx +140 -34
  341. package/src/anyspend/react/components/common/PanelOnramp.tsx +9 -9
  342. package/src/anyspend/react/components/common/PaySection.tsx +1 -1
  343. package/src/anyspend/react/components/common/StepProgress.tsx +40 -52
  344. package/src/anyspend/react/components/common/TokenBalance.tsx +0 -12
  345. package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +1 -9
  346. package/src/anyspend/react/components/common/TransferResultScreen.tsx +19 -11
  347. package/src/anyspend/react/components/context/AnySpendCustomizationContext.tsx +124 -0
  348. package/src/anyspend/react/components/icons/AnimatedCheckmark.tsx +119 -0
  349. package/src/anyspend/react/components/index.ts +33 -0
  350. package/src/anyspend/react/components/types/classes.ts +70 -0
  351. package/src/anyspend/react/components/types/customization.ts +99 -0
  352. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +3 -2
  353. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +3 -2
  354. package/src/anyspend/react/hooks/useAnyspendFlow.ts +5 -1
  355. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +5 -2
  356. package/src/anyspend/services/anyspend.ts +19 -2
  357. package/src/anyspend/types/forms.ts +97 -0
  358. package/src/anyspend/utils/format.ts +12 -3
  359. package/src/app.shared.ts +11 -0
  360. package/src/global-account/react/components/B3DynamicModal.tsx +13 -4
  361. package/src/global-account/react/components/ui/dialog.tsx +17 -8
  362. package/src/global-account/react/components/ui/drawer.tsx +2 -2
  363. package/src/global-account/react/stores/useModalStore.ts +52 -1
  364. package/src/shared/utils/number.ts +12 -0
  365. package/src/styles/index.css +48 -2
@@ -1,6 +1,7 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
2
  import { GetQuoteResponse } from "../../../anyspend/types/api_req_res";
3
3
  import type { AnySpendAllClasses } from "./types/classes";
4
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
4
5
  export interface DepositContractConfig {
5
6
  /** Custom function ABI JSON string */
6
7
  functionAbi: string;
@@ -103,6 +104,14 @@ export interface AnySpendDepositProps {
103
104
  destinationTokenAmount?: string;
104
105
  /** Opaque metadata passed to the order for callbacks (e.g., workflow form data) */
105
106
  callbackMetadata?: Record<string, unknown>;
107
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
108
+ senderAddress?: string;
109
+ /** Custom slot overrides for sub-components */
110
+ slots?: AnySpendSlots;
111
+ /** Custom content overrides for sub-components */
112
+ content?: AnySpendContent;
113
+ /** Custom theme overrides for sub-components */
114
+ theme?: AnySpendTheme;
106
115
  }
107
116
  /**
108
117
  * A flexible deposit component that wraps AnySpendCustomExactIn with optional chain selection.
@@ -139,4 +148,4 @@ export interface AnySpendDepositProps {
139
148
  * onSuccess={(amount) => console.log(`Deposited ${amount}`)}
140
149
  * />
141
150
  */
142
- export declare function AnySpendDeposit({ loadOrder, mode, recipientAddress, paymentType: initialPaymentType, sourceTokenAddress, sourceTokenChainId: initialSourceChainId, destinationTokenAddress, destinationTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, minDestinationAmount, header, orderType, depositContractConfig, showChainSelection, supportedChains, minPoolSize, topChainsCount, onClose, returnToHomeUrl, customRecipientLabel, returnHomeLabel, isCustomDeposit, classes, allowDirectTransfer, destinationTokenAmount, callbackMetadata, }: AnySpendDepositProps): import("react/jsx-runtime").JSX.Element | null;
151
+ export declare function AnySpendDeposit({ loadOrder, mode, recipientAddress, paymentType: initialPaymentType, sourceTokenAddress, sourceTokenChainId: initialSourceChainId, destinationTokenAddress, destinationTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, minDestinationAmount, header, orderType, depositContractConfig, showChainSelection, supportedChains, minPoolSize, topChainsCount, onClose, returnToHomeUrl, customRecipientLabel, returnHomeLabel, isCustomDeposit, classes, allowDirectTransfer, destinationTokenAmount, callbackMetadata, senderAddress, slots, content, theme, }: AnySpendDepositProps): import("react/jsx-runtime").JSX.Element | null;
@@ -97,7 +97,7 @@ function ChainIcon({ chainId, className }) {
97
97
  * onSuccess={(amount) => console.log(`Deposited ${amount}`)}
98
98
  * />
99
99
  */
100
- function AnySpendDeposit({ loadOrder, mode = "modal", recipientAddress, paymentType: initialPaymentType, sourceTokenAddress, sourceTokenChainId: initialSourceChainId, destinationTokenAddress, destinationTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, minDestinationAmount, header, orderType, depositContractConfig, showChainSelection, supportedChains = DEFAULT_SUPPORTED_CHAINS, minPoolSize = DEFAULT_MIN_POOL_SIZE, topChainsCount = 3, onClose, returnToHomeUrl, customRecipientLabel, returnHomeLabel, isCustomDeposit = false, classes, allowDirectTransfer = false, destinationTokenAmount, callbackMetadata, }) {
100
+ function AnySpendDeposit({ loadOrder, mode = "modal", recipientAddress, paymentType: initialPaymentType, sourceTokenAddress, sourceTokenChainId: initialSourceChainId, destinationTokenAddress, destinationTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, minDestinationAmount, header, orderType, depositContractConfig, showChainSelection, supportedChains = DEFAULT_SUPPORTED_CHAINS, minPoolSize = DEFAULT_MIN_POOL_SIZE, topChainsCount = 3, onClose, returnToHomeUrl, customRecipientLabel, returnHomeLabel, isCustomDeposit = false, classes, allowDirectTransfer = false, destinationTokenAmount, callbackMetadata, senderAddress, slots, content, theme, }) {
101
101
  // Extract deposit-specific classes for convenience
102
102
  const depositClasses = classes?.deposit;
103
103
  const { connectedEOAWallet } = (0, react_1.useAccountWallet)();
@@ -118,8 +118,9 @@ function AnySpendDeposit({ loadOrder, mode = "modal", recipientAddress, paymentT
118
118
  decimals: destinationTokenData?.decimals ?? 18,
119
119
  metadata: { logoURI: destinationTokenData?.logoURI },
120
120
  }), [destinationTokenAddress, destinationTokenChainId, destinationTokenData]);
121
- // Fetch balances for EOA wallet
122
- const { data: balanceData, isLoading: isBalanceLoading } = (0, react_1.useSimBalance)(shouldShowChainSelection ? eoaAddress : undefined, supportedChains.map(c => c.id));
121
+ // Fetch balances for EOA wallet (use senderAddress as fallback for pre-filled balance display)
122
+ const effectiveBalanceAddress = senderAddress || eoaAddress;
123
+ const { data: balanceData, isLoading: isBalanceLoading } = (0, react_1.useSimBalance)(shouldShowChainSelection ? effectiveBalanceAddress : undefined, supportedChains.map(c => c.id));
123
124
  // Group balances by chain and calculate total USD value per chain
124
125
  const chainBalances = (0, react_3.useMemo)(() => {
125
126
  if (!balanceData?.balances)
@@ -209,5 +210,5 @@ function AnySpendDeposit({ loadOrder, mode = "modal", recipientAddress, paymentT
209
210
  // Deposit view
210
211
  return ((0, jsx_runtime_1.jsxs)("div", { className: depositClasses?.form || "anyspend-deposit anyspend-deposit-form relative", children: [shouldShowChainSelection && ((0, jsx_runtime_1.jsxs)("button", { onClick: handleBack, className: depositClasses?.backButton ||
211
212
  "anyspend-deposit-back-button text-as-secondary hover:text-as-primary absolute left-4 top-4 z-10 flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)("svg", { className: depositClasses?.backIcon || "anyspend-deposit-back-icon h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }), (0, jsx_runtime_1.jsx)("span", { className: depositClasses?.backText || "anyspend-deposit-back-text text-sm", children: "Back" })] })), onClose && ((0, jsx_runtime_1.jsx)("button", { onClick: onClose, className: depositClasses?.closeButton ||
212
- "anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })), (0, jsx_runtime_1.jsx)("div", { className: depositClasses?.formContent || (0, cn_1.cn)("anyspend-deposit-form-content", shouldShowChainSelection && "pt-8"), children: isCustomDeposit ? ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: selectedChainId, destinationToken: destinationToken, destinationChainId: destinationTokenChainId, orderType: effectiveOrderType, minDestinationAmount: minDestinationAmount, header: header ?? defaultHeader, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa, customExactInConfig: depositContractConfig, returnToHomeUrl: returnToHomeUrl, customRecipientLabel: customRecipientLabel, returnHomeLabel: returnHomeLabel, classes: classes?.customExactIn, allowDirectTransfer: allowDirectTransfer, destinationTokenAmount: destinationTokenAmount, callbackMetadata: callbackMetadata }, selectedChainId)) : ((0, jsx_runtime_1.jsx)(AnySpend_1.AnySpend, { loadOrder: loadOrder, mode: mode, defaultActiveTab: paymentType, recipientAddress: recipientAddress, sourceChainId: selectedChainId, destinationTokenAddress: destinationTokenAddress, destinationTokenChainId: destinationTokenChainId, onSuccess: txHash => onSuccess?.(txHash ?? ""), onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, hideHeader: true, hideBottomNavigation: true, disableUrlParamManagement: true, returnToHomeUrl: returnToHomeUrl, customRecipientLabel: customRecipientLabel, returnHomeLabel: returnHomeLabel, classes: classes?.anySpend, allowDirectTransfer: allowDirectTransfer, destinationTokenAmount: destinationTokenAmount, callbackMetadata: callbackMetadata }, selectedChainId)) }), (0, jsx_runtime_1.jsx)(WarningText_1.ChainWarningText, { chainId: destinationTokenChainId, classes: classes?.chainWarningText || { root: "px-4 pb-4" } })] }));
213
+ "anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })), (0, jsx_runtime_1.jsx)("div", { className: depositClasses?.formContent || (0, cn_1.cn)("anyspend-deposit-form-content", shouldShowChainSelection && "pt-8"), children: isCustomDeposit ? ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: selectedChainId, destinationToken: destinationToken, destinationChainId: destinationTokenChainId, orderType: effectiveOrderType, minDestinationAmount: minDestinationAmount, header: header ?? defaultHeader, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa, customExactInConfig: depositContractConfig, returnToHomeUrl: returnToHomeUrl, customRecipientLabel: customRecipientLabel, returnHomeLabel: returnHomeLabel, classes: classes?.customExactIn, allowDirectTransfer: allowDirectTransfer, destinationTokenAmount: destinationTokenAmount, callbackMetadata: callbackMetadata, senderAddress: senderAddress, slots: slots, content: content, theme: theme }, selectedChainId)) : ((0, jsx_runtime_1.jsx)(AnySpend_1.AnySpend, { loadOrder: loadOrder, mode: mode, defaultActiveTab: paymentType, recipientAddress: recipientAddress, sourceChainId: selectedChainId, destinationTokenAddress: destinationTokenAddress, destinationTokenChainId: destinationTokenChainId, onSuccess: txHash => onSuccess?.(txHash ?? ""), onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, hideHeader: true, hideBottomNavigation: true, disableUrlParamManagement: true, returnToHomeUrl: returnToHomeUrl, customRecipientLabel: customRecipientLabel, returnHomeLabel: returnHomeLabel, classes: classes?.anySpend, allowDirectTransfer: allowDirectTransfer, destinationTokenAmount: destinationTokenAmount, callbackMetadata: callbackMetadata, senderAddress: senderAddress, slots: slots, content: content, theme: theme }, selectedChainId)) }), (0, jsx_runtime_1.jsx)(WarningText_1.ChainWarningText, { chainId: destinationTokenChainId, classes: classes?.chainWarningText || { root: "px-4 pb-4" } })] }));
213
214
  }
@@ -1,5 +1,6 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
- export declare function AnySpendDepositUpside({ loadOrder, mode, recipientAddress, sourceTokenAddress, sourceTokenChainId, depositContractAddress, token, onSuccess, }: {
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
3
+ export declare function AnySpendDepositUpside({ loadOrder, mode, recipientAddress, sourceTokenAddress, sourceTokenChainId, depositContractAddress, token, onSuccess, senderAddress, slots, content, theme, }: {
3
4
  loadOrder?: string;
4
5
  mode?: "modal" | "page";
5
6
  recipientAddress: string;
@@ -8,4 +9,9 @@ export declare function AnySpendDepositUpside({ loadOrder, mode, recipientAddres
8
9
  depositContractAddress: string;
9
10
  token: components["schemas"]["Token"];
10
11
  onSuccess?: (amount: string) => void;
12
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
13
+ senderAddress?: string;
14
+ slots?: AnySpendSlots;
15
+ content?: AnySpendContent;
16
+ theme?: AnySpendTheme;
11
17
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -25,7 +25,7 @@ const DEPOSIT_FOR_FUNCTION_ABI = JSON.stringify([
25
25
  type: "function",
26
26
  },
27
27
  ]);
28
- function AnySpendDepositUpside({ loadOrder, mode = "modal", recipientAddress, sourceTokenAddress, sourceTokenChainId, depositContractAddress, token, onSuccess, }) {
28
+ function AnySpendDepositUpside({ loadOrder, mode = "modal", recipientAddress, sourceTokenAddress, sourceTokenChainId, depositContractAddress, token, onSuccess, senderAddress, slots, content, theme, }) {
29
29
  if (!recipientAddress)
30
30
  return null;
31
31
  const header = () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "from-b3-react-background to-as-on-surface-1 w-full rounded-t-lg bg-gradient-to-t", children: (0, jsx_runtime_1.jsx)("div", { className: "mb-1 flex w-full flex-col items-center gap-2", children: (0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-2xl font-semibold", children: ["Swap & Deposit ", token.symbol] }) }) }) }));
@@ -37,5 +37,5 @@ function AnySpendDepositUpside({ loadOrder, mode = "modal", recipientAddress, so
37
37
  spenderAddress: depositContractAddress,
38
38
  action: `deposit ${token.symbol}`,
39
39
  };
40
- return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: token, destinationChainId: chains_1.base.id, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess }));
40
+ return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: token, destinationChainId: chains_1.base.id, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
41
41
  }
@@ -1,9 +1,15 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
- export declare function AnySpendNFT({ loadOrder, mode, recipientAddress, nftContract, onSuccess, onShowPointsDetail, }: {
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
3
+ export declare function AnySpendNFT({ loadOrder, mode, recipientAddress, nftContract, onSuccess, onShowPointsDetail, senderAddress, slots, content, theme, }: {
3
4
  loadOrder?: string;
4
5
  mode?: "modal" | "page";
5
6
  recipientAddress?: string;
6
7
  nftContract: components["schemas"]["NftContract"];
7
8
  onSuccess?: (txHash?: string) => void;
8
9
  onShowPointsDetail?: () => void;
10
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
11
+ senderAddress?: string;
12
+ slots?: AnySpendSlots;
13
+ content?: AnySpendContent;
14
+ theme?: AnySpendTheme;
9
15
  }): import("react/jsx-runtime").JSX.Element;
@@ -29,7 +29,7 @@ const CONTRACT_URI_ABI = [
29
29
  type: "function",
30
30
  },
31
31
  ];
32
- function AnySpendNFT({ loadOrder, mode = "modal", recipientAddress, nftContract, onSuccess, onShowPointsDetail, }) {
32
+ function AnySpendNFT({ loadOrder, mode = "modal", recipientAddress, nftContract, onSuccess, onShowPointsDetail, senderAddress, slots, content, theme, }) {
33
33
  const [imageUrlWithFallback, setFallbackImageUrl] = (0, react_3.useState)(nftContract.imageUrl);
34
34
  const hasFetchedRef = (0, react_3.useRef)(false);
35
35
  // Fetch contract metadata when imageUrl is empty
@@ -86,7 +86,7 @@ function AnySpendNFT({ loadOrder, mode = "modal", recipientAddress, nftContract,
86
86
  return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, activeTab: "fiat", recipientAddress: recipientAddress, orderType: "mint_nft", dstChainId: nftContract.chainId, dstToken: nftContract.currency, dstAmount: nftContract.price, contractAddress: nftContract.contractAddress, encodedData: "0x", metadata: {
87
87
  type: "mint_nft",
88
88
  nftContract: nftContract,
89
- }, header: header, onSuccess: onSuccess, onShowPointsDetail: onShowPointsDetail }));
89
+ }, header: header, onSuccess: onSuccess, onShowPointsDetail: onShowPointsDetail, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
90
90
  }
91
91
  function DropdownMenu({ nftContract }) {
92
92
  const [open, setOpen] = (0, react_3.useState)(false);
@@ -1,7 +1,13 @@
1
- export declare function AnySpendStakeB3({ loadOrder, mode, recipientAddress, stakeAmount, onSuccess, }: {
1
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
2
+ export declare function AnySpendStakeB3({ loadOrder, mode, recipientAddress, stakeAmount, onSuccess, senderAddress, slots, content, theme, }: {
2
3
  loadOrder?: string;
3
4
  mode?: "modal" | "page";
4
5
  recipientAddress: string;
5
6
  stakeAmount?: string;
6
7
  onSuccess?: () => void;
8
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
9
+ senderAddress?: string;
10
+ slots?: AnySpendSlots;
11
+ content?: AnySpendContent;
12
+ theme?: AnySpendTheme;
7
13
  }): import("react/jsx-runtime").JSX.Element;
@@ -34,7 +34,7 @@ function generateEncodedDataForStakingB3(amount, beneficiary) {
34
34
  });
35
35
  return encodedData;
36
36
  }
37
- function AnySpendStakeB3({ loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess, }) {
37
+ function AnySpendStakeB3({ loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess, senderAddress, slots, content, theme, }) {
38
38
  const hasMounted = (0, react_1.useHasMounted)();
39
39
  const { setB3ModalOpen } = (0, react_1.useModalStore)();
40
40
  // Wagmi hooks for direct staking
@@ -276,5 +276,5 @@ function AnySpendStakeB3({ loadOrder, mode = "modal", recipientAddress, stakeAmo
276
276
  const encodedData = generateEncodedDataForStakingB3(userStakeAmount, recipientAddress);
277
277
  return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, orderType: "custom", dstChainId: chains_1.base.id, dstToken: anyspend_1.B3_TOKEN, dstAmount: userStakeAmount, contractAddress: ERC20Staking, encodedData: encodedData, metadata: {
278
278
  action: "stake B3",
279
- }, header: header, onSuccess: onSuccess, showRecipient: true }));
279
+ }, header: header, onSuccess: onSuccess, showRecipient: true, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
280
280
  }
@@ -1,4 +1,5 @@
1
- export declare function AnySpendStakeB3ExactIn({ loadOrder, mode, sourceTokenAddress, sourceTokenChainId, recipientAddress, stakeAmount, onSuccess, }: {
1
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
2
+ export declare function AnySpendStakeB3ExactIn({ loadOrder, mode, sourceTokenAddress, sourceTokenChainId, recipientAddress, stakeAmount, onSuccess, senderAddress, slots, content, theme, }: {
2
3
  loadOrder?: string;
3
4
  mode?: "modal" | "page";
4
5
  sourceTokenAddress?: string;
@@ -6,4 +7,9 @@ export declare function AnySpendStakeB3ExactIn({ loadOrder, mode, sourceTokenAdd
6
7
  recipientAddress: string;
7
8
  stakeAmount?: string;
8
9
  onSuccess?: (amount: string) => void;
10
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
11
+ senderAddress?: string;
12
+ slots?: AnySpendSlots;
13
+ content?: AnySpendContent;
14
+ theme?: AnySpendTheme;
9
15
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -34,7 +34,7 @@ const STAKE_FUNCTION_ABI = JSON.stringify([
34
34
  outputs: [],
35
35
  },
36
36
  ]);
37
- function AnySpendStakeB3ExactIn({ loadOrder, mode = "modal", sourceTokenAddress, sourceTokenChainId, recipientAddress, stakeAmount, onSuccess, }) {
37
+ function AnySpendStakeB3ExactIn({ loadOrder, mode = "modal", sourceTokenAddress, sourceTokenChainId, recipientAddress, stakeAmount, onSuccess, senderAddress, slots, content, theme, }) {
38
38
  const hasMounted = (0, react_1.useHasMounted)();
39
39
  const { setB3ModalOpen } = (0, react_1.useModalStore)();
40
40
  // Wagmi hooks for direct staking
@@ -283,5 +283,5 @@ function AnySpendStakeB3ExactIn({ loadOrder, mode = "modal", sourceTokenAddress,
283
283
  onSuccess?.((0, number_1.formatTokenAmount)(BigInt(userStakeAmount), 18) ?? "");
284
284
  }, className: "bg-as-brand hover:bg-as-brand/90 text-as-primary h-14 w-full rounded-xl text-lg font-medium", children: "Done" })] })] }) }));
285
285
  }
286
- return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: anyspend_1.B3_TOKEN, destinationChainId: chains_1.base.id, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess }));
286
+ return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: anyspend_1.B3_TOKEN, destinationChainId: chains_1.base.id, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
287
287
  }
@@ -1,5 +1,6 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
- export declare function AnySpendStakeUpside({ loadOrder, mode, beneficiaryAddress, stakeAmount, stakingContractAddress, token, onSuccess, activeTab, }: {
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
3
+ export declare function AnySpendStakeUpside({ loadOrder, mode, beneficiaryAddress, stakeAmount, stakingContractAddress, token, onSuccess, activeTab, senderAddress, slots, content, theme, }: {
3
4
  loadOrder?: string;
4
5
  mode?: "modal" | "page";
5
6
  beneficiaryAddress: string;
@@ -8,4 +9,9 @@ export declare function AnySpendStakeUpside({ loadOrder, mode, beneficiaryAddres
8
9
  token: components["schemas"]["Token"];
9
10
  onSuccess?: () => void;
10
11
  activeTab?: "crypto" | "fiat";
12
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
13
+ senderAddress?: string;
14
+ slots?: AnySpendSlots;
15
+ content?: AnySpendContent;
16
+ theme?: AnySpendTheme;
11
17
  }): import("react/jsx-runtime").JSX.Element;
@@ -20,7 +20,7 @@ function generateEncodedDataForStaking(amount, beneficiary) {
20
20
  args: [beneficiary, BigInt(amount)],
21
21
  });
22
22
  }
23
- function AnySpendStakeUpside({ loadOrder, mode = "modal", beneficiaryAddress, stakeAmount, stakingContractAddress, token, onSuccess, activeTab, }) {
23
+ function AnySpendStakeUpside({ loadOrder, mode = "modal", beneficiaryAddress, stakeAmount, stakingContractAddress, token, onSuccess, activeTab, senderAddress, slots, content, theme, }) {
24
24
  const header = () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-60px] w-full rounded-t-lg bg-gradient-to-t", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[60px] w-full" }), (0, jsx_runtime_1.jsx)("div", { className: "mb-1 flex w-full flex-col items-center gap-2 p-5", children: (0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-2xl font-semibold", children: ["Swap & Stake ", stakeAmount ? (0, number_1.formatTokenAmount)(BigInt(stakeAmount), token.decimals) : "", " ", token.symbol] }) })] }) }));
25
25
  // Only generate encoded data if we have a valid beneficiary address
26
26
  // This is used for the AnySpendCustom swap & stake flow
@@ -30,5 +30,5 @@ function AnySpendStakeUpside({ loadOrder, mode = "modal", beneficiaryAddress, st
30
30
  const encodedData = generateEncodedDataForStaking(stakeAmount, beneficiaryAddress);
31
31
  return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, recipientAddress: beneficiaryAddress, orderType: "custom", dstChainId: chains_1.base.id, dstToken: token, dstAmount: stakeAmount, contractAddress: stakingContractAddress, encodedData: encodedData, metadata: {
32
32
  action: `stake ${token.symbol}`,
33
- }, header: header, onSuccess: onSuccess, showRecipient: true, activeTab: activeTab }));
33
+ }, header: header, onSuccess: onSuccess, showRecipient: true, activeTab: activeTab, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
34
34
  }
@@ -1,5 +1,6 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
- export declare function AnySpendStakeUpsideExactIn({ loadOrder, mode, recipientAddress, sourceTokenAddress, sourceTokenChainId, destinationTokenAmount, stakingContractAddress, token, onSuccess, }: {
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
3
+ export declare function AnySpendStakeUpsideExactIn({ loadOrder, mode, recipientAddress, sourceTokenAddress, sourceTokenChainId, destinationTokenAmount, stakingContractAddress, token, onSuccess, senderAddress, slots, content, theme, }: {
3
4
  loadOrder?: string;
4
5
  mode?: "modal" | "page";
5
6
  recipientAddress: string;
@@ -9,4 +10,9 @@ export declare function AnySpendStakeUpsideExactIn({ loadOrder, mode, recipientA
9
10
  token: components["schemas"]["Token"];
10
11
  destinationTokenAmount?: string;
11
12
  onSuccess?: (amount: string) => void;
13
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
14
+ senderAddress?: string;
15
+ slots?: AnySpendSlots;
16
+ content?: AnySpendContent;
17
+ theme?: AnySpendTheme;
12
18
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -17,7 +17,7 @@ const STAKE_FOR_FUNCTION_ABI = JSON.stringify([
17
17
  outputs: [],
18
18
  },
19
19
  ]);
20
- function AnySpendStakeUpsideExactIn({ loadOrder, mode = "modal", recipientAddress, sourceTokenAddress, sourceTokenChainId, destinationTokenAmount, stakingContractAddress, token, onSuccess, }) {
20
+ function AnySpendStakeUpsideExactIn({ loadOrder, mode = "modal", recipientAddress, sourceTokenAddress, sourceTokenChainId, destinationTokenAmount, stakingContractAddress, token, onSuccess, senderAddress, slots, content, theme, }) {
21
21
  if (!recipientAddress)
22
22
  return null;
23
23
  const header = () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "from-b3-react-background to-as-on-surface-1 w-full rounded-t-lg bg-gradient-to-t", children: (0, jsx_runtime_1.jsx)("div", { className: "mb-1 flex w-full flex-col items-center gap-2", children: (0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-2xl font-semibold", children: ["Swap & Stake ", token.symbol, " (Exact In)"] }) }) }) }));
@@ -29,5 +29,5 @@ function AnySpendStakeUpsideExactIn({ loadOrder, mode = "modal", recipientAddres
29
29
  spenderAddress: stakingContractAddress,
30
30
  action: `stake ${token.symbol}`,
31
31
  };
32
- return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: token, destinationChainId: chains_1.base.id, destinationTokenAmount: destinationTokenAmount, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess }));
32
+ return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: token, destinationChainId: chains_1.base.id, destinationTokenAmount: destinationTokenAmount, customExactInConfig: customExactInConfig, header: header, onSuccess: onSuccess, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
33
33
  }
@@ -1,4 +1,5 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
2
3
  type AnySpendTournamentProps = {
3
4
  mode?: "modal" | "page";
4
5
  action: "join";
@@ -10,6 +11,11 @@ type AnySpendTournamentProps = {
10
11
  tournamentEntryToken: components["schemas"]["Token"];
11
12
  tournamentEntryFee: string;
12
13
  onSuccess?: () => void;
14
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
15
+ senderAddress?: string;
16
+ slots?: AnySpendSlots;
17
+ content?: AnySpendContent;
18
+ theme?: AnySpendTheme;
13
19
  } | {
14
20
  mode?: "modal" | "page";
15
21
  action: "fund";
@@ -20,6 +26,11 @@ type AnySpendTournamentProps = {
20
26
  tournamentFundToken: components["schemas"]["Token"];
21
27
  tournamentFundAmount: string;
22
28
  onSuccess?: () => void;
29
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
30
+ senderAddress?: string;
31
+ slots?: AnySpendSlots;
32
+ content?: AnySpendContent;
33
+ theme?: AnySpendTheme;
23
34
  };
24
35
  export declare function AnySpendTournament(props: AnySpendTournamentProps): import("react/jsx-runtime").JSX.Element;
25
36
  export {};
@@ -7,7 +7,7 @@ const number_1 = require("../../../shared/utils/number");
7
7
  const react_1 = require("motion/react");
8
8
  const AnySpendCustom_1 = require("./AnySpendCustom");
9
9
  function AnySpendTournament(props) {
10
- const { mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess, } = props;
10
+ const { mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess, senderAddress, slots, content, theme, } = props;
11
11
  const dstToken = action === "join" ? props.tournamentEntryToken : props.tournamentFundToken;
12
12
  const dstAmount = action === "join" ? props.tournamentEntryFee : props.tournamentFundAmount;
13
13
  const header = ({ anyspendPrice, isLoadingAnyspendPrice, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "z-10 mt-[-100px] flex h-[270px] w-full items-end justify-center", children: (0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/tournament-play.svg", alt: "Tournament Play", className: "h-[200px] w-[360px] object-cover object-center" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-100px] w-full rounded-t-lg bg-gradient-to-t", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[100px] w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-1 p-6 pt-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-center text-lg font-semibold", children: [action === "join" ? "Pay entry fee to join " : "Pay to fund ", " ", tournamentMetadata.name] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 flex w-fit items-center gap-1", children: anyspendPrice ? ((0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
@@ -16,5 +16,5 @@ function AnySpendTournament(props) {
16
16
  return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, recipientAddress: action === "join" ? props.joinFor : undefined, orderType: action === "join" ? "join_tournament" : "fund_tournament", dstChainId: tournamentChainId, dstToken: dstToken, dstAmount: dstAmount, contractAddress: tournamentContractAddress, encodedData: "0x", metadata: {
17
17
  type: action === "join" ? "join_tournament" : "fund_tournament",
18
18
  tournament: tournamentMetadata,
19
- }, header: header, onSuccess: onSuccess, showRecipient: action === "join" }));
19
+ }, header: header, onSuccess: onSuccess, showRecipient: action === "join", senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
20
20
  }
@@ -1,4 +1,5 @@
1
1
  import { components } from "../../../anyspend/types/api";
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
2
3
  export declare const HYPE_TOKEN_DETAILS: {
3
4
  SYMBOL: string;
4
5
  LOGO_URI: string;
@@ -26,5 +27,10 @@ export interface AnySpendDepositHypeProps {
26
27
  returnToHomeUrl?: string;
27
28
  /** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
28
29
  customRecipientLabel?: string;
30
+ /** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
31
+ senderAddress?: string;
32
+ slots?: AnySpendSlots;
33
+ content?: AnySpendContent;
34
+ theme?: AnySpendTheme;
29
35
  }
30
- export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
36
+ export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, senderAddress, slots, content, theme, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
@@ -10,7 +10,7 @@ exports.HYPE_TOKEN_DETAILS = {
10
10
  SYMBOL: "HYPE",
11
11
  LOGO_URI: "https://cdn.hypeduel.com/hypes-coin.svg",
12
12
  };
13
- function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }) {
13
+ function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, senderAddress, slots, content, theme, }) {
14
14
  if (!recipientAddress)
15
15
  return null;
16
16
  const header = () => ((0, jsx_runtime_1.jsx)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }));
@@ -23,5 +23,5 @@ function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paym
23
23
  logoURI: exports.HYPE_TOKEN_DETAILS.LOGO_URI,
24
24
  },
25
25
  };
26
- return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: chains_1.base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa }));
26
+ return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: chains_1.base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa, senderAddress: senderAddress, slots: slots, content: content, theme: theme }));
27
27
  }
@@ -1,8 +1,12 @@
1
1
  import { GenerateSigMintResponse } from "../../types/signatureMint";
2
- export declare function AnyspendSignatureMint({ loadOrder, mode, signatureData, imageUrl, onSuccess, }: {
2
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
3
+ export declare function AnyspendSignatureMint({ loadOrder, mode, signatureData, imageUrl, onSuccess, slots, content, theme, }: {
3
4
  loadOrder?: string;
4
5
  mode?: "modal" | "page";
5
6
  signatureData: GenerateSigMintResponse;
6
7
  imageUrl?: string;
7
8
  onSuccess?: (txHash?: string) => void;
9
+ slots?: AnySpendSlots;
10
+ content?: AnySpendContent;
11
+ theme?: AnySpendTheme;
8
12
  }): import("react/jsx-runtime").JSX.Element;
@@ -41,7 +41,7 @@ function generateEncodedDataForSignatureMint(signatureData) {
41
41
  });
42
42
  return encodedData;
43
43
  }
44
- function AnyspendSignatureMint({ loadOrder, mode = "modal", signatureData, imageUrl, onSuccess, }) {
44
+ function AnyspendSignatureMint({ loadOrder, mode = "modal", signatureData, imageUrl, onSuccess, slots, content, theme, }) {
45
45
  // Get token data
46
46
  const { data: tokenData, isError: isTokenError, isLoading, } = (0, react_1.useTokenData)(signatureData.collection.chainId, signatureData.collection.signatureRequestBody?.currency);
47
47
  // Convert token data to AnySpend Token type
@@ -74,5 +74,5 @@ function AnyspendSignatureMint({ loadOrder, mode = "modal", signatureData, image
74
74
  const price = (0, viem_1.parseEther)(signatureData.payload.price?.toString() || "0");
75
75
  return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, recipientAddress: signatureData.payload.to, orderType: "custom", dstChainId: signatureData.collection.chainId, dstToken: dstToken, dstAmount: price.toString(), contractAddress: signatureData.collection.address || "", encodedData: encodedData, metadata: {
76
76
  action: "Signature Mint",
77
- }, header: header, onSuccess: onSuccess, showRecipient: true }));
77
+ }, header: header, onSuccess: onSuccess, showRecipient: true, slots: slots, content: content, theme: theme }));
78
78
  }
@@ -0,0 +1,9 @@
1
+ import type { AddressData } from "../../../types/forms";
2
+ interface AddressFormProps {
3
+ value: AddressData;
4
+ onChange: (address: AddressData) => void;
5
+ required?: boolean;
6
+ className?: string;
7
+ }
8
+ export declare function AddressForm({ value, onChange, required, className }: AddressFormProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AddressForm = AddressForm;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const cn_1 = require("../../../../shared/utils/cn");
7
+ const inputBaseClass = "w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 outline-none transition-colors focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500 dark:focus:border-blue-400";
8
+ const labelClass = "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300";
9
+ function AddressForm({ value, onChange, required, className }) {
10
+ const update = (field, val) => {
11
+ onChange({ ...value, [field]: val });
12
+ };
13
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("anyspend-address-form space-y-3", className), children: [(0, jsx_runtime_1.jsxs)("div", { className: "anyspend-address-street", children: [(0, jsx_runtime_1.jsxs)("label", { className: (0, cn_1.cn)("anyspend-form-label", labelClass), children: ["Street Address", required && (0, jsx_runtime_1.jsx)("span", { className: "ml-0.5 text-red-500", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: value.street || "", onChange: e => update("street", e.target.value), placeholder: "123 Main Street", required: required, className: (0, cn_1.cn)("anyspend-form-input", inputBaseClass) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "anyspend-address-city", children: [(0, jsx_runtime_1.jsxs)("label", { className: (0, cn_1.cn)("anyspend-form-label", labelClass), children: ["City", required && (0, jsx_runtime_1.jsx)("span", { className: "ml-0.5 text-red-500", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: value.city || "", onChange: e => update("city", e.target.value), placeholder: "City", required: required, className: (0, cn_1.cn)("anyspend-form-input", inputBaseClass) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "anyspend-address-state", children: [(0, jsx_runtime_1.jsxs)("label", { className: (0, cn_1.cn)("anyspend-form-label", labelClass), children: ["State / Province", required && (0, jsx_runtime_1.jsx)("span", { className: "ml-0.5 text-red-500", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: value.state || "", onChange: e => update("state", e.target.value), placeholder: "State", required: required, className: (0, cn_1.cn)("anyspend-form-input", inputBaseClass) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "anyspend-address-zip", children: [(0, jsx_runtime_1.jsxs)("label", { className: (0, cn_1.cn)("anyspend-form-label", labelClass), children: ["Zip / Postal Code", required && (0, jsx_runtime_1.jsx)("span", { className: "ml-0.5 text-red-500", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: value.zip || "", onChange: e => update("zip", e.target.value), placeholder: "12345", required: required, className: (0, cn_1.cn)("anyspend-form-input", inputBaseClass) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "anyspend-address-country", children: [(0, jsx_runtime_1.jsxs)("label", { className: (0, cn_1.cn)("anyspend-form-label", labelClass), children: ["Country", required && (0, jsx_runtime_1.jsx)("span", { className: "ml-0.5 text-red-500", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: value.country || "", onChange: e => update("country", e.target.value), placeholder: "Country", required: required, className: (0, cn_1.cn)("anyspend-form-input", inputBaseClass) })] })] })] }));
14
+ }
@@ -0,0 +1,117 @@
1
+ import { type ReactNode } from "react";
2
+ import { type PaymentMethod } from "./CheckoutPaymentPanel";
3
+ export type { AnySpendCheckoutClasses } from "../types/classes";
4
+ import type { AnySpendCheckoutClasses } from "../types/classes";
5
+ import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "../types/customization";
6
+ import type { CheckoutFormSchema, CheckoutFormComponentProps, ShippingOption, DiscountResult, AddressData } from "../../../types/forms";
7
+ export type { CheckoutFormSchema, CheckoutFormComponentProps, ShippingOption, DiscountResult, AddressData };
8
+ export interface CheckoutItem {
9
+ id?: string;
10
+ name: string;
11
+ description?: string;
12
+ imageUrl?: string;
13
+ /** Amount in wei (smallest unit of destination token) */
14
+ amount: string;
15
+ quantity: number;
16
+ /** Custom metadata displayed as label: value pairs (e.g., { "Size": "Large", "Color": "Blue" }) */
17
+ metadata?: Record<string, string>;
18
+ }
19
+ export interface CheckoutSummaryLine {
20
+ /** Display label (e.g., "Platform Fee", "Service Charge") */
21
+ label: string;
22
+ /** Amount in token's smallest unit (wei). Negative values shown as deductions. */
23
+ amount: string;
24
+ /** Optional description or note */
25
+ description?: string;
26
+ }
27
+ export interface AnySpendCheckoutProps {
28
+ /** Display mode */
29
+ mode?: "page" | "embedded";
30
+ /** The recipient address */
31
+ recipientAddress: string;
32
+ /** The destination token address */
33
+ destinationTokenAddress: string;
34
+ /** The destination chain ID */
35
+ destinationTokenChainId: number;
36
+ /** Line items */
37
+ items: CheckoutItem[];
38
+ /** Override computed total */
39
+ totalAmount?: string;
40
+ /** Organization name */
41
+ organizationName?: string;
42
+ /** Organization logo URL */
43
+ organizationLogo?: string;
44
+ /** Theme color (hex) */
45
+ themeColor?: string;
46
+ /** Custom button text */
47
+ buttonText?: string;
48
+ /** Checkout session ID (used by pay link backend to track sessions) */
49
+ checkoutSessionId?: string;
50
+ /** Called on successful payment */
51
+ onSuccess?: (result: {
52
+ txHash?: string;
53
+ orderId?: string;
54
+ }) => void;
55
+ /** Called on payment error */
56
+ onError?: (error: Error) => void;
57
+ /** URL to redirect to after payment */
58
+ returnUrl?: string;
59
+ /** Label for the return button */
60
+ returnLabel?: string;
61
+ /** Custom class names */
62
+ classes?: AnySpendCheckoutClasses;
63
+ /** Custom footer for the order summary. Pass `null` to hide, or a ReactNode to replace the default. */
64
+ footer?: ReactNode | null;
65
+ /** Which payment method to expand initially. Defaults to none (all collapsed). */
66
+ defaultPaymentMethod?: PaymentMethod;
67
+ /** Optional sender (payer) address — pre-fills token balances in the crypto panel */
68
+ senderAddress?: string;
69
+ /** Render function overrides for replaceable UI elements */
70
+ slots?: AnySpendSlots;
71
+ /** String or ReactNode overrides for text/messages */
72
+ content?: AnySpendContent;
73
+ /** Structured color/theme configuration */
74
+ theme?: AnySpendTheme;
75
+ /** Show the points row in the order status summary. Defaults to false. */
76
+ showPoints?: boolean;
77
+ /** Show the order ID row in the order status summary. Defaults to false. */
78
+ showOrderId?: boolean;
79
+ /** Shipping cost. String = amount in wei. Object = amount + custom label. */
80
+ shipping?: string | {
81
+ amount: string;
82
+ label?: string;
83
+ };
84
+ /** Tax amount. String = amount in wei. Object = amount + custom label + optional rate display. */
85
+ tax?: string | {
86
+ amount: string;
87
+ label?: string;
88
+ rate?: string;
89
+ };
90
+ /** Discount amount (displayed as negative). String = amount in wei. Object = amount + label + optional code. */
91
+ discount?: string | {
92
+ amount: string;
93
+ label?: string;
94
+ code?: string;
95
+ };
96
+ /** Additional summary line items (fees, tips, etc.) */
97
+ summaryLines?: CheckoutSummaryLine[];
98
+ /** JSON form schema defining fields to collect from the customer */
99
+ formSchema?: CheckoutFormSchema | null;
100
+ /** Custom React component to render as the checkout form */
101
+ formComponent?: React.ComponentType<CheckoutFormComponentProps>;
102
+ /** Called when form data changes */
103
+ onFormSubmit?: (data: Record<string, unknown>) => void;
104
+ /** Shipping options to display */
105
+ shippingOptions?: ShippingOption[] | null;
106
+ /** Whether to collect a shipping address */
107
+ collectShippingAddress?: boolean;
108
+ /** Called when shipping option changes */
109
+ onShippingChange?: (option: ShippingOption) => void;
110
+ /** Enable discount code input */
111
+ enableDiscountCode?: boolean;
112
+ /** Called when discount is applied */
113
+ onDiscountApplied?: (result: DiscountResult) => void;
114
+ /** Async function to validate a discount code. Returns DiscountResult. */
115
+ validateDiscount?: (code: string) => Promise<DiscountResult>;
116
+ }
117
+ export declare function AnySpendCheckout({ mode, recipientAddress, destinationTokenAddress, destinationTokenChainId, items, totalAmount: totalAmountOverride, organizationName, organizationLogo, themeColor, buttonText, checkoutSessionId, onSuccess, onError, returnUrl, returnLabel, classes, footer, defaultPaymentMethod, senderAddress, slots, content, theme, showPoints, showOrderId, shipping: shippingProp, tax, discount: discountProp, summaryLines, formSchema, formComponent, onFormSubmit, shippingOptions, collectShippingAddress, onShippingChange: onShippingChangeProp, enableDiscountCode, onDiscountApplied: onDiscountAppliedProp, validateDiscount, }: AnySpendCheckoutProps): import("react/jsx-runtime").JSX.Element;