@b3dotfun/sdk 0.0.7-alpha.13 → 0.0.7-alpha.15
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 -10
- 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 +32 -32
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +29 -29
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- 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 +17 -17
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -4
- 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 +9 -9
- 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 +1 -0
- package/dist/cjs/anyspend/react/components/index.js +3 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- 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.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- 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 +1 -1
- package/dist/cjs/anyspend/services/anyspend.js +13 -13
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/nft.js +6 -6
- package/dist/cjs/anyspend/types/onramp.js +1 -1
- 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.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- 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.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.js +8 -8
- 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.js +6 -6
- 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 +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +5 -5
- 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.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +1 -1
- 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/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.js +1 -1
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -1
- 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 +4 -4
- 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 +7 -0
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +14 -5
- 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 +10 -10
- 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.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.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/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 -10
- 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 +33 -33
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +31 -31
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- 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 +18 -18
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -4
- 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 +12 -12
- 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 +1 -0
- package/dist/esm/anyspend/react/components/index.js +1 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- 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.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- 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 +1 -1
- package/dist/esm/anyspend/services/anyspend.js +14 -14
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/nft.js +6 -6
- package/dist/esm/anyspend/types/onramp.js +1 -1
- 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.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- 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.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.js +8 -8
- 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.js +6 -6
- 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 +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +5 -5
- 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.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +2 -2
- 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/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.js +1 -1
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +1 -1
- 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 +4 -4
- 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 +7 -0
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +14 -5
- 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 +10 -10
- 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.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.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/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/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 +2 -2
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- 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 +1 -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/services/anyspend.d.ts +1 -1
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- 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/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 +7 -0
- 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/package.json +1 -1
- 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 +10 -10
- package/src/anyspend/react/components/AnySpend.tsx +32 -32
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +34 -34
- package/src/anyspend/react/components/AnySpendCustom.tsx +39 -39
- package/src/anyspend/react/components/AnySpendNFT.tsx +4 -4
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +18 -18
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -4
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +15 -15
- 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 +1 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +1 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -18
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +7 -7
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +7 -7
- 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 +23 -23
- 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/nft.ts +7 -7
- package/src/anyspend/types/onramp.ts +2 -2
- 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 +8 -8
- 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 +6 -6
- 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 +5 -5
- 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 +4 -4
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +2 -2
- 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/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 +1 -1
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +1 -1
- 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 +5 -5
- 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 +24 -6
- 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 +11 -11
- 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 -3
- 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 -1
- 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/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
|
@@ -65,9 +65,9 @@ const app = (0, basement_api_1.createClient)((0, socketio_client_1.default)(sock
|
|
|
65
65
|
},
|
|
66
66
|
removeItem: (key) => {
|
|
67
67
|
localStorage.deleteItem(key);
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
69
|
},
|
|
70
|
-
storageKey: BSMNT_AUTH_COOKIE_NAME
|
|
70
|
+
storageKey: BSMNT_AUTH_COOKIE_NAME,
|
|
71
71
|
});
|
|
72
72
|
const authenticate = async (accessToken, identityToken, params) => {
|
|
73
73
|
const fullToken = `${accessToken}+${identityToken}`;
|
|
@@ -79,9 +79,9 @@ const authenticate = async (accessToken, identityToken, params) => {
|
|
|
79
79
|
try {
|
|
80
80
|
const response = await app.authenticate({
|
|
81
81
|
strategy: "jwt",
|
|
82
|
-
accessToken: fullToken
|
|
82
|
+
accessToken: fullToken,
|
|
83
83
|
}, {
|
|
84
|
-
query: params || {}
|
|
84
|
+
query: params || {},
|
|
85
85
|
});
|
|
86
86
|
return response;
|
|
87
87
|
}
|
|
@@ -27,7 +27,7 @@ function B3DynamicModal() {
|
|
|
27
27
|
"anySpendStakeB3",
|
|
28
28
|
"anySpendBuySpin",
|
|
29
29
|
"anySpendOrderHistory",
|
|
30
|
-
"signInWithB3"
|
|
30
|
+
"signInWithB3",
|
|
31
31
|
].find(type => contentType?.type === type)) {
|
|
32
32
|
contentClass += " max-h-[90dvh] overflow-y-auto no-scrollbar w-full";
|
|
33
33
|
}
|
|
@@ -6,7 +6,7 @@ export declare const wagmiConfig: import("wagmi").Config<readonly [import("viem"
|
|
|
6
6
|
/**
|
|
7
7
|
* Main B3Provider component
|
|
8
8
|
*/
|
|
9
|
-
export declare function B3Provider({ isMainnetAnySpend, theme, children, accountOverride, environment, automaticallySetFirstEoa }: {
|
|
9
|
+
export declare function B3Provider({ isMainnetAnySpend, theme, children, accountOverride, environment, automaticallySetFirstEoa, }: {
|
|
10
10
|
isMainnetAnySpend?: boolean;
|
|
11
11
|
theme: "light" | "dark";
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -17,7 +17,7 @@ export declare function B3Provider({ isMainnetAnySpend, theme, children, account
|
|
|
17
17
|
/**
|
|
18
18
|
* Inner provider component that provides the actual B3Context
|
|
19
19
|
*/
|
|
20
|
-
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, automaticallySetFirstEoa, theme }: {
|
|
20
|
+
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, automaticallySetFirstEoa, theme, }: {
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
accountOverride?: Account;
|
|
23
23
|
environment: B3ContextType["environment"];
|
|
@@ -21,24 +21,24 @@ const DEFAULT_PERMISSIONS = {
|
|
|
21
21
|
approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"], // Example contract
|
|
22
22
|
nativeTokenLimitPerTransaction: 0.1, // in ETH
|
|
23
23
|
startDate: new Date(),
|
|
24
|
-
endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365) // 1 year from now
|
|
24
|
+
endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
|
|
25
25
|
};
|
|
26
26
|
exports.wagmiConfig = (0, wagmi_1.createConfig)({
|
|
27
27
|
chains: [supported_1.supportedChains[0], ...supported_1.supportedChains.slice(1)],
|
|
28
|
-
transports: Object.fromEntries(supported_1.supportedChains.map(chain => [chain.id, (0, wagmi_1.http)()]))
|
|
28
|
+
transports: Object.fromEntries(supported_1.supportedChains.map(chain => [chain.id, (0, wagmi_1.http)()])),
|
|
29
29
|
});
|
|
30
30
|
// Create queryClient instance
|
|
31
31
|
const queryClient = new react_query_1.QueryClient();
|
|
32
32
|
/**
|
|
33
33
|
* Main B3Provider component
|
|
34
34
|
*/
|
|
35
|
-
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, automaticallySetFirstEoa }) {
|
|
35
|
+
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, }) {
|
|
36
36
|
return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: exports.wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_2.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, children: (0, jsx_runtime_1.jsxs)(RelayKitProviderWrapper_1.RelayKitProviderWrapper, { isMainnet: isMainnetAnySpend, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" }), (0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme })] }) }) }) }) }));
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Inner provider component that provides the actual B3Context
|
|
40
40
|
*/
|
|
41
|
-
function InnerProvider({ children, accountOverride, environment, defaultPermissions = DEFAULT_PERMISSIONS, automaticallySetFirstEoa, theme = "light" }) {
|
|
41
|
+
function InnerProvider({ children, accountOverride, environment, defaultPermissions = DEFAULT_PERMISSIONS, automaticallySetFirstEoa, theme = "light", }) {
|
|
42
42
|
const activeAccount = (0, react_2.useActiveAccount)();
|
|
43
43
|
const [manuallySetAccount, setManuallySetAccount] = (0, react_1.useState)(undefined);
|
|
44
44
|
const [manuallySelectedWallet, setManuallySelectedWallet] = (0, react_1.useState)(undefined);
|
|
@@ -82,6 +82,6 @@ function InnerProvider({ children, accountOverride, environment, defaultPermissi
|
|
|
82
82
|
automaticallySetFirstEoa,
|
|
83
83
|
environment,
|
|
84
84
|
defaultPermissions,
|
|
85
|
-
theme
|
|
85
|
+
theme,
|
|
86
86
|
}, children: children }));
|
|
87
87
|
}
|
|
@@ -4,7 +4,7 @@ import { B3ContextType } from "./types";
|
|
|
4
4
|
/**
|
|
5
5
|
* Main B3Provider component
|
|
6
6
|
*/
|
|
7
|
-
export declare function B3Provider({ isMainnetAnySpend, theme, children, accountOverride, environment }: {
|
|
7
|
+
export declare function B3Provider({ isMainnetAnySpend, theme, children, accountOverride, environment, }: {
|
|
8
8
|
isMainnetAnySpend?: boolean;
|
|
9
9
|
theme: "light" | "dark";
|
|
10
10
|
children: React.ReactNode;
|
|
@@ -14,7 +14,7 @@ export declare function B3Provider({ isMainnetAnySpend, theme, children, account
|
|
|
14
14
|
/**
|
|
15
15
|
* Inner provider component that provides the actual B3Context
|
|
16
16
|
*/
|
|
17
|
-
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, theme }: {
|
|
17
|
+
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, theme, }: {
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
accountOverride?: Account;
|
|
20
20
|
environment: B3ContextType["environment"];
|
|
@@ -14,20 +14,20 @@ const DEFAULT_PERMISSIONS = {
|
|
|
14
14
|
approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"], // Example contract
|
|
15
15
|
nativeTokenLimitPerTransaction: 0.1, // in ETH
|
|
16
16
|
startDate: new Date(),
|
|
17
|
-
endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365) // 1 year from now
|
|
17
|
+
endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
|
|
18
18
|
};
|
|
19
19
|
// Create queryClient instance
|
|
20
20
|
const queryClient = new react_query_1.QueryClient();
|
|
21
21
|
/**
|
|
22
22
|
* Main B3Provider component
|
|
23
23
|
*/
|
|
24
|
-
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment }) {
|
|
24
|
+
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, }) {
|
|
25
25
|
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_2.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, children: children }) }) }));
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Inner provider component that provides the actual B3Context
|
|
29
29
|
*/
|
|
30
|
-
function InnerProvider({ children, accountOverride, environment, defaultPermissions = DEFAULT_PERMISSIONS, theme = "light" }) {
|
|
30
|
+
function InnerProvider({ children, accountOverride, environment, defaultPermissions = DEFAULT_PERMISSIONS, theme = "light", }) {
|
|
31
31
|
const activeAccount = (0, react_2.useActiveAccount)();
|
|
32
32
|
const [manuallySetAccount, setManuallySetAccount] = (0, react_1.useState)(undefined);
|
|
33
33
|
const [user, setUser] = (0, react_1.useState)(undefined);
|
|
@@ -48,6 +48,6 @@ function InnerProvider({ children, accountOverride, environment, defaultPermissi
|
|
|
48
48
|
ready: !!effectiveAccount,
|
|
49
49
|
environment,
|
|
50
50
|
defaultPermissions,
|
|
51
|
-
theme
|
|
51
|
+
theme,
|
|
52
52
|
}, children: children }));
|
|
53
53
|
}
|
|
@@ -7,5 +7,5 @@ interface ManageAccountProps {
|
|
|
7
7
|
chain: Chain;
|
|
8
8
|
partnerId: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain, partnerId }: ManageAccountProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain, partnerId, }: ManageAccountProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,7 +15,7 @@ function centerTruncate(str, length = 4) {
|
|
|
15
15
|
return str;
|
|
16
16
|
return `${str.slice(0, length)}...${str.slice(-length)}`;
|
|
17
17
|
}
|
|
18
|
-
function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain, partnerId }) {
|
|
18
|
+
function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain, partnerId, }) {
|
|
19
19
|
const [activeTab, setActiveTab] = (0, react_2.useState)("balance");
|
|
20
20
|
const [revokingSignerId, setRevokingSignerId] = (0, react_2.useState)(null);
|
|
21
21
|
const account = (0, react_3.useActiveAccount)();
|
|
@@ -24,7 +24,7 @@ function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain
|
|
|
24
24
|
const { data: nativeBalance } = (0, react_1.useNativeBalance)(account?.address);
|
|
25
25
|
const { data: signers, refetch: refetchSigners } = (0, react_1.useGetAllTWSigners)({
|
|
26
26
|
chain,
|
|
27
|
-
accountAddress: account?.address
|
|
27
|
+
accountAddress: account?.address,
|
|
28
28
|
});
|
|
29
29
|
const { setB3ModalOpen, setB3ModalContentType } = (0, react_1.useModalStore)();
|
|
30
30
|
const { logout } = (0, react_1.useAuthentication)(partnerId);
|
|
@@ -40,7 +40,7 @@ function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain
|
|
|
40
40
|
console.error("Error revoking access:", error);
|
|
41
41
|
setRevokingSignerId(null);
|
|
42
42
|
},
|
|
43
|
-
refetchSigners: () => refetchSigners()
|
|
43
|
+
refetchSigners: () => refetchSigners(),
|
|
44
44
|
});
|
|
45
45
|
const handleRevoke = async (signer) => {
|
|
46
46
|
setRevokingSignerId(signer.id);
|
|
@@ -58,13 +58,13 @@ function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain
|
|
|
58
58
|
setB3ModalContentType({
|
|
59
59
|
type: "anySpend",
|
|
60
60
|
defaultActiveTab: "fiat",
|
|
61
|
-
showBackButton: true
|
|
61
|
+
showBackButton: true,
|
|
62
62
|
});
|
|
63
63
|
}, children: "Deposit" }), (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "default", className: "font-neue-montreal-medium flex-1", onClick: () => {
|
|
64
64
|
setB3ModalOpen(true);
|
|
65
65
|
setB3ModalContentType({
|
|
66
66
|
type: "anySpend",
|
|
67
|
-
showBackButton: true
|
|
67
|
+
showBackButton: true,
|
|
68
68
|
});
|
|
69
69
|
}, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowRightLeft, { className: "mr-2 h-4 w-4" }), "Swap"] })] })] }));
|
|
70
70
|
const AssetsContent = () => ((0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-card border-b3-react-border rounded-lg border p-4", children: (0, jsx_runtime_1.jsx)(AccountAssets_1.AccountAssets, { nfts: assets?.nftResponse, isLoading: isLoading }) }));
|
|
@@ -13,5 +13,5 @@ interface MintButtonProps {
|
|
|
13
13
|
onSuccess?: (tx: `0x${string}`) => void;
|
|
14
14
|
onError?: (error: Error) => void;
|
|
15
15
|
}
|
|
16
|
-
export declare function MintButton({ contractAddress, quantity, chain, account, to, tokenId, className, children, onSuccess, onError }: MintButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function MintButton({ contractAddress, quantity, chain, account, to, tokenId, className, children, onSuccess, onError, }: MintButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -6,7 +6,7 @@ const react_1 = require("../../../../global-account/react");
|
|
|
6
6
|
const thirdweb_1 = require("../../../../shared/utils/thirdweb");
|
|
7
7
|
const react_2 = require("thirdweb/react");
|
|
8
8
|
const wallets_1 = require("thirdweb/wallets");
|
|
9
|
-
function MintButton({ contractAddress, quantity = 1, chain, account, to, tokenId, className, children = "Mint", onSuccess, onError }) {
|
|
9
|
+
function MintButton({ contractAddress, quantity = 1, chain, account, to, tokenId, className, children = "Mint", onSuccess, onError, }) {
|
|
10
10
|
const ecoSystemWallet = (0, react_2.useActiveAccount)();
|
|
11
11
|
console.log("@@ecoSystemWallet", ecoSystemWallet);
|
|
12
12
|
const { claim, isMinting } = (0, react_1.useClaim)({
|
|
@@ -14,7 +14,7 @@ function MintButton({ contractAddress, quantity = 1, chain, account, to, tokenId
|
|
|
14
14
|
quantity,
|
|
15
15
|
chain,
|
|
16
16
|
to,
|
|
17
|
-
tokenId
|
|
17
|
+
tokenId,
|
|
18
18
|
});
|
|
19
19
|
const smartAccountWithSignerOverride = ecoSystemWallet?.address !== to;
|
|
20
20
|
const handleMint = async () => {
|
|
@@ -24,12 +24,12 @@ function MintButton({ contractAddress, quantity = 1, chain, account, to, tokenId
|
|
|
24
24
|
chain,
|
|
25
25
|
sponsorGas: true,
|
|
26
26
|
overrides: {
|
|
27
|
-
accountAddress: ecoSystemWallet?.address
|
|
28
|
-
}
|
|
27
|
+
accountAddress: ecoSystemWallet?.address,
|
|
28
|
+
},
|
|
29
29
|
});
|
|
30
30
|
const smartAccountWithSigner = await wallet.connect({
|
|
31
31
|
client: thirdweb_1.client,
|
|
32
|
-
personalAccount: account
|
|
32
|
+
personalAccount: account,
|
|
33
33
|
});
|
|
34
34
|
const tx = await claim(smartAccountWithSigner);
|
|
35
35
|
onSuccess?.(tx);
|
|
@@ -19,11 +19,11 @@ function RelayKitProviderWrapper({ isMainnet, children }) {
|
|
|
19
19
|
source: "anyspend",
|
|
20
20
|
duneConfig: {
|
|
21
21
|
apiKey: "OkvN2bWlBPwXkvtmnTeYMQR1hYZBGDJt",
|
|
22
|
-
apiBaseUrl: "https://api.dune.com"
|
|
22
|
+
apiBaseUrl: "https://api.dune.com",
|
|
23
23
|
},
|
|
24
24
|
chains: relayChains,
|
|
25
25
|
privateChainIds: undefined,
|
|
26
26
|
appName: "AnySpend",
|
|
27
|
-
useGasFeeEstimations: true
|
|
27
|
+
useGasFeeEstimations: true,
|
|
28
28
|
}, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }) }));
|
|
29
29
|
}
|
|
@@ -3,4 +3,4 @@ import { RequestPermissionsModalProps } from "../../../../global-account/react";
|
|
|
3
3
|
* Component for requesting permissions to access user accounts and contracts
|
|
4
4
|
* Allows users to approve session keys with specific permission settings
|
|
5
5
|
*/
|
|
6
|
-
export declare function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, permissions }: RequestPermissionsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, permissions, }: RequestPermissionsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,14 +18,14 @@ const debug = (0, debug_1.debugB3React)("RequestPermissions");
|
|
|
18
18
|
* Component for requesting permissions to access user accounts and contracts
|
|
19
19
|
* Allows users to approve session keys with specific permission settings
|
|
20
20
|
*/
|
|
21
|
-
function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, permissions }) {
|
|
21
|
+
function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, permissions, }) {
|
|
22
22
|
const [isApproving, setIsApproving] = (0, react_3.useState)(false);
|
|
23
23
|
const account = (0, react_4.useActiveAccount)();
|
|
24
24
|
const { defaultPermissions } = (0, react_1.useB3)();
|
|
25
25
|
const DEFAULT_PERMISSIONS = (0, react_3.useMemo)(() => permissions ?? defaultPermissions, [defaultPermissions, permissions]);
|
|
26
26
|
const { refetch: refetchSigners } = (0, react_1.useGetAllTWSigners)({
|
|
27
27
|
chain,
|
|
28
|
-
accountAddress: account?.address
|
|
28
|
+
accountAddress: account?.address,
|
|
29
29
|
});
|
|
30
30
|
const { newSessionKey } = (0, react_1.useAddTWSessionKey)({
|
|
31
31
|
onSuccess: transactionResult => {
|
|
@@ -39,7 +39,7 @@ function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, perm
|
|
|
39
39
|
refetchSigners: () => {
|
|
40
40
|
return refetchSigners();
|
|
41
41
|
},
|
|
42
|
-
chain
|
|
42
|
+
chain,
|
|
43
43
|
});
|
|
44
44
|
const handleApprove = (0, react_3.useCallback)(async () => {
|
|
45
45
|
debug("@@handleApprove");
|
|
@@ -54,7 +54,7 @@ function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, perm
|
|
|
54
54
|
approvedTargets: DEFAULT_PERMISSIONS.approvedTargets,
|
|
55
55
|
nativeTokenLimitPerTransaction: DEFAULT_PERMISSIONS.nativeTokenLimitPerTransaction,
|
|
56
56
|
permissionStartTimestamp: DEFAULT_PERMISSIONS.startDate,
|
|
57
|
-
permissionEndTimestamp: DEFAULT_PERMISSIONS.endDate
|
|
57
|
+
permissionEndTimestamp: DEFAULT_PERMISSIONS.endDate,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
@@ -68,7 +68,7 @@ function RequestPermissions({ onSuccess, onError, chain, sessionKeyAddress, perm
|
|
|
68
68
|
const formatDate = (date) => {
|
|
69
69
|
return new Intl.DateTimeFormat("en-US", {
|
|
70
70
|
dateStyle: "medium",
|
|
71
|
-
timeStyle: "short"
|
|
71
|
+
timeStyle: "short",
|
|
72
72
|
}).format(date);
|
|
73
73
|
};
|
|
74
74
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("h2", { className: "mb-2 text-2xl font-bold", children: "Allow Access" }), (0, jsx_runtime_1.jsx)("p", { className: "text-b3-react-muted-foreground opacity-70", children: "This app would like permission to:" })] }), (0, jsx_runtime_1.jsx)(react_2.PermissionItem, { title: "Make transactions on your behalf", description: (0, jsx_runtime_1.jsxs)("span", { children: ["Up to", " ", (0, jsx_runtime_1.jsxs)("span", { className: "text-b3-react-primary font-medium", children: [DEFAULT_PERMISSIONS.nativeTokenLimitPerTransaction, " ETH"] }), " ", "per transaction"] }), icon: (0, jsx_runtime_1.jsx)(lucide_react_1.CreditCard, { className: "h-5 w-5" }) }), (0, jsx_runtime_1.jsx)(react_2.PermissionItem, { title: "View your account", description: "See your wallet address and balance", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Eye, { className: "h-5 w-5" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-card rounded-lg border p-5 py-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "mb-2 text-base font-medium", children: "Approved Contracts" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-2", children: DEFAULT_PERMISSIONS.approvedTargets.map((target) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background text-b3-react-muted-foreground rounded-md border px-3 py-2 font-mono text-sm", children: (0, formatAddress_1.formatAddress)(target) }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-react-muted-foreground text-sm", children: "\u2022 Game Contract" })] }, target))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-card rounded-lg border p-5 py-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "mb-2 text-base font-medium", children: "Permission" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-1 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-b3-react-muted-foreground", children: [(0, jsx_runtime_1.jsx)("span", { children: `Valid for ` }), (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(react_timeago_1.default, { date: DEFAULT_PERMISSIONS.endDate, live: false, formatter: (value, unit) => {
|
package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ type RequestPermissionsButtonProps = {
|
|
|
7
7
|
permissions?: PermissionsConfig;
|
|
8
8
|
closeOnSuccess?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function RequestPermissionsButton({ chain, sessionKeyAddress, onSuccess, onError, permissions, closeOnSuccess }: RequestPermissionsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function RequestPermissionsButton({ chain, sessionKeyAddress, onSuccess, onError, permissions, closeOnSuccess, }: RequestPermissionsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RequestPermissionsButton = RequestPermissionsButton;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("../../../../global-account/react");
|
|
6
|
-
function RequestPermissionsButton({ chain, sessionKeyAddress, onSuccess, onError, permissions, closeOnSuccess = true }) {
|
|
6
|
+
function RequestPermissionsButton({ chain, sessionKeyAddress, onSuccess, onError, permissions, closeOnSuccess = true, }) {
|
|
7
7
|
const { setB3ModalOpen, setB3ModalContentType } = (0, react_1.useModalStore)();
|
|
8
8
|
const handleClick = () => {
|
|
9
9
|
setB3ModalContentType({
|
|
@@ -17,7 +17,7 @@ function RequestPermissionsButton({ chain, sessionKeyAddress, onSuccess, onError
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
onError,
|
|
20
|
-
permissions
|
|
20
|
+
permissions,
|
|
21
21
|
});
|
|
22
22
|
setB3ModalOpen(true);
|
|
23
23
|
};
|
|
@@ -16,7 +16,7 @@ const ManageAccountButton_1 = require("../custom/ManageAccountButton");
|
|
|
16
16
|
function SignIn(props) {
|
|
17
17
|
const { className } = props;
|
|
18
18
|
const { automaticallySetFirstEoa } = (0, react_1.useB3)();
|
|
19
|
-
const { wallet, address: globalAddress, ensName, connectedSmartWallet, connectedEOAWallet, isActiveSmartWallet, isActiveEOAWallet, smartWalletIcon, eoaWalletIcon } = (0, react_1.useAccountWallet)();
|
|
19
|
+
const { wallet, address: globalAddress, ensName, connectedSmartWallet, connectedEOAWallet, isActiveSmartWallet, isActiveEOAWallet, smartWalletIcon, eoaWalletIcon, } = (0, react_1.useAccountWallet)();
|
|
20
20
|
const isMobile = (0, react_1.useIsMobile)();
|
|
21
21
|
const { logout } = (0, react_1.useAuthentication)(String(process.env.NEXT_PUBLIC_GLOBAL_ACCOUNTS_PARTNER_ID));
|
|
22
22
|
const onDisconnect = async () => {
|
|
@@ -3,4 +3,4 @@ import { SignInWithB3ModalProps } from "../../../../global-account/react";
|
|
|
3
3
|
* Component that manages the authentication flow for Sign In With B3
|
|
4
4
|
* Handles different login providers, authentication steps, and session key management
|
|
5
5
|
*/
|
|
6
|
-
export declare function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onError, chain, sessionKeyAddress, partnerId, closeAfterLogin, loginWithSiwe, source, signersEnabled }: SignInWithB3ModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export declare function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onError, chain, sessionKeyAddress, partnerId, closeAfterLogin, loginWithSiwe, source, signersEnabled, }: SignInWithB3ModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ const MAX_REFETCH_ATTEMPTS = 20;
|
|
|
15
15
|
* Component that manages the authentication flow for Sign In With B3
|
|
16
16
|
* Handles different login providers, authentication steps, and session key management
|
|
17
17
|
*/
|
|
18
|
-
function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onError, chain, sessionKeyAddress, partnerId, closeAfterLogin = false, loginWithSiwe = false, source = "signInWithB3Button", signersEnabled = false }) {
|
|
18
|
+
function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onError, chain, sessionKeyAddress, partnerId, closeAfterLogin = false, loginWithSiwe = false, source = "signInWithB3Button", signersEnabled = false, }) {
|
|
19
19
|
const { setUser, automaticallySetFirstEoa } = (0, react_1.useB3)();
|
|
20
20
|
const [step, setStep] = (0, react_2.useState)(source === "requestPermissions" ? null : "login");
|
|
21
21
|
const [sessionKeyAdded, setSessionKeyAdded] = (0, react_2.useState)(source === "requestPermissions" ? true : false);
|
|
@@ -24,12 +24,12 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
24
24
|
const [loginComplete, setLoginComplete] = (0, react_2.useState)(source === "requestPermissions" ? true : false);
|
|
25
25
|
const [refetchCount, setRefetchCount] = (0, react_2.useState)(0);
|
|
26
26
|
const [refetchError, setRefetchError] = (0, react_2.useState)(null);
|
|
27
|
-
const { data: signers, refetch: refetchSigners, isFetching: isFetchingSigners } = (0, react_1.useGetAllTWSigners)({
|
|
27
|
+
const { data: signers, refetch: refetchSigners, isFetching: isFetchingSigners, } = (0, react_1.useGetAllTWSigners)({
|
|
28
28
|
chain,
|
|
29
29
|
accountAddress: account?.address,
|
|
30
30
|
queryOptions: {
|
|
31
|
-
enabled: signersEnabled
|
|
32
|
-
}
|
|
31
|
+
enabled: signersEnabled,
|
|
32
|
+
},
|
|
33
33
|
});
|
|
34
34
|
const { authenticate } = (0, react_1.useSiwe)();
|
|
35
35
|
const [authenticatingWithB3, setAuthenticatingWithB3] = (0, react_2.useState)(false);
|
|
@@ -60,7 +60,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
60
60
|
debug("@@SignInWithB3Flow:useEffect", {
|
|
61
61
|
loginComplete,
|
|
62
62
|
isFetchingSigners,
|
|
63
|
-
source
|
|
63
|
+
source,
|
|
64
64
|
});
|
|
65
65
|
if (loginComplete && !isFetchingSigners) {
|
|
66
66
|
// Check if we already have a signer for this partner
|
|
@@ -75,7 +75,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
75
75
|
setB3ModalContentType({
|
|
76
76
|
type: "manageAccount",
|
|
77
77
|
chain,
|
|
78
|
-
partnerId
|
|
78
|
+
partnerId,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -95,7 +95,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
95
95
|
setB3ModalContentType({
|
|
96
96
|
type: "manageAccount",
|
|
97
97
|
chain,
|
|
98
|
-
partnerId
|
|
98
|
+
partnerId,
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
}, [
|
|
@@ -110,7 +110,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
110
110
|
chain,
|
|
111
111
|
onSessionKeySuccess,
|
|
112
112
|
setB3ModalOpen,
|
|
113
|
-
signersEnabled
|
|
113
|
+
signersEnabled,
|
|
114
114
|
]);
|
|
115
115
|
debug("render", {
|
|
116
116
|
step,
|
|
@@ -118,7 +118,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
118
118
|
account,
|
|
119
119
|
signers,
|
|
120
120
|
refetchCount,
|
|
121
|
-
refetchError
|
|
121
|
+
refetchError,
|
|
122
122
|
});
|
|
123
123
|
// Keep this effect for handling closeAfterLogin when adding new session keys
|
|
124
124
|
(0, react_2.useEffect)(() => {
|
|
@@ -139,7 +139,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
139
139
|
partnerId,
|
|
140
140
|
closeAfterLogin,
|
|
141
141
|
loginWithSiwe,
|
|
142
|
-
source: "requestPermissions"
|
|
142
|
+
source: "requestPermissions",
|
|
143
143
|
});
|
|
144
144
|
}, [
|
|
145
145
|
chain,
|
|
@@ -151,7 +151,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
151
151
|
partnerId,
|
|
152
152
|
sessionKeyAddress,
|
|
153
153
|
setB3ModalContentType,
|
|
154
|
-
strategies
|
|
154
|
+
strategies,
|
|
155
155
|
]);
|
|
156
156
|
const handleLoginSuccess = (0, react_2.useCallback)(async (account) => {
|
|
157
157
|
debug("Authenticating with B3 via SIWE");
|
|
@@ -172,7 +172,7 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
172
172
|
chain,
|
|
173
173
|
sessionKeyAddress,
|
|
174
174
|
onSuccess: onSessionKeySuccessEnhanced,
|
|
175
|
-
onError
|
|
175
|
+
onError,
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
}, [chain, onError, onSessionKeySuccessEnhanced, sessionKeyAddress, setB3ModalContentType, step]);
|
|
@@ -13,7 +13,7 @@ function SignInWithB3Privy({ onSuccess, onError, partnerId, chain }) {
|
|
|
13
13
|
const { logout } = (0, react_1.useAuthentication)(partnerId);
|
|
14
14
|
debug("@@SignInWithB3Privy", {
|
|
15
15
|
isLoading,
|
|
16
|
-
fullToken
|
|
16
|
+
fullToken,
|
|
17
17
|
});
|
|
18
18
|
(0, react_2.useEffect)(() => {
|
|
19
19
|
async function autoConnect() {
|
|
@@ -4,6 +4,6 @@ exports.AuthButton = AuthButton;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Button_1 = require("../../custom/Button");
|
|
6
6
|
const signInUtils_1 = require("../utils/signInUtils");
|
|
7
|
-
function AuthButton({ strategy, onClick, isLoading }) {
|
|
7
|
+
function AuthButton({ strategy, onClick, isLoading, }) {
|
|
8
8
|
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClick, disabled: isLoading, className: "flex w-full items-center justify-center bg-gray-100 px-2 py-3 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700", children: (0, jsx_runtime_1.jsx)("img", { src: signInUtils_1.strategyIcons[strategy], className: "h-9 w-9" }) }, strategy));
|
|
9
9
|
}
|
|
@@ -4,6 +4,6 @@ exports.WalletRow = WalletRow;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("thirdweb/react");
|
|
6
6
|
const Button_1 = require("../../custom/Button");
|
|
7
|
-
function WalletRow({ walletId, onClick, isLoading }) {
|
|
7
|
+
function WalletRow({ walletId, onClick, isLoading, }) {
|
|
8
8
|
return ((0, jsx_runtime_1.jsx)(react_1.WalletProvider, { id: walletId, children: (0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: onClick, disabled: isLoading, className: "flex w-full items-center justify-normal gap-3 rounded-lg border border-gray-200 bg-transparent px-4 py-3 text-gray-900 hover:bg-gray-100 dark:border-gray-700 dark:text-gray-100 dark:hover:bg-gray-800", children: [(0, jsx_runtime_1.jsx)(react_1.WalletIcon, { className: "h-12 w-12", loadingComponent: (0, jsx_runtime_1.jsx)("div", { className: "h-8 w-8 animate-pulse rounded-full bg-gray-200 dark:bg-gray-700" }) }), (0, jsx_runtime_1.jsx)(react_1.WalletName, { className: "font-bold text-gray-900 dark:text-gray-100", loadingComponent: (0, jsx_runtime_1.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-700" }) })] }) }, walletId));
|
|
9
9
|
}
|
|
@@ -12,15 +12,15 @@ function LoginStepContainer({ children, partnerId }) {
|
|
|
12
12
|
const { data: partner } = (0, react_1.useQueryB3)("global-accounts-partners", "find", {
|
|
13
13
|
query: {
|
|
14
14
|
partnerId,
|
|
15
|
-
$limit: 1
|
|
16
|
-
}
|
|
15
|
+
$limit: 1,
|
|
16
|
+
},
|
|
17
17
|
}, !!partnerId);
|
|
18
18
|
const partnerLogo = partner?.data?.[0]?.loginCustomization?.logoUrl;
|
|
19
19
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center justify-center py-6", children: [partnerLogo && (0, jsx_runtime_1.jsx)("img", { src: partnerLogo, alt: "Partner Logo", className: "mb-4 h-12 w-auto object-contain" }), children, (0, jsx_runtime_1.jsxs)("h2", { className: "mt-3 flex items-center gap-2 text-lg font-bold", children: ["Powered by", (0, jsx_runtime_1.jsx)("img", { alt: "B3 Logo", className: "h-5", src: "https://cdn.b3.fun/b3_logo.svg" }), "Connect"] })] }));
|
|
20
20
|
}
|
|
21
21
|
function LoginStep({ onSuccess, onError, partnerId, chain }) {
|
|
22
22
|
const wallet = (0, wallets_1.ecosystemWallet)(constants_1.ecosystemWalletId, {
|
|
23
|
-
partnerId: partnerId
|
|
23
|
+
partnerId: partnerId,
|
|
24
24
|
});
|
|
25
25
|
const { theme } = (0, react_1.useB3)();
|
|
26
26
|
const setIsAuthenticating = (0, react_1.useAuthStore)(state => state.setIsAuthenticating);
|
|
@@ -29,17 +29,17 @@ function LoginStep({ onSuccess, onError, partnerId, chain }) {
|
|
|
29
29
|
return ((0, jsx_runtime_1.jsx)(LoginStepContainer, { partnerId: partnerId, children: (0, jsx_runtime_1.jsx)(react_2.ConnectEmbed, { showThirdwebBranding: false, client: thirdweb_1.client, chain: chain, wallets: [wallet], theme: theme === "light"
|
|
30
30
|
? (0, react_2.lightTheme)({
|
|
31
31
|
colors: {
|
|
32
|
-
modalBg: "hsl(var(--b3-react-background))"
|
|
33
|
-
}
|
|
32
|
+
modalBg: "hsl(var(--b3-react-background))",
|
|
33
|
+
},
|
|
34
34
|
})
|
|
35
35
|
: (0, react_2.darkTheme)({
|
|
36
36
|
colors: {
|
|
37
|
-
modalBg: "hsl(var(--b3-react-background))"
|
|
38
|
-
}
|
|
37
|
+
modalBg: "hsl(var(--b3-react-background))",
|
|
38
|
+
},
|
|
39
39
|
}), autoConnect: true, style: {
|
|
40
40
|
width: "100%",
|
|
41
41
|
height: "100%",
|
|
42
|
-
border: 0
|
|
42
|
+
border: 0,
|
|
43
43
|
},
|
|
44
44
|
// TODO: Integrate with SIWE in useSIWE
|
|
45
45
|
// auth={{
|
|
@@ -60,7 +60,7 @@ function LoginStep({ onSuccess, onError, partnerId, chain }) {
|
|
|
60
60
|
// }}
|
|
61
61
|
header: {
|
|
62
62
|
title: "Sign in with B3",
|
|
63
|
-
titleIcon: "https://cdn.b3.fun/b3_logo.svg"
|
|
63
|
+
titleIcon: "https://cdn.b3.fun/b3_logo.svg",
|
|
64
64
|
}, onConnect: async (wallet) => {
|
|
65
65
|
try {
|
|
66
66
|
setIsAuthenticating(true);
|
|
@@ -10,5 +10,5 @@ interface LoginStepCustomProps {
|
|
|
10
10
|
strategies: AllowedStrategy[];
|
|
11
11
|
maxInitialWallets?: number;
|
|
12
12
|
}
|
|
13
|
-
export declare function LoginStepCustom({ onSuccess, onError, partnerId, chain, strategies, maxInitialWallets, automaticallySetFirstEoa }: LoginStepCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function LoginStepCustom({ onSuccess, onError, partnerId, chain, strategies, maxInitialWallets, automaticallySetFirstEoa, }: LoginStepCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -7,7 +7,7 @@ const thirdweb_1 = require("../../../../../shared/utils/thirdweb");
|
|
|
7
7
|
const react_2 = require("react");
|
|
8
8
|
const react_3 = require("thirdweb/react");
|
|
9
9
|
const wallets_1 = require("thirdweb/wallets");
|
|
10
|
-
function LoginStepCustom({ onSuccess, onError, partnerId, chain, strategies, maxInitialWallets = 2, automaticallySetFirstEoa }) {
|
|
10
|
+
function LoginStepCustom({ onSuccess, onError, partnerId, chain, strategies, maxInitialWallets = 2, automaticallySetFirstEoa, }) {
|
|
11
11
|
const [isLoading, setIsLoading] = (0, react_2.useState)(false);
|
|
12
12
|
const [showAllWallets, setShowAllWallets] = (0, react_2.useState)(false);
|
|
13
13
|
const { connect } = (0, react_1.useConnect)(partnerId, chain);
|
|
@@ -33,7 +33,7 @@ function LoginStepCustom({ onSuccess, onError, partnerId, chain, strategies, max
|
|
|
33
33
|
connectResult = await connectTW(async () => {
|
|
34
34
|
const wallet = (0, wallets_1.createWallet)(options.wallet?.id);
|
|
35
35
|
await wallet.connect({
|
|
36
|
-
client: thirdweb_1.client
|
|
36
|
+
client: thirdweb_1.client,
|
|
37
37
|
});
|
|
38
38
|
return wallet;
|
|
39
39
|
});
|
|
@@ -21,7 +21,7 @@ exports.allowedStrategies = [
|
|
|
21
21
|
"com.coinbase.wallet",
|
|
22
22
|
// Custom strategies
|
|
23
23
|
// TODO: Audit we don't use "privy" directly anymore
|
|
24
|
-
...customStrategies
|
|
24
|
+
...customStrategies,
|
|
25
25
|
];
|
|
26
26
|
function isWalletType(strategy) {
|
|
27
27
|
// Check if it's a known wallet ID pattern (com.*, io.*, etc.)
|
|
@@ -48,7 +48,7 @@ exports.strategyIcons = {
|
|
|
48
48
|
x: "https://cdn.b3.fun/x.svg?1",
|
|
49
49
|
discord: "https://cdn.b3.fun/discord.svg",
|
|
50
50
|
apple: "https://cdn.b3.fun/apple.svg",
|
|
51
|
-
guest: "https://cdn.b3.fun/incognito.svg"
|
|
51
|
+
guest: "https://cdn.b3.fun/incognito.svg",
|
|
52
52
|
// Add more strategies as needed
|
|
53
53
|
};
|
|
54
54
|
// Test it
|