@b3dotfun/sdk 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +345 -0
- package/constants/chains/b3Chain.js +2 -0
- package/dist/cjs/anyspend/abis/abi-usdc-base.d.ts +1074 -0
- package/dist/cjs/anyspend/abis/abi-usdc-base.js +602 -0
- package/dist/cjs/anyspend/abis/erc20-staking.d.ts +540 -0
- package/dist/cjs/anyspend/abis/erc20-staking.js +301 -0
- package/dist/cjs/anyspend/constants/index.d.ts +28 -0
- package/dist/cjs/anyspend/constants/index.js +72 -0
- package/dist/cjs/anyspend/index.d.ts +13 -0
- package/dist/cjs/anyspend/index.js +35 -0
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +22 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +700 -0
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +333 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +22 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +399 -0
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +31 -0
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.d.ts +7 -0
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +19 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +269 -0
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +27 -0
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +21 -0
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +5 -0
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +7 -0
- package/dist/cjs/anyspend/react/components/common/HowItWorks.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/common/HowItWorks.js +7 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +14 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +391 -0
- package/dist/cjs/anyspend/react/components/common/OrderHistory.d.ts +7 -0
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +24 -0
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +38 -0
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +4 -0
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +14 -0
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +59 -0
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +18 -0
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +50 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +4 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +46 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +29 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +124 -0
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.js +15 -0
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.d.ts +7 -0
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.js +27 -0
- package/dist/cjs/anyspend/react/components/common/PaymentOptions.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/PaymentOptions.js +7 -0
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +153 -0
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.js +23 -0
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +21 -0
- package/dist/cjs/anyspend/react/components/icons/EthIcon.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/icons/EthIcon.js +7 -0
- package/dist/cjs/anyspend/react/components/icons/SolIcon.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/icons/SolIcon.js +7 -0
- package/dist/cjs/anyspend/react/components/icons/USDCIcon.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/icons/USDCIcon.js +7 -0
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +21 -0
- package/dist/cjs/anyspend/react/hooks/index.d.ts +13 -0
- package/dist/cjs/anyspend/react/hooks/index.js +29 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +39 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +83 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +34 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +68 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +706 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +37 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +634 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +20 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.d.ts +23 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +52 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +39 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.d.ts +23 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +18 -0
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +48 -0
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +19 -0
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.d.ts +40 -0
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +53 -0
- package/dist/cjs/anyspend/react/hooks/useGetGeo.d.ts +16 -0
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +15 -0
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +158 -0
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.d.ts +6 -0
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +18 -0
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.d.ts +10 -0
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +20 -0
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.d.ts +27 -0
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +42 -0
- package/dist/cjs/anyspend/services/anyspend.d.ts +372 -0
- package/dist/cjs/anyspend/services/anyspend.js +126 -0
- package/dist/cjs/anyspend/types/chain.d.ts +26 -0
- package/dist/cjs/anyspend/types/chain.js +8 -0
- package/dist/cjs/anyspend/types/custom.d.ts +130 -0
- package/dist/cjs/anyspend/types/custom.js +19 -0
- package/dist/cjs/anyspend/types/globalWallet.d.ts +18 -0
- package/dist/cjs/anyspend/types/globalWallet.js +10 -0
- package/dist/cjs/anyspend/types/index.d.ts +13 -0
- package/dist/cjs/anyspend/types/index.js +29 -0
- package/dist/cjs/anyspend/types/nft.d.ts +267 -0
- package/dist/cjs/anyspend/types/nft.js +36 -0
- package/dist/cjs/anyspend/types/onramp.d.ts +25 -0
- package/dist/cjs/anyspend/types/onramp.js +17 -0
- package/dist/cjs/anyspend/types/order.d.ts +1771 -0
- package/dist/cjs/anyspend/types/order.js +85 -0
- package/dist/cjs/anyspend/types/permit.d.ts +21 -0
- package/dist/cjs/anyspend/types/permit.js +11 -0
- package/dist/cjs/anyspend/types/relay.d.ts +10 -0
- package/dist/cjs/anyspend/types/relay.js +12 -0
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +4113 -0
- package/dist/cjs/anyspend/types/req-res/createOrder.js +60 -0
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +120 -0
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +31 -0
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +3129 -0
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +23 -0
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.d.ts +28 -0
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +11 -0
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +2278 -0
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +11 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +253 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +46 -0
- package/dist/cjs/anyspend/types/req-res/getTokenList.d.ts +63 -0
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +18 -0
- package/dist/cjs/anyspend/types/req-res/index.d.ts +8 -0
- package/dist/cjs/anyspend/types/req-res/index.js +24 -0
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +66 -0
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +11 -0
- package/dist/cjs/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/cjs/anyspend/types/req-res/stripe.js +1 -0
- package/dist/cjs/anyspend/types/swap.d.ts +119 -0
- package/dist/cjs/anyspend/types/swap.js +13 -0
- package/dist/cjs/anyspend/types/token.d.ts +34 -0
- package/dist/cjs/anyspend/types/token.js +14 -0
- package/dist/cjs/anyspend/types/tournament.d.ts +174 -0
- package/dist/cjs/anyspend/types/tournament.js +24 -0
- package/dist/cjs/anyspend/types/transaction.d.ts +84 -0
- package/dist/cjs/anyspend/types/transaction.js +34 -0
- package/dist/cjs/anyspend/utils/address.d.ts +4 -0
- package/dist/cjs/anyspend/utils/address.js +29 -0
- package/dist/cjs/anyspend/utils/chain.d.ts +25 -0
- package/dist/cjs/anyspend/utils/chain.js +294 -0
- package/dist/cjs/anyspend/utils/format.d.ts +6 -0
- package/dist/cjs/anyspend/utils/format.js +59 -0
- package/dist/cjs/anyspend/utils/index.d.ts +8 -0
- package/dist/cjs/anyspend/utils/index.js +24 -0
- package/dist/cjs/anyspend/utils/json.d.ts +1 -0
- package/dist/cjs/anyspend/utils/json.js +6 -0
- package/dist/cjs/anyspend/utils/number.d.ts +13 -0
- package/dist/cjs/anyspend/utils/number.js +90 -0
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +127 -0
- package/dist/cjs/anyspend/utils/orderPayload.js +56 -0
- package/dist/cjs/anyspend/utils/string.d.ts +1 -0
- package/dist/cjs/anyspend/utils/string.js +9 -0
- package/dist/cjs/anyspend/utils/token.d.ts +7 -0
- package/dist/cjs/anyspend/utils/token.js +73 -0
- package/dist/cjs/generated/chain-networks.json +483 -0
- package/dist/cjs/global-account/app.d.ts +4 -0
- package/dist/cjs/global-account/app.js +65 -0
- package/dist/cjs/global-account/app.native.d.ts +5 -0
- package/dist/cjs/global-account/app.native.js +90 -0
- package/dist/cjs/global-account/bsmnt.d.ts +4 -0
- package/dist/cjs/global-account/bsmnt.js +69 -0
- package/dist/cjs/global-account/bsmnt.native.d.ts +5 -0
- package/dist/cjs/global-account/bsmnt.native.js +93 -0
- package/dist/cjs/global-account/index.d.ts +9 -0
- package/dist/cjs/global-account/index.js +27 -0
- package/dist/cjs/global-account/index.native.d.ts +3 -0
- package/dist/cjs/global-account/index.native.js +18 -0
- package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.d.ts +7 -0
- package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.js +13 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.d.ts +1 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +92 -0
- package/dist/cjs/global-account/react/components/B3Provider.d.ts +53 -0
- package/dist/cjs/global-account/react/components/B3Provider.js +118 -0
- package/dist/cjs/global-account/react/components/B3Provider.native.d.ts +46 -0
- package/dist/cjs/global-account/react/components/B3Provider.native.js +76 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +85 -0
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +17 -0
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +51 -0
- package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/cjs/global-account/react/components/ProfileAvatar.js +127 -0
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.d.ts +4 -0
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +29 -0
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +6 -0
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +83 -0
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +11 -0
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +26 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +45 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +6 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +203 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +11 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +51 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +5 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +9 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PermissionItem.d.ts +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PermissionItem.js +8 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +6 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +9 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.d.ts +24 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +89 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +14 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +76 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +17 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +56 -0
- package/dist/cjs/global-account/react/components/StyleRoot.d.ts +4 -0
- package/dist/cjs/global-account/react/components/StyleRoot.js +10 -0
- package/dist/cjs/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +113 -0
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +12 -0
- package/dist/cjs/global-account/react/components/custom/Button.js +36 -0
- package/dist/cjs/global-account/react/components/custom/ClientOnly.d.ts +7 -0
- package/dist/cjs/global-account/react/components/custom/ClientOnly.js +13 -0
- package/dist/cjs/global-account/react/components/custom/CopyToClipboard.d.ts +7 -0
- package/dist/cjs/global-account/react/components/custom/CopyToClipboard.js +21 -0
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.d.ts +4 -0
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +24 -0
- package/dist/cjs/global-account/react/components/custom/WalletConnectorIcon.d.ts +4 -0
- package/dist/cjs/global-account/react/components/custom/WalletConnectorIcon.js +27 -0
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.d.ts +13 -0
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +93 -0
- package/dist/cjs/global-account/react/components/ui/Loading.d.ts +7 -0
- package/dist/cjs/global-account/react/components/ui/Loading.js +18 -0
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +14 -0
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +29 -0
- package/dist/cjs/global-account/react/components/ui/TabSystem.d.ts +30 -0
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +86 -0
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +9 -0
- package/dist/cjs/global-account/react/components/ui/Tabs.js +53 -0
- package/dist/cjs/global-account/react/components/ui/badge.d.ts +9 -0
- package/dist/cjs/global-account/react/components/ui/badge.js +24 -0
- package/dist/cjs/global-account/react/components/ui/button.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ui/button.js +72 -0
- package/dist/cjs/global-account/react/components/ui/command.d.ts +82 -0
- package/dist/cjs/global-account/react/components/ui/command.js +74 -0
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +30 -0
- package/dist/cjs/global-account/react/components/ui/dialog.js +71 -0
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +22 -0
- package/dist/cjs/global-account/react/components/ui/drawer.js +71 -0
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.d.ts +4 -0
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +146 -0
- package/dist/cjs/global-account/react/components/ui/glare-card.d.ts +4 -0
- package/dist/cjs/global-account/react/components/ui/glare-card.js +108 -0
- package/dist/cjs/global-account/react/components/ui/input.d.ts +5 -0
- package/dist/cjs/global-account/react/components/ui/input.js +46 -0
- package/dist/cjs/global-account/react/components/ui/popover.d.ts +6 -0
- package/dist/cjs/global-account/react/components/ui/popover.js +52 -0
- package/dist/cjs/global-account/react/components/ui/scroll-area.d.ts +5 -0
- package/dist/cjs/global-account/react/components/ui/scroll-area.js +47 -0
- package/dist/cjs/global-account/react/components/ui/skeleton.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ui/skeleton.js +8 -0
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ui/text-loop.js +29 -0
- package/dist/cjs/global-account/react/components/ui/text-shimmer.d.ts +10 -0
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +22 -0
- package/dist/cjs/global-account/react/components/ui/tooltip.d.ts +7 -0
- package/dist/cjs/global-account/react/components/ui/tooltip.js +50 -0
- package/dist/cjs/global-account/react/components/ui/transition-panel.d.ts +14 -0
- package/dist/cjs/global-account/react/components/ui/transition-panel.js +10 -0
- package/dist/cjs/global-account/react/hooks/useAccountAssets.d.ts +3 -0
- package/dist/cjs/global-account/react/hooks/useAccountAssets.js +35 -0
- package/dist/cjs/global-account/react/hooks/useAccountWallet.d.ts +18 -0
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +70 -0
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +21 -0
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +56 -0
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +10 -0
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +123 -0
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +15 -0
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +70 -0
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +41 -0
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +150 -0
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.d.ts +4 -0
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +13 -0
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.d.ts +5 -0
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +73 -0
- package/dist/cjs/global-account/react/hooks/useClaim.d.ts +16 -0
- package/dist/cjs/global-account/react/hooks/useClaim.js +50 -0
- package/dist/cjs/global-account/react/hooks/useConnect.d.ts +9 -0
- package/dist/cjs/global-account/react/hooks/useConnect.js +52 -0
- package/dist/cjs/global-account/react/hooks/useExchangeRate.d.ts +12 -0
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +30 -0
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.d.ts +30 -0
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +77 -0
- package/dist/cjs/global-account/react/hooks/useGetGeo.d.ts +17 -0
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +20 -0
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +11 -0
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +69 -0
- package/dist/cjs/global-account/react/hooks/useHasMounted.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useHasMounted.js +11 -0
- package/dist/cjs/global-account/react/hooks/useIsMobile.d.ts +2 -0
- package/dist/cjs/global-account/react/hooks/useIsMobile.js +8 -0
- package/dist/cjs/global-account/react/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/cjs/global-account/react/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/dist/cjs/global-account/react/hooks/useMediaQuery.d.ts +6 -0
- package/dist/cjs/global-account/react/hooks/useMediaQuery.js +47 -0
- package/dist/cjs/global-account/react/hooks/useNativeBalance.d.ts +22 -0
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +76 -0
- package/dist/cjs/global-account/react/hooks/useOnchainName.d.ts +19 -0
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +193 -0
- package/dist/cjs/global-account/react/hooks/useOneBalance.d.ts +26 -0
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +69 -0
- package/dist/cjs/global-account/react/hooks/useQueryB3.d.ts +25 -0
- package/dist/cjs/global-account/react/hooks/useQueryB3.js +40 -0
- package/dist/cjs/global-account/react/hooks/useQueryBSMNT.d.ts +25 -0
- package/dist/cjs/global-account/react/hooks/useQueryBSMNT.js +40 -0
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +16 -0
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +49 -0
- package/dist/cjs/global-account/react/hooks/useRouter.d.ts +14 -0
- package/dist/cjs/global-account/react/hooks/useRouter.js +78 -0
- package/dist/cjs/global-account/react/hooks/useSearchParamsSSR.d.ts +2 -0
- package/dist/cjs/global-account/react/hooks/useSearchParamsSSR.js +31 -0
- package/dist/cjs/global-account/react/hooks/useSiwe.d.ts +4 -0
- package/dist/cjs/global-account/react/hooks/useSiwe.js +38 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalance.d.ts +12 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +64 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +22 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +58 -0
- package/dist/cjs/global-account/react/hooks/useTokenData.d.ts +9 -0
- package/dist/cjs/global-account/react/hooks/useTokenData.js +47 -0
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.d.ts +17 -0
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +30 -0
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +17 -0
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +48 -0
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +15 -0
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +34 -0
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +54 -0
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +51 -0
- package/dist/cjs/global-account/react/hooks/useURLParams.d.ts +8 -0
- package/dist/cjs/global-account/react/hooks/useURLParams.js +38 -0
- package/dist/cjs/global-account/react/stores/useAuthStore.d.ts +26 -0
- package/dist/cjs/global-account/react/stores/useAuthStore.js +39 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +267 -0
- package/dist/cjs/global-account/react/stores/useModalStore.js +36 -0
- package/dist/cjs/global-account/server.d.ts +8 -0
- package/dist/cjs/global-account/server.js +26 -0
- package/dist/cjs/global-account/types/b3-api.d.ts +3 -0
- package/dist/cjs/global-account/types/b3-api.js +41 -0
- package/dist/cjs/global-account/types/b3-api.types.d.ts +51 -0
- package/dist/cjs/global-account/types/b3-api.types.js +4 -0
- package/dist/cjs/global-account/types/chain-networks.d.ts +44 -0
- package/dist/cjs/global-account/types/chain-networks.js +48 -0
- package/dist/cjs/global-account/types/feature-flags.d.ts +8 -0
- package/dist/cjs/global-account/types/feature-flags.js +10 -0
- package/dist/cjs/global-account/types/permissions.d.ts +21 -0
- package/dist/cjs/global-account/types/permissions.js +2 -0
- package/dist/cjs/global-account/types/reservoir.types.d.ts +89 -0
- package/dist/cjs/global-account/types/reservoir.types.js +2 -0
- package/dist/cjs/global-account/types/simplehash.types.d.ts +292 -0
- package/dist/cjs/global-account/types/simplehash.types.js +2 -0
- package/dist/cjs/global-account/types.d.ts +19 -0
- package/dist/cjs/global-account/types.js +2 -0
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +144 -0
- package/dist/cjs/shared/constants/chains/b3Chain.js +167 -0
- package/dist/cjs/shared/constants/chains/chainPlatformMap.d.ts +24 -0
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +47 -0
- package/dist/cjs/shared/constants/chains/supported.d.ts +53 -0
- package/dist/cjs/shared/constants/chains/supported.js +31 -0
- package/dist/cjs/shared/constants/index.d.ts +15 -0
- package/dist/cjs/shared/constants/index.js +21 -0
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +11494 -0
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.js +1355 -0
- package/dist/cjs/shared/thirdweb/generated/client.gen.d.ts +12 -0
- package/dist/cjs/shared/thirdweb/generated/client.gen.js +6 -0
- package/dist/cjs/shared/thirdweb/generated/index.d.ts +2 -0
- package/dist/cjs/shared/thirdweb/generated/index.js +19 -0
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.d.ts +1448 -0
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.js +1037 -0
- package/dist/cjs/shared/thirdweb/generated/types.gen.d.ts +4159 -0
- package/dist/cjs/shared/thirdweb/generated/types.gen.js +3 -0
- package/dist/cjs/shared/thirdweb/initiateClient.d.ts +1 -0
- package/dist/cjs/shared/thirdweb/initiateClient.js +27 -0
- package/dist/cjs/shared/thirdweb/openapi-ts.config.d.ts +2 -0
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +8 -0
- package/dist/cjs/shared/utils/b3Ens.d.ts +5 -0
- package/dist/cjs/shared/utils/b3Ens.js +27 -0
- package/dist/cjs/shared/utils/centerTruncate.d.ts +1 -0
- package/dist/cjs/shared/utils/centerTruncate.js +14 -0
- package/dist/cjs/shared/utils/chain-transformers.d.ts +5 -0
- package/dist/cjs/shared/utils/chain-transformers.js +50 -0
- package/dist/cjs/shared/utils/chains.d.ts +6 -0
- package/dist/cjs/shared/utils/chains.js +38 -0
- package/dist/cjs/shared/utils/cn.d.ts +2 -0
- package/dist/cjs/shared/utils/cn.js +8 -0
- package/dist/cjs/shared/utils/colors.d.ts +2 -0
- package/dist/cjs/shared/utils/colors.js +33 -0
- package/dist/cjs/shared/utils/cookies.d.ts +3 -0
- package/dist/cjs/shared/utils/cookies.js +17 -0
- package/dist/cjs/shared/utils/debug.d.ts +4 -0
- package/dist/cjs/shared/utils/debug.js +20 -0
- package/dist/cjs/shared/utils/fetchBalances.d.ts +16 -0
- package/dist/cjs/shared/utils/fetchBalances.js +64 -0
- package/dist/cjs/shared/utils/fetchBsmntProfile.d.ts +1 -0
- package/dist/cjs/shared/utils/fetchBsmntProfile.js +26 -0
- package/dist/cjs/shared/utils/formatAddress.d.ts +2 -0
- package/dist/cjs/shared/utils/formatAddress.js +19 -0
- package/dist/cjs/shared/utils/formatNumber.d.ts +7 -0
- package/dist/cjs/shared/utils/formatNumber.js +49 -0
- package/dist/cjs/shared/utils/index.d.ts +2 -0
- package/dist/cjs/shared/utils/index.js +23 -0
- package/dist/cjs/shared/utils/insights.d.ts +7 -0
- package/dist/cjs/shared/utils/insights.js +388 -0
- package/dist/cjs/shared/utils/ipfs.d.ts +12 -0
- package/dist/cjs/shared/utils/ipfs.js +32 -0
- package/dist/cjs/shared/utils/number.d.ts +11 -0
- package/dist/cjs/shared/utils/number.js +110 -0
- package/dist/cjs/shared/utils/payment.utils.d.ts +5 -0
- package/dist/cjs/shared/utils/payment.utils.js +36 -0
- package/dist/cjs/shared/utils/simplehash.d.ts +12 -0
- package/dist/cjs/shared/utils/simplehash.js +308 -0
- package/dist/cjs/shared/utils/sprinter.d.ts +1 -0
- package/dist/cjs/shared/utils/sprinter.js +15 -0
- package/dist/cjs/shared/utils/thirdweb-insights.d.ts +105 -0
- package/dist/cjs/shared/utils/thirdweb-insights.js +200 -0
- package/dist/cjs/shared/utils/thirdweb.d.ts +1 -0
- package/dist/cjs/shared/utils/thirdweb.js +11 -0
- package/dist/cjs/styles/index.d.ts +20 -0
- package/dist/cjs/styles/index.js +22 -0
- package/dist/esm/anyspend/abis/abi-usdc-base.d.ts +1074 -0
- package/dist/esm/anyspend/abis/abi-usdc-base.js +599 -0
- package/dist/esm/anyspend/abis/erc20-staking.d.ts +540 -0
- package/dist/esm/anyspend/abis/erc20-staking.js +298 -0
- package/dist/esm/anyspend/constants/index.d.ts +28 -0
- package/dist/esm/anyspend/constants/index.js +69 -0
- package/dist/esm/anyspend/index.d.ts +13 -0
- package/dist/esm/anyspend/index.js +19 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +22 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +693 -0
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +327 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +22 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +393 -0
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +8 -0
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +25 -0
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.d.ts +7 -0
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +16 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +8 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +263 -0
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +27 -0
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +15 -0
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +5 -0
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +4 -0
- package/dist/esm/anyspend/react/components/common/HowItWorks.d.ts +10 -0
- package/dist/esm/anyspend/react/components/common/HowItWorks.js +4 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +14 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +385 -0
- package/dist/esm/anyspend/react/components/common/OrderHistory.d.ts +7 -0
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +18 -0
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +32 -0
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +4 -0
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +11 -0
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +11 -0
- package/dist/esm/anyspend/react/components/common/OrderToken.js +56 -0
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +18 -0
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +47 -0
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +4 -0
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +40 -0
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +29 -0
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +118 -0
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.js +12 -0
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.d.ts +7 -0
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.js +21 -0
- package/dist/esm/anyspend/react/components/common/PaymentOptions.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/PaymentOptions.js +4 -0
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +147 -0
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.js +17 -0
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +6 -0
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +18 -0
- package/dist/esm/anyspend/react/components/icons/EthIcon.d.ts +3 -0
- package/dist/esm/anyspend/react/components/icons/EthIcon.js +4 -0
- package/dist/esm/anyspend/react/components/icons/SolIcon.d.ts +3 -0
- package/dist/esm/anyspend/react/components/icons/SolIcon.js +4 -0
- package/dist/esm/anyspend/react/components/icons/USDCIcon.d.ts +3 -0
- package/dist/esm/anyspend/react/components/icons/USDCIcon.js +4 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +6 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +15 -0
- package/dist/esm/anyspend/react/hooks/index.d.ts +13 -0
- package/dist/esm/anyspend/react/hooks/index.js +13 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +39 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +80 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +34 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +65 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +706 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +31 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +634 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +17 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.d.ts +23 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +49 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +36 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.d.ts +23 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +15 -0
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +48 -0
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +16 -0
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.d.ts +40 -0
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +50 -0
- package/dist/esm/anyspend/react/hooks/useGetGeo.d.ts +16 -0
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +12 -0
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/esm/anyspend/react/hooks/usePermitData.js +154 -0
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.d.ts +6 -0
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +15 -0
- package/dist/esm/anyspend/react/hooks/useStripeSupport.d.ts +10 -0
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +17 -0
- package/dist/esm/anyspend/react/providers/AnyspendProvider.d.ts +27 -0
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +38 -0
- package/dist/esm/anyspend/services/anyspend.d.ts +372 -0
- package/dist/esm/anyspend/services/anyspend.js +120 -0
- package/dist/esm/anyspend/types/chain.d.ts +26 -0
- package/dist/esm/anyspend/types/chain.js +5 -0
- package/dist/esm/anyspend/types/custom.d.ts +130 -0
- package/dist/esm/anyspend/types/custom.js +13 -0
- package/dist/esm/anyspend/types/globalWallet.d.ts +18 -0
- package/dist/esm/anyspend/types/globalWallet.js +7 -0
- package/dist/esm/anyspend/types/index.d.ts +13 -0
- package/dist/esm/anyspend/types/index.js +13 -0
- package/dist/esm/anyspend/types/nft.d.ts +267 -0
- package/dist/esm/anyspend/types/nft.js +33 -0
- package/dist/esm/anyspend/types/onramp.d.ts +25 -0
- package/dist/esm/anyspend/types/onramp.js +14 -0
- package/dist/esm/anyspend/types/order.d.ts +1771 -0
- package/dist/esm/anyspend/types/order.js +82 -0
- package/dist/esm/anyspend/types/permit.d.ts +21 -0
- package/dist/esm/anyspend/types/permit.js +8 -0
- package/dist/esm/anyspend/types/relay.d.ts +10 -0
- package/dist/esm/anyspend/types/relay.js +9 -0
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +4113 -0
- package/dist/esm/anyspend/types/req-res/createOrder.js +57 -0
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +120 -0
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +28 -0
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +3129 -0
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +20 -0
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.d.ts +28 -0
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +8 -0
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +2278 -0
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +8 -0
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +253 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +43 -0
- package/dist/esm/anyspend/types/req-res/getTokenList.d.ts +63 -0
- package/dist/esm/anyspend/types/req-res/getTokenList.js +15 -0
- package/dist/esm/anyspend/types/req-res/index.d.ts +8 -0
- package/dist/esm/anyspend/types/req-res/index.js +8 -0
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +66 -0
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +8 -0
- package/dist/esm/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/esm/anyspend/types/req-res/stripe.js +1 -0
- package/dist/esm/anyspend/types/swap.d.ts +119 -0
- package/dist/esm/anyspend/types/swap.js +10 -0
- package/dist/esm/anyspend/types/token.d.ts +34 -0
- package/dist/esm/anyspend/types/token.js +11 -0
- package/dist/esm/anyspend/types/tournament.d.ts +174 -0
- package/dist/esm/anyspend/types/tournament.js +21 -0
- package/dist/esm/anyspend/types/transaction.d.ts +84 -0
- package/dist/esm/anyspend/types/transaction.js +31 -0
- package/dist/esm/anyspend/utils/address.d.ts +4 -0
- package/dist/esm/anyspend/utils/address.js +23 -0
- package/dist/esm/anyspend/utils/chain.d.ts +25 -0
- package/dist/esm/anyspend/utils/chain.js +271 -0
- package/dist/esm/anyspend/utils/format.d.ts +6 -0
- package/dist/esm/anyspend/utils/format.js +54 -0
- package/dist/esm/anyspend/utils/index.d.ts +8 -0
- package/dist/esm/anyspend/utils/index.js +8 -0
- package/dist/esm/anyspend/utils/json.d.ts +1 -0
- package/dist/esm/anyspend/utils/json.js +3 -0
- package/dist/esm/anyspend/utils/number.d.ts +13 -0
- package/dist/esm/anyspend/utils/number.js +79 -0
- package/dist/esm/anyspend/utils/orderPayload.d.ts +127 -0
- package/dist/esm/anyspend/utils/orderPayload.js +51 -0
- package/dist/esm/anyspend/utils/string.d.ts +1 -0
- package/dist/esm/anyspend/utils/string.js +5 -0
- package/dist/esm/anyspend/utils/token.d.ts +7 -0
- package/dist/esm/anyspend/utils/token.js +65 -0
- package/dist/esm/generated/chain-networks.json +483 -0
- package/dist/esm/global-account/app.d.ts +4 -0
- package/dist/esm/global-account/app.js +57 -0
- package/dist/esm/global-account/app.native.d.ts +5 -0
- package/dist/esm/global-account/app.native.js +83 -0
- package/dist/esm/global-account/bsmnt.d.ts +4 -0
- package/dist/esm/global-account/bsmnt.js +61 -0
- package/dist/esm/global-account/bsmnt.native.d.ts +5 -0
- package/dist/esm/global-account/bsmnt.native.js +86 -0
- package/dist/esm/global-account/index.d.ts +9 -0
- package/dist/esm/global-account/index.js +11 -0
- package/dist/esm/global-account/index.native.d.ts +3 -0
- package/dist/esm/global-account/index.native.js +11 -0
- package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.d.ts +7 -0
- package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.js +10 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.d.ts +1 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +86 -0
- package/dist/esm/global-account/react/components/B3Provider.d.ts +53 -0
- package/dist/esm/global-account/react/components/B3Provider.js +109 -0
- package/dist/esm/global-account/react/components/B3Provider.native.d.ts +46 -0
- package/dist/esm/global-account/react/components/B3Provider.native.js +70 -0
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +11 -0
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +79 -0
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +17 -0
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +48 -0
- package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/esm/global-account/react/components/ProfileAvatar.js +127 -0
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.d.ts +4 -0
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +26 -0
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +6 -0
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +77 -0
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +11 -0
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +23 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +10 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +39 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +6 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +200 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +11 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +45 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +5 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +6 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/PermissionItem.d.ts +10 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/PermissionItem.js +5 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +6 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +6 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.d.ts +24 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +82 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +14 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +70 -0
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +17 -0
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +50 -0
- package/dist/esm/global-account/react/components/StyleRoot.d.ts +4 -0
- package/dist/esm/global-account/react/components/StyleRoot.js +7 -0
- package/dist/esm/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +107 -0
- package/dist/esm/global-account/react/components/custom/Button.d.ts +12 -0
- package/dist/esm/global-account/react/components/custom/Button.js +32 -0
- package/dist/esm/global-account/react/components/custom/ClientOnly.d.ts +7 -0
- package/dist/esm/global-account/react/components/custom/ClientOnly.js +10 -0
- package/dist/esm/global-account/react/components/custom/CopyToClipboard.d.ts +7 -0
- package/dist/esm/global-account/react/components/custom/CopyToClipboard.js +18 -0
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.d.ts +4 -0
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +21 -0
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.d.ts +4 -0
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +24 -0
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.d.ts +13 -0
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +58 -0
- package/dist/esm/global-account/react/components/ui/Loading.d.ts +7 -0
- package/dist/esm/global-account/react/components/ui/Loading.js +15 -0
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +14 -0
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +24 -0
- package/dist/esm/global-account/react/components/ui/TabSystem.d.ts +30 -0
- package/dist/esm/global-account/react/components/ui/TabSystem.js +46 -0
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +9 -0
- package/dist/esm/global-account/react/components/ui/Tabs.js +13 -0
- package/dist/esm/global-account/react/components/ui/badge.d.ts +9 -0
- package/dist/esm/global-account/react/components/ui/badge.js +20 -0
- package/dist/esm/global-account/react/components/ui/button.d.ts +11 -0
- package/dist/esm/global-account/react/components/ui/button.js +35 -0
- package/dist/esm/global-account/react/components/ui/command.d.ts +82 -0
- package/dist/esm/global-account/react/components/ui/command.js +30 -0
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +30 -0
- package/dist/esm/global-account/react/components/ui/dialog.js +26 -0
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +22 -0
- package/dist/esm/global-account/react/components/ui/drawer.js +26 -0
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.d.ts +4 -0
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +142 -0
- package/dist/esm/global-account/react/components/ui/glare-card.d.ts +4 -0
- package/dist/esm/global-account/react/components/ui/glare-card.js +104 -0
- package/dist/esm/global-account/react/components/ui/input.d.ts +5 -0
- package/dist/esm/global-account/react/components/ui/input.js +10 -0
- package/dist/esm/global-account/react/components/ui/popover.d.ts +6 -0
- package/dist/esm/global-account/react/components/ui/popover.js +11 -0
- package/dist/esm/global-account/react/components/ui/scroll-area.d.ts +5 -0
- package/dist/esm/global-account/react/components/ui/scroll-area.js +10 -0
- package/dist/esm/global-account/react/components/ui/skeleton.d.ts +2 -0
- package/dist/esm/global-account/react/components/ui/skeleton.js +6 -0
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +11 -0
- package/dist/esm/global-account/react/components/ui/text-loop.js +26 -0
- package/dist/esm/global-account/react/components/ui/text-shimmer.d.ts +10 -0
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +19 -0
- package/dist/esm/global-account/react/components/ui/tooltip.d.ts +7 -0
- package/dist/esm/global-account/react/components/ui/tooltip.js +11 -0
- package/dist/esm/global-account/react/components/ui/transition-panel.d.ts +14 -0
- package/dist/esm/global-account/react/components/ui/transition-panel.js +7 -0
- package/dist/esm/global-account/react/hooks/useAccountAssets.d.ts +3 -0
- package/dist/esm/global-account/react/hooks/useAccountAssets.js +32 -0
- package/dist/esm/global-account/react/hooks/useAccountWallet.d.ts +18 -0
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +67 -0
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +21 -0
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +50 -0
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +10 -0
- package/dist/esm/global-account/react/hooks/useAuthentication.js +117 -0
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +15 -0
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +67 -0
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +41 -0
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +147 -0
- package/dist/esm/global-account/react/hooks/useBsmntProfile.d.ts +4 -0
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +9 -0
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.d.ts +5 -0
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +70 -0
- package/dist/esm/global-account/react/hooks/useClaim.d.ts +16 -0
- package/dist/esm/global-account/react/hooks/useClaim.js +46 -0
- package/dist/esm/global-account/react/hooks/useConnect.d.ts +9 -0
- package/dist/esm/global-account/react/hooks/useConnect.js +49 -0
- package/dist/esm/global-account/react/hooks/useExchangeRate.d.ts +12 -0
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +27 -0
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.d.ts +30 -0
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +71 -0
- package/dist/esm/global-account/react/hooks/useGetGeo.d.ts +17 -0
- package/dist/esm/global-account/react/hooks/useGetGeo.js +18 -0
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +11 -0
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +66 -0
- package/dist/esm/global-account/react/hooks/useHasMounted.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useHasMounted.js +8 -0
- package/dist/esm/global-account/react/hooks/useIsMobile.d.ts +2 -0
- package/dist/esm/global-account/react/hooks/useIsMobile.js +6 -0
- package/dist/esm/global-account/react/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/esm/global-account/react/hooks/useIsomorphicLayoutEffect.js +2 -0
- package/dist/esm/global-account/react/hooks/useMediaQuery.d.ts +6 -0
- package/dist/esm/global-account/react/hooks/useMediaQuery.js +44 -0
- package/dist/esm/global-account/react/hooks/useNativeBalance.d.ts +22 -0
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +72 -0
- package/dist/esm/global-account/react/hooks/useOnchainName.d.ts +19 -0
- package/dist/esm/global-account/react/hooks/useOnchainName.js +187 -0
- package/dist/esm/global-account/react/hooks/useOneBalance.d.ts +26 -0
- package/dist/esm/global-account/react/hooks/useOneBalance.js +65 -0
- package/dist/esm/global-account/react/hooks/useQueryB3.d.ts +25 -0
- package/dist/esm/global-account/react/hooks/useQueryB3.js +34 -0
- package/dist/esm/global-account/react/hooks/useQueryBSMNT.d.ts +25 -0
- package/dist/esm/global-account/react/hooks/useQueryBSMNT.js +34 -0
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +16 -0
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +43 -0
- package/dist/esm/global-account/react/hooks/useRouter.d.ts +14 -0
- package/dist/esm/global-account/react/hooks/useRouter.js +75 -0
- package/dist/esm/global-account/react/hooks/useSearchParamsSSR.d.ts +2 -0
- package/dist/esm/global-account/react/hooks/useSearchParamsSSR.js +27 -0
- package/dist/esm/global-account/react/hooks/useSiwe.d.ts +4 -0
- package/dist/esm/global-account/react/hooks/useSiwe.js +32 -0
- package/dist/esm/global-account/react/hooks/useTokenBalance.d.ts +12 -0
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +61 -0
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +22 -0
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +55 -0
- package/dist/esm/global-account/react/hooks/useTokenData.d.ts +9 -0
- package/dist/esm/global-account/react/hooks/useTokenData.js +44 -0
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.d.ts +17 -0
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +27 -0
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +17 -0
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +45 -0
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +15 -0
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +31 -0
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +54 -0
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +45 -0
- package/dist/esm/global-account/react/hooks/useURLParams.d.ts +8 -0
- package/dist/esm/global-account/react/hooks/useURLParams.js +32 -0
- package/dist/esm/global-account/react/stores/useAuthStore.d.ts +26 -0
- package/dist/esm/global-account/react/stores/useAuthStore.js +36 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +267 -0
- package/dist/esm/global-account/react/stores/useModalStore.js +33 -0
- package/dist/esm/global-account/server.d.ts +8 -0
- package/dist/esm/global-account/server.js +22 -0
- package/dist/esm/global-account/types/b3-api.d.ts +3 -0
- package/dist/esm/global-account/types/b3-api.js +3 -0
- package/dist/esm/global-account/types/b3-api.types.d.ts +51 -0
- package/dist/esm/global-account/types/b3-api.types.js +3 -0
- package/dist/esm/global-account/types/chain-networks.d.ts +44 -0
- package/dist/esm/global-account/types/chain-networks.js +45 -0
- package/dist/esm/global-account/types/feature-flags.d.ts +8 -0
- package/dist/esm/global-account/types/feature-flags.js +7 -0
- package/dist/esm/global-account/types/permissions.d.ts +21 -0
- package/dist/esm/global-account/types/permissions.js +1 -0
- package/dist/esm/global-account/types/reservoir.types.d.ts +89 -0
- package/dist/esm/global-account/types/reservoir.types.js +1 -0
- package/dist/esm/global-account/types/simplehash.types.d.ts +292 -0
- package/dist/esm/global-account/types/simplehash.types.js +1 -0
- package/dist/esm/global-account/types.d.ts +19 -0
- package/dist/esm/global-account/types.js +1 -0
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +144 -0
- package/dist/esm/shared/constants/chains/b3Chain.js +161 -0
- package/dist/esm/shared/constants/chains/chainPlatformMap.d.ts +24 -0
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +43 -0
- package/dist/esm/shared/constants/chains/supported.d.ts +53 -0
- package/dist/esm/shared/constants/chains/supported.js +25 -0
- package/dist/esm/shared/constants/index.d.ts +15 -0
- package/dist/esm/shared/constants/index.js +18 -0
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +11494 -0
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.js +1225 -0
- package/dist/esm/shared/thirdweb/generated/client.gen.d.ts +12 -0
- package/dist/esm/shared/thirdweb/generated/client.gen.js +3 -0
- package/dist/esm/shared/thirdweb/generated/index.d.ts +2 -0
- package/dist/esm/shared/thirdweb/generated/index.js +3 -0
- package/dist/esm/shared/thirdweb/generated/sdk.gen.d.ts +1448 -0
- package/dist/esm/shared/thirdweb/generated/sdk.gen.js +995 -0
- package/dist/esm/shared/thirdweb/generated/types.gen.d.ts +4159 -0
- package/dist/esm/shared/thirdweb/generated/types.gen.js +2 -0
- package/dist/esm/shared/thirdweb/initiateClient.d.ts +1 -0
- package/dist/esm/shared/thirdweb/initiateClient.js +25 -0
- package/dist/esm/shared/thirdweb/openapi-ts.config.d.ts +2 -0
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +6 -0
- package/dist/esm/shared/utils/b3Ens.d.ts +5 -0
- package/dist/esm/shared/utils/b3Ens.js +23 -0
- package/dist/esm/shared/utils/centerTruncate.d.ts +1 -0
- package/dist/esm/shared/utils/centerTruncate.js +11 -0
- package/dist/esm/shared/utils/chain-transformers.d.ts +5 -0
- package/dist/esm/shared/utils/chain-transformers.js +46 -0
- package/dist/esm/shared/utils/chains.d.ts +6 -0
- package/dist/esm/shared/utils/chains.js +31 -0
- package/dist/esm/shared/utils/cn.d.ts +2 -0
- package/dist/esm/shared/utils/cn.js +5 -0
- package/dist/esm/shared/utils/colors.d.ts +2 -0
- package/dist/esm/shared/utils/colors.js +29 -0
- package/dist/esm/shared/utils/cookies.d.ts +3 -0
- package/dist/esm/shared/utils/cookies.js +12 -0
- package/dist/esm/shared/utils/debug.d.ts +4 -0
- package/dist/esm/shared/utils/debug.js +13 -0
- package/dist/esm/shared/utils/fetchBalances.d.ts +16 -0
- package/dist/esm/shared/utils/fetchBalances.js +60 -0
- package/dist/esm/shared/utils/fetchBsmntProfile.d.ts +1 -0
- package/dist/esm/shared/utils/fetchBsmntProfile.js +23 -0
- package/dist/esm/shared/utils/formatAddress.d.ts +2 -0
- package/dist/esm/shared/utils/formatAddress.js +14 -0
- package/dist/esm/shared/utils/formatNumber.d.ts +7 -0
- package/dist/esm/shared/utils/formatNumber.js +45 -0
- package/dist/esm/shared/utils/index.d.ts +2 -0
- package/dist/esm/shared/utils/index.js +6 -0
- package/dist/esm/shared/utils/insights.d.ts +7 -0
- package/dist/esm/shared/utils/insights.js +381 -0
- package/dist/esm/shared/utils/ipfs.d.ts +12 -0
- package/dist/esm/shared/utils/ipfs.js +29 -0
- package/dist/esm/shared/utils/number.d.ts +11 -0
- package/dist/esm/shared/utils/number.js +102 -0
- package/dist/esm/shared/utils/payment.utils.d.ts +5 -0
- package/dist/esm/shared/utils/payment.utils.js +30 -0
- package/dist/esm/shared/utils/simplehash.d.ts +12 -0
- package/dist/esm/shared/utils/simplehash.js +286 -0
- package/dist/esm/shared/utils/sprinter.d.ts +1 -0
- package/dist/esm/shared/utils/sprinter.js +11 -0
- package/dist/esm/shared/utils/thirdweb-insights.d.ts +105 -0
- package/dist/esm/shared/utils/thirdweb-insights.js +192 -0
- package/dist/esm/shared/utils/thirdweb.d.ts +1 -0
- package/dist/esm/shared/utils/thirdweb.js +8 -0
- package/dist/esm/styles/index.d.ts +20 -0
- package/dist/esm/styles/index.js +20 -0
- package/dist/styles/index.css +1 -0
- package/dist/types/anyspend/abis/abi-usdc-base.d.ts +1074 -0
- package/dist/types/anyspend/abis/erc20-staking.d.ts +540 -0
- package/dist/types/anyspend/constants/index.d.ts +28 -0
- package/dist/types/anyspend/index.d.ts +13 -0
- package/dist/types/anyspend/react/components/AnySpend.d.ts +22 -0
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +22 -0
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +8 -0
- package/dist/types/anyspend/react/components/AnySpendNFTButton.d.ts +7 -0
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +8 -0
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +27 -0
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +5 -0
- package/dist/types/anyspend/react/components/common/HowItWorks.d.ts +10 -0
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +14 -0
- package/dist/types/anyspend/react/components/common/OrderHistory.d.ts +7 -0
- package/dist/types/anyspend/react/components/common/OrderHistoryItem.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +4 -0
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +11 -0
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +18 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +4 -0
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +29 -0
- package/dist/types/anyspend/react/components/common/PaymentMethodIcons.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/PaymentOneClick.d.ts +7 -0
- package/dist/types/anyspend/react/components/common/PaymentOptions.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/PaymentStripeWeb2.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/PaymentVendorUI.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +6 -0
- package/dist/types/anyspend/react/components/icons/EthIcon.d.ts +3 -0
- package/dist/types/anyspend/react/components/icons/SolIcon.d.ts +3 -0
- package/dist/types/anyspend/react/components/icons/USDCIcon.d.ts +3 -0
- package/dist/types/anyspend/react/components/modals/EnterRecipientModal.d.ts +6 -0
- package/dist/types/anyspend/react/hooks/index.d.ts +13 -0
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +39 -0
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +34 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +706 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +634 -0
- package/dist/types/anyspend/react/hooks/useAnyspendQuote.d.ts +23 -0
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/types/anyspend/react/hooks/useAnyspendTokens.d.ts +23 -0
- package/dist/types/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +48 -0
- package/dist/types/anyspend/react/hooks/useGeoOnrampOptions.d.ts +40 -0
- package/dist/types/anyspend/react/hooks/useGetGeo.d.ts +16 -0
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/types/anyspend/react/hooks/useStripeClientSecret.d.ts +6 -0
- package/dist/types/anyspend/react/hooks/useStripeSupport.d.ts +10 -0
- package/dist/types/anyspend/react/providers/AnyspendProvider.d.ts +27 -0
- package/dist/types/anyspend/services/anyspend.d.ts +372 -0
- package/dist/types/anyspend/types/chain.d.ts +26 -0
- package/dist/types/anyspend/types/custom.d.ts +130 -0
- package/dist/types/anyspend/types/globalWallet.d.ts +18 -0
- package/dist/types/anyspend/types/index.d.ts +13 -0
- package/dist/types/anyspend/types/nft.d.ts +267 -0
- package/dist/types/anyspend/types/onramp.d.ts +25 -0
- package/dist/types/anyspend/types/order.d.ts +1771 -0
- package/dist/types/anyspend/types/permit.d.ts +21 -0
- package/dist/types/anyspend/types/relay.d.ts +10 -0
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +4113 -0
- package/dist/types/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +120 -0
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +3129 -0
- package/dist/types/anyspend/types/req-res/getOrderByCreator.d.ts +28 -0
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +2278 -0
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +253 -0
- package/dist/types/anyspend/types/req-res/getTokenList.d.ts +63 -0
- package/dist/types/anyspend/types/req-res/index.d.ts +8 -0
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +66 -0
- package/dist/types/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/types/anyspend/types/swap.d.ts +119 -0
- package/dist/types/anyspend/types/token.d.ts +34 -0
- package/dist/types/anyspend/types/tournament.d.ts +174 -0
- package/dist/types/anyspend/types/transaction.d.ts +84 -0
- package/dist/types/anyspend/utils/address.d.ts +4 -0
- package/dist/types/anyspend/utils/chain.d.ts +25 -0
- package/dist/types/anyspend/utils/format.d.ts +6 -0
- package/dist/types/anyspend/utils/index.d.ts +8 -0
- package/dist/types/anyspend/utils/json.d.ts +1 -0
- package/dist/types/anyspend/utils/number.d.ts +13 -0
- package/dist/types/anyspend/utils/orderPayload.d.ts +127 -0
- package/dist/types/anyspend/utils/string.d.ts +1 -0
- package/dist/types/anyspend/utils/token.d.ts +7 -0
- package/dist/types/global-account/app.d.ts +4 -0
- package/dist/types/global-account/app.native.d.ts +5 -0
- package/dist/types/global-account/bsmnt.d.ts +4 -0
- package/dist/types/global-account/bsmnt.native.d.ts +5 -0
- package/dist/types/global-account/index.d.ts +9 -0
- package/dist/types/global-account/index.native.d.ts +3 -0
- package/dist/types/global-account/react/components/AccountAssets/AccountAssets.d.ts +7 -0
- package/dist/types/global-account/react/components/B3DynamicModal.d.ts +1 -0
- package/dist/types/global-account/react/components/B3Provider.d.ts +53 -0
- package/dist/types/global-account/react/components/B3Provider.native.d.ts +46 -0
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +11 -0
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +17 -0
- package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/types/global-account/react/components/RelayKitProviderWrapper.d.ts +4 -0
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +6 -0
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +11 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +10 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +6 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +11 -0
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +5 -0
- package/dist/types/global-account/react/components/SignInWithB3/components/PermissionItem.d.ts +10 -0
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +6 -0
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStep.d.ts +24 -0
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +14 -0
- package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +17 -0
- package/dist/types/global-account/react/components/StyleRoot.d.ts +4 -0
- package/dist/types/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/types/global-account/react/components/custom/Button.d.ts +12 -0
- package/dist/types/global-account/react/components/custom/ClientOnly.d.ts +7 -0
- package/dist/types/global-account/react/components/custom/CopyToClipboard.d.ts +7 -0
- package/dist/types/global-account/react/components/custom/StaggeredFadeLoader.d.ts +4 -0
- package/dist/types/global-account/react/components/custom/WalletConnectorIcon.d.ts +4 -0
- package/dist/types/global-account/react/components/magicui/AnimatedLottie.d.ts +13 -0
- package/dist/types/global-account/react/components/ui/Loading.d.ts +7 -0
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +14 -0
- package/dist/types/global-account/react/components/ui/TabSystem.d.ts +30 -0
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +9 -0
- package/dist/types/global-account/react/components/ui/badge.d.ts +9 -0
- package/dist/types/global-account/react/components/ui/button.d.ts +11 -0
- package/dist/types/global-account/react/components/ui/command.d.ts +82 -0
- package/dist/types/global-account/react/components/ui/dialog.d.ts +30 -0
- package/dist/types/global-account/react/components/ui/drawer.d.ts +22 -0
- package/dist/types/global-account/react/components/ui/glare-card-rounded.d.ts +4 -0
- package/dist/types/global-account/react/components/ui/glare-card.d.ts +4 -0
- package/dist/types/global-account/react/components/ui/input.d.ts +5 -0
- package/dist/types/global-account/react/components/ui/popover.d.ts +6 -0
- package/dist/types/global-account/react/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/global-account/react/components/ui/skeleton.d.ts +2 -0
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +11 -0
- package/dist/types/global-account/react/components/ui/text-shimmer.d.ts +10 -0
- package/dist/types/global-account/react/components/ui/tooltip.d.ts +7 -0
- package/dist/types/global-account/react/components/ui/transition-panel.d.ts +14 -0
- package/dist/types/global-account/react/hooks/useAccountAssets.d.ts +3 -0
- package/dist/types/global-account/react/hooks/useAccountWallet.d.ts +18 -0
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +21 -0
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +10 -0
- package/dist/types/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +15 -0
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +41 -0
- package/dist/types/global-account/react/hooks/useBsmntProfile.d.ts +4 -0
- package/dist/types/global-account/react/hooks/useChainSwitchWithAction.d.ts +5 -0
- package/dist/types/global-account/react/hooks/useClaim.d.ts +16 -0
- package/dist/types/global-account/react/hooks/useConnect.d.ts +9 -0
- package/dist/types/global-account/react/hooks/useExchangeRate.d.ts +12 -0
- package/dist/types/global-account/react/hooks/useGetAllTWSigners.d.ts +30 -0
- package/dist/types/global-account/react/hooks/useGetGeo.d.ts +17 -0
- package/dist/types/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +11 -0
- package/dist/types/global-account/react/hooks/useHasMounted.d.ts +1 -0
- package/dist/types/global-account/react/hooks/useIsMobile.d.ts +2 -0
- package/dist/types/global-account/react/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/types/global-account/react/hooks/useMediaQuery.d.ts +6 -0
- package/dist/types/global-account/react/hooks/useNativeBalance.d.ts +22 -0
- package/dist/types/global-account/react/hooks/useOnchainName.d.ts +19 -0
- package/dist/types/global-account/react/hooks/useOneBalance.d.ts +26 -0
- package/dist/types/global-account/react/hooks/useQueryB3.d.ts +25 -0
- package/dist/types/global-account/react/hooks/useQueryBSMNT.d.ts +25 -0
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +16 -0
- package/dist/types/global-account/react/hooks/useRouter.d.ts +14 -0
- package/dist/types/global-account/react/hooks/useSearchParamsSSR.d.ts +2 -0
- package/dist/types/global-account/react/hooks/useSiwe.d.ts +4 -0
- package/dist/types/global-account/react/hooks/useTokenBalance.d.ts +12 -0
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +22 -0
- package/dist/types/global-account/react/hooks/useTokenData.d.ts +9 -0
- package/dist/types/global-account/react/hooks/useTokenFromUrl.d.ts +17 -0
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +17 -0
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +15 -0
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +54 -0
- package/dist/types/global-account/react/hooks/useURLParams.d.ts +8 -0
- package/dist/types/global-account/react/stores/useAuthStore.d.ts +26 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +267 -0
- package/dist/types/global-account/server.d.ts +8 -0
- package/dist/types/global-account/types/b3-api.d.ts +3 -0
- package/dist/types/global-account/types/b3-api.types.d.ts +51 -0
- package/dist/types/global-account/types/chain-networks.d.ts +44 -0
- package/dist/types/global-account/types/feature-flags.d.ts +8 -0
- package/dist/types/global-account/types/permissions.d.ts +21 -0
- package/dist/types/global-account/types/reservoir.types.d.ts +89 -0
- package/dist/types/global-account/types/simplehash.types.d.ts +292 -0
- package/dist/types/global-account/types.d.ts +19 -0
- package/dist/types/shared/constants/chains/b3Chain.d.ts +144 -0
- package/dist/types/shared/constants/chains/chainPlatformMap.d.ts +24 -0
- package/dist/types/shared/constants/chains/supported.d.ts +53 -0
- package/dist/types/shared/constants/index.d.ts +15 -0
- package/dist/types/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +11494 -0
- package/dist/types/shared/thirdweb/generated/client.gen.d.ts +12 -0
- package/dist/types/shared/thirdweb/generated/index.d.ts +2 -0
- package/dist/types/shared/thirdweb/generated/sdk.gen.d.ts +1448 -0
- package/dist/types/shared/thirdweb/generated/types.gen.d.ts +4159 -0
- package/dist/types/shared/thirdweb/initiateClient.d.ts +1 -0
- package/dist/types/shared/thirdweb/openapi-ts.config.d.ts +2 -0
- package/dist/types/shared/utils/b3Ens.d.ts +5 -0
- package/dist/types/shared/utils/centerTruncate.d.ts +1 -0
- package/dist/types/shared/utils/chain-transformers.d.ts +5 -0
- package/dist/types/shared/utils/chains.d.ts +6 -0
- package/dist/types/shared/utils/cn.d.ts +2 -0
- package/dist/types/shared/utils/colors.d.ts +2 -0
- package/dist/types/shared/utils/cookies.d.ts +3 -0
- package/dist/types/shared/utils/debug.d.ts +4 -0
- package/dist/types/shared/utils/fetchBalances.d.ts +16 -0
- package/dist/types/shared/utils/fetchBsmntProfile.d.ts +1 -0
- package/dist/types/shared/utils/formatAddress.d.ts +2 -0
- package/dist/types/shared/utils/formatNumber.d.ts +7 -0
- package/dist/types/shared/utils/index.d.ts +2 -0
- package/dist/types/shared/utils/insights.d.ts +7 -0
- package/dist/types/shared/utils/ipfs.d.ts +12 -0
- package/dist/types/shared/utils/number.d.ts +11 -0
- package/dist/types/shared/utils/payment.utils.d.ts +5 -0
- package/dist/types/shared/utils/simplehash.d.ts +12 -0
- package/dist/types/shared/utils/sprinter.d.ts +1 -0
- package/dist/types/shared/utils/thirdweb-insights.d.ts +105 -0
- package/dist/types/shared/utils/thirdweb.d.ts +1 -0
- package/dist/types/styles/index.d.ts +20 -0
- package/package.json +340 -0
- package/src/anyspend/abis/abi-usdc-base.ts +600 -0
- package/src/anyspend/abis/erc20-staking.ts +299 -0
- package/src/anyspend/constants/index.ts +88 -0
- package/src/anyspend/index.ts +24 -0
- package/src/anyspend/react/components/AnySpend.tsx +1144 -0
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +623 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +812 -0
- package/src/anyspend/react/components/AnySpendNFT.tsx +134 -0
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +33 -0
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +491 -0
- package/src/anyspend/react/components/AnySpendTournament.tsx +109 -0
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +18 -0
- package/src/anyspend/react/components/common/HowItWorks.tsx +37 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +1195 -0
- package/src/anyspend/react/components/common/OrderHistory.tsx +64 -0
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +189 -0
- package/src/anyspend/react/components/common/OrderStatus.tsx +39 -0
- package/src/anyspend/react/components/common/OrderToken.tsx +132 -0
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +168 -0
- package/src/anyspend/react/components/common/PanelOnramp.tsx +108 -0
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +354 -0
- package/src/anyspend/react/components/common/PaymentMethodIcons.tsx +22 -0
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +42 -0
- package/src/anyspend/react/components/common/PaymentOptions.tsx +36 -0
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +368 -0
- package/src/anyspend/react/components/common/PaymentVendorUI.tsx +26 -0
- package/src/anyspend/react/components/common/TokenBalance.tsx +63 -0
- package/src/anyspend/react/components/icons/EthIcon.tsx +31 -0
- package/src/anyspend/react/components/icons/SolIcon.tsx +39 -0
- package/src/anyspend/react/components/icons/USDCIcon.tsx +19 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +50 -0
- package/src/anyspend/react/hooks/index.ts +13 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +131 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +102 -0
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +36 -0
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +29 -0
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +58 -0
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +38 -0
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +24 -0
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +21 -0
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +58 -0
- package/src/anyspend/react/hooks/useGetGeo.ts +31 -0
- package/src/anyspend/react/hooks/usePermitData.ts +183 -0
- package/src/anyspend/react/hooks/useStripeClientSecret.ts +20 -0
- package/src/anyspend/react/hooks/useStripeSupport.ts +22 -0
- package/src/anyspend/react/providers/AnyspendProvider.tsx +45 -0
- package/src/anyspend/services/anyspend.ts +191 -0
- package/src/anyspend/types/chain.ts +30 -0
- package/src/anyspend/types/custom.ts +17 -0
- package/src/anyspend/types/globalWallet.ts +9 -0
- package/src/anyspend/types/index.ts +14 -0
- package/src/anyspend/types/nft.ts +50 -0
- package/src/anyspend/types/onramp.ts +15 -0
- package/src/anyspend/types/order.ts +94 -0
- package/src/anyspend/types/permit.ts +10 -0
- package/src/anyspend/types/relay.ts +13 -0
- package/src/anyspend/types/req-res/createOrder.ts +66 -0
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +34 -0
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +23 -0
- package/src/anyspend/types/req-res/getOrderByCreator.ts +9 -0
- package/src/anyspend/types/req-res/getOrderHistory.ts +9 -0
- package/src/anyspend/types/req-res/getQuote.ts +60 -0
- package/src/anyspend/types/req-res/getTokenList.ts +18 -0
- package/src/anyspend/types/req-res/index.ts +8 -0
- package/src/anyspend/types/req-res/sendPermitData.ts +10 -0
- package/src/anyspend/types/req-res/stripe.ts +0 -0
- package/src/anyspend/types/swap.ts +12 -0
- package/src/anyspend/types/token.ts +13 -0
- package/src/anyspend/types/tournament.ts +26 -0
- package/src/anyspend/types/transaction.ts +39 -0
- package/src/anyspend/utils/address.ts +25 -0
- package/src/anyspend/utils/chain.ts +342 -0
- package/src/anyspend/utils/format.ts +64 -0
- package/src/anyspend/utils/index.ts +8 -0
- package/src/anyspend/utils/json.ts +3 -0
- package/src/anyspend/utils/number.ts +93 -0
- package/src/anyspend/utils/orderPayload.ts +63 -0
- package/src/anyspend/utils/string.ts +4 -0
- package/src/anyspend/utils/token.ts +72 -0
- package/src/generated/chain-networks.json +483 -0
- package/src/global-account/app.native.ts +105 -0
- package/src/global-account/app.ts +68 -0
- package/src/global-account/bsmnt.native.ts +108 -0
- package/src/global-account/bsmnt.ts +73 -0
- package/src/global-account/index.native.ts +17 -0
- package/src/global-account/index.ts +17 -0
- package/src/global-account/react/components/AccountAssets/AccountAssets.tsx +48 -0
- package/src/global-account/react/components/B3DynamicModal.tsx +118 -0
- package/src/global-account/react/components/B3Provider.native.tsx +141 -0
- package/src/global-account/react/components/B3Provider.tsx +201 -0
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +242 -0
- package/src/global-account/react/components/MintButton/MintButton.tsx +83 -0
- package/src/global-account/react/components/ProfileAvatar.tsx +138 -0
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +34 -0
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +167 -0
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +51 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +93 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +255 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +60 -0
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +23 -0
- package/src/global-account/react/components/SignInWithB3/components/PermissionItem.tsx +22 -0
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +32 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +135 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +148 -0
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +70 -0
- package/src/global-account/react/components/StyleRoot.tsx +12 -0
- package/src/global-account/react/components/Transak/TransakModal.tsx +134 -0
- package/src/global-account/react/components/custom/Button.tsx +54 -0
- package/src/global-account/react/components/custom/ClientOnly.tsx +20 -0
- package/src/global-account/react/components/custom/CopyToClipboard.tsx +47 -0
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +43 -0
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +32 -0
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +106 -0
- package/src/global-account/react/components/ui/Loading.tsx +27 -0
- package/src/global-account/react/components/ui/ShinyButton.tsx +82 -0
- package/src/global-account/react/components/ui/TabSystem.tsx +157 -0
- package/src/global-account/react/components/ui/Tabs.tsx +56 -0
- package/src/global-account/react/components/ui/badge.tsx +30 -0
- package/src/global-account/react/components/ui/button.tsx +57 -0
- package/src/global-account/react/components/ui/command.tsx +140 -0
- package/src/global-account/react/components/ui/dialog.tsx +131 -0
- package/src/global-account/react/components/ui/drawer.tsx +97 -0
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +182 -0
- package/src/global-account/react/components/ui/glare-card.tsx +138 -0
- package/src/global-account/react/components/ui/input.tsx +25 -0
- package/src/global-account/react/components/ui/popover.tsx +34 -0
- package/src/global-account/react/components/ui/scroll-area.tsx +40 -0
- package/src/global-account/react/components/ui/skeleton.tsx +7 -0
- package/src/global-account/react/components/ui/text-loop.tsx +61 -0
- package/src/global-account/react/components/ui/text-shimmer.tsx +47 -0
- package/src/global-account/react/components/ui/tooltip.tsx +34 -0
- package/src/global-account/react/components/ui/transition-panel.tsx +38 -0
- package/src/global-account/react/hooks/useAccountAssets.ts +34 -0
- package/src/global-account/react/hooks/useAccountWallet.tsx +110 -0
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +85 -0
- package/src/global-account/react/hooks/useAuthentication.ts +127 -0
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +91 -0
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +202 -0
- package/src/global-account/react/hooks/useBsmntProfile.ts +14 -0
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +79 -0
- package/src/global-account/react/hooks/useClaim.tsx +66 -0
- package/src/global-account/react/hooks/useConnect.tsx +60 -0
- package/src/global-account/react/hooks/useExchangeRate.tsx +43 -0
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +139 -0
- package/src/global-account/react/hooks/useGetGeo.tsx +40 -0
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +78 -0
- package/src/global-account/react/hooks/useHasMounted.ts +11 -0
- package/src/global-account/react/hooks/useIsMobile.tsx +9 -0
- package/src/global-account/react/hooks/useIsomorphicLayoutEffect.tsx +3 -0
- package/src/global-account/react/hooks/useMediaQuery.tsx +60 -0
- package/src/global-account/react/hooks/useNativeBalance.tsx +90 -0
- package/src/global-account/react/hooks/useOnchainName.tsx +198 -0
- package/src/global-account/react/hooks/useOneBalance.tsx +95 -0
- package/src/global-account/react/hooks/useQueryB3.ts +72 -0
- package/src/global-account/react/hooks/useQueryBSMNT.ts +72 -0
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +69 -0
- package/src/global-account/react/hooks/useRouter.tsx +103 -0
- package/src/global-account/react/hooks/useSearchParamsSSR.tsx +34 -0
- package/src/global-account/react/hooks/useSiwe.tsx +39 -0
- package/src/global-account/react/hooks/useTokenBalance.tsx +85 -0
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +93 -0
- package/src/global-account/react/hooks/useTokenData.ts +56 -0
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +46 -0
- package/src/global-account/react/hooks/useTokenPrice.tsx +85 -0
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +58 -0
- package/src/global-account/react/hooks/useTokensFromAddress.ts +118 -0
- package/src/global-account/react/hooks/useURLParams.ts +43 -0
- package/src/global-account/react/stores/useAuthStore.ts +64 -0
- package/src/global-account/react/stores/useModalStore.ts +325 -0
- package/src/global-account/server.ts +23 -0
- package/src/global-account/types/b3-api.ts +4 -0
- package/src/global-account/types/b3-api.types.ts +83 -0
- package/src/global-account/types/chain-networks.ts +54 -0
- package/src/global-account/types/feature-flags.ts +13 -0
- package/src/global-account/types/permissions.ts +24 -0
- package/src/global-account/types/react-timeago.d.ts +18 -0
- package/src/global-account/types/reservoir.types.ts +94 -0
- package/src/global-account/types/simplehash.types.ts +301 -0
- package/src/global-account/types.ts +24 -0
- package/src/shared/constants/chains/b3Chain.ts +177 -0
- package/src/shared/constants/chains/chainPlatformMap.ts +47 -0
- package/src/shared/constants/chains/supported.ts +33 -0
- package/src/shared/constants/index.ts +26 -0
- package/src/shared/thirdweb/generated/@tanstack/react-query.gen.ts +1363 -0
- package/src/shared/thirdweb/generated/client.gen.ts +16 -0
- package/src/shared/thirdweb/generated/index.ts +3 -0
- package/src/shared/thirdweb/generated/sdk.gen.ts +1051 -0
- package/src/shared/thirdweb/generated/types.gen.ts +4349 -0
- package/src/shared/thirdweb/initiateClient.ts +30 -0
- package/src/shared/thirdweb/insight-service.json +12664 -0
- package/src/shared/thirdweb/openapi-ts.config.ts +7 -0
- package/src/shared/utils/b3Ens.ts +28 -0
- package/src/shared/utils/centerTruncate.ts +12 -0
- package/src/shared/utils/chain-transformers.ts +51 -0
- package/src/shared/utils/chains.ts +38 -0
- package/src/shared/utils/cn.ts +6 -0
- package/src/shared/utils/colors.ts +33 -0
- package/src/shared/utils/cookies.ts +13 -0
- package/src/shared/utils/debug.ts +17 -0
- package/src/shared/utils/fetchBalances.ts +89 -0
- package/src/shared/utils/fetchBsmntProfile.ts +29 -0
- package/src/shared/utils/formatAddress.ts +16 -0
- package/src/shared/utils/formatNumber.ts +43 -0
- package/src/shared/utils/index.ts +7 -0
- package/src/shared/utils/insights.ts +409 -0
- package/src/shared/utils/ipfs.ts +33 -0
- package/src/shared/utils/number.ts +142 -0
- package/src/shared/utils/payment.utils.ts +34 -0
- package/src/shared/utils/simplehash.ts +372 -0
- package/src/shared/utils/sprinter.ts +14 -0
- package/src/shared/utils/thirdweb-insights.ts +338 -0
- package/src/shared/utils/thirdweb.ts +11 -0
- package/src/styles/index.css +279 -0
- package/src/styles/index.ts +24 -0
|
@@ -0,0 +1,1195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ALL_CHAINS,
|
|
5
|
+
capitalizeFirstLetter,
|
|
6
|
+
DepositTransaction,
|
|
7
|
+
EVM_CHAINS,
|
|
8
|
+
ExecuteTransaction,
|
|
9
|
+
getChainName,
|
|
10
|
+
getErrorDisplay,
|
|
11
|
+
getExplorerTxUrl,
|
|
12
|
+
getPaymentUrl,
|
|
13
|
+
getStatusDisplay,
|
|
14
|
+
isNativeToken,
|
|
15
|
+
Order,
|
|
16
|
+
OrderStatus,
|
|
17
|
+
OrderType,
|
|
18
|
+
RefundTransaction,
|
|
19
|
+
RELAY_ETH_ADDRESS,
|
|
20
|
+
RelayTransaction,
|
|
21
|
+
zNft,
|
|
22
|
+
zToken,
|
|
23
|
+
zTournament
|
|
24
|
+
} from "@b3dotfun/sdk/anyspend";
|
|
25
|
+
import { CopyToClipboard } from "@b3dotfun/sdk/global-account/react/components/custom/CopyToClipboard";
|
|
26
|
+
import { Badge } from "@b3dotfun/sdk/global-account/react/components/ui/badge";
|
|
27
|
+
import { Button } from "@b3dotfun/sdk/global-account/react/components/ui/button";
|
|
28
|
+
import ShinyButton from "@b3dotfun/sdk/global-account/react/components/ui/ShinyButton";
|
|
29
|
+
import { Skeleton } from "@b3dotfun/sdk/global-account/react/components/ui/skeleton";
|
|
30
|
+
import { TextLoop } from "@b3dotfun/sdk/global-account/react/components/ui/text-loop";
|
|
31
|
+
import { TextShimmer } from "@b3dotfun/sdk/global-account/react/components/ui/text-shimmer";
|
|
32
|
+
import { useAccountWallet } from "@b3dotfun/sdk/global-account/react/hooks/useAccountWallet";
|
|
33
|
+
import { useChainSwitchWithAction } from "@b3dotfun/sdk/global-account/react/hooks/useChainSwitchWithAction";
|
|
34
|
+
import { useOnchainName } from "@b3dotfun/sdk/global-account/react/hooks/useOnchainName";
|
|
35
|
+
import { useModalStore } from "@b3dotfun/sdk/global-account/react/stores/useModalStore";
|
|
36
|
+
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
37
|
+
import centerTruncate from "@b3dotfun/sdk/shared/utils/centerTruncate";
|
|
38
|
+
import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
39
|
+
import { useColorMode } from "@chakra-ui/react";
|
|
40
|
+
import { WalletCoinbase, WalletMetamask, WalletPhantom, WalletTrust, WalletWalletConnect } from "@web3icons/react";
|
|
41
|
+
import { motion } from "framer-motion";
|
|
42
|
+
import {
|
|
43
|
+
CheckIcon,
|
|
44
|
+
ChevronDown,
|
|
45
|
+
ChevronRight,
|
|
46
|
+
Copy,
|
|
47
|
+
ExternalLink,
|
|
48
|
+
Home,
|
|
49
|
+
Loader2,
|
|
50
|
+
RefreshCcw,
|
|
51
|
+
SquareArrowOutUpRight
|
|
52
|
+
} from "lucide-react";
|
|
53
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
54
|
+
import { QRCodeSVG } from "qrcode.react";
|
|
55
|
+
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
56
|
+
import TimeAgo from "react-timeago";
|
|
57
|
+
import { toast } from "sonner";
|
|
58
|
+
import { Address } from "thirdweb";
|
|
59
|
+
import { erc20Abi, WalletClient } from "viem";
|
|
60
|
+
import { b3 } from "viem/chains";
|
|
61
|
+
import { useWaitForTransactionReceipt, useWalletClient } from "wagmi";
|
|
62
|
+
import PaymentVendorUI from "./PaymentVendorUI";
|
|
63
|
+
|
|
64
|
+
interface OrderDetailsProps {
|
|
65
|
+
isMainnet: boolean;
|
|
66
|
+
mode?: "modal" | "page";
|
|
67
|
+
order: Order;
|
|
68
|
+
depositTxs: DepositTransaction[] | null;
|
|
69
|
+
relayTx: RelayTransaction | null;
|
|
70
|
+
executeTx: ExecuteTransaction | null;
|
|
71
|
+
refundTxs: RefundTransaction[] | null;
|
|
72
|
+
onBack?: () => void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Add this helper function near the top or just above the component
|
|
76
|
+
function getOrderSuccessText({
|
|
77
|
+
order,
|
|
78
|
+
tournament,
|
|
79
|
+
formattedActualDstAmount,
|
|
80
|
+
dstToken,
|
|
81
|
+
recipientName,
|
|
82
|
+
centerTruncate
|
|
83
|
+
}: {
|
|
84
|
+
order: Order;
|
|
85
|
+
tournament?: any;
|
|
86
|
+
formattedActualDstAmount?: string;
|
|
87
|
+
dstToken: any;
|
|
88
|
+
recipientName?: string;
|
|
89
|
+
centerTruncate: (address: string, n: number) => string;
|
|
90
|
+
}) {
|
|
91
|
+
const recipient = recipientName || centerTruncate(order.recipientAddress, 8);
|
|
92
|
+
|
|
93
|
+
let actionText = "";
|
|
94
|
+
switch (order.type) {
|
|
95
|
+
case OrderType.Swap:
|
|
96
|
+
actionText = `sent ${formattedActualDstAmount || "--"} ${dstToken.symbol}`;
|
|
97
|
+
return `Successfully ${actionText} to ${recipient}`;
|
|
98
|
+
case OrderType.MintNFT:
|
|
99
|
+
actionText = `minted ${order.metadata.nft.name}`;
|
|
100
|
+
return `Successfully ${actionText} to ${recipient}`;
|
|
101
|
+
case OrderType.JoinTournament:
|
|
102
|
+
actionText = `joined ${tournament?.name}`;
|
|
103
|
+
return `Successfully ${actionText} for ${recipient}`;
|
|
104
|
+
case OrderType.FundTournament:
|
|
105
|
+
actionText = `funded ${tournament?.name}`;
|
|
106
|
+
return `Successfully ${actionText}`;
|
|
107
|
+
case OrderType.Custom:
|
|
108
|
+
actionText = order.metadata.action || `executed contract`;
|
|
109
|
+
return `Successfully ${actionText}`;
|
|
110
|
+
default:
|
|
111
|
+
throw new Error("Invalid order type");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Rounds a token amount to 6 significant digits after the first non-zero in the decimal part.
|
|
117
|
+
* Always rounds up (not standard rounding) if there are more than 6 significant digits.
|
|
118
|
+
* For example:
|
|
119
|
+
* 0.000123456 -> 0.000123456 (unchanged, as it has 6 significant digits)
|
|
120
|
+
* 0.0001234561 -> 0.000123457 (rounded up to 6 significant digits)
|
|
121
|
+
* 0.0001234564 -> 0.000123457 (always rounded up, even if digit < 5)
|
|
122
|
+
* 1,234,567.000123456789 -> 1,234,567.000123457 (decimal part rounded up to 6 sig digits)
|
|
123
|
+
* 1,234,567.000123123123 -> 1,234,567.000123124 (decimal part rounded up to 6 sig digits)
|
|
124
|
+
* @param amount The amount value as a string
|
|
125
|
+
* @returns The rounded amount string
|
|
126
|
+
*/
|
|
127
|
+
function roundTokenAmount(amount: string | undefined): string | undefined {
|
|
128
|
+
if (!amount) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Split the number into whole and decimal parts
|
|
133
|
+
const parts = amount.split(".");
|
|
134
|
+
if (parts.length === 1) {
|
|
135
|
+
// No decimal part
|
|
136
|
+
return amount;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const wholePart = parts[0];
|
|
140
|
+
const decimalPart = parts[1];
|
|
141
|
+
|
|
142
|
+
// Check if decimal has 6 or fewer significant digits
|
|
143
|
+
if (decimalPart.length <= 6) {
|
|
144
|
+
return amount;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Find the position of the first non-zero digit in the decimal part
|
|
148
|
+
let firstNonZeroPos = 0;
|
|
149
|
+
while (firstNonZeroPos < decimalPart.length && decimalPart[firstNonZeroPos] === "0") {
|
|
150
|
+
firstNonZeroPos++;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Calculate how many significant digits we have after the first non-zero
|
|
154
|
+
const significantDigitsAfterFirstNonZero = decimalPart.length - firstNonZeroPos;
|
|
155
|
+
|
|
156
|
+
// If we have 6 or fewer significant digits, return as is
|
|
157
|
+
if (significantDigitsAfterFirstNonZero <= 6) {
|
|
158
|
+
return amount;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// We need to round to 6 significant digits after the first non-zero
|
|
162
|
+
// Keep all leading zeros plus 6 significant digits
|
|
163
|
+
const keepLength = firstNonZeroPos + 6;
|
|
164
|
+
|
|
165
|
+
// Always round up if there are more digits
|
|
166
|
+
const shouldRoundUp = decimalPart.length > keepLength;
|
|
167
|
+
|
|
168
|
+
// Create array of digits we're keeping (to handle carry)
|
|
169
|
+
const digits = decimalPart.substring(0, keepLength).split("");
|
|
170
|
+
|
|
171
|
+
// Apply rounding (always round up)
|
|
172
|
+
if (shouldRoundUp) {
|
|
173
|
+
// Start from the last position and carry as needed
|
|
174
|
+
let i = digits.length - 1;
|
|
175
|
+
let carry = 1;
|
|
176
|
+
|
|
177
|
+
while (i >= 0 && carry > 0) {
|
|
178
|
+
const digit = parseInt(digits[i], 10) + carry;
|
|
179
|
+
if (digit === 10) {
|
|
180
|
+
digits[i] = "0";
|
|
181
|
+
carry = 1;
|
|
182
|
+
} else {
|
|
183
|
+
digits[i] = digit.toString();
|
|
184
|
+
carry = 0;
|
|
185
|
+
}
|
|
186
|
+
i--;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Handle carry into the whole part if needed
|
|
190
|
+
if (carry > 0) {
|
|
191
|
+
return `${(parseInt(wholePart, 10) + 1).toString()}.${digits.join("")}`;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Join the parts back together
|
|
196
|
+
const roundedDecimalPart = digits.join("");
|
|
197
|
+
return `${wholePart}.${roundedDecimalPart}`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const OrderDetails = memo(function OrderDetails({
|
|
201
|
+
isMainnet,
|
|
202
|
+
mode = "modal",
|
|
203
|
+
order,
|
|
204
|
+
depositTxs,
|
|
205
|
+
relayTx,
|
|
206
|
+
executeTx,
|
|
207
|
+
refundTxs,
|
|
208
|
+
onBack
|
|
209
|
+
}: OrderDetailsProps) {
|
|
210
|
+
const router = useRouter();
|
|
211
|
+
const searchParams = useSearchParams();
|
|
212
|
+
|
|
213
|
+
const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
|
|
214
|
+
|
|
215
|
+
const srcToken = zToken.parse(order.metadata.srcToken);
|
|
216
|
+
const dstToken = zToken.parse(order.metadata.dstToken);
|
|
217
|
+
const nft = order.type === OrderType.MintNFT ? zNft.parse(order.metadata.nft) : undefined;
|
|
218
|
+
const tournament =
|
|
219
|
+
order.type === OrderType.JoinTournament || order.type === OrderType.FundTournament
|
|
220
|
+
? zTournament.parse(order.metadata.tournament)
|
|
221
|
+
: undefined;
|
|
222
|
+
|
|
223
|
+
const { name: recipientName } = useOnchainName(order.recipientAddress);
|
|
224
|
+
const account = useAccountWallet();
|
|
225
|
+
|
|
226
|
+
const { data: walletClient } = useWalletClient();
|
|
227
|
+
const [txHash, setTxHash] = useState<`0x${string}` | undefined>();
|
|
228
|
+
const [showQRCode, setShowQRCode] = useState(false);
|
|
229
|
+
const { isLoading: txLoading, isSuccess: txSuccess } = useWaitForTransactionReceipt({ hash: txHash });
|
|
230
|
+
|
|
231
|
+
const { switchChainAndExecute, isSwitchingOrExecuting } = useChainSwitchWithAction();
|
|
232
|
+
|
|
233
|
+
// const { permitData, isCheckingPermit } = usePermitData({
|
|
234
|
+
// chainId: order.srcChain,
|
|
235
|
+
// tokenAddress: order.srcTokenAddress as Hex,
|
|
236
|
+
// ownerAddress: account?.address && isAddress(account.address) ? getAddress(account.address) : undefined,
|
|
237
|
+
// amount: BigInt(order.srcAmount)
|
|
238
|
+
// });
|
|
239
|
+
|
|
240
|
+
// const { sendPermitData } = useAnyspendSendPermitData({
|
|
241
|
+
// onSuccess: _data => {
|
|
242
|
+
// toast.info("Sent permit data successfully");
|
|
243
|
+
// },
|
|
244
|
+
// onError: error => {
|
|
245
|
+
// console.error(error);
|
|
246
|
+
// toast.error("Failed to send permit data: " + error.message);
|
|
247
|
+
// }
|
|
248
|
+
// });
|
|
249
|
+
|
|
250
|
+
const { colorMode } = useColorMode();
|
|
251
|
+
|
|
252
|
+
const roundedUpSrcAmount = useMemo(() => {
|
|
253
|
+
// Display the full transfer amount without rounding since users need to see the exact value they're transferring.
|
|
254
|
+
// Use 21 significant digits (max allowed by Intl.NumberFormat)
|
|
255
|
+
const formattedSrcAmount = srcToken
|
|
256
|
+
? formatTokenAmount(BigInt(order.srcAmount), srcToken.decimals, 21, false)
|
|
257
|
+
: undefined;
|
|
258
|
+
|
|
259
|
+
return roundTokenAmount(formattedSrcAmount);
|
|
260
|
+
}, [order.srcAmount, srcToken]);
|
|
261
|
+
|
|
262
|
+
// This function handles the actual payment process
|
|
263
|
+
const handlePaymentProcess = useCallback(
|
|
264
|
+
async (currentWalletClient: WalletClient) => {
|
|
265
|
+
if (!currentWalletClient || !currentWalletClient?.chain?.id) {
|
|
266
|
+
toast.error("Please connect your wallet");
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
console.log("Processing transaction on chain:", currentWalletClient.chain.id);
|
|
271
|
+
|
|
272
|
+
// Process transaction
|
|
273
|
+
// if (permitData?.data && account.address) {
|
|
274
|
+
// const signature = await currentWalletClient.signTypedData({
|
|
275
|
+
// domain: permitData.data.domain,
|
|
276
|
+
// types: permitData.data.types,
|
|
277
|
+
// primaryType: "Permit",
|
|
278
|
+
// message: permitData.data.messageToSign
|
|
279
|
+
// });
|
|
280
|
+
|
|
281
|
+
// // Split signature into v, r, s components
|
|
282
|
+
// const r = signature.slice(0, 66);
|
|
283
|
+
// const s = "0x" + signature.slice(66, 130);
|
|
284
|
+
// const v = parseInt(signature.slice(130, 132), 16);
|
|
285
|
+
|
|
286
|
+
// sendPermitData({
|
|
287
|
+
// isMainnet: true,
|
|
288
|
+
// orderId: order.id,
|
|
289
|
+
// permitData: {
|
|
290
|
+
// deadline: Number(permitData.data.messageToSign.deadline),
|
|
291
|
+
// ownerAddress: account.address,
|
|
292
|
+
// r,
|
|
293
|
+
// s,
|
|
294
|
+
// v
|
|
295
|
+
// }
|
|
296
|
+
// });
|
|
297
|
+
|
|
298
|
+
// return;
|
|
299
|
+
// }
|
|
300
|
+
|
|
301
|
+
const signer = currentWalletClient.account!;
|
|
302
|
+
|
|
303
|
+
// Send transaction
|
|
304
|
+
if (isNativeToken(order.srcTokenAddress)) {
|
|
305
|
+
const hash = await currentWalletClient.sendTransaction({
|
|
306
|
+
account: signer,
|
|
307
|
+
chain: EVM_CHAINS[order.srcChain].viem,
|
|
308
|
+
to: order.globalAddress as `0x${string}`,
|
|
309
|
+
value: BigInt(order.srcAmount)
|
|
310
|
+
});
|
|
311
|
+
setTxHash(hash);
|
|
312
|
+
} else {
|
|
313
|
+
const hash = await currentWalletClient.writeContract({
|
|
314
|
+
account: signer,
|
|
315
|
+
chain: EVM_CHAINS[order.srcChain].viem,
|
|
316
|
+
address: order.srcTokenAddress as `0x${string}`,
|
|
317
|
+
abi: erc20Abi,
|
|
318
|
+
functionName: "transfer",
|
|
319
|
+
args: [order.globalAddress as Address, BigInt(order.srcAmount)]
|
|
320
|
+
});
|
|
321
|
+
setTxHash(hash);
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
[order]
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
// Main payment handler that triggers chain switch and payment
|
|
328
|
+
const handlePayment = async () => {
|
|
329
|
+
console.log("Initiating payment process. Target chain:", order.srcChain, "Current chain:", walletClient?.chain?.id);
|
|
330
|
+
await switchChainAndExecute(order.srcChain, handlePaymentProcess);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// When waitingForDeposit is true, we show a message to the user to wait for the deposit to be processed.
|
|
334
|
+
const setWaitingForDeposit = useCallback(() => {
|
|
335
|
+
const params = new URLSearchParams(searchParams);
|
|
336
|
+
params.set("waitingForDeposit", "true");
|
|
337
|
+
router.push(`?${params}`);
|
|
338
|
+
}, [router, searchParams]);
|
|
339
|
+
|
|
340
|
+
useEffect(() => {
|
|
341
|
+
if (txSuccess) {
|
|
342
|
+
toast.success("Transaction successful! We are processing your order.", { duration: 10000 });
|
|
343
|
+
setWaitingForDeposit();
|
|
344
|
+
setTxHash(undefined);
|
|
345
|
+
}
|
|
346
|
+
}, [setWaitingForDeposit, txSuccess]);
|
|
347
|
+
|
|
348
|
+
const [showOrderDetails, setShowOrderDetails] = useState(false);
|
|
349
|
+
|
|
350
|
+
if (!srcToken || !dstToken) {
|
|
351
|
+
return <div>Loading...</div>;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const expectedDstAmount =
|
|
355
|
+
order.type === OrderType.MintNFT ||
|
|
356
|
+
order.type === OrderType.JoinTournament ||
|
|
357
|
+
order.type === OrderType.FundTournament ||
|
|
358
|
+
order.type === OrderType.Custom
|
|
359
|
+
? "0"
|
|
360
|
+
: order.payload.expectedDstAmount.toString();
|
|
361
|
+
const formattedExpectedDstAmount = formatTokenAmount(BigInt(expectedDstAmount), dstToken.decimals);
|
|
362
|
+
|
|
363
|
+
const actualDstAmount =
|
|
364
|
+
order.type === OrderType.MintNFT ||
|
|
365
|
+
order.type === OrderType.JoinTournament ||
|
|
366
|
+
order.type === OrderType.FundTournament ||
|
|
367
|
+
order.type === OrderType.Custom
|
|
368
|
+
? undefined
|
|
369
|
+
: order.payload.actualDstAmount;
|
|
370
|
+
const formattedActualDstAmount = actualDstAmount
|
|
371
|
+
? formatTokenAmount(BigInt(actualDstAmount), dstToken.decimals)
|
|
372
|
+
: undefined;
|
|
373
|
+
|
|
374
|
+
const depositedAmount = depositTxs
|
|
375
|
+
? depositTxs.reduce((acc, curr) => acc + BigInt(curr.amount), BigInt(0))
|
|
376
|
+
: BigInt(0);
|
|
377
|
+
const depositDeficit = BigInt(order.srcAmount) - depositedAmount;
|
|
378
|
+
const depositEnoughAmount = depositDeficit <= BigInt(0);
|
|
379
|
+
const formattedDepositDeficit = formatTokenAmount(BigInt(depositDeficit), srcToken.decimals);
|
|
380
|
+
|
|
381
|
+
const { text: statusText, status: statusDisplay } = getStatusDisplay(order);
|
|
382
|
+
|
|
383
|
+
const permalink =
|
|
384
|
+
window.location.origin === "https://basement.fun"
|
|
385
|
+
? window.location.origin + "/deposit/" + order.id
|
|
386
|
+
: window.location.origin + "?orderId=" + order.id;
|
|
387
|
+
|
|
388
|
+
const handleCoinbaseRedirect = () => {
|
|
389
|
+
const coinbaseUrl = `https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(permalink)}`;
|
|
390
|
+
return coinbaseUrl;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const handlePhantomRedirect = () => {
|
|
394
|
+
const phantomDeepLink = `https://phantom.app/ul/browse/${encodeURIComponent(permalink)}`;
|
|
395
|
+
return phantomDeepLink;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
if (refundTxs) {
|
|
399
|
+
return (
|
|
400
|
+
<>
|
|
401
|
+
<div className="relative mt-4 flex w-full flex-col gap-4">
|
|
402
|
+
<div className="bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2">
|
|
403
|
+
<motion.div
|
|
404
|
+
className="from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent"
|
|
405
|
+
initial={{ height: "0%" }}
|
|
406
|
+
animate={{ height: "100%" }}
|
|
407
|
+
transition={{ duration: 1.5, ease: "easeInOut" }}
|
|
408
|
+
></motion.div>
|
|
409
|
+
</div>
|
|
410
|
+
{depositTxs
|
|
411
|
+
? depositTxs.map(dTx => (
|
|
412
|
+
<TransactionDetails
|
|
413
|
+
key={dTx.txHash}
|
|
414
|
+
title={`Received ${formatTokenAmount(BigInt(dTx.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
415
|
+
chainId={order.srcChain}
|
|
416
|
+
tx={dTx}
|
|
417
|
+
isProcessing={false}
|
|
418
|
+
/>
|
|
419
|
+
))
|
|
420
|
+
: null}
|
|
421
|
+
{refundTxs
|
|
422
|
+
? refundTxs.map(rTx => (
|
|
423
|
+
<TransactionDetails
|
|
424
|
+
key={rTx.txHash}
|
|
425
|
+
title={`Refunded ${formatTokenAmount(BigInt(rTx.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
426
|
+
chainId={order.srcChain}
|
|
427
|
+
tx={rTx}
|
|
428
|
+
isProcessing={false}
|
|
429
|
+
/>
|
|
430
|
+
))
|
|
431
|
+
: null}
|
|
432
|
+
</div>
|
|
433
|
+
{order.errorDetails && (
|
|
434
|
+
<div className="flex justify-center">
|
|
435
|
+
<span className="text-as-primary/50 text-center text-sm" style={{ maxWidth: "40ch" }}>
|
|
436
|
+
{getErrorDisplay(order.errorDetails)}
|
|
437
|
+
</span>
|
|
438
|
+
</div>
|
|
439
|
+
)}
|
|
440
|
+
<button
|
|
441
|
+
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
442
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
443
|
+
>
|
|
444
|
+
{mode === "page" ? (
|
|
445
|
+
<>
|
|
446
|
+
Return to Home <Home className="ml-2 h-4 w-4" />
|
|
447
|
+
</>
|
|
448
|
+
) : (
|
|
449
|
+
"Close"
|
|
450
|
+
)}
|
|
451
|
+
</button>
|
|
452
|
+
</>
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (executeTx) {
|
|
457
|
+
return (
|
|
458
|
+
<>
|
|
459
|
+
<div className="relative mt-4 flex w-full flex-col gap-4">
|
|
460
|
+
<div className="bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2">
|
|
461
|
+
<motion.div
|
|
462
|
+
className="from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent"
|
|
463
|
+
initial={{ height: "0%" }}
|
|
464
|
+
animate={{ height: "100%" }}
|
|
465
|
+
transition={{ duration: 1.5, ease: "easeInOut" }}
|
|
466
|
+
></motion.div>
|
|
467
|
+
</div>
|
|
468
|
+
{depositTxs
|
|
469
|
+
? depositTxs.map(dTxs => (
|
|
470
|
+
<TransactionDetails
|
|
471
|
+
key={dTxs.txHash}
|
|
472
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
473
|
+
chainId={order.srcChain}
|
|
474
|
+
tx={dTxs}
|
|
475
|
+
isProcessing={false}
|
|
476
|
+
/>
|
|
477
|
+
))
|
|
478
|
+
: null}
|
|
479
|
+
<TransactionDetails
|
|
480
|
+
title="Processed Transaction"
|
|
481
|
+
chainId={order.srcChain}
|
|
482
|
+
tx={relayTx}
|
|
483
|
+
delay={0.5}
|
|
484
|
+
isProcessing={false}
|
|
485
|
+
/>
|
|
486
|
+
<TransactionDetails
|
|
487
|
+
title={
|
|
488
|
+
order.type === OrderType.Swap
|
|
489
|
+
? "Processed Swap"
|
|
490
|
+
: order.type === OrderType.MintNFT
|
|
491
|
+
? "Minted NFT"
|
|
492
|
+
: order.type === OrderType.JoinTournament
|
|
493
|
+
? "Joined Tournament"
|
|
494
|
+
: order.type === OrderType.FundTournament
|
|
495
|
+
? "Funded Tournament"
|
|
496
|
+
: "Processed Order"
|
|
497
|
+
}
|
|
498
|
+
chainId={order.dstChain}
|
|
499
|
+
tx={executeTx}
|
|
500
|
+
isProcessing={false}
|
|
501
|
+
delay={1}
|
|
502
|
+
/>
|
|
503
|
+
</div>
|
|
504
|
+
<div className="flex w-full flex-col gap-8">
|
|
505
|
+
<Button variant="link" asChild>
|
|
506
|
+
<a
|
|
507
|
+
href={getExplorerTxUrl(order.dstChain, executeTx.txHash)}
|
|
508
|
+
target="_blank"
|
|
509
|
+
className="text-as-primary/70 hover:text-as-primary"
|
|
510
|
+
style={{ whiteSpace: "normal" }} // Don't know why but class can't override.
|
|
511
|
+
>
|
|
512
|
+
{getOrderSuccessText({
|
|
513
|
+
order,
|
|
514
|
+
tournament,
|
|
515
|
+
formattedActualDstAmount: formattedActualDstAmount,
|
|
516
|
+
dstToken,
|
|
517
|
+
recipientName,
|
|
518
|
+
centerTruncate
|
|
519
|
+
})}
|
|
520
|
+
<ExternalLink className="ml-2 h-4 w-4" />
|
|
521
|
+
</a>
|
|
522
|
+
</Button>
|
|
523
|
+
</div>
|
|
524
|
+
|
|
525
|
+
{order.type === OrderType.JoinTournament && order.status === OrderStatus.Executed && (
|
|
526
|
+
<ShinyButton
|
|
527
|
+
accentColor={"hsl(var(--as-brand))"}
|
|
528
|
+
textColor="text-white"
|
|
529
|
+
className="flex w-full items-center gap-2"
|
|
530
|
+
disabled={txLoading || isSwitchingOrExecuting}
|
|
531
|
+
onClick={() => setB3ModalOpen(false)}
|
|
532
|
+
>
|
|
533
|
+
<span className="pl-4">Continue to Tournament</span>
|
|
534
|
+
<ChevronRight className="h-4 w-4" />
|
|
535
|
+
</ShinyButton>
|
|
536
|
+
)}
|
|
537
|
+
|
|
538
|
+
{order.status === OrderStatus.Executed && (
|
|
539
|
+
<button
|
|
540
|
+
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
541
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
542
|
+
>
|
|
543
|
+
{mode === "page" ? (
|
|
544
|
+
<>
|
|
545
|
+
Return to Home <Home className="ml-2 h-4 w-4" />
|
|
546
|
+
</>
|
|
547
|
+
) : (
|
|
548
|
+
"Close"
|
|
549
|
+
)}
|
|
550
|
+
</button>
|
|
551
|
+
)}
|
|
552
|
+
</>
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (relayTx && relayTx.status === "success") {
|
|
557
|
+
return (
|
|
558
|
+
<>
|
|
559
|
+
<div className="relative mt-4 flex w-full flex-col gap-4">
|
|
560
|
+
<div className="bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2">
|
|
561
|
+
<motion.div
|
|
562
|
+
className="from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent"
|
|
563
|
+
initial={{ height: "0%" }}
|
|
564
|
+
animate={{ height: "100%" }}
|
|
565
|
+
transition={{ duration: 1.5, ease: "easeInOut" }}
|
|
566
|
+
></motion.div>
|
|
567
|
+
</div>
|
|
568
|
+
{depositTxs
|
|
569
|
+
? depositTxs.map(dTxs => (
|
|
570
|
+
<TransactionDetails
|
|
571
|
+
key={dTxs.txHash}
|
|
572
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
573
|
+
chainId={order.srcChain}
|
|
574
|
+
tx={dTxs}
|
|
575
|
+
isProcessing={false}
|
|
576
|
+
/>
|
|
577
|
+
))
|
|
578
|
+
: null}
|
|
579
|
+
{/* If the source and destination chains are the same, AnySpend doesn't have executeTransaction */}
|
|
580
|
+
{order.srcChain === order.dstChain ? (
|
|
581
|
+
<TransactionDetails
|
|
582
|
+
title={
|
|
583
|
+
order.type === OrderType.Swap
|
|
584
|
+
? "Processed Swap"
|
|
585
|
+
: order.type === OrderType.MintNFT
|
|
586
|
+
? "Minted NFT"
|
|
587
|
+
: order.type === OrderType.JoinTournament
|
|
588
|
+
? "Joined Tournament"
|
|
589
|
+
: order.type === OrderType.FundTournament
|
|
590
|
+
? "Funded Tournament"
|
|
591
|
+
: "Processed Transaction"
|
|
592
|
+
}
|
|
593
|
+
chainId={order.srcChain}
|
|
594
|
+
isProcessing={false}
|
|
595
|
+
tx={relayTx}
|
|
596
|
+
delay={0.5}
|
|
597
|
+
/>
|
|
598
|
+
) : (
|
|
599
|
+
<>
|
|
600
|
+
<TransactionDetails
|
|
601
|
+
title="Processed Transaction"
|
|
602
|
+
chainId={order.srcChain}
|
|
603
|
+
isProcessing={false}
|
|
604
|
+
tx={relayTx}
|
|
605
|
+
delay={0.5}
|
|
606
|
+
/>
|
|
607
|
+
<TransactionDetails
|
|
608
|
+
title={
|
|
609
|
+
order.type === OrderType.Swap
|
|
610
|
+
? "Processing Swap"
|
|
611
|
+
: order.type === OrderType.MintNFT
|
|
612
|
+
? "Minting NFT"
|
|
613
|
+
: order.type === OrderType.JoinTournament
|
|
614
|
+
? "Joining Tournament"
|
|
615
|
+
: order.type === OrderType.FundTournament
|
|
616
|
+
? "Funding Tournament"
|
|
617
|
+
: "Processing Bridge"
|
|
618
|
+
}
|
|
619
|
+
chainId={order.dstChain}
|
|
620
|
+
isProcessing={true}
|
|
621
|
+
tx={executeTx}
|
|
622
|
+
delay={1}
|
|
623
|
+
/>
|
|
624
|
+
</>
|
|
625
|
+
)}
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
<div className="flex w-full flex-col gap-8">
|
|
629
|
+
<Button variant="link" asChild>
|
|
630
|
+
<a
|
|
631
|
+
href={getExplorerTxUrl(order.dstChain, relayTx.txHash)}
|
|
632
|
+
target="_blank"
|
|
633
|
+
className="text-as-primary/70 hover:text-as-primary"
|
|
634
|
+
style={{ whiteSpace: "normal" }}
|
|
635
|
+
>
|
|
636
|
+
{getOrderSuccessText({
|
|
637
|
+
order,
|
|
638
|
+
tournament,
|
|
639
|
+
formattedActualDstAmount,
|
|
640
|
+
dstToken,
|
|
641
|
+
recipientName,
|
|
642
|
+
centerTruncate
|
|
643
|
+
})}
|
|
644
|
+
<ExternalLink className="ml-2 h-4 w-4" />
|
|
645
|
+
</a>
|
|
646
|
+
</Button>
|
|
647
|
+
</div>
|
|
648
|
+
|
|
649
|
+
{order.type === OrderType.JoinTournament && order.status === OrderStatus.Executed && (
|
|
650
|
+
<ShinyButton
|
|
651
|
+
accentColor={"hsl(var(--as-brand))"}
|
|
652
|
+
textColor="text-white"
|
|
653
|
+
className="flex w-full items-center gap-2"
|
|
654
|
+
disabled={txLoading || isSwitchingOrExecuting}
|
|
655
|
+
onClick={() => setB3ModalOpen(false)}
|
|
656
|
+
>
|
|
657
|
+
<span className="pl-4">Continue to Tournament</span>
|
|
658
|
+
<ChevronRight className="h-4 w-4" />
|
|
659
|
+
</ShinyButton>
|
|
660
|
+
)}
|
|
661
|
+
|
|
662
|
+
{order.status === OrderStatus.Executed && (
|
|
663
|
+
<button
|
|
664
|
+
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
665
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
666
|
+
>
|
|
667
|
+
{mode === "page" ? (
|
|
668
|
+
<>
|
|
669
|
+
Return to Home <Home className="ml-2 h-4 w-4" />
|
|
670
|
+
</>
|
|
671
|
+
) : (
|
|
672
|
+
"Close"
|
|
673
|
+
)}
|
|
674
|
+
</button>
|
|
675
|
+
)}
|
|
676
|
+
</>
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// This boolean indicates that user finish payment, and waiting for the deposit to be confirmed. We get this from query params (waitingForDeposit=true)
|
|
681
|
+
const waitingForDeposit = new URLSearchParams(window.location.search).get("waitingForDeposit") === "true";
|
|
682
|
+
if (depositTxs?.length || waitingForDeposit) {
|
|
683
|
+
return (
|
|
684
|
+
<>
|
|
685
|
+
<div className="relative mt-4 flex w-full flex-col gap-6">
|
|
686
|
+
<div className="bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2">
|
|
687
|
+
<motion.div
|
|
688
|
+
className="from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent"
|
|
689
|
+
initial={{ height: "0%" }}
|
|
690
|
+
animate={{ height: "100%" }}
|
|
691
|
+
transition={{ duration: 1, ease: "easeInOut" }}
|
|
692
|
+
></motion.div>
|
|
693
|
+
</div>
|
|
694
|
+
{(depositTxs || []).map((dTxs, index) => (
|
|
695
|
+
<TransactionDetails
|
|
696
|
+
key={dTxs.txHash}
|
|
697
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
698
|
+
chainId={order.srcChain}
|
|
699
|
+
tx={dTxs}
|
|
700
|
+
isProcessing={index < (depositTxs || []).length - 1 ? false : !depositEnoughAmount}
|
|
701
|
+
/>
|
|
702
|
+
))}
|
|
703
|
+
{statusDisplay === "failure" ? (
|
|
704
|
+
<TransactionDetails
|
|
705
|
+
title={statusText}
|
|
706
|
+
chainId={order.srcChain}
|
|
707
|
+
tx={null}
|
|
708
|
+
isProcessing={false}
|
|
709
|
+
delay={0.5}
|
|
710
|
+
/>
|
|
711
|
+
) : depositEnoughAmount ? (
|
|
712
|
+
<TransactionDetails
|
|
713
|
+
title={
|
|
714
|
+
order.type === OrderType.Swap
|
|
715
|
+
? "Processing Swap"
|
|
716
|
+
: order.type === OrderType.MintNFT
|
|
717
|
+
? "Minting NFT"
|
|
718
|
+
: order.type === OrderType.JoinTournament
|
|
719
|
+
? "Joining Tournament"
|
|
720
|
+
: order.type === OrderType.FundTournament
|
|
721
|
+
? "Funding Tournament"
|
|
722
|
+
: "Processing Transaction"
|
|
723
|
+
}
|
|
724
|
+
chainId={order.srcChain}
|
|
725
|
+
tx={null}
|
|
726
|
+
isProcessing={true}
|
|
727
|
+
delay={0.5}
|
|
728
|
+
/>
|
|
729
|
+
) : (
|
|
730
|
+
<TransactionDetails
|
|
731
|
+
title={`Waiting for deposit ${formattedDepositDeficit} ${srcToken.symbol}`}
|
|
732
|
+
chainId={order.srcChain}
|
|
733
|
+
tx={null}
|
|
734
|
+
isProcessing={true}
|
|
735
|
+
delay={0.5}
|
|
736
|
+
/>
|
|
737
|
+
)}
|
|
738
|
+
</div>
|
|
739
|
+
|
|
740
|
+
{/* <DelayedSupportMessage /> */}
|
|
741
|
+
</>
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return (
|
|
746
|
+
<>
|
|
747
|
+
{statusDisplay === "failure" && (
|
|
748
|
+
<div className="flex w-full flex-col items-center gap-3 whitespace-nowrap pb-2 text-sm">
|
|
749
|
+
<div className="bg-as-light-brand/20 flex w-full flex-col gap-4 rounded-lg p-8">
|
|
750
|
+
<div className="text-as-primary" style={{ whiteSpace: "normal" }}>
|
|
751
|
+
This order is no longer valid because the order expired.
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
)}
|
|
756
|
+
|
|
757
|
+
{statusDisplay === "processing" && (
|
|
758
|
+
<>
|
|
759
|
+
{order.onrampMetadata ? (
|
|
760
|
+
<PaymentVendorUI isMainnet={isMainnet} order={order} dstTokenSymbol={dstToken.symbol} />
|
|
761
|
+
) : (
|
|
762
|
+
<div className="relative flex w-full flex-1 flex-col">
|
|
763
|
+
<div className={"flex flex-col gap-1"}>
|
|
764
|
+
<span className={"text-as-primary/50"}>Please send</span>
|
|
765
|
+
<div className="flex w-full flex-wrap items-center gap-6 sm:justify-between sm:gap-0">
|
|
766
|
+
<CopyToClipboard
|
|
767
|
+
text={roundedUpSrcAmount}
|
|
768
|
+
onCopy={() => {
|
|
769
|
+
toast.success("Copied to clipboard");
|
|
770
|
+
}}
|
|
771
|
+
>
|
|
772
|
+
<div className="flex items-center gap-2">
|
|
773
|
+
<strong className="border-as-brand text-as-primary border-b-2 pb-1 text-2xl font-semibold sm:text-xl">
|
|
774
|
+
{roundedUpSrcAmount} {srcToken.symbol}
|
|
775
|
+
</strong>
|
|
776
|
+
<Copy className="text-as-primary/50 hover:text-as-primary h-5 w-5 cursor-pointer transition-all duration-200" />
|
|
777
|
+
</div>
|
|
778
|
+
</CopyToClipboard>
|
|
779
|
+
|
|
780
|
+
<Badge variant="outline" className="flex h-10 items-center gap-2 px-3 py-1 pr-2 text-sm">
|
|
781
|
+
on {getChainName(order.srcChain)}
|
|
782
|
+
<img
|
|
783
|
+
src={ALL_CHAINS[order.srcChain].logoUrl}
|
|
784
|
+
alt={getChainName(order.srcChain)}
|
|
785
|
+
className={cn("h-6 rounded-full", order.srcChain === b3.id && "h-5 rounded-none")}
|
|
786
|
+
/>
|
|
787
|
+
</Badge>
|
|
788
|
+
</div>
|
|
789
|
+
<span className={"text-as-primary/50 mb-1 mt-2"}> to the address:</span>
|
|
790
|
+
</div>
|
|
791
|
+
<CopyToClipboard
|
|
792
|
+
text={order.globalAddress}
|
|
793
|
+
onCopy={() => {
|
|
794
|
+
toast.success("Copied to clipboard");
|
|
795
|
+
}}
|
|
796
|
+
>
|
|
797
|
+
<div className="bg-b3-react-background border-b3-react-border hover:border-as-brand group flex cursor-pointer items-center justify-between gap-4 rounded-lg border p-3 px-4 shadow-md transition-all duration-200">
|
|
798
|
+
<div className="text-as-primary overflow-hidden text-ellipsis whitespace-nowrap text-sm">
|
|
799
|
+
{order.globalAddress}
|
|
800
|
+
</div>
|
|
801
|
+
<Copy className="group-hover:text-as-brand text-as-primary/50 h-5 w-5 cursor-pointer transition-all duration-200" />
|
|
802
|
+
</div>
|
|
803
|
+
</CopyToClipboard>
|
|
804
|
+
|
|
805
|
+
{account?.address && !showQRCode ? (
|
|
806
|
+
<div className="mb-4 mt-8 flex w-full flex-col items-center gap-4">
|
|
807
|
+
<div className="relative flex w-full flex-col items-center gap-2">
|
|
808
|
+
<ShinyButton
|
|
809
|
+
accentColor={"hsl(var(--as-brand))"}
|
|
810
|
+
textColor="text-white"
|
|
811
|
+
className="flex w-5/6 items-center gap-2 sm:px-0"
|
|
812
|
+
disabled={txLoading || isSwitchingOrExecuting}
|
|
813
|
+
onClick={handlePayment}
|
|
814
|
+
>
|
|
815
|
+
{txLoading ? (
|
|
816
|
+
<>
|
|
817
|
+
Transaction Pending
|
|
818
|
+
<Loader2 className="ml-2 h-5 w-5 animate-spin" />
|
|
819
|
+
</>
|
|
820
|
+
) : (
|
|
821
|
+
<>
|
|
822
|
+
<span className="pl-4 text-lg md:text-sm">Pay from Connected Wallet</span>
|
|
823
|
+
<ChevronRight className="h-4 w-4" />
|
|
824
|
+
</>
|
|
825
|
+
)}
|
|
826
|
+
</ShinyButton>
|
|
827
|
+
<span className="label-style text-as-primary/50 text-xs">
|
|
828
|
+
Connected to: {centerTruncate(account?.address || "", 6)}
|
|
829
|
+
</span>
|
|
830
|
+
</div>
|
|
831
|
+
|
|
832
|
+
<div className="flex w-full flex-col items-center gap-2">
|
|
833
|
+
<ShinyButton
|
|
834
|
+
accentColor={colorMode === "dark" ? "#ffffff" : "#000000"}
|
|
835
|
+
className="flex w-5/6 items-center gap-2 sm:px-0"
|
|
836
|
+
onClick={() => setShowQRCode(true)}
|
|
837
|
+
>
|
|
838
|
+
<span className="pl-4 text-lg md:text-sm">Pay from a different wallet</span>
|
|
839
|
+
<ChevronRight className="h-4 w-4" />
|
|
840
|
+
</ShinyButton>
|
|
841
|
+
|
|
842
|
+
<div className="flex items-center gap-2">
|
|
843
|
+
<WalletMetamask className="h-5 w-5" variant="branded" />
|
|
844
|
+
<WalletCoinbase className="h-5 w-5" variant="branded" />
|
|
845
|
+
<WalletPhantom className="h-5 w-5" variant="branded" />
|
|
846
|
+
<WalletTrust className="h-5 w-5" variant="branded" />
|
|
847
|
+
<WalletWalletConnect className="h-5 w-5" variant="branded" />
|
|
848
|
+
<span className="label-style text-as-primary/30 text-xs">& more</span>
|
|
849
|
+
</div>
|
|
850
|
+
</div>
|
|
851
|
+
</div>
|
|
852
|
+
) : (
|
|
853
|
+
<motion.div
|
|
854
|
+
initial={{ opacity: 0, filter: "blur(10px)" }}
|
|
855
|
+
animate={{ opacity: 1, filter: "blur(0px)" }}
|
|
856
|
+
transition={{ duration: 0.5, ease: "easeInOut" }}
|
|
857
|
+
className="flex w-full items-center justify-evenly gap-4"
|
|
858
|
+
>
|
|
859
|
+
<div className="mt-8 flex flex-col items-center rounded-lg bg-white p-6 pb-3">
|
|
860
|
+
<QRCodeSVG
|
|
861
|
+
value={getPaymentUrl(
|
|
862
|
+
order.globalAddress,
|
|
863
|
+
BigInt(order.srcAmount),
|
|
864
|
+
order.srcTokenAddress === RELAY_ETH_ADDRESS ? "ETH" : order.srcTokenAddress
|
|
865
|
+
)}
|
|
866
|
+
size={200}
|
|
867
|
+
/>
|
|
868
|
+
<div className="mt-3 flex items-center justify-center gap-2 text-sm">
|
|
869
|
+
<span className="label-style text-as-brand/70 text-sm">Scan with</span>
|
|
870
|
+
<TextLoop interval={3}>
|
|
871
|
+
<WalletMetamask className="h-5 w-5" variant="branded" />
|
|
872
|
+
<WalletCoinbase className="h-5 w-5" variant="branded" />
|
|
873
|
+
<WalletPhantom className="h-5 w-5" variant="branded" />
|
|
874
|
+
<WalletTrust className="h-5 w-5" variant="branded" />
|
|
875
|
+
<WalletWalletConnect className="h-5 w-5" variant="branded" />
|
|
876
|
+
</TextLoop>
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
|
|
880
|
+
<div className="flex flex-col gap-2">
|
|
881
|
+
{account && (
|
|
882
|
+
<Button variant="ghost" className="text-as-primary w-full" onClick={handlePayment}>
|
|
883
|
+
Send Transaction <ChevronRight className="ml-2 h-4 w-4" />
|
|
884
|
+
</Button>
|
|
885
|
+
)}
|
|
886
|
+
{EVM_CHAINS[order.srcChain] ? (
|
|
887
|
+
<Button variant="outline" className="w-full" onClick={handlePayment}>
|
|
888
|
+
Open Metamask
|
|
889
|
+
<WalletMetamask className="ml-2 h-5 w-5" variant="branded" />
|
|
890
|
+
</Button>
|
|
891
|
+
) : null}
|
|
892
|
+
<a href={handleCoinbaseRedirect()}>
|
|
893
|
+
<Button variant="outline" className="w-full">
|
|
894
|
+
Open Coinbase
|
|
895
|
+
<WalletCoinbase className="ml-2 h-5 w-5" variant="branded" />
|
|
896
|
+
</Button>
|
|
897
|
+
</a>
|
|
898
|
+
<a href={handlePhantomRedirect()}>
|
|
899
|
+
<Button variant="outline" className="w-full">
|
|
900
|
+
Open Phantom
|
|
901
|
+
<WalletPhantom className="ml-2 h-5 w-5" variant="branded" />
|
|
902
|
+
</Button>
|
|
903
|
+
</a>
|
|
904
|
+
</div>
|
|
905
|
+
</motion.div>
|
|
906
|
+
)}
|
|
907
|
+
</div>
|
|
908
|
+
)}
|
|
909
|
+
|
|
910
|
+
<div className="bg-as-light-brand/30 w-full rounded-lg p-4 sm:p-2 sm:px-4">
|
|
911
|
+
<p className="text-as-secondary mb-3 text-sm">Continue on another device?</p>
|
|
912
|
+
<div className="flex items-center gap-4">
|
|
913
|
+
<CopyToClipboard
|
|
914
|
+
text={permalink}
|
|
915
|
+
onCopy={() => {
|
|
916
|
+
toast.success("Copied to clipboard");
|
|
917
|
+
}}
|
|
918
|
+
>
|
|
919
|
+
<Button variant="outline" className="w-full">
|
|
920
|
+
Copy Link
|
|
921
|
+
<Copy className="ml-2 h-3 w-3" />
|
|
922
|
+
</Button>
|
|
923
|
+
</CopyToClipboard>
|
|
924
|
+
<Button
|
|
925
|
+
variant="outline"
|
|
926
|
+
className="w-full"
|
|
927
|
+
onClick={() => {
|
|
928
|
+
if (navigator.share) {
|
|
929
|
+
navigator
|
|
930
|
+
.share({
|
|
931
|
+
title: "Complete Deposit",
|
|
932
|
+
text: "Complete your deposit on BSMNT.fun",
|
|
933
|
+
url: permalink
|
|
934
|
+
})
|
|
935
|
+
.catch(error => console.log("Error sharing:", error));
|
|
936
|
+
} else {
|
|
937
|
+
toast.error("Web Share API is not supported on this browser");
|
|
938
|
+
}
|
|
939
|
+
}}
|
|
940
|
+
>
|
|
941
|
+
Send Link <SquareArrowOutUpRight className="ml-2 h-3 w-3" />
|
|
942
|
+
</Button>
|
|
943
|
+
</div>
|
|
944
|
+
</div>
|
|
945
|
+
</>
|
|
946
|
+
)}
|
|
947
|
+
|
|
948
|
+
<div className="flex w-full items-center justify-center gap-1 text-sm">
|
|
949
|
+
<div className="text-as-primary/30">Time remaining:</div>
|
|
950
|
+
<div className="text-as-primary">
|
|
951
|
+
{depositEnoughAmount ? (
|
|
952
|
+
"Received"
|
|
953
|
+
) : order.status === OrderStatus.Expired ? (
|
|
954
|
+
"Expired"
|
|
955
|
+
) : (
|
|
956
|
+
<TimeAgo date={new Date(order.expiredAt)} live={true} />
|
|
957
|
+
)}
|
|
958
|
+
</div>
|
|
959
|
+
</div>
|
|
960
|
+
|
|
961
|
+
{showOrderDetails ? (
|
|
962
|
+
<motion.div
|
|
963
|
+
className="w-full"
|
|
964
|
+
initial={{ opacity: 0, y: 20, filter: "blur(10px)" }}
|
|
965
|
+
animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}
|
|
966
|
+
transition={{ duration: 0.3, delay: 0, ease: "easeInOut" }}
|
|
967
|
+
>
|
|
968
|
+
<div className="flex w-full flex-col items-center gap-3 whitespace-nowrap py-2 text-sm">
|
|
969
|
+
<div className="flex w-full items-center justify-between gap-2">
|
|
970
|
+
<div className="text-as-primary/30">
|
|
971
|
+
{order.type === OrderType.Swap || order.type === OrderType.MintNFT
|
|
972
|
+
? "Expected to receive"
|
|
973
|
+
: order.type === OrderType.JoinTournament
|
|
974
|
+
? "Join tournament"
|
|
975
|
+
: order.type === OrderType.FundTournament
|
|
976
|
+
? "Fund tournament"
|
|
977
|
+
: order.type === OrderType.Custom
|
|
978
|
+
? order.metadata.action
|
|
979
|
+
? capitalizeFirstLetter(order.metadata.action)
|
|
980
|
+
: "Contract execution"
|
|
981
|
+
: ""}
|
|
982
|
+
</div>
|
|
983
|
+
|
|
984
|
+
<div className="flex items-end gap-2">
|
|
985
|
+
{order.type === OrderType.Swap ? (
|
|
986
|
+
`~${formattedExpectedDstAmount} ${dstToken.symbol}`
|
|
987
|
+
) : order.type === OrderType.MintNFT ? (
|
|
988
|
+
<div className="flex items-center gap-2">
|
|
989
|
+
<img src={nft?.imageUrl} alt={nft?.name || "NFT"} className="h-5 w-5" />
|
|
990
|
+
<div>{nft?.name || "NFT"}</div>
|
|
991
|
+
</div>
|
|
992
|
+
) : order.type === OrderType.JoinTournament || order.type === OrderType.FundTournament ? (
|
|
993
|
+
<div className="flex items-center gap-2">
|
|
994
|
+
<img src={tournament?.imageUrl} alt={tournament?.name || "Tournament"} className="h-5 w-5" />
|
|
995
|
+
<div>{tournament?.name || "Tournament"}</div>
|
|
996
|
+
</div>
|
|
997
|
+
) : null}
|
|
998
|
+
|
|
999
|
+
<div className="text-as-primary/50 flex items-center gap-2">
|
|
1000
|
+
<span>on {order.dstChain !== b3.id && getChainName(order.dstChain)}</span>
|
|
1001
|
+
<img
|
|
1002
|
+
src={ALL_CHAINS[order.dstChain].logoUrl}
|
|
1003
|
+
alt={getChainName(order.dstChain)}
|
|
1004
|
+
className={cn(
|
|
1005
|
+
"h-3",
|
|
1006
|
+
order.dstChain !== b3.id && "w-3 rounded-full",
|
|
1007
|
+
order.dstChain === b3.id && "h-4"
|
|
1008
|
+
)}
|
|
1009
|
+
/>
|
|
1010
|
+
</div>
|
|
1011
|
+
</div>
|
|
1012
|
+
</div>
|
|
1013
|
+
|
|
1014
|
+
<div className="divider w-full" />
|
|
1015
|
+
|
|
1016
|
+
<div className="flex w-full justify-between gap-4">
|
|
1017
|
+
<div className="text-as-primary/30">Order ID</div>
|
|
1018
|
+
<div className="text-as-primary overflow-hidden text-ellipsis whitespace-nowrap">{order.id}</div>
|
|
1019
|
+
</div>
|
|
1020
|
+
|
|
1021
|
+
<div className="divider w-full" />
|
|
1022
|
+
|
|
1023
|
+
<div className="flex w-full justify-between gap-4">
|
|
1024
|
+
<div className="text-as-primary/30">Recipient</div>
|
|
1025
|
+
<div className="flex flex-col items-end gap-1">
|
|
1026
|
+
{recipientName && <div className="text-as-primary font-semibold">{recipientName}</div>}
|
|
1027
|
+
<CopyToClipboard
|
|
1028
|
+
text={order.recipientAddress}
|
|
1029
|
+
onCopy={() => {
|
|
1030
|
+
toast.success("Copied recipient address to clipboard");
|
|
1031
|
+
}}
|
|
1032
|
+
>
|
|
1033
|
+
<div className="text-as-primary flex items-center gap-2">
|
|
1034
|
+
{centerTruncate(order.recipientAddress, 10)}
|
|
1035
|
+
<Copy className="text-as-primary/50 hover:text-as-primary h-4 w-4 cursor-pointer transition-all duration-200" />
|
|
1036
|
+
</div>
|
|
1037
|
+
</CopyToClipboard>
|
|
1038
|
+
</div>
|
|
1039
|
+
</div>
|
|
1040
|
+
</div>
|
|
1041
|
+
</motion.div>
|
|
1042
|
+
) : (
|
|
1043
|
+
<div className="flex w-full items-center">
|
|
1044
|
+
<div className="divider w-full" />
|
|
1045
|
+
<button className="whitespace-nowrap text-sm" onClick={() => setShowOrderDetails(true)}>
|
|
1046
|
+
Order Details
|
|
1047
|
+
</button>
|
|
1048
|
+
<ChevronDown className="text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" />
|
|
1049
|
+
<div className="divider w-full" />
|
|
1050
|
+
</div>
|
|
1051
|
+
)}
|
|
1052
|
+
|
|
1053
|
+
<button
|
|
1054
|
+
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
1055
|
+
onClick={onBack}
|
|
1056
|
+
>
|
|
1057
|
+
Cancel and start over <RefreshCcw className="ml-2 h-4 w-4" />
|
|
1058
|
+
</button>
|
|
1059
|
+
|
|
1060
|
+
{/* <DelayedSupportMessage /> */}
|
|
1061
|
+
</>
|
|
1062
|
+
);
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
function TransactionDetails({
|
|
1066
|
+
title,
|
|
1067
|
+
chainId,
|
|
1068
|
+
tx,
|
|
1069
|
+
isProcessing,
|
|
1070
|
+
delay
|
|
1071
|
+
}: {
|
|
1072
|
+
title: string;
|
|
1073
|
+
chainId: number;
|
|
1074
|
+
tx: DepositTransaction | RelayTransaction | ExecuteTransaction | null;
|
|
1075
|
+
isProcessing: boolean;
|
|
1076
|
+
delay?: number;
|
|
1077
|
+
}) {
|
|
1078
|
+
return (
|
|
1079
|
+
<div className={"relative flex w-full flex-1 items-center justify-between gap-4"}>
|
|
1080
|
+
<div className="flex grow items-center gap-4">
|
|
1081
|
+
<motion.div className="bg-b3-react-background relative h-10 w-10 rounded-full">
|
|
1082
|
+
{isProcessing ? (
|
|
1083
|
+
<motion.div
|
|
1084
|
+
initial={{ opacity: 0, scale: 0.3 }}
|
|
1085
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
1086
|
+
transition={{ duration: 0.5, ease: "easeInOut", delay }}
|
|
1087
|
+
className="absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full bg-black/70 shadow-lg backdrop-blur-sm"
|
|
1088
|
+
>
|
|
1089
|
+
<Loader2 className="text-as-primary h-4 w-4 animate-spin" />
|
|
1090
|
+
</motion.div>
|
|
1091
|
+
) : (
|
|
1092
|
+
<motion.div
|
|
1093
|
+
initial={{ opacity: 0, scale: 0.3 }}
|
|
1094
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
1095
|
+
transition={{ duration: 0.5, ease: "easeOut", delay }}
|
|
1096
|
+
className="bg-as-brand/70 absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border border-white/30 shadow-lg shadow-purple-500/30 backdrop-blur-sm"
|
|
1097
|
+
style={{
|
|
1098
|
+
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)"
|
|
1099
|
+
}}
|
|
1100
|
+
>
|
|
1101
|
+
<CheckIcon className="text-as-primary h-3 w-3" />
|
|
1102
|
+
</motion.div>
|
|
1103
|
+
)}
|
|
1104
|
+
</motion.div>
|
|
1105
|
+
<motion.div
|
|
1106
|
+
initial={{ opacity: 0 }}
|
|
1107
|
+
animate={{ opacity: 1 }}
|
|
1108
|
+
transition={{ duration: 0.3, ease: "easeInOut", delay }}
|
|
1109
|
+
className={"shrink-0 text-base"}
|
|
1110
|
+
>
|
|
1111
|
+
{isProcessing ? (
|
|
1112
|
+
<TextShimmer duration={1}>{title}</TextShimmer>
|
|
1113
|
+
) : (
|
|
1114
|
+
<span className="text-as-primary">{title}</span>
|
|
1115
|
+
)}
|
|
1116
|
+
</motion.div>
|
|
1117
|
+
</div>
|
|
1118
|
+
<div className="flex flex-col gap-1">
|
|
1119
|
+
{tx ? (
|
|
1120
|
+
<motion.div
|
|
1121
|
+
initial={{ opacity: 0 }}
|
|
1122
|
+
animate={{ opacity: 1 }}
|
|
1123
|
+
transition={{ duration: 0.3, ease: "easeInOut", delay: (delay || 0) + 0.3 }}
|
|
1124
|
+
className="flex items-center gap-3"
|
|
1125
|
+
>
|
|
1126
|
+
<a href={getExplorerTxUrl(chainId, tx.txHash)} target="_blank">
|
|
1127
|
+
<div className={"text-as-primary/30 font-mono text-xs"}>{centerTruncate(tx?.txHash, 6)}</div>
|
|
1128
|
+
</a>
|
|
1129
|
+
</motion.div>
|
|
1130
|
+
) : null}
|
|
1131
|
+
</div>
|
|
1132
|
+
</div>
|
|
1133
|
+
);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export const OrderDetailsLoadingView = (
|
|
1137
|
+
<div className={"mx-auto flex w-[460px] max-w-full flex-col items-center gap-4"}>
|
|
1138
|
+
{/* Status Badge */}
|
|
1139
|
+
<Badge
|
|
1140
|
+
variant="default"
|
|
1141
|
+
className="hover:bg-b3-react-background flex items-center gap-3 border-white/20 bg-white/10 px-4 py-1 text-base transition-colors"
|
|
1142
|
+
>
|
|
1143
|
+
<Loader2 className="text-as-primary h-4 w-4 animate-spin" />
|
|
1144
|
+
<TextShimmer duration={1} className="font-sf-rounded text-base font-semibold">
|
|
1145
|
+
Loading...
|
|
1146
|
+
</TextShimmer>
|
|
1147
|
+
</Badge>
|
|
1148
|
+
|
|
1149
|
+
{/* Main Content Area */}
|
|
1150
|
+
<div className="flex w-full flex-1 flex-col">
|
|
1151
|
+
{/* Amount and Chain Info */}
|
|
1152
|
+
<div className="mb-4 flex flex-col gap-1">
|
|
1153
|
+
<Skeleton className="h-4 w-24" />
|
|
1154
|
+
<div className="mt-2 flex items-center gap-2">
|
|
1155
|
+
<Skeleton className="h-8 w-48" />
|
|
1156
|
+
<Skeleton className="ml-4 h-8 w-32" />
|
|
1157
|
+
</div>
|
|
1158
|
+
<Skeleton className="mt-4 h-8 w-24" />
|
|
1159
|
+
</div>
|
|
1160
|
+
|
|
1161
|
+
{/* Address Box */}
|
|
1162
|
+
<Skeleton className="mb-4 h-12 w-full" />
|
|
1163
|
+
|
|
1164
|
+
{/* QR and Wallet Section */}
|
|
1165
|
+
<div className="flex w-full items-center justify-between gap-4">
|
|
1166
|
+
{/* QR Code Area */}
|
|
1167
|
+
<Skeleton className="rounded-lg p-6 pb-3">
|
|
1168
|
+
<div className="h-[200px] w-[200px]" />
|
|
1169
|
+
<div className="mt-3 flex items-center justify-center gap-2">
|
|
1170
|
+
<div className="h-5 w-5 rounded-full" />
|
|
1171
|
+
</div>
|
|
1172
|
+
</Skeleton>
|
|
1173
|
+
|
|
1174
|
+
{/* Wallet Buttons */}
|
|
1175
|
+
<div className="flex flex-1 flex-col gap-2">
|
|
1176
|
+
{[1, 2, 3].map(i => (
|
|
1177
|
+
<Skeleton key={i} className="h-10 w-full" />
|
|
1178
|
+
))}
|
|
1179
|
+
</div>
|
|
1180
|
+
</div>
|
|
1181
|
+
</div>
|
|
1182
|
+
|
|
1183
|
+
{/* Share Section */}
|
|
1184
|
+
<div className="bg-b3-react-background mt-8 w-full rounded-lg p-4">
|
|
1185
|
+
<Skeleton className="mb-3 h-4 w-48" />
|
|
1186
|
+
<div className="flex items-center gap-4">
|
|
1187
|
+
<Skeleton className="h-10 flex-1" />
|
|
1188
|
+
<Skeleton className="h-10 flex-1" />
|
|
1189
|
+
</div>
|
|
1190
|
+
</div>
|
|
1191
|
+
|
|
1192
|
+
{/* Cancel Button */}
|
|
1193
|
+
<Skeleton className="h-10 w-full" />
|
|
1194
|
+
</div>
|
|
1195
|
+
);
|