@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.
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +40 -11
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +16 -14
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +40 -10
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +5 -4
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/checkout/AddressForm.js +14 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +158 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +61 -0
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +20 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +27 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.js +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +75 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.js +13 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.js +65 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +64 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +170 -0
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +324 -0
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +62 -0
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +269 -0
- package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +20 -0
- package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +93 -19
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/cjs/anyspend/react/components/common/PaySection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/common/StepProgress.js +6 -11
- package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
- package/dist/cjs/anyspend/react/components/common/TransferResultScreen.js +5 -1
- package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.js +92 -0
- package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.js +71 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +8 -1
- package/dist/cjs/anyspend/react/components/index.js +10 -1
- package/dist/cjs/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/cjs/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/cjs/anyspend/react/components/types/customization.js +2 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +3 -2
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -0
- package/dist/cjs/anyspend/services/anyspend.js +17 -2
- package/dist/cjs/anyspend/types/forms.d.ts +92 -0
- package/dist/cjs/anyspend/types/forms.js +8 -0
- package/dist/cjs/anyspend/utils/format.js +12 -3
- package/dist/cjs/app.shared.js +8 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +9 -3
- package/dist/cjs/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ui/dialog.js +2 -2
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/cjs/global-account/react/components/ui/drawer.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/cjs/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
- package/dist/cjs/shared/utils/number.d.ts +5 -0
- package/dist/cjs/shared/utils/number.js +13 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +41 -12
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +16 -14
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +42 -12
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +5 -4
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/esm/anyspend/react/components/checkout/AddressForm.js +11 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +155 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +58 -0
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/esm/anyspend/react/components/checkout/CartSummary.js +17 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +24 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.js +28 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +72 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.js +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.js +62 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +61 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +28 -0
- package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +167 -0
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +321 -0
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +59 -0
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +266 -0
- package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +17 -0
- package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +1 -1
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +96 -22
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/esm/anyspend/react/components/common/PaySection.js +1 -1
- package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/esm/anyspend/react/components/common/StepProgress.js +6 -11
- package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
- package/dist/esm/anyspend/react/components/common/TransferResultScreen.js +7 -3
- package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.js +88 -0
- package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.js +68 -0
- package/dist/esm/anyspend/react/components/index.d.ts +8 -1
- package/dist/esm/anyspend/react/components/index.js +5 -0
- package/dist/esm/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/esm/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/esm/anyspend/react/components/types/customization.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +3 -2
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -0
- package/dist/esm/anyspend/services/anyspend.js +17 -2
- package/dist/esm/anyspend/types/forms.d.ts +92 -0
- package/dist/esm/anyspend/types/forms.js +7 -0
- package/dist/esm/anyspend/utils/format.js +12 -3
- package/dist/esm/app.shared.js +8 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +9 -3
- package/dist/esm/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/esm/global-account/react/components/ui/dialog.js +2 -2
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/esm/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
- package/dist/esm/shared/utils/number.d.ts +5 -0
- package/dist/esm/shared/utils/number.js +12 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/types/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/types/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/types/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/types/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/types/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/types/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/types/anyspend/react/components/index.d.ts +8 -1
- package/dist/types/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/types/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/types/anyspend/services/anyspend.d.ts +1 -0
- package/dist/types/anyspend/types/forms.d.ts +92 -0
- package/dist/types/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/types/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/types/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/types/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/types/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/types/shared/constants/chains/supported.d.ts +3 -3
- package/dist/types/shared/utils/number.d.ts +5 -0
- package/package.json +1 -1
- package/src/anyspend/react/components/AnySpend.tsx +84 -37
- package/src/anyspend/react/components/AnySpendBondKit.tsx +12 -1
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +14 -0
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +10 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +38 -20
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +82 -35
- package/src/anyspend/react/components/AnySpendDeposit.tsx +24 -2
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +14 -0
- package/src/anyspend/react/components/AnySpendNFT.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +14 -0
- package/src/anyspend/react/components/AnySpendTournament.tsx +19 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +14 -0
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +10 -0
- package/src/anyspend/react/components/checkout/AddressForm.tsx +98 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +398 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +221 -0
- package/src/anyspend/react/components/checkout/CartItemRow.tsx +58 -0
- package/src/anyspend/react/components/checkout/CartSummary.tsx +158 -0
- package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +98 -0
- package/src/anyspend/react/components/checkout/CheckoutFormField.tsx +129 -0
- package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +241 -0
- package/src/anyspend/react/components/checkout/CheckoutLayout.tsx +52 -0
- package/src/anyspend/react/components/checkout/CheckoutOrderStatus.tsx +224 -0
- package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +341 -0
- package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +110 -0
- package/src/anyspend/react/components/checkout/CoinbaseCheckoutPanel.tsx +279 -0
- package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +630 -0
- package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +127 -0
- package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +612 -0
- package/src/anyspend/react/components/checkout/PoweredByBranding.tsx +42 -0
- package/src/anyspend/react/components/checkout/ShippingSelector.tsx +73 -0
- package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +29 -7
- package/src/anyspend/react/components/common/CryptoPaySection.tsx +1 -1
- package/src/anyspend/react/components/common/CryptoPaymentMethodDisplay.tsx +1 -1
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +2 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +5 -5
- package/src/anyspend/react/components/common/OrderStatus.tsx +140 -34
- package/src/anyspend/react/components/common/PanelOnramp.tsx +9 -9
- package/src/anyspend/react/components/common/PaySection.tsx +1 -1
- package/src/anyspend/react/components/common/StepProgress.tsx +40 -52
- package/src/anyspend/react/components/common/TokenBalance.tsx +0 -12
- package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +1 -9
- package/src/anyspend/react/components/common/TransferResultScreen.tsx +19 -11
- package/src/anyspend/react/components/context/AnySpendCustomizationContext.tsx +124 -0
- package/src/anyspend/react/components/icons/AnimatedCheckmark.tsx +119 -0
- package/src/anyspend/react/components/index.ts +33 -0
- package/src/anyspend/react/components/types/classes.ts +70 -0
- package/src/anyspend/react/components/types/customization.ts +99 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +3 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +3 -2
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +5 -1
- package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +5 -2
- package/src/anyspend/services/anyspend.ts +19 -2
- package/src/anyspend/types/forms.ts +97 -0
- package/src/anyspend/utils/format.ts +12 -3
- package/src/app.shared.ts +11 -0
- package/src/global-account/react/components/B3DynamicModal.tsx +13 -4
- package/src/global-account/react/components/ui/dialog.tsx +17 -8
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/stores/useModalStore.ts +52 -1
- package/src/shared/utils/number.ts +12 -0
- package/src/styles/index.css +48 -2
|
@@ -7451,6 +7451,8 @@ export declare function useFirstEOA(chain?: {
|
|
|
7451
7451
|
[x: `bool[${string}]`]: undefined;
|
|
7452
7452
|
[x: `bytes[${string}]`]: undefined;
|
|
7453
7453
|
[x: `bytes1[${string}]`]: undefined;
|
|
7454
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
7455
|
+
[x: `bytes30[${string}]`]: undefined;
|
|
7454
7456
|
[x: `bytes18[${string}]`]: undefined;
|
|
7455
7457
|
[x: `bytes6[${string}]`]: undefined;
|
|
7456
7458
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -7458,7 +7460,6 @@ export declare function useFirstEOA(chain?: {
|
|
|
7458
7460
|
[x: `bytes10[${string}]`]: undefined;
|
|
7459
7461
|
[x: `bytes2[${string}]`]: undefined;
|
|
7460
7462
|
[x: `bytes3[${string}]`]: undefined;
|
|
7461
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
7462
7463
|
[x: `bytes5[${string}]`]: undefined;
|
|
7463
7464
|
[x: `bytes7[${string}]`]: undefined;
|
|
7464
7465
|
[x: `bytes11[${string}]`]: undefined;
|
|
@@ -7479,7 +7480,6 @@ export declare function useFirstEOA(chain?: {
|
|
|
7479
7480
|
[x: `bytes27[${string}]`]: undefined;
|
|
7480
7481
|
[x: `bytes28[${string}]`]: undefined;
|
|
7481
7482
|
[x: `bytes29[${string}]`]: undefined;
|
|
7482
|
-
[x: `bytes30[${string}]`]: undefined;
|
|
7483
7483
|
[x: `bytes31[${string}]`]: undefined;
|
|
7484
7484
|
[x: `bytes32[${string}]`]: undefined;
|
|
7485
7485
|
[x: `int[${string}]`]: undefined;
|
|
@@ -7553,6 +7553,8 @@ export declare function useFirstEOA(chain?: {
|
|
|
7553
7553
|
bool?: undefined;
|
|
7554
7554
|
bytes?: undefined;
|
|
7555
7555
|
bytes1?: undefined;
|
|
7556
|
+
bytes4?: undefined;
|
|
7557
|
+
bytes30?: undefined;
|
|
7556
7558
|
bytes18?: undefined;
|
|
7557
7559
|
bytes6?: undefined;
|
|
7558
7560
|
bytes9?: undefined;
|
|
@@ -7560,7 +7562,6 @@ export declare function useFirstEOA(chain?: {
|
|
|
7560
7562
|
bytes10?: undefined;
|
|
7561
7563
|
bytes2?: undefined;
|
|
7562
7564
|
bytes3?: undefined;
|
|
7563
|
-
bytes4?: undefined;
|
|
7564
7565
|
bytes5?: undefined;
|
|
7565
7566
|
bytes7?: undefined;
|
|
7566
7567
|
bytes11?: undefined;
|
|
@@ -7581,7 +7582,6 @@ export declare function useFirstEOA(chain?: {
|
|
|
7581
7582
|
bytes27?: undefined;
|
|
7582
7583
|
bytes28?: undefined;
|
|
7583
7584
|
bytes29?: undefined;
|
|
7584
|
-
bytes30?: undefined;
|
|
7585
7585
|
bytes31?: undefined;
|
|
7586
7586
|
bytes32?: undefined;
|
|
7587
7587
|
int56?: undefined;
|
|
@@ -32,8 +32,8 @@ export declare function useUser(): {
|
|
|
32
32
|
name?: string | undefined;
|
|
33
33
|
address?: string | undefined;
|
|
34
34
|
email?: string | undefined;
|
|
35
|
-
username?: string | undefined;
|
|
36
35
|
phone?: string | undefined;
|
|
36
|
+
username?: string | undefined;
|
|
37
37
|
fid?: string | undefined;
|
|
38
38
|
};
|
|
39
39
|
}[] | undefined;
|
|
@@ -36,8 +36,8 @@ export declare function useUserQuery(): {
|
|
|
36
36
|
name?: string | undefined;
|
|
37
37
|
address?: string | undefined;
|
|
38
38
|
email?: string | undefined;
|
|
39
|
-
username?: string | undefined;
|
|
40
39
|
phone?: string | undefined;
|
|
40
|
+
username?: string | undefined;
|
|
41
41
|
fid?: string | undefined;
|
|
42
42
|
};
|
|
43
43
|
}[] | undefined;
|
|
@@ -481,6 +481,58 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
|
|
|
481
481
|
* Props for the AnySpend Workflow Trigger modal
|
|
482
482
|
* Handles payments that trigger b3os-workflow runs
|
|
483
483
|
*/
|
|
484
|
+
/**
|
|
485
|
+
* Props for the AnySpend Checkout Trigger modal
|
|
486
|
+
* Shopify-style checkout with predefined destination token and amount
|
|
487
|
+
*/
|
|
488
|
+
export interface AnySpendCheckoutTriggerModalProps extends BaseModalProps {
|
|
489
|
+
/** Modal type identifier */
|
|
490
|
+
type: "anySpendCheckoutTrigger";
|
|
491
|
+
/** Payment recipient address (hex) */
|
|
492
|
+
recipientAddress: string;
|
|
493
|
+
/** Destination token address */
|
|
494
|
+
destinationTokenAddress: string;
|
|
495
|
+
/** Destination chain ID */
|
|
496
|
+
destinationTokenChainId: number;
|
|
497
|
+
/** Line items to display in the cart (optional — if omitted, only the payment panel is shown) */
|
|
498
|
+
items?: Array<{
|
|
499
|
+
id?: string;
|
|
500
|
+
name: string;
|
|
501
|
+
description?: string;
|
|
502
|
+
imageUrl?: string;
|
|
503
|
+
amount: string;
|
|
504
|
+
quantity: number;
|
|
505
|
+
}>;
|
|
506
|
+
/** Total amount in wei — required when items are not provided */
|
|
507
|
+
totalAmount?: string;
|
|
508
|
+
/** Organization name */
|
|
509
|
+
organizationName?: string;
|
|
510
|
+
/** Organization logo URL */
|
|
511
|
+
organizationLogo?: string;
|
|
512
|
+
/** Theme color (hex) */
|
|
513
|
+
themeColor?: string;
|
|
514
|
+
/** Custom button text */
|
|
515
|
+
buttonText?: string;
|
|
516
|
+
/** Workflow ID to trigger on payment */
|
|
517
|
+
workflowId?: string;
|
|
518
|
+
/** Organization ID that owns the workflow */
|
|
519
|
+
orgId?: string;
|
|
520
|
+
/** Optional callback metadata merged into the order */
|
|
521
|
+
callbackMetadata?: {
|
|
522
|
+
inputs?: Record<string, unknown>;
|
|
523
|
+
} & Record<string, unknown>;
|
|
524
|
+
/** Called on successful payment */
|
|
525
|
+
onSuccess?: (result: {
|
|
526
|
+
txHash?: string;
|
|
527
|
+
orderId?: string;
|
|
528
|
+
}) => void;
|
|
529
|
+
/** Called on payment error */
|
|
530
|
+
onError?: (error: Error) => void;
|
|
531
|
+
/** URL to redirect to after payment */
|
|
532
|
+
returnUrl?: string;
|
|
533
|
+
/** Label for the return button */
|
|
534
|
+
returnLabel?: string;
|
|
535
|
+
}
|
|
484
536
|
export interface AnySpendWorkflowTriggerModalProps extends BaseModalProps {
|
|
485
537
|
/** Modal type identifier */
|
|
486
538
|
type: "anySpendWorkflowTrigger";
|
|
@@ -574,7 +626,7 @@ export interface AnySpendDepositModalProps extends BaseModalProps {
|
|
|
574
626
|
/**
|
|
575
627
|
* Union type of all possible modal content types
|
|
576
628
|
*/
|
|
577
|
-
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendStakeB3ExactInProps | AnySpendStakeUpsideProps | AnySpendStakeUpsideExactInProps | AnySpendDepositUpsideProps | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | LinkNewAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps | DepositModalProps | SendModalProps | NotificationsModalProps | AnySpendCollectorClubPurchaseProps | AnySpendDepositModalProps | AnySpendWorkflowTriggerModalProps;
|
|
629
|
+
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendStakeB3ExactInProps | AnySpendStakeUpsideProps | AnySpendStakeUpsideExactInProps | AnySpendDepositUpsideProps | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | LinkNewAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps | DepositModalProps | SendModalProps | NotificationsModalProps | AnySpendCollectorClubPurchaseProps | AnySpendDepositModalProps | AnySpendWorkflowTriggerModalProps | AnySpendCheckoutTriggerModalProps;
|
|
578
630
|
/**
|
|
579
631
|
* State interface for the modal store
|
|
580
632
|
*/
|
|
@@ -92,9 +92,9 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
|
92
92
|
readonly rpc: string;
|
|
93
93
|
readonly icon: {
|
|
94
94
|
format: string;
|
|
95
|
-
height: number;
|
|
96
|
-
width: number;
|
|
97
95
|
url: string;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
export declare const thirdwebB3Testnet: ThirdwebChain;
|
|
@@ -35,13 +35,13 @@ export declare const supportedChainNetworks: {
|
|
|
35
35
|
uri: string;
|
|
36
36
|
}[];
|
|
37
37
|
};
|
|
38
|
+
_id: string | {};
|
|
38
39
|
icon: {
|
|
39
40
|
format: string;
|
|
40
|
-
height: number;
|
|
41
|
-
width: number;
|
|
42
41
|
url: string;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
43
44
|
};
|
|
44
|
-
_id: string | {};
|
|
45
45
|
}[];
|
|
46
46
|
export declare const coingeckoChains: Record<number, {
|
|
47
47
|
coingecko_id: string;
|
|
@@ -8,4 +8,9 @@ export declare const formatDisplayNumber: (value: string | bigint | number | und
|
|
|
8
8
|
fallback?: string;
|
|
9
9
|
showSubscripts?: boolean;
|
|
10
10
|
}) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Safely convert a string to BigInt, returning 0n for invalid values.
|
|
13
|
+
* Use this for consumer-provided amount strings that may not be valid wei values.
|
|
14
|
+
*/
|
|
15
|
+
export declare function safeBigInt(value: string): bigint;
|
|
11
16
|
export declare function formatUnits(value: string, decimals?: number): string;
|
package/package.json
CHANGED
|
@@ -42,7 +42,8 @@ import { getThirdwebChain } from "@b3dotfun/sdk/shared/constants/chains/supporte
|
|
|
42
42
|
import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
43
43
|
import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
44
44
|
import invariant from "invariant";
|
|
45
|
-
import { ArrowDown,
|
|
45
|
+
import { ArrowDown, HistoryIcon, Loader2 } from "lucide-react";
|
|
46
|
+
import { AnimatedCheckmark } from "./icons/AnimatedCheckmark";
|
|
46
47
|
import { motion } from "motion/react";
|
|
47
48
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
48
49
|
import { formatUnits, parseUnits } from "viem";
|
|
@@ -68,7 +69,9 @@ import { PanelOnrampPayment } from "./common/PanelOnrampPayment";
|
|
|
68
69
|
import { PointsDetailPanel } from "./common/PointsDetailPanel";
|
|
69
70
|
import { RecipientSelection } from "./common/RecipientSelection";
|
|
70
71
|
import { TabSection } from "./common/TabSection";
|
|
72
|
+
import { AnySpendCustomizationProvider, useAnySpendCustomization } from "./context/AnySpendCustomizationContext";
|
|
71
73
|
import type { AnySpendClasses } from "./types/classes";
|
|
74
|
+
import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
|
|
72
75
|
|
|
73
76
|
const baseChain = getThirdwebChain(8453);
|
|
74
77
|
|
|
@@ -129,13 +132,22 @@ export function AnySpend(props: {
|
|
|
129
132
|
destinationTokenAmount?: string;
|
|
130
133
|
/** Opaque metadata passed to the order for callbacks (e.g., workflow form data) */
|
|
131
134
|
callbackMetadata?: Record<string, unknown>;
|
|
135
|
+
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
136
|
+
senderAddress?: string;
|
|
137
|
+
/** Render function overrides for replaceable UI elements */
|
|
138
|
+
slots?: AnySpendSlots;
|
|
139
|
+
/** String or ReactNode overrides for text/messages */
|
|
140
|
+
content?: AnySpendContent;
|
|
141
|
+
/** Structured color/theme configuration */
|
|
142
|
+
theme?: AnySpendTheme;
|
|
132
143
|
}) {
|
|
133
144
|
const fingerprintConfig = getFingerprintConfig();
|
|
134
145
|
|
|
135
|
-
console.log("[mitch] AnySpend rendered with fingerprintConfig:", props, fingerprintConfig);
|
|
136
146
|
return (
|
|
137
147
|
<AnySpendFingerprintWrapper fingerprint={fingerprintConfig}>
|
|
138
|
-
<
|
|
148
|
+
<AnySpendCustomizationProvider slots={props.slots} content={props.content} theme={props.theme}>
|
|
149
|
+
<AnySpendInner {...props} />
|
|
150
|
+
</AnySpendCustomizationProvider>
|
|
139
151
|
</AnySpendFingerprintWrapper>
|
|
140
152
|
);
|
|
141
153
|
}
|
|
@@ -162,6 +174,7 @@ function AnySpendInner({
|
|
|
162
174
|
allowDirectTransfer = false,
|
|
163
175
|
destinationTokenAmount,
|
|
164
176
|
callbackMetadata,
|
|
177
|
+
senderAddress,
|
|
165
178
|
}: {
|
|
166
179
|
sourceChainId?: number;
|
|
167
180
|
destinationTokenAddress?: string;
|
|
@@ -184,7 +197,12 @@ function AnySpendInner({
|
|
|
184
197
|
allowDirectTransfer?: boolean;
|
|
185
198
|
destinationTokenAmount?: string;
|
|
186
199
|
callbackMetadata?: Record<string, unknown>;
|
|
200
|
+
senderAddress?: string;
|
|
201
|
+
slots?: AnySpendSlots;
|
|
202
|
+
content?: AnySpendContent;
|
|
203
|
+
theme?: AnySpendTheme;
|
|
187
204
|
}) {
|
|
205
|
+
const { slots, content } = useAnySpendCustomization();
|
|
188
206
|
const searchParams = useSearchParamsSSR();
|
|
189
207
|
const router = useRouter();
|
|
190
208
|
|
|
@@ -568,9 +586,10 @@ function AnySpendInner({
|
|
|
568
586
|
const recipientName = recipientProfile.data?.name;
|
|
569
587
|
|
|
570
588
|
// Check token balance for crypto payments
|
|
589
|
+
const effectiveBalanceAddress = senderAddress || connectedEOAWallet?.getAccount()?.address;
|
|
571
590
|
const { rawBalance, isLoading: isBalanceLoading } = useTokenBalanceDirect({
|
|
572
591
|
token: selectedSrcToken,
|
|
573
|
-
address:
|
|
592
|
+
address: effectiveBalanceAddress,
|
|
574
593
|
});
|
|
575
594
|
|
|
576
595
|
// Check if user has enough balanceuseAutoSetActiveWalletFromWagmi
|
|
@@ -969,7 +988,7 @@ function AnySpendInner({
|
|
|
969
988
|
: selectedDstToken,
|
|
970
989
|
srcAmount: srcAmountBigInt.toString(),
|
|
971
990
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount || "0",
|
|
972
|
-
creatorAddress: globalAddress,
|
|
991
|
+
creatorAddress: senderAddress || globalAddress,
|
|
973
992
|
callbackMetadata,
|
|
974
993
|
});
|
|
975
994
|
} catch (err: any) {
|
|
@@ -1047,7 +1066,7 @@ function AnySpendInner({
|
|
|
1047
1066
|
window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin,
|
|
1048
1067
|
},
|
|
1049
1068
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
1050
|
-
creatorAddress: globalAddress,
|
|
1069
|
+
creatorAddress: senderAddress || globalAddress,
|
|
1051
1070
|
callbackMetadata,
|
|
1052
1071
|
});
|
|
1053
1072
|
} catch (err: any) {
|
|
@@ -1343,26 +1362,35 @@ function AnySpendInner({
|
|
|
1343
1362
|
transition={{ duration: 0.3, delay: 0.2, ease: "easeInOut" }}
|
|
1344
1363
|
className={cn("mt-4 flex w-full max-w-[460px] flex-col gap-2")}
|
|
1345
1364
|
>
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1365
|
+
{slots.actionButton ? (
|
|
1366
|
+
slots.actionButton({
|
|
1367
|
+
onClick: onMainButtonClick,
|
|
1368
|
+
disabled: btnInfo.disable,
|
|
1369
|
+
loading: btnInfo.loading,
|
|
1370
|
+
text: btnInfo.text,
|
|
1371
|
+
})
|
|
1372
|
+
) : (
|
|
1373
|
+
<ShinyButton
|
|
1374
|
+
accentColor={"hsl(var(--as-brand))"}
|
|
1375
|
+
disabled={btnInfo.disable}
|
|
1376
|
+
onClick={onMainButtonClick}
|
|
1377
|
+
className={
|
|
1378
|
+
(btnInfo.error && classes?.mainButtonError) ||
|
|
1379
|
+
(btnInfo.disable && classes?.mainButtonDisabled) ||
|
|
1380
|
+
classes?.mainButton ||
|
|
1381
|
+
cn(
|
|
1382
|
+
"as-main-button relative w-full",
|
|
1383
|
+
btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand",
|
|
1384
|
+
)
|
|
1385
|
+
}
|
|
1386
|
+
textClassName={cn(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white")}
|
|
1387
|
+
>
|
|
1388
|
+
<div className="flex items-center justify-center gap-2">
|
|
1389
|
+
{btnInfo.loading && <Loader2 className="h-4 w-4 animate-spin" />}
|
|
1390
|
+
{btnInfo.text}
|
|
1391
|
+
</div>
|
|
1392
|
+
</ShinyButton>
|
|
1393
|
+
)}
|
|
1366
1394
|
|
|
1367
1395
|
{!hideTransactionHistoryButton && (globalAddress || effectiveRecipientAddress) ? (
|
|
1368
1396
|
<Button
|
|
@@ -1494,18 +1522,37 @@ function AnySpendInner({
|
|
|
1494
1522
|
/>
|
|
1495
1523
|
) : null;
|
|
1496
1524
|
|
|
1497
|
-
const
|
|
1525
|
+
const defaultSuccessTitle = content.successTitle || "Transfer Complete";
|
|
1526
|
+
const defaultSuccessDesc =
|
|
1527
|
+
content.successDescription ||
|
|
1528
|
+
`Your ${selectedSrcToken.symbol} has been sent to ${effectiveRecipientAddress?.slice(0, 6)}...${effectiveRecipientAddress?.slice(-4)} on ${getChainName(selectedSrcChainId)}`;
|
|
1529
|
+
const resolvedReturnLabel = content.returnButtonLabel || returnHomeLabel;
|
|
1530
|
+
|
|
1531
|
+
const directTransferSuccessView = slots.successScreen ? (
|
|
1532
|
+
slots.successScreen({
|
|
1533
|
+
title: typeof defaultSuccessTitle === "string" ? defaultSuccessTitle : "Transfer Complete",
|
|
1534
|
+
description: typeof defaultSuccessDesc === "string" ? defaultSuccessDesc : "",
|
|
1535
|
+
txHash: directTransferTxHash,
|
|
1536
|
+
explorerUrl: directTransferTxHash ? getExplorerTxUrl(selectedSrcChainId, directTransferTxHash) : undefined,
|
|
1537
|
+
onDone: () => {
|
|
1538
|
+
if (returnToHomeUrl) {
|
|
1539
|
+
window.location.href = returnToHomeUrl;
|
|
1540
|
+
} else {
|
|
1541
|
+
onSuccess?.(directTransferTxHash);
|
|
1542
|
+
setDirectTransferTxHash(undefined);
|
|
1543
|
+
setB3ModalOpen(false);
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
returnUrl: returnToHomeUrl,
|
|
1547
|
+
returnLabel: resolvedReturnLabel || undefined,
|
|
1548
|
+
})
|
|
1549
|
+
) : (
|
|
1498
1550
|
<div className="mx-auto flex w-[460px] max-w-full flex-col items-center gap-6 p-5">
|
|
1499
1551
|
<div className="flex flex-col items-center gap-4">
|
|
1500
|
-
<
|
|
1501
|
-
<CheckCircle className="text-as-brand h-8 w-8" />
|
|
1502
|
-
</div>
|
|
1552
|
+
<AnimatedCheckmark className="h-16 w-16" />
|
|
1503
1553
|
<div className="text-center">
|
|
1504
|
-
<h2 className="text-as-primary text-xl font-bold">
|
|
1505
|
-
<p className="text-as-secondary mt-1 text-sm">
|
|
1506
|
-
Your {selectedSrcToken.symbol} has been sent to {effectiveRecipientAddress?.slice(0, 6)}...
|
|
1507
|
-
{effectiveRecipientAddress?.slice(-4)} on {getChainName(selectedSrcChainId)}
|
|
1508
|
-
</p>
|
|
1554
|
+
<h2 className="text-as-primary text-xl font-bold">{defaultSuccessTitle}</h2>
|
|
1555
|
+
<p className="text-as-secondary mt-1 text-sm">{defaultSuccessDesc}</p>
|
|
1509
1556
|
</div>
|
|
1510
1557
|
</div>
|
|
1511
1558
|
|
|
@@ -1528,7 +1575,7 @@ function AnySpendInner({
|
|
|
1528
1575
|
}}
|
|
1529
1576
|
className="bg-as-brand hover:bg-as-brand/90 w-full text-white"
|
|
1530
1577
|
>
|
|
1531
|
-
{
|
|
1578
|
+
{resolvedReturnLabel || "Return to Home"}
|
|
1532
1579
|
</Button>
|
|
1533
1580
|
) : (
|
|
1534
1581
|
<Button
|
|
@@ -1539,7 +1586,7 @@ function AnySpendInner({
|
|
|
1539
1586
|
}}
|
|
1540
1587
|
className="bg-as-brand hover:bg-as-brand/90 w-full text-white"
|
|
1541
1588
|
>
|
|
1542
|
-
{
|
|
1589
|
+
{resolvedReturnLabel || "Done"}
|
|
1543
1590
|
</Button>
|
|
1544
1591
|
)}
|
|
1545
1592
|
</div>
|
|
@@ -13,6 +13,7 @@ import { useEffect, useMemo, useState } from "react";
|
|
|
13
13
|
import { createPublicClient, encodeFunctionData, formatEther, http, parseEther } from "viem";
|
|
14
14
|
import { BondkitToken, BondkitTokenABI } from "../../../bondkit";
|
|
15
15
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
16
|
+
import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
|
|
16
17
|
|
|
17
18
|
// Debounce utility function
|
|
18
19
|
function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void {
|
|
@@ -38,7 +39,14 @@ export function AnySpendBondKit({
|
|
|
38
39
|
imageUrl,
|
|
39
40
|
b3Amount: initialB3Amount,
|
|
40
41
|
onSuccess,
|
|
41
|
-
|
|
42
|
+
slots,
|
|
43
|
+
content,
|
|
44
|
+
theme,
|
|
45
|
+
}: AnySpendBondKitProps & {
|
|
46
|
+
slots?: AnySpendSlots;
|
|
47
|
+
content?: AnySpendContent;
|
|
48
|
+
theme?: AnySpendTheme;
|
|
49
|
+
}) {
|
|
42
50
|
const hasMounted = useHasMounted();
|
|
43
51
|
const [showAmountPrompt, setShowAmountPrompt] = useState(!initialB3Amount);
|
|
44
52
|
const [b3Amount, setB3Amount] = useState(initialB3Amount || "");
|
|
@@ -371,6 +379,9 @@ export function AnySpendBondKit({
|
|
|
371
379
|
header={header}
|
|
372
380
|
onSuccess={onSuccess}
|
|
373
381
|
showRecipient={true}
|
|
382
|
+
slots={slots}
|
|
383
|
+
content={content}
|
|
384
|
+
theme={theme}
|
|
374
385
|
/>
|
|
375
386
|
);
|
|
376
387
|
}
|
|
@@ -21,6 +21,7 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
21
21
|
import { createPublicClient, encodeFunctionData, erc20Abi, formatUnits, http } from "viem";
|
|
22
22
|
import { useAccount, useWaitForTransactionReceipt } from "wagmi";
|
|
23
23
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
24
|
+
import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
|
|
24
25
|
import { EthIcon } from "./icons/EthIcon";
|
|
25
26
|
import { SolIcon } from "./icons/SolIcon";
|
|
26
27
|
import { UsdcIcon } from "./icons/USDCIcon";
|
|
@@ -130,6 +131,10 @@ export function AnySpendBuySpin({
|
|
|
130
131
|
recipientAddress,
|
|
131
132
|
prefillQuantity,
|
|
132
133
|
onSuccess,
|
|
134
|
+
senderAddress,
|
|
135
|
+
slots,
|
|
136
|
+
content,
|
|
137
|
+
theme,
|
|
133
138
|
}: {
|
|
134
139
|
loadOrder?: string;
|
|
135
140
|
mode?: "modal" | "page";
|
|
@@ -138,6 +143,11 @@ export function AnySpendBuySpin({
|
|
|
138
143
|
recipientAddress: string;
|
|
139
144
|
prefillQuantity?: string;
|
|
140
145
|
onSuccess?: (txHash?: string) => void;
|
|
146
|
+
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
147
|
+
senderAddress?: string;
|
|
148
|
+
slots?: AnySpendSlots;
|
|
149
|
+
content?: AnySpendContent;
|
|
150
|
+
theme?: AnySpendTheme;
|
|
141
151
|
}) {
|
|
142
152
|
const hasMounted = useHasMounted();
|
|
143
153
|
const { setB3ModalOpen } = useModalStore();
|
|
@@ -681,6 +691,10 @@ export function AnySpendBuySpin({
|
|
|
681
691
|
header={header}
|
|
682
692
|
onSuccess={txHash => onSuccess?.(txHash)}
|
|
683
693
|
showRecipient={false}
|
|
694
|
+
senderAddress={senderAddress}
|
|
695
|
+
slots={slots}
|
|
696
|
+
content={content}
|
|
697
|
+
theme={theme}
|
|
684
698
|
/>
|
|
685
699
|
);
|
|
686
700
|
}
|
|
@@ -33,6 +33,7 @@ import React, { useEffect, useMemo, useState } from "react";
|
|
|
33
33
|
import { createPublicClient, encodeFunctionData, http } from "viem";
|
|
34
34
|
import { base } from "viem/chains";
|
|
35
35
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
36
|
+
import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
|
|
36
37
|
import {
|
|
37
38
|
BUY_PACKS_FOR_ABI,
|
|
38
39
|
BUY_PACKS_FOR_WITH_DISCOUNT_ABI,
|
|
@@ -123,6 +124,9 @@ export interface AnySpendCollectorClubPurchaseProps {
|
|
|
123
124
|
* When provided, validates on-chain and adjusts the price accordingly.
|
|
124
125
|
*/
|
|
125
126
|
discountCode?: string;
|
|
127
|
+
slots?: AnySpendSlots;
|
|
128
|
+
content?: AnySpendContent;
|
|
129
|
+
theme?: AnySpendTheme;
|
|
126
130
|
}
|
|
127
131
|
|
|
128
132
|
export function AnySpendCollectorClubPurchase({
|
|
@@ -143,6 +147,9 @@ export function AnySpendCollectorClubPurchase({
|
|
|
143
147
|
packType,
|
|
144
148
|
forceFiatPayment,
|
|
145
149
|
discountCode,
|
|
150
|
+
slots,
|
|
151
|
+
content,
|
|
152
|
+
theme,
|
|
146
153
|
}: AnySpendCollectorClubPurchaseProps) {
|
|
147
154
|
const ccShopAddress = isStaging ? CC_SHOP_ADDRESS_STAGING : CC_SHOP_ADDRESS;
|
|
148
155
|
|
|
@@ -391,6 +398,9 @@ export function AnySpendCollectorClubPurchase({
|
|
|
391
398
|
showRecipient={showRecipient}
|
|
392
399
|
srcFiatAmount={srcFiatAmount}
|
|
393
400
|
forceFiatPayment={forceFiatPayment}
|
|
401
|
+
slots={slots}
|
|
402
|
+
content={content}
|
|
403
|
+
theme={theme}
|
|
394
404
|
/>
|
|
395
405
|
);
|
|
396
406
|
}
|