@b3dotfun/sdk 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/cjs/anyspend/abis/erc20-staking.js +51 -51
- package/dist/cjs/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/cjs/anyspend/abis/signature-minting.js +45 -0
- package/dist/cjs/anyspend/constants/index.js +13 -10
- package/dist/cjs/anyspend/index.d.ts +4 -2
- package/dist/cjs/anyspend/index.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +69 -68
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +68 -66
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +158 -101
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +21 -20
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +77 -0
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +52 -63
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +9 -9
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +15 -14
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +26 -25
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/cjs/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/common/Warning.js +7 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/index.js +5 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +6 -6
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +26 -25
- package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/cjs/anyspend/react/hooks/index.js +1 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.js +39 -0
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +7 -6
- package/dist/cjs/anyspend/services/anyspend.d.ts +9 -40
- package/dist/cjs/anyspend/services/anyspend.js +11 -24
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/index.d.ts +1 -1
- package/dist/cjs/anyspend/types/index.js +1 -1
- package/dist/cjs/anyspend/types/metadata.d.ts +26 -0
- package/dist/cjs/anyspend/types/metadata.js +16 -0
- package/dist/cjs/anyspend/types/nft.d.ts +7 -0
- package/dist/cjs/anyspend/types/nft.js +8 -6
- package/dist/cjs/anyspend/types/onramp.d.ts +3 -0
- package/dist/cjs/anyspend/types/onramp.js +2 -1
- package/dist/cjs/anyspend/types/order.d.ts +40 -200
- package/dist/cjs/anyspend/types/order.js +7 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/cjs/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/req-res/index.js +0 -1
- package/dist/cjs/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/cjs/anyspend/types/signature-mint.js +2 -0
- package/dist/cjs/anyspend/types/swap.js +2 -2
- package/dist/cjs/anyspend/types/token.js +2 -2
- package/dist/cjs/anyspend/types/tournament.js +4 -4
- package/dist/cjs/anyspend/types/transaction.js +4 -4
- package/dist/cjs/anyspend/utils/chain.js +16 -16
- package/dist/cjs/anyspend/utils/format.js +2 -6
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +22 -8
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +13 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +17 -16
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +50 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +12 -17
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/StyleRoot.js +0 -1
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/cjs/global-account/react/components/custom/Icon.js +52 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +20 -0
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +32 -23
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/cjs/global-account/react/stores/useModalStore.js +3 -3
- package/dist/cjs/global-account/server.js +3 -3
- package/dist/cjs/global-account/types/chain-networks.js +8 -8
- package/dist/cjs/global-account/types/feature-flags.js +1 -1
- package/dist/cjs/index.d.ts +0 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/shared/constants/chains/b3Chain.js +35 -35
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/cjs/shared/constants/chains/supported.js +4 -1
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +3 -2
- package/dist/cjs/shared/react/hooks/index.d.ts +1 -0
- package/dist/cjs/shared/react/hooks/index.js +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.js +57 -0
- package/dist/cjs/shared/react/index.d.ts +1 -0
- package/dist/cjs/shared/react/index.js +17 -0
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/cjs/shared/thirdweb/initiateClient.js +2 -2
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/cjs/shared/utils/b3Ens.js +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +9 -9
- package/dist/cjs/shared/utils/fetchBalances.js +4 -4
- package/dist/cjs/shared/utils/formatUsername.d.ts +1 -0
- package/dist/cjs/shared/utils/formatUsername.js +8 -0
- package/dist/cjs/shared/utils/index.d.ts +3 -1
- package/dist/cjs/shared/utils/index.js +4 -6
- package/dist/cjs/shared/utils/insights.js +28 -28
- package/dist/cjs/shared/utils/ipfs.js +1 -1
- package/dist/cjs/shared/utils/number.js +3 -3
- package/dist/cjs/shared/utils/simplehash.js +22 -22
- package/dist/cjs/shared/utils/thirdweb-insights.js +15 -15
- package/dist/cjs/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/cjs/shared/utils/truncateAddress.js +16 -0
- package/dist/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/esm/anyspend/abis/signature-minting.js +42 -0
- package/dist/esm/anyspend/constants/index.js +13 -10
- package/dist/esm/anyspend/index.d.ts +4 -2
- package/dist/esm/anyspend/index.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +23 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +41 -39
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +138 -81
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +22 -21
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +71 -0
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +53 -64
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +3 -3
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +9 -8
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +14 -13
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/esm/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/esm/anyspend/react/components/common/Warning.js +4 -0
- package/dist/esm/anyspend/react/components/index.d.ts +2 -0
- package/dist/esm/anyspend/react/components/index.js +2 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +16 -15
- package/dist/esm/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/esm/anyspend/react/hooks/index.js +1 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.js +33 -0
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +5 -4
- package/dist/esm/anyspend/services/anyspend.d.ts +9 -40
- package/dist/esm/anyspend/services/anyspend.js +12 -25
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/index.d.ts +1 -1
- package/dist/esm/anyspend/types/index.js +1 -1
- package/dist/esm/anyspend/types/metadata.d.ts +26 -0
- package/dist/esm/anyspend/types/metadata.js +11 -0
- package/dist/esm/anyspend/types/nft.d.ts +7 -0
- package/dist/esm/anyspend/types/nft.js +8 -6
- package/dist/esm/anyspend/types/onramp.d.ts +3 -0
- package/dist/esm/anyspend/types/onramp.js +2 -1
- package/dist/esm/anyspend/types/order.d.ts +40 -200
- package/dist/esm/anyspend/types/order.js +7 -12
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/esm/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/esm/anyspend/types/req-res/index.js +0 -1
- package/dist/esm/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/esm/anyspend/types/signature-mint.js +1 -0
- package/dist/esm/anyspend/types/swap.js +2 -2
- package/dist/esm/anyspend/types/token.js +2 -2
- package/dist/esm/anyspend/types/tournament.js +4 -4
- package/dist/esm/anyspend/types/transaction.js +4 -4
- package/dist/esm/anyspend/utils/chain.js +18 -18
- package/dist/esm/anyspend/utils/format.js +2 -6
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +23 -9
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +14 -4
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +8 -7
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/esm/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -6
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +6 -6
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +44 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +8 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +0 -1
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/esm/global-account/react/components/custom/Icon.js +50 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +17 -0
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +34 -22
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -13
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/esm/global-account/react/stores/useModalStore.js +3 -3
- package/dist/esm/global-account/server.js +3 -3
- package/dist/esm/global-account/types/chain-networks.js +8 -8
- package/dist/esm/global-account/types/feature-flags.js +1 -1
- package/dist/esm/index.d.ts +0 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/shared/constants/chains/b3Chain.js +35 -35
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/esm/shared/constants/chains/supported.js +4 -1
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +2 -1
- package/dist/esm/shared/react/hooks/index.d.ts +1 -0
- package/dist/esm/shared/react/hooks/index.js +1 -0
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/esm/shared/react/hooks/useNavigation.js +52 -0
- package/dist/esm/shared/react/index.d.ts +1 -0
- package/dist/esm/shared/react/index.js +1 -0
- package/dist/esm/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/esm/shared/thirdweb/initiateClient.js +2 -2
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/esm/shared/utils/b3Ens.js +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +9 -9
- package/dist/esm/shared/utils/fetchBalances.js +4 -4
- package/dist/esm/shared/utils/formatUsername.d.ts +1 -0
- package/dist/esm/shared/utils/formatUsername.js +5 -0
- package/dist/esm/shared/utils/index.d.ts +3 -1
- package/dist/esm/shared/utils/index.js +4 -5
- package/dist/esm/shared/utils/insights.js +28 -28
- package/dist/esm/shared/utils/ipfs.js +1 -1
- package/dist/esm/shared/utils/number.js +3 -3
- package/dist/esm/shared/utils/simplehash.js +23 -23
- package/dist/esm/shared/utils/thirdweb-insights.js +15 -15
- package/dist/esm/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/esm/shared/utils/truncateAddress.js +12 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/types/anyspend/index.d.ts +4 -2
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/types/anyspend/react/components/index.d.ts +2 -0
- package/dist/types/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/types/anyspend/services/anyspend.d.ts +9 -40
- package/dist/types/anyspend/types/index.d.ts +1 -1
- package/dist/types/anyspend/types/metadata.d.ts +26 -0
- package/dist/types/anyspend/types/nft.d.ts +7 -0
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +40 -200
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/types/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/types/index.d.ts +0 -0
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/types/shared/react/index.d.ts +1 -0
- package/dist/types/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/types/shared/utils/formatUsername.d.ts +1 -0
- package/dist/types/shared/utils/index.d.ts +3 -1
- package/dist/types/shared/utils/truncateAddress.d.ts +6 -0
- package/package.json +24 -4
- package/src/anyspend/README.md +12 -0
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/abis/signature-minting.ts +43 -0
- package/src/anyspend/constants/index.ts +13 -11
- package/src/anyspend/index.ts +4 -6
- package/src/anyspend/react/components/AnySpend.tsx +44 -39
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +46 -41
- package/src/anyspend/react/components/AnySpendCustom.tsx +214 -89
- package/src/anyspend/react/components/AnySpendNFT.tsx +11 -6
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +23 -22
- package/src/anyspend/react/components/AnySpendTournament.tsx +7 -4
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +147 -0
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +75 -77
- package/src/anyspend/react/components/common/OrderHistory.tsx +1 -1
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +3 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +5 -5
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +9 -17
- package/src/anyspend/react/components/common/PaymentMethodIcons.tsx +1 -1
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +3 -3
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +16 -15
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/common/Warning.tsx +7 -0
- package/src/anyspend/react/components/index.ts +2 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +0 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -20
- package/src/anyspend/react/hooks/index.ts +1 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +10 -20
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +9 -8
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +4 -4
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +4 -4
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGetGeo.ts +1 -1
- package/src/anyspend/react/hooks/useSigMint.tsx +55 -0
- package/src/anyspend/react/hooks/useStripeClientSecret.ts +3 -3
- package/src/anyspend/react/hooks/useStripeSupport.ts +3 -3
- package/src/anyspend/react/providers/AnyspendProvider.tsx +9 -4
- package/src/anyspend/services/anyspend.ts +21 -39
- package/src/anyspend/types/chain.ts +1 -1
- package/src/anyspend/types/custom.ts +2 -2
- package/src/anyspend/types/globalWallet.ts +1 -1
- package/src/anyspend/types/index.ts +1 -1
- package/src/anyspend/types/metadata.ts +41 -0
- package/src/anyspend/types/nft.ts +10 -7
- package/src/anyspend/types/onramp.ts +3 -2
- package/src/anyspend/types/order.ts +9 -16
- package/src/anyspend/types/relay.ts +1 -1
- package/src/anyspend/types/req-res/createOrder.ts +9 -9
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +5 -5
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +4 -4
- package/src/anyspend/types/req-res/getOrderByCreator.ts +2 -2
- package/src/anyspend/types/req-res/getOrderHistory.ts +1 -1
- package/src/anyspend/types/req-res/getQuote.ts +14 -9
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/index.ts +0 -1
- package/src/anyspend/types/signature-mint.ts +77 -0
- package/src/anyspend/types/swap.ts +2 -2
- package/src/anyspend/types/token.ts +2 -2
- package/src/anyspend/types/tournament.ts +4 -4
- package/src/anyspend/types/transaction.ts +4 -4
- package/src/anyspend/utils/chain.ts +25 -25
- package/src/anyspend/utils/format.ts +2 -7
- package/src/anyspend/utils/orderPayload.ts +21 -9
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +15 -6
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +22 -20
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +190 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +16 -28
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +0 -1
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/Icon.tsx +102 -0
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +33 -0
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +2 -2
- package/src/global-account/react/hooks/useAccountAssets.ts +4 -4
- package/src/global-account/react/hooks/useAccountWallet.tsx +9 -9
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +7 -7
- package/src/global-account/react/hooks/useAuthentication.ts +3 -3
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +9 -9
- package/src/global-account/react/hooks/useB3EnsName.ts +43 -31
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +14 -14
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +23 -4
- package/src/global-account/server.ts +3 -3
- package/src/global-account/types/chain-networks.ts +10 -10
- package/src/global-account/types/feature-flags.ts +2 -2
- package/src/index.ts +1 -0
- package/src/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +6 -1
- package/src/shared/constants/index.ts +3 -1
- package/src/shared/react/hooks/index.ts +1 -0
- package/src/shared/react/hooks/useNavigation.ts +61 -0
- package/src/shared/react/index.ts +1 -0
- package/src/shared/thirdweb/generated/sdk.gen.ts +3 -3
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/formatUsername.ts +5 -0
- package/src/shared/utils/index.ts +4 -6
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
- package/src/shared/utils/truncateAddress.ts +11 -0
- package/src/styles/index.css +5 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -39
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +0 -158
- package/dist/cjs/anyspend/types/permit.d.ts +0 -21
- package/dist/cjs/anyspend/types/permit.js +0 -11
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +0 -11
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -36
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/esm/anyspend/react/hooks/usePermitData.js +0 -154
- package/dist/esm/anyspend/types/permit.d.ts +0 -21
- package/dist/esm/anyspend/types/permit.js +0 -8
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +0 -8
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/types/anyspend/types/permit.d.ts +0 -21
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +0 -38
- package/src/anyspend/react/hooks/usePermitData.ts +0 -183
- package/src/anyspend/types/permit.ts +0 -10
- package/src/anyspend/types/req-res/sendPermitData.ts +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Order, USDC_BASE
|
|
1
|
+
import { Order, USDC_BASE } from "@b3dotfun/sdk/anyspend";
|
|
2
|
+
import { useStripeClientSecret } from "@b3dotfun/sdk/anyspend/react";
|
|
2
3
|
import { STRIPE_CONFIG } from "@b3dotfun/sdk/anyspend/constants";
|
|
3
4
|
import { ShinyButton, useB3 } from "@b3dotfun/sdk/global-account/react";
|
|
4
5
|
import { formatStripeAmount } from "@b3dotfun/sdk/shared/utils/payment.utils";
|
|
@@ -22,7 +23,7 @@ export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }
|
|
|
22
23
|
|
|
23
24
|
const { clientSecret, isLoadingStripeClientSecret, stripeClientSecretError } = useStripeClientSecret(
|
|
24
25
|
isMainnet,
|
|
25
|
-
order.stripePaymentIntentId
|
|
26
|
+
order.stripePaymentIntentId!,
|
|
26
27
|
);
|
|
27
28
|
|
|
28
29
|
if (isLoadingStripeClientSecret) {
|
|
@@ -38,7 +39,7 @@ export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }
|
|
|
38
39
|
stripe={stripePromise}
|
|
39
40
|
options={{
|
|
40
41
|
clientSecret: clientSecret || undefined,
|
|
41
|
-
appearance: { theme: theme === "light" ? "stripe" : "night" }
|
|
42
|
+
appearance: { theme: theme === "light" ? "stripe" : "night" },
|
|
42
43
|
}}
|
|
43
44
|
>
|
|
44
45
|
<StripePaymentForm order={order} clientSecret={clientSecret} onPaymentSuccess={onPaymentSuccess} />
|
|
@@ -80,7 +81,7 @@ function StripeErrorState({ error }: { error: string }) {
|
|
|
80
81
|
function StripePaymentForm({
|
|
81
82
|
order,
|
|
82
83
|
clientSecret,
|
|
83
|
-
onPaymentSuccess
|
|
84
|
+
onPaymentSuccess,
|
|
84
85
|
}: {
|
|
85
86
|
order: Order;
|
|
86
87
|
clientSecret: string | null;
|
|
@@ -135,7 +136,7 @@ function StripePaymentForm({
|
|
|
135
136
|
console.log("@@stripe-web2-payment:confirming-payment:", JSON.stringify({ orderId: order.id }, null, 2));
|
|
136
137
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
137
138
|
elements,
|
|
138
|
-
redirect: "if_required"
|
|
139
|
+
redirect: "if_required",
|
|
139
140
|
});
|
|
140
141
|
|
|
141
142
|
if (error) {
|
|
@@ -144,7 +145,7 @@ function StripePaymentForm({
|
|
|
144
145
|
} else if (paymentIntent && paymentIntent.status === "succeeded") {
|
|
145
146
|
console.log(
|
|
146
147
|
"@@stripe-web2-payment:success:",
|
|
147
|
-
JSON.stringify({ orderId: order.id, paymentIntentId: paymentIntent.id }, null, 2)
|
|
148
|
+
JSON.stringify({ orderId: order.id, paymentIntentId: paymentIntent.id }, null, 2),
|
|
148
149
|
);
|
|
149
150
|
// Payment succeeded without redirect - handle success in the modal
|
|
150
151
|
setMessage(null);
|
|
@@ -174,31 +175,31 @@ function StripePaymentForm({
|
|
|
174
175
|
defaultValues: {
|
|
175
176
|
billingDetails: {
|
|
176
177
|
name: "",
|
|
177
|
-
email: ""
|
|
178
|
-
}
|
|
178
|
+
email: "",
|
|
179
|
+
},
|
|
179
180
|
},
|
|
180
181
|
fields: {
|
|
181
|
-
billingDetails: "auto" as const
|
|
182
|
+
billingDetails: "auto" as const,
|
|
182
183
|
},
|
|
183
184
|
wallets: {
|
|
184
185
|
applePay: "auto" as const,
|
|
185
|
-
googlePay: "auto" as const
|
|
186
|
-
}
|
|
186
|
+
googlePay: "auto" as const,
|
|
187
|
+
},
|
|
187
188
|
};
|
|
188
189
|
|
|
189
190
|
const howItWorksSteps = [
|
|
190
191
|
{
|
|
191
192
|
number: 1,
|
|
192
|
-
description: "Enter your payment details securely using Stripe's encrypted form"
|
|
193
|
+
description: "Enter your payment details securely using Stripe's encrypted form",
|
|
193
194
|
},
|
|
194
195
|
{
|
|
195
196
|
number: 2,
|
|
196
|
-
description: "Your payment is processed instantly and securely through our payment partner"
|
|
197
|
+
description: "Your payment is processed instantly and securely through our payment partner",
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
number: 3,
|
|
200
|
-
description: "After payment confirmation, your order will be processed and completed automatically"
|
|
201
|
-
}
|
|
201
|
+
description: "After payment confirmation, your order will be processed and completed automatically",
|
|
202
|
+
},
|
|
202
203
|
];
|
|
203
204
|
|
|
204
205
|
return (
|
|
@@ -5,7 +5,7 @@ import { formatUnits } from "viem";
|
|
|
5
5
|
export function TokenBalance({
|
|
6
6
|
token,
|
|
7
7
|
walletAddress,
|
|
8
|
-
onChangeInput
|
|
8
|
+
onChangeInput,
|
|
9
9
|
}: {
|
|
10
10
|
token: Token;
|
|
11
11
|
walletAddress: string | undefined;
|
|
@@ -13,7 +13,7 @@ export function TokenBalance({
|
|
|
13
13
|
}) {
|
|
14
14
|
const { rawBalance, formattedBalance, isLoading } = useTokenBalance({
|
|
15
15
|
token,
|
|
16
|
-
address: walletAddress
|
|
16
|
+
address: walletAddress,
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
const handlePercentageClick = (percentage: number) => {
|
|
@@ -4,10 +4,12 @@ export { AnySpendBuySpin } from "./AnySpendBuySpin";
|
|
|
4
4
|
export { AnySpendCustom } from "./AnySpendCustom";
|
|
5
5
|
export { AnySpendNFT } from "./AnySpendNFT";
|
|
6
6
|
export { AnySpendNFTButton } from "./AnySpendNFTButton";
|
|
7
|
+
export { AnyspendSignatureMint } from "./AnyspendSignatureMint";
|
|
7
8
|
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
8
9
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
9
10
|
|
|
10
11
|
// Common Components
|
|
12
|
+
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
11
13
|
export { OrderDetails } from "./common/OrderDetails";
|
|
12
14
|
export { OrderHistory } from "./common/OrderHistory";
|
|
13
15
|
export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
1
|
import { Dialog, DialogContent, Input, ShinyButton } from "@b3dotfun/sdk/global-account/react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
3
|
|
|
4
4
|
export function EnterRecipientModal({
|
|
5
5
|
isOpenPasteRecipientAddress,
|
|
6
6
|
setIsOpenPasteRecipientAddress,
|
|
7
7
|
recipientAddress,
|
|
8
|
-
setRecipientAddress
|
|
8
|
+
setRecipientAddress,
|
|
9
9
|
}: {
|
|
10
10
|
isOpenPasteRecipientAddress: boolean;
|
|
11
11
|
setIsOpenPasteRecipientAddress: (isOpen: boolean) => void;
|
|
@@ -15,7 +15,6 @@ export function WebviewOnrampOrderStatus({ order }: WebviewOnrampOrderStatusProp
|
|
|
15
15
|
order.status === OrderStatus.WaitingStripePayment ||
|
|
16
16
|
order.status === OrderStatus.ScanningDepositTransaction ||
|
|
17
17
|
order.status === OrderStatus.SendingTokenFromVault ||
|
|
18
|
-
order.status === OrderStatus.ObtainToken ||
|
|
19
18
|
order.status === OrderStatus.Relay;
|
|
20
19
|
const isExecuted = order.status === OrderStatus.Executed;
|
|
21
20
|
const isFailed = order.status === OrderStatus.Failure;
|
|
@@ -6,10 +6,8 @@ import {
|
|
|
6
6
|
OrderType,
|
|
7
7
|
STRIPE_CONFIG,
|
|
8
8
|
Token,
|
|
9
|
-
useAnyspendCreateOnrampOrder,
|
|
10
|
-
useGeoOnrampOptions,
|
|
11
|
-
useStripeClientSecret
|
|
12
9
|
} from "@b3dotfun/sdk/anyspend";
|
|
10
|
+
import { useAnyspendCreateOnrampOrder, useGeoOnrampOptions, useStripeClientSecret } from "@b3dotfun/sdk/anyspend/react";
|
|
13
11
|
import centerTruncate from "@b3dotfun/sdk/shared/utils/centerTruncate";
|
|
14
12
|
import { Elements, PaymentElement, useElements, useStripe } from "@stripe/react-stripe-js";
|
|
15
13
|
import { loadStripe } from "@stripe/stripe-js";
|
|
@@ -51,7 +49,7 @@ function StripePaymentForm({ order, onPaymentSuccess }: { order: Order; onPaymen
|
|
|
51
49
|
try {
|
|
52
50
|
const { error: submitError } = await stripe.confirmPayment({
|
|
53
51
|
elements,
|
|
54
|
-
redirect: "if_required"
|
|
52
|
+
redirect: "if_required",
|
|
55
53
|
});
|
|
56
54
|
|
|
57
55
|
if (submitError) {
|
|
@@ -74,9 +72,9 @@ function StripePaymentForm({ order, onPaymentSuccess }: { order: Order; onPaymen
|
|
|
74
72
|
defaultValues: {
|
|
75
73
|
billingDetails: {
|
|
76
74
|
name: "",
|
|
77
|
-
email: ""
|
|
78
|
-
}
|
|
79
|
-
}
|
|
75
|
+
email: "",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
80
78
|
};
|
|
81
79
|
|
|
82
80
|
return (
|
|
@@ -117,7 +115,7 @@ export function WebviewOnrampPayment({
|
|
|
117
115
|
anyspendQuote,
|
|
118
116
|
onPaymentSuccess,
|
|
119
117
|
userId,
|
|
120
|
-
partnerId
|
|
118
|
+
partnerId,
|
|
121
119
|
}: WebviewOnrampPaymentProps) {
|
|
122
120
|
const [stableAmountForGeo, setStableAmountForGeo] = useState(srcAmountOnRamp);
|
|
123
121
|
const hasInitialized = useRef(false);
|
|
@@ -135,7 +133,7 @@ export function WebviewOnrampPayment({
|
|
|
135
133
|
const {
|
|
136
134
|
geoData,
|
|
137
135
|
isStripeWeb2Supported,
|
|
138
|
-
isLoading: isLoadingGeoOnramp
|
|
136
|
+
isLoading: isLoadingGeoOnramp,
|
|
139
137
|
} = useGeoOnrampOptions(true, stableAmountForGeo);
|
|
140
138
|
|
|
141
139
|
const { createOrder, isCreatingOrder } = useAnyspendCreateOnrampOrder({
|
|
@@ -146,12 +144,12 @@ export function WebviewOnrampPayment({
|
|
|
146
144
|
onError: error => {
|
|
147
145
|
console.error(error);
|
|
148
146
|
toast.error("Failed to create order: " + error.message);
|
|
149
|
-
}
|
|
147
|
+
},
|
|
150
148
|
});
|
|
151
149
|
|
|
152
150
|
const { clientSecret, isLoadingStripeClientSecret } = useStripeClientSecret(
|
|
153
151
|
true,
|
|
154
|
-
createdOrder?.stripePaymentIntentId || ""
|
|
152
|
+
createdOrder?.stripePaymentIntentId || "",
|
|
155
153
|
);
|
|
156
154
|
|
|
157
155
|
// Create order when component mounts and all required data is available
|
|
@@ -173,7 +171,7 @@ export function WebviewOnrampPayment({
|
|
|
173
171
|
return {
|
|
174
172
|
...destinationToken,
|
|
175
173
|
chainId: destinationToken.chainId,
|
|
176
|
-
address: destinationToken.address
|
|
174
|
+
address: destinationToken.address,
|
|
177
175
|
};
|
|
178
176
|
};
|
|
179
177
|
|
|
@@ -189,10 +187,10 @@ export function WebviewOnrampPayment({
|
|
|
189
187
|
paymentMethod: "",
|
|
190
188
|
country: geoData.country || "US",
|
|
191
189
|
ipAddress: geoData.ip,
|
|
192
|
-
redirectUrl: `${window.location.origin}${userId ? `?userId=${userId}` : ""}
|
|
190
|
+
redirectUrl: `${window.location.origin}${userId ? `?userId=${userId}` : ""}`,
|
|
193
191
|
},
|
|
194
192
|
expectedDstAmount: anyspendQuote.data?.currencyOut?.amount?.toString() || "0",
|
|
195
|
-
partnerId
|
|
193
|
+
partnerId,
|
|
196
194
|
});
|
|
197
195
|
} catch (err: any) {
|
|
198
196
|
console.error(err);
|
|
@@ -211,7 +209,7 @@ export function WebviewOnrampPayment({
|
|
|
211
209
|
createOrder,
|
|
212
210
|
destinationToken,
|
|
213
211
|
userId,
|
|
214
|
-
partnerId
|
|
212
|
+
partnerId,
|
|
215
213
|
]);
|
|
216
214
|
|
|
217
215
|
// Check if all required data is loaded
|
|
@@ -256,7 +254,7 @@ export function WebviewOnrampPayment({
|
|
|
256
254
|
<span className="font-medium">
|
|
257
255
|
{anyspendQuote?.data?.currencyOut?.amount
|
|
258
256
|
? Number(
|
|
259
|
-
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
257
|
+
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals),
|
|
260
258
|
).toFixed(4)
|
|
261
259
|
: "0"}{" "}
|
|
262
260
|
{destinationToken.symbol}
|
|
@@ -297,9 +295,9 @@ export function WebviewOnrampPayment({
|
|
|
297
295
|
variables: {
|
|
298
296
|
colorPrimary: "#2563eb",
|
|
299
297
|
colorBackground: "#ffffff",
|
|
300
|
-
borderRadius: "12px"
|
|
301
|
-
}
|
|
302
|
-
}
|
|
298
|
+
borderRadius: "12px",
|
|
299
|
+
},
|
|
300
|
+
},
|
|
303
301
|
}}
|
|
304
302
|
>
|
|
305
303
|
<StripePaymentForm order={createdOrder} onPaymentSuccess={onPaymentSuccess} />
|
|
@@ -334,7 +332,7 @@ export function WebviewOnrampPayment({
|
|
|
334
332
|
<span className="font-medium">
|
|
335
333
|
{anyspendQuote?.data?.currencyOut?.amount
|
|
336
334
|
? Number(
|
|
337
|
-
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
335
|
+
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals),
|
|
338
336
|
).toFixed(4)
|
|
339
337
|
: "0"}{" "}
|
|
340
338
|
{destinationToken.symbol}
|
|
@@ -3,11 +3,10 @@ export * from "./useAnyspendCreateOrder";
|
|
|
3
3
|
export * from "./useAnyspendOrderAndTransactions";
|
|
4
4
|
export * from "./useAnyspendOrderHistory";
|
|
5
5
|
export * from "./useAnyspendQuote";
|
|
6
|
-
export * from "./useAnyspendSendPermitData";
|
|
7
6
|
export * from "./useAnyspendTokens";
|
|
8
7
|
export * from "./useCoinbaseOnrampOptions";
|
|
9
8
|
export * from "./useGeoOnrampOptions";
|
|
10
9
|
export * from "./useGetGeo";
|
|
11
|
-
export * from "./
|
|
10
|
+
export * from "./useSigMint";
|
|
12
11
|
export * from "./useStripeClientSecret";
|
|
13
12
|
export * from "./useStripeSupport";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { USDC_BASE } from "@b3dotfun/sdk/anyspend/constants";
|
|
2
2
|
import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
3
|
-
import {
|
|
3
|
+
import { OnrampVendor } from "@b3dotfun/sdk/anyspend/types";
|
|
4
4
|
import { buildMetadata, buildPayload, normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
|
|
5
5
|
import { useMutation } from "@tanstack/react-query";
|
|
6
6
|
import { useMemo } from "react";
|
|
7
7
|
import { parseUnits } from "viem";
|
|
8
8
|
import { base } from "viem/chains";
|
|
9
|
+
import { CreateOrderParams } from "./useAnyspendCreateOrder";
|
|
9
10
|
|
|
10
11
|
export type OnrampOptions = {
|
|
11
12
|
vendor: OnrampVendor;
|
|
@@ -15,20 +16,9 @@ export type OnrampOptions = {
|
|
|
15
16
|
ipAddress?: string; // Required for Stripe
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
export type CreateOnrampOrderParams = {
|
|
19
|
-
isMainnet: boolean;
|
|
20
|
-
recipientAddress: string;
|
|
21
|
-
orderType: OrderType;
|
|
22
|
-
dstChain: number;
|
|
23
|
-
dstToken: Token;
|
|
19
|
+
export type CreateOnrampOrderParams = Omit<CreateOrderParams, "srcChain" | "srcToken" | "srcAmount"> & {
|
|
24
20
|
srcFiatAmount: string;
|
|
25
21
|
onramp: OnrampOptions;
|
|
26
|
-
partnerId?: string;
|
|
27
|
-
expectedDstAmount: string;
|
|
28
|
-
creatorAddress?: string;
|
|
29
|
-
nft?: Nft & { price: string };
|
|
30
|
-
tournament?: Tournament & { contractAddress: string; entryPriceOrFundAmount: string };
|
|
31
|
-
payload?: any;
|
|
32
22
|
};
|
|
33
23
|
|
|
34
24
|
export type UseAnyspendCreateOnrampOrderProps = {
|
|
@@ -56,7 +46,7 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
56
46
|
nft,
|
|
57
47
|
tournament,
|
|
58
48
|
payload,
|
|
59
|
-
partnerId
|
|
49
|
+
partnerId,
|
|
60
50
|
} = params;
|
|
61
51
|
|
|
62
52
|
try {
|
|
@@ -92,7 +82,7 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
92
82
|
expectedDstAmount,
|
|
93
83
|
nft,
|
|
94
84
|
tournament,
|
|
95
|
-
payload
|
|
85
|
+
payload,
|
|
96
86
|
}),
|
|
97
87
|
onramp,
|
|
98
88
|
metadata: buildMetadata(orderType, {
|
|
@@ -102,10 +92,10 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
102
92
|
expectedDstAmount,
|
|
103
93
|
nft,
|
|
104
94
|
tournament,
|
|
105
|
-
payload
|
|
95
|
+
payload,
|
|
106
96
|
}),
|
|
107
97
|
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined,
|
|
108
|
-
partnerId
|
|
98
|
+
partnerId,
|
|
109
99
|
});
|
|
110
100
|
} catch (error: any) {
|
|
111
101
|
// If the error has a response with message and statusCode, throw that
|
|
@@ -121,14 +111,14 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
121
111
|
},
|
|
122
112
|
onError: (error: Error) => {
|
|
123
113
|
onError?.(error);
|
|
124
|
-
}
|
|
114
|
+
},
|
|
125
115
|
});
|
|
126
116
|
|
|
127
117
|
return useMemo(
|
|
128
118
|
() => ({
|
|
129
119
|
createOrder,
|
|
130
|
-
isCreatingOrder: isPending
|
|
120
|
+
isCreatingOrder: isPending,
|
|
131
121
|
}),
|
|
132
|
-
[createOrder, isPending]
|
|
122
|
+
[createOrder, isPending],
|
|
133
123
|
);
|
|
134
124
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
2
2
|
import { Nft, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend/types";
|
|
3
|
-
import {
|
|
3
|
+
import { buildMetadata, buildPayload, normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
|
|
4
4
|
import { useMutation } from "@tanstack/react-query";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
|
|
@@ -18,6 +18,7 @@ export type CreateOrderParams = {
|
|
|
18
18
|
tournament?: Tournament & { contractAddress: string; entryPriceOrFundAmount: string };
|
|
19
19
|
creatorAddress?: string;
|
|
20
20
|
payload?: any;
|
|
21
|
+
partnerId?: string;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export type UseAnyspendCreateOrderProps = {
|
|
@@ -42,7 +43,7 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
42
43
|
srcToken,
|
|
43
44
|
dstToken,
|
|
44
45
|
srcAmount,
|
|
45
|
-
creatorAddress
|
|
46
|
+
creatorAddress,
|
|
46
47
|
} = params;
|
|
47
48
|
|
|
48
49
|
try {
|
|
@@ -62,7 +63,7 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
62
63
|
expectedDstAmount: params.expectedDstAmount,
|
|
63
64
|
nft: params.nft,
|
|
64
65
|
tournament: params.tournament,
|
|
65
|
-
payload: params.payload
|
|
66
|
+
payload: params.payload,
|
|
66
67
|
}),
|
|
67
68
|
metadata: buildMetadata(orderType, {
|
|
68
69
|
orderType,
|
|
@@ -71,9 +72,9 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
71
72
|
expectedDstAmount: params.expectedDstAmount,
|
|
72
73
|
nft: params.nft,
|
|
73
74
|
tournament: params.tournament,
|
|
74
|
-
payload: params.payload
|
|
75
|
+
payload: params.payload,
|
|
75
76
|
}),
|
|
76
|
-
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined
|
|
77
|
+
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined,
|
|
77
78
|
});
|
|
78
79
|
} catch (error: any) {
|
|
79
80
|
// If the error has a response with message and statusCode, throw that
|
|
@@ -89,14 +90,14 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
89
90
|
},
|
|
90
91
|
onError: (error: Error) => {
|
|
91
92
|
onError?.(error);
|
|
92
|
-
}
|
|
93
|
+
},
|
|
93
94
|
});
|
|
94
95
|
|
|
95
96
|
return useMemo(
|
|
96
97
|
() => ({
|
|
97
98
|
createOrder,
|
|
98
|
-
isCreatingOrder: isPending
|
|
99
|
+
isCreatingOrder: isPending,
|
|
99
100
|
}),
|
|
100
|
-
[createOrder, isPending]
|
|
101
|
+
[createOrder, isPending],
|
|
101
102
|
);
|
|
102
103
|
}
|
|
@@ -21,7 +21,7 @@ export function useAnyspendOrderAndTransactions(isMainnet: boolean, orderId: str
|
|
|
21
21
|
structuralSharing: (oldData, newData) => {
|
|
22
22
|
if (isEqual(oldData, newData)) return oldData;
|
|
23
23
|
return newData;
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
return useMemo(
|
|
@@ -29,8 +29,8 @@ export function useAnyspendOrderAndTransactions(isMainnet: boolean, orderId: str
|
|
|
29
29
|
orderAndTransactions: data,
|
|
30
30
|
isLoadingOrderAndTransactions: isLoading,
|
|
31
31
|
getOrderAndTransactionsError: error,
|
|
32
|
-
refetchOrderAndTransactions: refetch
|
|
32
|
+
refetchOrderAndTransactions: refetch,
|
|
33
33
|
}),
|
|
34
|
-
[data, error, isLoading, refetch]
|
|
34
|
+
[data, error, isLoading, refetch],
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -5,25 +5,25 @@ export function useAnyspendOrderHistory(
|
|
|
5
5
|
isMainnet: boolean,
|
|
6
6
|
creatorAddress: string | undefined,
|
|
7
7
|
limit: number = 100,
|
|
8
|
-
offset: number = 0
|
|
8
|
+
offset: number = 0,
|
|
9
9
|
) {
|
|
10
10
|
const {
|
|
11
11
|
data: rawData = [],
|
|
12
12
|
isLoading,
|
|
13
13
|
refetch,
|
|
14
|
-
error
|
|
14
|
+
error,
|
|
15
15
|
} = useQuery({
|
|
16
16
|
queryKey: ["getOrderHistory", creatorAddress, limit, offset],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
const response = await anyspendService.getOrderHistory(isMainnet, creatorAddress, limit, offset);
|
|
19
19
|
return response.data;
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
return {
|
|
24
24
|
orderHistory: rawData,
|
|
25
25
|
isLoadingOrderHistory: isLoading,
|
|
26
26
|
getOrderHistoryError: error,
|
|
27
|
-
refetchOrderHistory: refetch
|
|
27
|
+
refetchOrderHistory: refetch,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -21,7 +21,7 @@ import { useMemo } from "react";
|
|
|
21
21
|
*/
|
|
22
22
|
export function useAnyspendQuote(isMainnet: boolean, req: GetQuoteRequest) {
|
|
23
23
|
const { data, isLoading, refetch, error } = useQuery({
|
|
24
|
-
queryKey: ["useAnyspendQuote", isMainnet, req],
|
|
24
|
+
queryKey: ["useAnyspendQuote", isMainnet, JSON.stringify(req)],
|
|
25
25
|
queryFn: () => {
|
|
26
26
|
return anyspendService.getQuote(isMainnet, req);
|
|
27
27
|
},
|
|
@@ -39,11 +39,11 @@ export function useAnyspendQuote(isMainnet: boolean, req: GetQuoteRequest) {
|
|
|
39
39
|
? req.price
|
|
40
40
|
: req.type === OrderType.FundTournament
|
|
41
41
|
? req.fundAmount
|
|
42
|
-
: req.payload.amount
|
|
43
|
-
) !== BigInt(0)
|
|
42
|
+
: req.payload.amount,
|
|
43
|
+
) !== BigInt(0),
|
|
44
44
|
),
|
|
45
45
|
refetchInterval: 10000,
|
|
46
|
-
retry: false
|
|
46
|
+
retry: false,
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
return useMemo(
|
|
@@ -51,8 +51,8 @@ export function useAnyspendQuote(isMainnet: boolean, req: GetQuoteRequest) {
|
|
|
51
51
|
anyspendQuote: data,
|
|
52
52
|
isLoadingAnyspendQuote: isLoading,
|
|
53
53
|
getAnyspendQuoteError: error,
|
|
54
|
-
refetchAnyspendQuote: refetch
|
|
54
|
+
refetchAnyspendQuote: refetch,
|
|
55
55
|
}),
|
|
56
|
-
[data, error, isLoading, refetch]
|
|
56
|
+
[data, error, isLoading, refetch],
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -6,19 +6,19 @@ export function useAnyspendTokenList(isMainnet: boolean, chainId: number, query:
|
|
|
6
6
|
const {
|
|
7
7
|
data = [],
|
|
8
8
|
isLoading,
|
|
9
|
-
refetch
|
|
9
|
+
refetch,
|
|
10
10
|
} = useQuery({
|
|
11
11
|
queryKey: ["getAnyspendTokenList", chainId, query],
|
|
12
12
|
queryFn: () => anyspendService.getTokenList(isMainnet, chainId, query),
|
|
13
|
-
enabled: true
|
|
13
|
+
enabled: true,
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
return useMemo(
|
|
17
17
|
() => ({
|
|
18
18
|
data,
|
|
19
19
|
isLoading,
|
|
20
|
-
refetch
|
|
20
|
+
refetch,
|
|
21
21
|
}),
|
|
22
|
-
[data, isLoading, refetch]
|
|
22
|
+
[data, isLoading, refetch],
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -6,7 +6,7 @@ export function useCoinbaseOnrampOptions(isMainnet: boolean, country?: string) {
|
|
|
6
6
|
const { data, isLoading, error, refetch } = useQuery({
|
|
7
7
|
queryKey: ["getCoinbaseOnrampOptions", isMainnet, country],
|
|
8
8
|
queryFn: () => anyspendService.getCoinbaseOnrampOptions(isMainnet, country!),
|
|
9
|
-
enabled: Boolean(country)
|
|
9
|
+
enabled: Boolean(country),
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
return useMemo(
|
|
@@ -14,8 +14,8 @@ export function useCoinbaseOnrampOptions(isMainnet: boolean, country?: string) {
|
|
|
14
14
|
coinbaseOnrampOptions: data,
|
|
15
15
|
isLoadingCoinbaseOnrampOptions: isLoading,
|
|
16
16
|
coinbaseOnrampOptionsError: error,
|
|
17
|
-
refetchCoinbaseOnrampOptions: refetch
|
|
17
|
+
refetchCoinbaseOnrampOptions: refetch,
|
|
18
18
|
}),
|
|
19
|
-
[data, isLoading, error, refetch]
|
|
19
|
+
[data, isLoading, error, refetch],
|
|
20
20
|
);
|
|
21
21
|
}
|
|
@@ -39,7 +39,7 @@ export function useGeoOnrampOptions(isMainnet: boolean, srcFiatAmount: string) {
|
|
|
39
39
|
isLoadingStripeSupport,
|
|
40
40
|
geoError,
|
|
41
41
|
coinbaseOnrampOptionsError,
|
|
42
|
-
stripeSupportError
|
|
42
|
+
stripeSupportError,
|
|
43
43
|
}),
|
|
44
44
|
[
|
|
45
45
|
geoData,
|
|
@@ -52,7 +52,7 @@ export function useGeoOnrampOptions(isMainnet: boolean, srcFiatAmount: string) {
|
|
|
52
52
|
isLoadingStripeSupport,
|
|
53
53
|
geoError,
|
|
54
54
|
coinbaseOnrampOptionsError,
|
|
55
|
-
stripeSupportError
|
|
56
|
-
]
|
|
55
|
+
stripeSupportError,
|
|
56
|
+
],
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useQueryB3 } from "@b3dotfun/sdk/global-account/react/hooks/useQueryB3";
|
|
2
|
+
import { FindByAddressParams, GenerateSigMintParams, IsMintEligibleParams } from "../../types/signature-mint";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Hook to generate signature for minting
|
|
6
|
+
*/
|
|
7
|
+
export const useGenerateSigMintData = ({
|
|
8
|
+
recipientAddress,
|
|
9
|
+
contractAddress,
|
|
10
|
+
chainId,
|
|
11
|
+
quantity,
|
|
12
|
+
prompt,
|
|
13
|
+
}: GenerateSigMintParams) => {
|
|
14
|
+
return useQueryB3<"signature-minting-collections", "generateSignature">(
|
|
15
|
+
"signature-minting-collections",
|
|
16
|
+
"generateSignature",
|
|
17
|
+
{
|
|
18
|
+
recipientAddress,
|
|
19
|
+
contractAddress,
|
|
20
|
+
chainId,
|
|
21
|
+
quantity,
|
|
22
|
+
prompt,
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Hook to fetch a signature minting collection by address
|
|
29
|
+
*/
|
|
30
|
+
export const useSigMintCollection = ({ address, chainId }: FindByAddressParams) => {
|
|
31
|
+
return useQueryB3<"signature-minting-collections", "findByAddress">(
|
|
32
|
+
"signature-minting-collections",
|
|
33
|
+
"findByAddress",
|
|
34
|
+
{
|
|
35
|
+
address,
|
|
36
|
+
chainId,
|
|
37
|
+
},
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Hook to check if an address is eligible for minting
|
|
43
|
+
*/
|
|
44
|
+
export const useIsMintEligible = ({ contractAddress, chainId, recipientAddress, quantity }: IsMintEligibleParams) => {
|
|
45
|
+
return useQueryB3<"signature-minting-collections", "isMintEligible">(
|
|
46
|
+
"signature-minting-collections",
|
|
47
|
+
"isMintEligible",
|
|
48
|
+
{
|
|
49
|
+
contractAddress,
|
|
50
|
+
chainId,
|
|
51
|
+
recipientAddress,
|
|
52
|
+
quantity,
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
};
|