@b3dotfun/sdk 0.0.7-alpha.19 → 0.0.7-alpha.2
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/constants/index.js +10 -13
- package/dist/cjs/anyspend/index.d.ts +0 -1
- package/dist/cjs/anyspend/index.js +0 -1
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +20 -20
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +66 -68
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +90 -133
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +5 -7
- 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 +20 -21
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -7
- 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 +23 -52
- 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 +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +7 -7
- 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 +12 -12
- 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/index.d.ts +0 -1
- package/dist/cjs/anyspend/react/components/index.js +1 -3
- 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/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +14 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.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/usePermitData.js +19 -19
- 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 +3 -3
- package/dist/cjs/anyspend/services/anyspend.d.ts +2 -9
- package/dist/cjs/anyspend/services/anyspend.js +14 -14
- 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 +0 -1
- package/dist/cjs/anyspend/types/index.js +0 -1
- package/dist/cjs/anyspend/types/nft.d.ts +0 -7
- package/dist/cjs/anyspend/types/nft.js +6 -8
- package/dist/cjs/anyspend/types/onramp.d.ts +0 -3
- package/dist/cjs/anyspend/types/onramp.js +1 -2
- package/dist/cjs/anyspend/types/order.d.ts +0 -40
- package/dist/cjs/anyspend/types/order.js +7 -7
- package/dist/cjs/anyspend/types/permit.js +1 -1
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -98
- 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 +0 -63
- 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 +0 -49
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/cjs/anyspend/types/req-res/getQuote.js +9 -14
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +2 -2
- 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 -2
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +8 -22
- 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 +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +6 -6
- 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/SignInWithB3.d.ts +2 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +17 -12
- 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 +1 -0
- 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/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/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 +4 -8
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +23 -32
- 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 +0 -2
- 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/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 +1 -1
- package/dist/cjs/shared/constants/index.d.ts +0 -1
- package/dist/cjs/shared/constants/index.js +2 -3
- 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/index.d.ts +0 -9
- package/dist/cjs/shared/utils/index.js +0 -17
- 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/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/constants/index.js +10 -13
- package/dist/esm/anyspend/index.d.ts +0 -1
- package/dist/esm/anyspend/index.js +0 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +22 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +39 -41
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +71 -114
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +5 -7
- 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 +21 -22
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -7
- 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 +24 -53
- 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 +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +8 -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 +12 -12
- 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/index.d.ts +0 -1
- package/dist/esm/anyspend/react/components/index.js +0 -1
- 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/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +15 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.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/usePermitData.js +19 -19
- 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 +3 -3
- package/dist/esm/anyspend/services/anyspend.d.ts +2 -9
- package/dist/esm/anyspend/services/anyspend.js +15 -15
- 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 +0 -1
- package/dist/esm/anyspend/types/index.js +0 -1
- package/dist/esm/anyspend/types/nft.d.ts +0 -7
- package/dist/esm/anyspend/types/nft.js +6 -8
- package/dist/esm/anyspend/types/onramp.d.ts +0 -3
- package/dist/esm/anyspend/types/onramp.js +1 -2
- package/dist/esm/anyspend/types/order.d.ts +0 -40
- package/dist/esm/anyspend/types/order.js +7 -7
- package/dist/esm/anyspend/types/permit.js +1 -1
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -98
- 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 +0 -63
- 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 +0 -49
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/esm/anyspend/types/req-res/getQuote.js +9 -14
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +2 -2
- 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 -2
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +9 -23
- 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 +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +6 -6
- 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/SignInWithB3.d.ts +2 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +13 -8
- 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 +1 -0
- 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/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/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 +4 -8
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +22 -34
- 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 +0 -2
- 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/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 +1 -1
- package/dist/esm/shared/constants/index.d.ts +0 -1
- package/dist/esm/shared/constants/index.js +1 -2
- 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/index.d.ts +0 -9
- package/dist/esm/shared/utils/index.js +0 -15
- 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/styles/index.css +1 -1
- package/dist/types/anyspend/index.d.ts +0 -1
- 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 +2 -3
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- 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/index.d.ts +0 -1
- 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/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- package/dist/types/anyspend/services/anyspend.d.ts +2 -9
- package/dist/types/anyspend/types/index.d.ts +0 -1
- package/dist/types/anyspend/types/nft.d.ts +0 -7
- package/dist/types/anyspend/types/onramp.d.ts +0 -3
- package/dist/types/anyspend/types/order.d.ts +0 -40
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -98
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -63
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -49
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -37
- 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/SignInWithB3.d.ts +2 -1
- 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/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 +4 -8
- 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 +0 -2
- package/dist/types/shared/constants/index.d.ts +0 -1
- package/dist/types/shared/utils/index.d.ts +0 -9
- package/package.json +3 -15
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/constants/index.ts +11 -13
- package/src/anyspend/index.ts +0 -1
- package/src/anyspend/react/components/AnySpend.tsx +32 -33
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +41 -46
- package/src/anyspend/react/components/AnySpendCustom.tsx +70 -158
- package/src/anyspend/react/components/AnySpendNFT.tsx +6 -11
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +22 -23
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -7
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +31 -75
- 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 +3 -3
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +8 -8
- 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 +14 -14
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/index.ts +0 -1
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -18
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +20 -10
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +8 -9
- 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 +5 -5
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +3 -3
- 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/usePermitData.ts +19 -19
- 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 +3 -3
- package/src/anyspend/services/anyspend.ts +25 -25
- 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 +0 -1
- package/src/anyspend/types/nft.ts +7 -10
- package/src/anyspend/types/onramp.ts +2 -3
- package/src/anyspend/types/order.ts +9 -9
- package/src/anyspend/types/permit.ts +1 -1
- 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 +9 -14
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/sendPermitData.ts +2 -2
- 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 -2
- package/src/anyspend/utils/orderPayload.ts +9 -21
- 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 +3 -3
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +8 -7
- 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/SignInWithB3.tsx +28 -16
- 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 +1 -0
- 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/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 +1 -1
- 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 +31 -43
- 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 +3 -5
- 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/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +1 -1
- package/src/shared/constants/index.ts +1 -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/index.ts +0 -16
- 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/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +0 -50
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/cjs/global-account/react/components/custom/Icon.js +0 -52
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +0 -20
- package/dist/cjs/shared/react/hooks/index.d.ts +0 -1
- package/dist/cjs/shared/react/hooks/index.js +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.js +0 -57
- package/dist/cjs/shared/react/index.d.ts +0 -1
- package/dist/cjs/shared/react/index.js +0 -17
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +0 -44
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/esm/global-account/react/components/custom/Icon.js +0 -50
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +0 -17
- package/dist/esm/shared/react/hooks/index.d.ts +0 -1
- package/dist/esm/shared/react/hooks/index.js +0 -1
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/esm/shared/react/hooks/useNavigation.js +0 -52
- package/dist/esm/shared/react/index.d.ts +0 -1
- package/dist/esm/shared/react/index.js +0 -1
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/types/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/types/shared/react/hooks/index.d.ts +0 -1
- package/dist/types/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/types/shared/react/index.d.ts +0 -1
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +0 -190
- package/src/global-account/react/components/custom/Icon.tsx +0 -102
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +0 -33
- package/src/shared/react/hooks/index.ts +0 -1
- package/src/shared/react/hooks/useNavigation.ts +0 -61
- package/src/shared/react/index.ts +0 -1
|
@@ -5,10 +5,10 @@ import { viemToThirdwebChain } from "../../../shared/constants/chains/b3Chain.js
|
|
|
5
5
|
import { getChainById } from "../../../shared/utils/chains.js";
|
|
6
6
|
import { client } from "../../../shared/utils/thirdweb.js";
|
|
7
7
|
import { getWalletBalance } from "thirdweb/wallets";
|
|
8
|
-
export function useTokenBalancesByChain({ address, chainsIds, enabled = true
|
|
8
|
+
export function useTokenBalancesByChain({ address, chainsIds, enabled = true }) {
|
|
9
9
|
// Normalize chains to array
|
|
10
10
|
const chainIds = Array.isArray(chainsIds) ? chainsIds : [chainsIds];
|
|
11
|
-
const { data: combinedData, isLoading, error
|
|
11
|
+
const { data: combinedData, isLoading, error } = useQuery({
|
|
12
12
|
queryKey: ["tokenBalancesByChain", address, chainIds.join(",")],
|
|
13
13
|
queryFn: async () => {
|
|
14
14
|
try {
|
|
@@ -19,20 +19,20 @@ export function useTokenBalancesByChain({ address, chainsIds, enabled = true, })
|
|
|
19
19
|
const walletBalance = await getWalletBalance({
|
|
20
20
|
address,
|
|
21
21
|
client,
|
|
22
|
-
chain: viemToThirdwebChain(getChainById(chainId))
|
|
22
|
+
chain: viemToThirdwebChain(getChainById(chainId))
|
|
23
23
|
});
|
|
24
24
|
return {
|
|
25
25
|
chainId,
|
|
26
|
-
...walletBalance
|
|
26
|
+
...walletBalance
|
|
27
27
|
};
|
|
28
28
|
})),
|
|
29
29
|
getERC20Balances(address, {
|
|
30
|
-
chainIds
|
|
31
|
-
})
|
|
30
|
+
chainIds
|
|
31
|
+
})
|
|
32
32
|
]);
|
|
33
33
|
return {
|
|
34
34
|
nativeTokens,
|
|
35
|
-
fungibleTokens: fungibleResponse.data
|
|
35
|
+
fungibleTokens: fungibleResponse.data
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
catch (err) {
|
|
@@ -44,12 +44,12 @@ export function useTokenBalancesByChain({ address, chainsIds, enabled = true, })
|
|
|
44
44
|
staleTime: 30000, // Consider data fresh for 30 seconds
|
|
45
45
|
gcTime: 5 * 60 * 1000, // Keep in cache for 5 minutes
|
|
46
46
|
retry: 2, // Limit retries on failure
|
|
47
|
-
structuralSharing: false
|
|
47
|
+
structuralSharing: false
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
50
|
nativeTokens: combinedData?.nativeTokens ?? [],
|
|
51
51
|
fungibleTokens: combinedData?.fungibleTokens ?? [],
|
|
52
52
|
isLoading,
|
|
53
|
-
error: error
|
|
53
|
+
error: error
|
|
54
54
|
};
|
|
55
55
|
}
|
|
@@ -14,9 +14,9 @@ export function useTokenData(chainId, address) {
|
|
|
14
14
|
method: "POST",
|
|
15
15
|
headers: {
|
|
16
16
|
"X-Service-Method": "findByAddress",
|
|
17
|
-
"Content-Type": "application/json"
|
|
17
|
+
"Content-Type": "application/json"
|
|
18
18
|
},
|
|
19
|
-
body: JSON.stringify({ chainId, address: normalizedAddress })
|
|
19
|
+
body: JSON.stringify({ chainId, address: normalizedAddress })
|
|
20
20
|
});
|
|
21
21
|
if (response.ok) {
|
|
22
22
|
const data = await response.json();
|
|
@@ -39,6 +39,6 @@ export function useTokenData(chainId, address) {
|
|
|
39
39
|
enabled: Boolean(chainId) && Boolean(address) && address?.trim() !== "",
|
|
40
40
|
refetchOnWindowFocus: false,
|
|
41
41
|
refetchOnMount: false,
|
|
42
|
-
refetchOnReconnect: false
|
|
42
|
+
refetchOnReconnect: false
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getCoingeckoChainInfo } from "../../../shared/constants/chains/supported.js";
|
|
3
|
-
import { useSearchParams } from "../../../shared/react/hooks/index.js";
|
|
4
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
+
import { useSearchParams } from "next/navigation";
|
|
5
5
|
async function fetchTokenInfo(network, address) {
|
|
6
6
|
const response = await fetch("https://api.b3.fun/tokens", {
|
|
7
7
|
method: "POST",
|
|
8
8
|
headers: {
|
|
9
9
|
"Content-Type": "application/json",
|
|
10
|
-
"X-Service-Method": "getCoinGeckoTokenInfo"
|
|
10
|
+
"X-Service-Method": "getCoinGeckoTokenInfo"
|
|
11
11
|
},
|
|
12
12
|
body: JSON.stringify({
|
|
13
13
|
network,
|
|
14
|
-
address
|
|
15
|
-
})
|
|
14
|
+
address
|
|
15
|
+
})
|
|
16
16
|
});
|
|
17
17
|
if (!response.ok) {
|
|
18
18
|
throw new Error("Failed to fetch token info");
|
|
@@ -26,8 +26,8 @@ async function fetchTokenInfo(network, address) {
|
|
|
26
26
|
export function useTokenFromUrl({ defaultToken, prefix }) {
|
|
27
27
|
const searchParams = useSearchParams();
|
|
28
28
|
// Get parameters from URL
|
|
29
|
-
const currencyParam = searchParams
|
|
30
|
-
const chainIdParam = searchParams
|
|
29
|
+
const currencyParam = searchParams?.get(`${prefix}Currency`);
|
|
30
|
+
const chainIdParam = searchParams?.get(`${prefix}ChainId`);
|
|
31
31
|
// Determine if we should fetch token info
|
|
32
32
|
const shouldFetchToken = Boolean(currencyParam && chainIdParam && currencyParam.toLowerCase() !== defaultToken.address.toLowerCase());
|
|
33
33
|
// Determine network based on chainId
|
|
@@ -37,7 +37,7 @@ export function useTokenFromUrl({ defaultToken, prefix }) {
|
|
|
37
37
|
queryFn: () => fetchTokenInfo(network, currencyParam),
|
|
38
38
|
enabled: shouldFetchToken,
|
|
39
39
|
staleTime: Infinity,
|
|
40
|
-
gcTime: Infinity
|
|
40
|
+
gcTime: Infinity
|
|
41
41
|
});
|
|
42
42
|
// Return default token if no params or same as default
|
|
43
43
|
if (!shouldFetchToken) {
|
|
@@ -48,7 +48,7 @@ export function useTokenFromUrl({ defaultToken, prefix }) {
|
|
|
48
48
|
return {
|
|
49
49
|
...defaultToken,
|
|
50
50
|
address: currencyParam,
|
|
51
|
-
chainId: Number(chainIdParam)
|
|
51
|
+
chainId: Number(chainIdParam)
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
// Return enhanced token with API data
|
|
@@ -59,8 +59,8 @@ export function useTokenFromUrl({ defaultToken, prefix }) {
|
|
|
59
59
|
symbol: tokenInfo.data.attributes.symbol,
|
|
60
60
|
decimals: tokenInfo.data.attributes.decimals,
|
|
61
61
|
metadata: {
|
|
62
|
-
logoURI: tokenInfo.data.attributes.image_url
|
|
63
|
-
}
|
|
62
|
+
logoURI: tokenInfo.data.attributes.image_url
|
|
63
|
+
}
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
export function useTokenFromAddress({ address, chainId }) {
|
|
@@ -69,7 +69,7 @@ export function useTokenFromAddress({ address, chainId }) {
|
|
|
69
69
|
queryFn: () => fetchTokenInfo(getCoingeckoChainInfo(chainId).coingecko_id, address),
|
|
70
70
|
enabled: Boolean(address),
|
|
71
71
|
staleTime: Infinity,
|
|
72
|
-
gcTime: Infinity
|
|
72
|
+
gcTime: Infinity
|
|
73
73
|
});
|
|
74
74
|
if (isError || !tokenInfo) {
|
|
75
75
|
return undefined;
|
|
@@ -81,7 +81,7 @@ export function useTokenFromAddress({ address, chainId }) {
|
|
|
81
81
|
symbol: tokenInfo?.data.attributes.symbol || "",
|
|
82
82
|
decimals: tokenInfo?.data.attributes.decimals || 18,
|
|
83
83
|
metadata: {
|
|
84
|
-
logoURI: tokenInfo?.data.attributes.image_url
|
|
85
|
-
}
|
|
84
|
+
logoURI: tokenInfo?.data.attributes.image_url
|
|
85
|
+
}
|
|
86
86
|
};
|
|
87
87
|
}
|
|
@@ -8,7 +8,7 @@ interface UseTokenPriceProps {
|
|
|
8
8
|
queryOptions?: Omit<UseQueryOptions<number, Error>, "queryKey" | "queryFn" | "refetchInterval" | "staleTime" | "retry" | "retryDelay">;
|
|
9
9
|
}
|
|
10
10
|
export declare function useTokenPrice({ contractAddress, chainId, // Default to Base
|
|
11
|
-
vsCurrency, refreshInterval, queryOptions
|
|
11
|
+
vsCurrency, refreshInterval, queryOptions }: UseTokenPriceProps): {
|
|
12
12
|
price: number;
|
|
13
13
|
isLoading: boolean;
|
|
14
14
|
error: Error | null;
|
|
@@ -6,8 +6,8 @@ async function fetchTokenPrice(contractAddress, chainId, vsCurrency = "usd") {
|
|
|
6
6
|
const response = await fetch(`https://pro-api.coingecko.com/api/v3/simple/token_price/${platformId}?contract_addresses=${contractAddress}&vs_currencies=${vsCurrency}`, {
|
|
7
7
|
headers: {
|
|
8
8
|
accept: "application/json",
|
|
9
|
-
"x-cg-pro-api-key": process.env.COINGECKO_API_KEY
|
|
10
|
-
}
|
|
9
|
+
"x-cg-pro-api-key": process.env.COINGECKO_API_KEY
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
12
|
if (!response.ok) {
|
|
13
13
|
throw new Error(`Failed to fetch token price: ${response.status} ${response.statusText}`);
|
|
@@ -25,21 +25,21 @@ async function fetchTokenPrice(contractAddress, chainId, vsCurrency = "usd") {
|
|
|
25
25
|
return data[contractAddress][vsCurrency];
|
|
26
26
|
}
|
|
27
27
|
export function useTokenPrice({ contractAddress, chainId = 8453, // Default to Base
|
|
28
|
-
vsCurrency = "usd", refreshInterval = 30000, queryOptions = {}
|
|
29
|
-
const { data: price = 0, isLoading, error, refetch
|
|
28
|
+
vsCurrency = "usd", refreshInterval = 30000, queryOptions = {} }) {
|
|
29
|
+
const { data: price = 0, isLoading, error, refetch } = useQuery({
|
|
30
30
|
queryKey: ["tokenPrice", contractAddress, chainId, vsCurrency],
|
|
31
31
|
queryFn: () => fetchTokenPrice(contractAddress, chainId, vsCurrency),
|
|
32
32
|
refetchInterval: refreshInterval,
|
|
33
33
|
staleTime: refreshInterval / 2, // Consider data stale after half the refresh interval
|
|
34
34
|
retry: 3,
|
|
35
35
|
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
36
|
-
...queryOptions
|
|
36
|
+
...queryOptions
|
|
37
37
|
});
|
|
38
38
|
return {
|
|
39
39
|
price,
|
|
40
40
|
isLoading,
|
|
41
41
|
error,
|
|
42
|
-
refetch
|
|
42
|
+
refetch
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
export default useTokenPrice;
|
|
@@ -7,7 +7,7 @@ interface UseTokenPriceWithFallbackProps {
|
|
|
7
7
|
refreshInterval?: number;
|
|
8
8
|
}
|
|
9
9
|
export declare function useTokenPriceWithFallback({ contractAddress, symbol, chainId, // Default to Base
|
|
10
|
-
vsCurrency, refreshInterval
|
|
10
|
+
vsCurrency, refreshInterval }: UseTokenPriceWithFallbackProps): {
|
|
11
11
|
price: number;
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
error: false | Error | null;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
import { useExchangeRate } from "./useExchangeRate.js";
|
|
3
3
|
import { useTokenPrice } from "./useTokenPrice.js";
|
|
4
4
|
export function useTokenPriceWithFallback({ contractAddress, symbol, chainId = 8453, // Default to Base
|
|
5
|
-
vsCurrency = "usd", refreshInterval = 30000
|
|
5
|
+
vsCurrency = "usd", refreshInterval = 30000 }) {
|
|
6
6
|
// Try to get the exchange rate using the symbol if provided
|
|
7
|
-
const { rate: exchangeRate, isLoading: isExchangeRateLoading, error: exchangeRateError
|
|
7
|
+
const { rate: exchangeRate, isLoading: isExchangeRateLoading, error: exchangeRateError } = useExchangeRate({
|
|
8
8
|
baseCurrency: symbol || "",
|
|
9
9
|
quoteCurrency: vsCurrency,
|
|
10
|
-
refreshInterval
|
|
10
|
+
refreshInterval
|
|
11
11
|
});
|
|
12
12
|
// Only call useTokenPrice if exchange rate is not available
|
|
13
|
-
const { price: tokenPrice, isLoading: isTokenPriceLoading, error: tokenPriceError
|
|
13
|
+
const { price: tokenPrice, isLoading: isTokenPriceLoading, error: tokenPriceError } = useTokenPrice({
|
|
14
14
|
contractAddress,
|
|
15
15
|
chainId,
|
|
16
16
|
vsCurrency,
|
|
17
17
|
refreshInterval,
|
|
18
18
|
queryOptions: {
|
|
19
|
-
enabled: !isExchangeRateLoading && !exchangeRate && !exchangeRateError
|
|
20
|
-
}
|
|
19
|
+
enabled: !isExchangeRateLoading && !exchangeRate && !exchangeRateError
|
|
20
|
+
}
|
|
21
21
|
});
|
|
22
22
|
// Determine which price to use
|
|
23
23
|
const price = exchangeRate || tokenPrice;
|
|
@@ -26,6 +26,6 @@ vsCurrency = "usd", refreshInterval = 30000, }) {
|
|
|
26
26
|
return {
|
|
27
27
|
price,
|
|
28
28
|
isLoading,
|
|
29
|
-
error
|
|
29
|
+
error
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -50,5 +50,5 @@ interface UseTokensFromAddressProps {
|
|
|
50
50
|
page?: number;
|
|
51
51
|
metadata?: boolean;
|
|
52
52
|
}
|
|
53
|
-
export declare function useTokensFromAddress({ ownerAddress, chain, limit, page, metadata
|
|
53
|
+
export declare function useTokensFromAddress({ ownerAddress, chain, limit, page, metadata }: UseTokensFromAddressProps): import("@tanstack/react-query").UseQueryResult<TokensResponse, Error>;
|
|
54
54
|
export {};
|
|
@@ -2,7 +2,7 @@ import { THIRDWEB_CLIENT_ID } from "../../../shared/constants/index.js";
|
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import createDebug from "debug";
|
|
4
4
|
const debug = createDebug("@@b3:useTokensFromAddress");
|
|
5
|
-
export function useTokensFromAddress({ ownerAddress, chain, limit = 50, page = 0, metadata = true
|
|
5
|
+
export function useTokensFromAddress({ ownerAddress, chain, limit = 50, page = 0, metadata = true }) {
|
|
6
6
|
return useQuery({
|
|
7
7
|
queryKey: ["useTokensFromAddress", ownerAddress, chain, limit, page, metadata],
|
|
8
8
|
queryFn: async () => {
|
|
@@ -40,6 +40,6 @@ export function useTokensFromAddress({ ownerAddress, chain, limit = 50, page = 0
|
|
|
40
40
|
const data = await response.json();
|
|
41
41
|
return data;
|
|
42
42
|
},
|
|
43
|
-
enabled: Boolean(ownerAddress)
|
|
43
|
+
enabled: Boolean(ownerAddress)
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useAuthStore } from "./useAuthStore";
|
|
2
2
|
export { useModalStore } from "./useModalStore";
|
|
3
|
-
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnyspendOrderDetailsProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props, ManageAccountModalProps, ModalContentType, RequestPermissionsModalProps, SignInWithB3ModalProps, TransakProps
|
|
3
|
+
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnyspendOrderDetailsProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props, ManageAccountModalProps, ModalContentType, RequestPermissionsModalProps, SignInWithB3ModalProps, TransakProps } from "./useModalStore";
|
|
@@ -20,7 +20,7 @@ export const useAuthStore = create(set => ({
|
|
|
20
20
|
accessToken: params.accessToken,
|
|
21
21
|
chain: params.chain,
|
|
22
22
|
onSuccess: params.onSuccess,
|
|
23
|
-
onError: params.onError
|
|
23
|
+
onError: params.onError
|
|
24
24
|
}),
|
|
25
25
|
reset: () => set({
|
|
26
26
|
isOpen: false,
|
|
@@ -31,6 +31,6 @@ export const useAuthStore = create(set => ({
|
|
|
31
31
|
isAuthenticating: false,
|
|
32
32
|
isAuthenticated: false,
|
|
33
33
|
onSuccess: undefined,
|
|
34
|
-
onError: undefined
|
|
35
|
-
})
|
|
34
|
+
onError: undefined
|
|
35
|
+
})
|
|
36
36
|
}));
|
|
@@ -124,8 +124,6 @@ export interface AnySpendNftProps extends BaseModalProps {
|
|
|
124
124
|
nftContract: NftContract;
|
|
125
125
|
/** Recipient address to receive the NFT */
|
|
126
126
|
recipientAddress?: string;
|
|
127
|
-
/** Callback function called when the NFT is successfully transferred */
|
|
128
|
-
onSuccess?: (txHash?: string) => void;
|
|
129
127
|
}
|
|
130
128
|
/**
|
|
131
129
|
* Props for the AnySpend tournament modal
|
|
@@ -13,7 +13,7 @@ export const useModalStore = create(set => ({
|
|
|
13
13
|
const newHistory = state.contentType ? [...state.history, state.contentType] : state.history;
|
|
14
14
|
return {
|
|
15
15
|
contentType: content,
|
|
16
|
-
history: newHistory
|
|
16
|
+
history: newHistory
|
|
17
17
|
};
|
|
18
18
|
}),
|
|
19
19
|
navigateBack: () => set(state => {
|
|
@@ -24,10 +24,10 @@ export const useModalStore = create(set => ({
|
|
|
24
24
|
const previousModal = newHistory.pop();
|
|
25
25
|
return {
|
|
26
26
|
contentType: previousModal || null,
|
|
27
|
-
history: newHistory
|
|
27
|
+
history: newHistory
|
|
28
28
|
};
|
|
29
29
|
}),
|
|
30
30
|
clearHistory: () => set({ history: [] }),
|
|
31
31
|
ecoSystemAccountAddress: undefined,
|
|
32
|
-
setEcoSystemAccountAddress: (address) => set({ ecoSystemAccountAddress: address })
|
|
32
|
+
setEcoSystemAccountAddress: (address) => set({ ecoSystemAccountAddress: address })
|
|
33
33
|
}));
|
|
@@ -11,12 +11,12 @@ export const authenticateWithRest = async (token) => {
|
|
|
11
11
|
method: "POST",
|
|
12
12
|
headers: {
|
|
13
13
|
"Content-Type": "application/json",
|
|
14
|
-
Authorization: `Bearer ${token}
|
|
14
|
+
Authorization: `Bearer ${token}`
|
|
15
15
|
},
|
|
16
16
|
body: JSON.stringify({
|
|
17
17
|
strategy: "jwt",
|
|
18
|
-
accessToken: token
|
|
19
|
-
})
|
|
18
|
+
accessToken: token
|
|
19
|
+
})
|
|
20
20
|
});
|
|
21
21
|
return response;
|
|
22
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObjectIdSchema, Type } from "@feathersjs/typebox";
|
|
2
2
|
const ChainContractSchema = Type.Object({
|
|
3
3
|
address: Type.String(),
|
|
4
|
-
blockCreated: Type.Optional(Type.Integer())
|
|
4
|
+
blockCreated: Type.Optional(Type.Integer())
|
|
5
5
|
});
|
|
6
6
|
export const chainNetworksSchema = Type.Object({
|
|
7
7
|
_id: ObjectIdSchema(),
|
|
@@ -10,27 +10,27 @@ export const chainNetworksSchema = Type.Object({
|
|
|
10
10
|
rpcUrls: Type.Object({
|
|
11
11
|
default: Type.Object({
|
|
12
12
|
http: Type.String({ format: "uri" }),
|
|
13
|
-
ws: Type.String({ format: "uri" })
|
|
13
|
+
ws: Type.String({ format: "uri" })
|
|
14
14
|
}),
|
|
15
15
|
backups: Type.Array(Type.Object({
|
|
16
16
|
type: Type.Union([Type.Literal("http"), Type.Literal("ws")]),
|
|
17
|
-
uri: Type.String()
|
|
18
|
-
}))
|
|
17
|
+
uri: Type.String()
|
|
18
|
+
}))
|
|
19
19
|
}),
|
|
20
20
|
icon: Type.Object({
|
|
21
21
|
url: Type.String({ format: "uri" }),
|
|
22
22
|
width: Type.Integer(),
|
|
23
23
|
height: Type.Integer(),
|
|
24
|
-
format: Type.String()
|
|
24
|
+
format: Type.String()
|
|
25
25
|
}),
|
|
26
26
|
blockExplorers: Type.Object({
|
|
27
27
|
explorerTitle: Type.String(),
|
|
28
|
-
default: Type.String({ format: "uri" })
|
|
28
|
+
default: Type.String({ format: "uri" })
|
|
29
29
|
}),
|
|
30
30
|
nativeCurrency: Type.Object({
|
|
31
31
|
name: Type.String(),
|
|
32
32
|
symbol: Type.String(),
|
|
33
|
-
decimals: Type.Integer()
|
|
33
|
+
decimals: Type.Integer()
|
|
34
34
|
}),
|
|
35
35
|
testnet: Type.Optional(Type.Boolean()),
|
|
36
36
|
testnetConfigID: Type.Optional(Type.Integer()),
|
|
@@ -41,5 +41,5 @@ export const chainNetworksSchema = Type.Object({
|
|
|
41
41
|
fees: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
42
42
|
badge: Type.Optional(Type.String({ format: "uri" })),
|
|
43
43
|
color: Type.Optional(Type.String()),
|
|
44
|
-
enabledFeatures: Type.Optional(Type.Array(Type.String()))
|
|
44
|
+
enabledFeatures: Type.Optional(Type.Array(Type.String()))
|
|
45
45
|
}, { $id: "ChainNetworks", additionalProperties: false });
|
|
@@ -13,11 +13,11 @@ export const viemToThirdwebChain = (chain) => {
|
|
|
13
13
|
? [
|
|
14
14
|
{
|
|
15
15
|
name: chain.blockExplorers.default.name,
|
|
16
|
-
url: chain.blockExplorers.default.url
|
|
17
|
-
}
|
|
16
|
+
url: chain.blockExplorers.default.url
|
|
17
|
+
}
|
|
18
18
|
]
|
|
19
19
|
: undefined,
|
|
20
|
-
testnet: chain.testnet ? true : undefined
|
|
20
|
+
testnet: chain.testnet ? true : undefined
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
export const b3Testnet = defineChain({
|
|
@@ -27,27 +27,27 @@ export const b3Testnet = defineChain({
|
|
|
27
27
|
rpcUrls: {
|
|
28
28
|
default: {
|
|
29
29
|
http: ["https://sepolia.b3.fun"],
|
|
30
|
-
ws: ["wss://sepolia.b3.fun/ws"]
|
|
31
|
-
}
|
|
30
|
+
ws: ["wss://sepolia.b3.fun/ws"]
|
|
31
|
+
}
|
|
32
32
|
},
|
|
33
33
|
icon: {
|
|
34
34
|
url: "https://cdn.b3.fun/b3_logo.svg",
|
|
35
35
|
width: 32,
|
|
36
36
|
height: 32,
|
|
37
|
-
format: "svg"
|
|
37
|
+
format: "svg"
|
|
38
38
|
},
|
|
39
39
|
blockExplorers: {
|
|
40
40
|
default: {
|
|
41
41
|
name: "B3 Explorer",
|
|
42
|
-
url: "https://sepolia-explorer.b3.fun"
|
|
43
|
-
}
|
|
42
|
+
url: "https://sepolia-explorer.b3.fun"
|
|
43
|
+
}
|
|
44
44
|
},
|
|
45
45
|
nativeCurrency: {
|
|
46
46
|
name: "Ether",
|
|
47
47
|
symbol: "ETH",
|
|
48
|
-
decimals: 18
|
|
48
|
+
decimals: 18
|
|
49
49
|
},
|
|
50
|
-
testnet: true
|
|
50
|
+
testnet: true
|
|
51
51
|
});
|
|
52
52
|
export const b3Mainnet = defineChain({
|
|
53
53
|
id: 8333,
|
|
@@ -56,26 +56,26 @@ export const b3Mainnet = defineChain({
|
|
|
56
56
|
rpcUrls: {
|
|
57
57
|
default: {
|
|
58
58
|
http: ["https://mainnet-rpc.b3.fun"],
|
|
59
|
-
ws: ["wss://mainnet-rpc.b3.fun/ws"]
|
|
60
|
-
}
|
|
59
|
+
ws: ["wss://mainnet-rpc.b3.fun/ws"]
|
|
60
|
+
}
|
|
61
61
|
},
|
|
62
62
|
icon: {
|
|
63
63
|
url: "https://cdn.b3.fun/b3_logo.svg",
|
|
64
64
|
width: 32,
|
|
65
65
|
height: 32,
|
|
66
|
-
format: "svg"
|
|
66
|
+
format: "svg"
|
|
67
67
|
},
|
|
68
68
|
blockExplorers: {
|
|
69
69
|
default: {
|
|
70
70
|
name: "B3 Explorer",
|
|
71
|
-
url: "https://explorer.b3.fun"
|
|
72
|
-
}
|
|
71
|
+
url: "https://explorer.b3.fun"
|
|
72
|
+
}
|
|
73
73
|
},
|
|
74
74
|
nativeCurrency: {
|
|
75
75
|
name: "Ether",
|
|
76
76
|
symbol: "ETH",
|
|
77
|
-
decimals: 18
|
|
78
|
-
}
|
|
77
|
+
decimals: 18
|
|
78
|
+
}
|
|
79
79
|
});
|
|
80
80
|
export const getViemChainConfig = (config) => defineChain({
|
|
81
81
|
id: config.id,
|
|
@@ -84,18 +84,18 @@ export const getViemChainConfig = (config) => defineChain({
|
|
|
84
84
|
rpcUrls: {
|
|
85
85
|
default: {
|
|
86
86
|
http: [config.rpcUrls.default.http],
|
|
87
|
-
ws: [config.rpcUrls.default.ws]
|
|
88
|
-
}
|
|
87
|
+
ws: [config.rpcUrls.default.ws]
|
|
88
|
+
}
|
|
89
89
|
},
|
|
90
90
|
icon: config.icon,
|
|
91
91
|
blockExplorers: {
|
|
92
92
|
default: {
|
|
93
93
|
name: config.blockExplorers.explorerTitle,
|
|
94
|
-
url: config.blockExplorers.default
|
|
95
|
-
}
|
|
94
|
+
url: config.blockExplorers.default
|
|
95
|
+
}
|
|
96
96
|
},
|
|
97
97
|
nativeCurrency: config.nativeCurrency,
|
|
98
|
-
testnet: config.testnet ? true : undefined
|
|
98
|
+
testnet: config.testnet ? true : undefined
|
|
99
99
|
});
|
|
100
100
|
export const thirdwebB3Testnet = defineThirdwebChain({
|
|
101
101
|
id: 1993,
|
|
@@ -105,20 +105,20 @@ export const thirdwebB3Testnet = defineThirdwebChain({
|
|
|
105
105
|
url: "https://cdn.b3.fun/b3_logo.svg",
|
|
106
106
|
width: 32,
|
|
107
107
|
height: 32,
|
|
108
|
-
format: "svg"
|
|
108
|
+
format: "svg"
|
|
109
109
|
},
|
|
110
110
|
blockExplorers: [
|
|
111
111
|
{
|
|
112
112
|
name: "B3 Explorer",
|
|
113
|
-
url: "https://sepolia-explorer.b3.fun"
|
|
114
|
-
}
|
|
113
|
+
url: "https://sepolia-explorer.b3.fun"
|
|
114
|
+
}
|
|
115
115
|
],
|
|
116
116
|
nativeCurrency: {
|
|
117
117
|
name: "Ether",
|
|
118
118
|
symbol: "ETH",
|
|
119
|
-
decimals: 18
|
|
119
|
+
decimals: 18
|
|
120
120
|
},
|
|
121
|
-
testnet: true
|
|
121
|
+
testnet: true
|
|
122
122
|
});
|
|
123
123
|
export const thirdwebB3Mainnet = defineThirdwebChain({
|
|
124
124
|
id: 8333,
|
|
@@ -128,19 +128,19 @@ export const thirdwebB3Mainnet = defineThirdwebChain({
|
|
|
128
128
|
url: "https://cdn.b3.fun/b3_logo.svg",
|
|
129
129
|
width: 32,
|
|
130
130
|
height: 32,
|
|
131
|
-
format: "svg"
|
|
131
|
+
format: "svg"
|
|
132
132
|
},
|
|
133
133
|
blockExplorers: [
|
|
134
134
|
{
|
|
135
135
|
name: "B3 Explorer",
|
|
136
|
-
url: "https://explorer.b3.fun"
|
|
137
|
-
}
|
|
136
|
+
url: "https://explorer.b3.fun"
|
|
137
|
+
}
|
|
138
138
|
],
|
|
139
139
|
nativeCurrency: {
|
|
140
140
|
name: "Ether",
|
|
141
141
|
symbol: "ETH",
|
|
142
|
-
decimals: 18
|
|
143
|
-
}
|
|
142
|
+
decimals: 18
|
|
143
|
+
}
|
|
144
144
|
});
|
|
145
145
|
export const getThirdwebChainConfig = (config) => defineThirdwebChain({
|
|
146
146
|
id: config.id,
|
|
@@ -150,11 +150,11 @@ export const getThirdwebChainConfig = (config) => defineThirdwebChain({
|
|
|
150
150
|
blockExplorers: [
|
|
151
151
|
{
|
|
152
152
|
name: config.blockExplorers.explorerTitle,
|
|
153
|
-
url: config.blockExplorers.default
|
|
154
|
-
}
|
|
153
|
+
url: config.blockExplorers.default
|
|
154
|
+
}
|
|
155
155
|
],
|
|
156
156
|
nativeCurrency: config.nativeCurrency,
|
|
157
|
-
testnet: config.testnet ? true : undefined
|
|
157
|
+
testnet: config.testnet ? true : undefined
|
|
158
158
|
});
|
|
159
159
|
export const b3Chain = process.env.NEXT_PUBLIC_B3_CHAINID === "8333" ? b3Mainnet : b3Testnet;
|
|
160
160
|
export const thirdwebB3Chain = process.env.NEXT_PUBLIC_B3_CHAINID === "8333" ? thirdwebB3Mainnet : thirdwebB3Testnet;
|
|
@@ -18,7 +18,7 @@ export const supportedChainsTW = [
|
|
|
18
18
|
const networkData = chainNetworks.find(n => n.id === chain.id);
|
|
19
19
|
return networkData ? toThirdwebChain(networkData) : undefined;
|
|
20
20
|
})
|
|
21
|
-
.filter((chain) => chain !== undefined)
|
|
21
|
+
.filter((chain) => chain !== undefined)
|
|
22
22
|
];
|
|
23
23
|
// Original format from chain-networks.json
|
|
24
24
|
export const supportedChainNetworks = chainNetworks;
|
|
@@ -13,4 +13,3 @@ export declare const THIRDWEB_SECRET_KEY: string;
|
|
|
13
13
|
export declare const THIRDWEB_CLIENT_ID: string;
|
|
14
14
|
export declare const CLIENT_APP_BUNDLE_ID: string;
|
|
15
15
|
export declare const B3_AUTH_COOKIE_NAME = "b3-auth";
|
|
16
|
-
export declare const ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
|
|
@@ -9,11 +9,10 @@ export const tokenIcons = {
|
|
|
9
9
|
USDC: "https://cdn.b3.fun/usd-coin.svg",
|
|
10
10
|
USDT: "https://cdn.b3.fun/usdt.svg",
|
|
11
11
|
DAI: "https://cdn.b3.fun/dai.svg",
|
|
12
|
-
B3: b3CoinIcon
|
|
12
|
+
B3: b3CoinIcon
|
|
13
13
|
// Add more asset icons as needed
|
|
14
14
|
};
|
|
15
15
|
export const THIRDWEB_SECRET_KEY = process.env.THIRDWEB_SECRET_KEY || "";
|
|
16
16
|
export const THIRDWEB_CLIENT_ID = process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID || process.env.EXPO_PUBLIC_THIRDWEB_CLIENT_ID || "";
|
|
17
17
|
export const CLIENT_APP_BUNDLE_ID = process.env.EXPO_PUBLIC_B3_BUNDLE_ID || "";
|
|
18
18
|
export const B3_AUTH_COOKIE_NAME = "b3-auth";
|
|
19
|
-
export const ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
|
|
@@ -3,7 +3,7 @@ import { client } from "./generated/client.gen.js";
|
|
|
3
3
|
(function () {
|
|
4
4
|
// Set BASE URL
|
|
5
5
|
client.setConfig({
|
|
6
|
-
baseUrl: "https://insight.thirdweb.com"
|
|
6
|
+
baseUrl: "https://insight.thirdweb.com"
|
|
7
7
|
});
|
|
8
8
|
// Interceptors for issues described here https://npc-labs.slack.com/archives/C070E6HNG85/p1742446793549779?thread_ts=1741637902.666019&cid=C070E6HNG85
|
|
9
9
|
client.interceptors.request.use((request, options) => {
|
|
@@ -19,7 +19,7 @@ import { client } from "./generated/client.gen.js";
|
|
|
19
19
|
}
|
|
20
20
|
return new Request(newUrl, {
|
|
21
21
|
...request,
|
|
22
|
-
headers
|
|
22
|
+
headers
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
})();
|
|
@@ -2,5 +2,5 @@ import { defineConfig } from "@hey-api/openapi-ts";
|
|
|
2
2
|
export default defineConfig({
|
|
3
3
|
input: "./insight-service.json",
|
|
4
4
|
output: "./src/thirdweb/generated",
|
|
5
|
-
plugins: ["@hey-api/client-fetch", "@tanstack/react-query"]
|
|
5
|
+
plugins: ["@hey-api/client-fetch", "@tanstack/react-query"] // Using fetch client as an example
|
|
6
6
|
});
|