@privy-io/react-auth 1.98.0 → 2.0.0-beta-20241218220832
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/abstract-smart-wallets.js +1 -1
- package/dist/cjs/actions/importWallet.js +1 -1
- package/dist/cjs/auth-flows/farcaster.js +1 -1
- package/dist/cjs/auth-flows/telegram.js +1 -1
- package/dist/cjs/client/user.js +1 -1
- package/dist/cjs/client.js +1 -1
- package/dist/cjs/components/Captcha.js +1 -1
- package/dist/cjs/components/ConnectEmailForm.js +1 -1
- package/dist/cjs/components/LoginModal.js +1 -1
- package/dist/cjs/components/QrCode.js +2 -2
- package/dist/cjs/components/UpdateEmailForm.js +1 -1
- package/dist/cjs/components/embedded-wallets/PriceDisplay.js +3 -3
- package/dist/cjs/components/embedded-wallets/SolanaTransactionDetails.js +1 -1
- package/dist/cjs/components/embedded-wallets/TransactionDetails.js +2 -2
- package/dist/cjs/components/embedded-wallets/TransactionDetailsWrapper.js +1 -1
- package/dist/cjs/components/embedded-wallets/TransactionTotal.js +1 -1
- package/dist/cjs/components/embedded-wallets/WalletLink.js +1 -1
- package/dist/cjs/components/embedded-wallets/index.js +1 -1
- package/dist/cjs/components/external-wallets/InjectedWalletIcon.js +1 -1
- package/dist/cjs/components/ui/wallet/Address.js +1 -1
- package/dist/cjs/components/ui/wallet/WalletInfoCard.js +1 -1
- package/dist/cjs/components/ui/wallet/WalletInfoCard.story.js +1 -1
- package/dist/cjs/config.js +1 -1
- package/dist/cjs/configuration/context.js +1 -1
- package/dist/cjs/connectors/coinbase.js +1 -1
- package/dist/cjs/connectors/embedded.js +1 -1
- package/dist/cjs/connectors/embeddedProvider.js +1 -1
- package/dist/cjs/connectors/errors.js +1 -1
- package/dist/cjs/connectors/ethereum/EthereumNullConnector.js +1 -1
- package/dist/cjs/connectors/ethereum/index.js +1 -1
- package/dist/cjs/connectors/index.js +1 -1
- package/dist/cjs/connectors/injected.js +1 -1
- package/dist/cjs/connectors/metamask.js +1 -1
- package/dist/cjs/connectors/phantom-solana.js +1 -1
- package/dist/cjs/connectors/phantom.js +1 -1
- package/dist/cjs/connectors/privyProxyProvider.js +1 -1
- package/dist/cjs/connectors/solana/SolanaNullConnector.js +1 -1
- package/dist/cjs/connectors/solana/index.js +1 -1
- package/dist/cjs/connectors/solana/toSolanaWalletConnectors.js +1 -1
- package/dist/cjs/connectors/walletconnect-registry.js +1 -1
- package/dist/cjs/connectors/walletconnect-v2.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/embedded-wallets/EmbeddedWalletIframe.js +1 -1
- package/dist/cjs/embedded-wallets/delegated-actions.js +1 -1
- package/dist/cjs/embedded-wallets/rpc/index.js +1 -1
- package/dist/cjs/embedded-wallets/solana/provider.js +1 -1
- package/dist/cjs/errors-42YzokZM.js +1 -0
- package/dist/cjs/hooks/captcha-context.js +1 -1
- package/dist/cjs/hooks/events-context.js +1 -1
- package/dist/cjs/hooks/internal-context.js +1 -1
- package/dist/cjs/hooks/privy-context.js +1 -1
- package/dist/cjs/hooks/privy-provider.js +1 -1
- package/dist/cjs/hooks/smart-wallets-provider.js +1 -1
- package/dist/cjs/hooks/useEmbeddedWalletCreate.js +1 -1
- package/dist/cjs/hooks/useFormattedBalances.js +1 -1
- package/dist/cjs/hooks/useImportWallet.js +1 -1
- package/dist/cjs/hooks/useLinkWithSiwe.js +1 -1
- package/dist/cjs/hooks/useLoginWithEmail.js +1 -1
- package/dist/cjs/hooks/useLoginWithOAuth.js +1 -1
- package/dist/cjs/hooks/useLoginWithPasskey.js +1 -1
- package/dist/cjs/hooks/useLoginWithSms.js +1 -1
- package/dist/cjs/hooks/usePrivy.js +1 -1
- package/dist/cjs/hooks/useSolanaWallets.js +1 -1
- package/dist/cjs/hooks/useWalletBalance.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/abstract-smart-wallets.js +1 -1
- package/dist/cjs/lib/erc20/actions/getErc20TokenInfo.js +1 -1
- package/dist/cjs/lib/ethers.js +1 -1
- package/dist/cjs/lib/funding/prepareFundingModalData.js +1 -1
- package/dist/cjs/lib/smart-wallets-shared.js +1 -1
- package/dist/cjs/lib/smart-wallets.js +1 -1
- package/dist/cjs/lib/viem/prepareTransactionRequest.js +1 -0
- package/dist/cjs/lib/viem/toViemTransactionSerializable.js +1 -0
- package/dist/cjs/lib/wallets/actions/getBalanceForChains.js +1 -1
- package/dist/cjs/lib/wallets/actions/getErc20Balance.js +1 -1
- package/dist/cjs/privy-components/user-pill/Account.js +1 -1
- package/dist/cjs/privy-components/user-pill/PrimaryAccount.js +1 -1
- package/dist/cjs/privy-components/user-pill/PrimaryWallet.js +1 -1
- package/dist/cjs/privy-components/user-pill/UserMenu.js +1 -1
- package/dist/cjs/privy-components/user-pill/UserPill.js +2 -2
- package/dist/cjs/privy-components/user-pill/UserPill.test.js +1 -1
- package/dist/cjs/privy-components/user-pill/screens/AccountScreen.js +1 -1
- package/dist/cjs/privy-components/user-pill/screens/LinkedAccountsScreen.js +1 -1
- package/dist/cjs/privy-components/user-pill/screens/MenuScreen.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/ActiveWalletCard.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/ConnectWalletView.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/SelectActiveWalletView.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/WalletCardView.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/WalletsDialog.js +1 -1
- package/dist/cjs/privy-components/wallets-pill/useActiveWallet.js +1 -1
- package/dist/cjs/privy-provider-El73p7ez.js +2 -0
- package/dist/cjs/screens/AccountTransferScreen/EmbeddedWalletInfoView.js +1 -1
- package/dist/cjs/screens/AccountTransferScreen/LinkConflictScreen.js +1 -1
- package/dist/cjs/screens/AffirmativeConsentScreen.js +1 -1
- package/dist/cjs/screens/AwaitingPasswordlessCodeScreen.js +1 -1
- package/dist/cjs/screens/CaptchaScreen.js +1 -1
- package/dist/cjs/screens/ConnectOnlyAuthenticatedScreen.js +1 -1
- package/dist/cjs/screens/ConnectOnlyLandingScreen.js +1 -1
- package/dist/cjs/screens/ConnectOnlyStatusScreen.js +1 -1
- package/dist/cjs/screens/ConnectionStatusScreen.js +2 -2
- package/dist/cjs/screens/CrossAppAuthScreen.js +1 -1
- package/dist/cjs/screens/DelegatedActionsConsentScreen.js +1 -1
- package/dist/cjs/screens/EmbeddedWalletConnectingScreen.js +1 -1
- package/dist/cjs/screens/EmbeddedWalletCreatedScreen.js +1 -1
- package/dist/cjs/screens/EmbeddedWalletKeyExportScreen.js +2 -2
- package/dist/cjs/screens/EmbeddedWalletOnAccountCreateScreen.js +1 -1
- package/dist/cjs/screens/EmbeddedWalletPasswordUpdateScreen.js +1 -1
- package/dist/cjs/screens/ErrorScreen.js +1 -1
- package/dist/cjs/screens/FarcasterConnectStatusScreen.js +2 -2
- package/dist/cjs/screens/FarcasterSignerStatusScreen.js +2 -2
- package/dist/cjs/screens/Funding/AwaitingEvmToSolBridgingScreen.js +1 -1
- package/dist/cjs/screens/Funding/AwaitingExternalSolanaTransferScreen.js +2 -2
- package/dist/cjs/screens/Funding/AwaitingExternalTransferScreen.js +1 -1
- package/dist/cjs/screens/Funding/AwaitingSolToEvmBridgingScreen.js +1 -1
- package/dist/cjs/screens/Funding/BridgeNetworkSelectionView.js +1 -1
- package/dist/cjs/screens/Funding/FundingEditAmountScreen.js +1 -1
- package/dist/cjs/screens/Funding/FundingMethodSelectionScreen.js +1 -1
- package/dist/cjs/screens/Funding/ManualTransferScreen.js +1 -1
- package/dist/cjs/screens/Funding/TransferFromWalletScreen.js +1 -1
- package/dist/cjs/screens/Funding/TransferOrBridgeLoadingScreen.js +1 -1
- package/dist/cjs/screens/Funding/styles.js +1 -1
- package/dist/cjs/screens/LandingScreen/ConnectOrCreateScreen.js +1 -1
- package/dist/cjs/screens/LandingScreen/CustomLandingScreenView.js +1 -1
- package/dist/cjs/screens/LandingScreen/EmailButton.js +1 -1
- package/dist/cjs/screens/LandingScreen/FarcasterButton.js +1 -1
- package/dist/cjs/screens/LandingScreen/LandingScreen.js +1 -1
- package/dist/cjs/screens/LandingScreen/LandingScreenView.js +1 -1
- package/dist/cjs/screens/LandingScreen/PasskeyLink.js +1 -1
- package/dist/cjs/screens/LandingScreen/SmsButton.js +1 -1
- package/dist/cjs/screens/LandingScreen/SocialButton.js +1 -1
- package/dist/cjs/screens/LandingScreen/TelegramButton.js +1 -1
- package/dist/cjs/screens/LinkEmailScreen.js +1 -1
- package/dist/cjs/screens/LinkWalletScreen.js +1 -1
- package/dist/cjs/screens/MfaScreens/EnrollPasskey.js +1 -1
- package/dist/cjs/screens/MfaScreens/EnrollSms.js +1 -1
- package/dist/cjs/screens/MfaScreens/EnrollTotp.js +1 -1
- package/dist/cjs/screens/MfaScreens/MfaEnrollmentFlowScreen.js +1 -1
- package/dist/cjs/screens/MfaScreens/MfaVerifyFlowScreen.js +1 -1
- package/dist/cjs/screens/MfaScreens/VerifyWithPasskey.js +1 -1
- package/dist/cjs/screens/OAuthStatusScreen.js +1 -1
- package/dist/cjs/screens/Recovery/PasswordRecoveryScreen.js +1 -1
- package/dist/cjs/screens/Recovery/RecoveryPasswordCreateScreen.js +1 -1
- package/dist/cjs/screens/Recovery/RecoverySelectionScreen.js +1 -1
- package/dist/cjs/screens/Recovery/SetAutomaticRecoveryScreen.js +1 -1
- package/dist/cjs/screens/SendSolanaTransactionScreen/SendSolanaTransactionScreen.js +1 -1
- package/dist/cjs/screens/SendSolanaTransactionScreen/SolanaTransactionReceiptView.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/SendTransactionScreen.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/SendTransactionScreenView.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/TransactionDetail.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/TransactionErrorView.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/TransactionReceiptView.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/index.js +1 -1
- package/dist/cjs/screens/SendTransactionScreen/usePrepareTransaction.js +1 -1
- package/dist/cjs/screens/SignRequestScreen.js +1 -1
- package/dist/cjs/screens/TelegramAuthScreen.js +1 -1
- package/dist/cjs/screens/UpdateEmailScreen.js +1 -1
- package/dist/cjs/session.js +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/svg/qr-codes.js +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/utils/eth/getPublicClient.js +1 -0
- package/dist/cjs/utils/index.js +1 -1
- package/dist/dts/index.d.mts +703 -101
- package/dist/dts/index.d.ts +703 -101
- package/dist/dts/solana.d.mts +2 -4
- package/dist/dts/solana.d.ts +2 -4
- package/dist/dts/{types-DLYwr0wq.d.mts → types-BlSTYBTj.d.mts} +5 -45
- package/dist/dts/{types-DLYwr0wq.d.ts → types-BlSTYBTj.d.ts} +5 -45
- package/dist/dts/ui.d.mts +1 -3
- package/dist/dts/ui.d.ts +1 -3
- package/dist/dts/{useFundSolanaWallet-DNaRhc-b.d.mts → useFundSolanaWallet-BSJVk8QT.d.mts} +7 -15
- package/dist/dts/{useFundSolanaWallet-DNaRhc-b.d.ts → useFundSolanaWallet-BSJVk8QT.d.ts} +7 -15
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/actions/importWallet.mjs +1 -1
- package/dist/esm/auth-flows/farcaster.mjs +1 -1
- package/dist/esm/auth-flows/telegram.mjs +1 -1
- package/dist/esm/client/user.mjs +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/components/Captcha.mjs +1 -1
- package/dist/esm/components/ConnectEmailForm.mjs +1 -1
- package/dist/esm/components/LoginModal.mjs +1 -1
- package/dist/esm/components/QrCode.mjs +2 -2
- package/dist/esm/components/UpdateEmailForm.mjs +1 -1
- package/dist/esm/components/embedded-wallets/PriceDisplay.mjs +3 -3
- package/dist/esm/components/embedded-wallets/SolanaTransactionDetails.mjs +1 -1
- package/dist/esm/components/embedded-wallets/TransactionDetails.mjs +2 -2
- package/dist/esm/components/embedded-wallets/TransactionDetailsWrapper.mjs +1 -1
- package/dist/esm/components/embedded-wallets/TransactionTotal.mjs +1 -1
- package/dist/esm/components/embedded-wallets/WalletLink.mjs +1 -1
- package/dist/esm/components/embedded-wallets/index.mjs +1 -1
- package/dist/esm/components/external-wallets/InjectedWalletIcon.mjs +1 -1
- package/dist/esm/components/ui/wallet/Address.mjs +1 -1
- package/dist/esm/components/ui/wallet/WalletInfoCard.mjs +1 -1
- package/dist/esm/components/ui/wallet/WalletInfoCard.story.mjs +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/configuration/context.mjs +1 -1
- package/dist/esm/connectors/coinbase.mjs +1 -1
- package/dist/esm/connectors/embedded.mjs +1 -1
- package/dist/esm/connectors/embeddedProvider.mjs +1 -1
- package/dist/esm/connectors/errors.mjs +1 -1
- package/dist/esm/connectors/ethereum/EthereumNullConnector.mjs +1 -1
- package/dist/esm/connectors/ethereum/index.mjs +1 -1
- package/dist/esm/connectors/index.mjs +1 -1
- package/dist/esm/connectors/injected.mjs +1 -1
- package/dist/esm/connectors/metamask.mjs +1 -1
- package/dist/esm/connectors/phantom-solana.mjs +1 -1
- package/dist/esm/connectors/phantom.mjs +1 -1
- package/dist/esm/connectors/privyProxyProvider.mjs +1 -1
- package/dist/esm/connectors/solana/SolanaNullConnector.mjs +1 -1
- package/dist/esm/connectors/solana/index.mjs +1 -1
- package/dist/esm/connectors/solana/toSolanaWalletConnectors.mjs +1 -1
- package/dist/esm/connectors/walletconnect-registry.mjs +1 -1
- package/dist/esm/connectors/walletconnect-v2.mjs +1 -1
- package/dist/esm/constants.mjs +1 -1
- package/dist/esm/embedded-wallets/EmbeddedWalletIframe.mjs +1 -1
- package/dist/esm/embedded-wallets/delegated-actions.mjs +1 -1
- package/dist/esm/embedded-wallets/rpc/index.mjs +1 -1
- package/dist/esm/embedded-wallets/solana/provider.mjs +1 -1
- package/dist/esm/errors-l5CH-t4_.mjs +1 -0
- package/dist/esm/hooks/captcha-context.mjs +1 -1
- package/dist/esm/hooks/events-context.mjs +1 -1
- package/dist/esm/hooks/internal-context.mjs +1 -1
- package/dist/esm/hooks/privy-context.mjs +1 -1
- package/dist/esm/hooks/privy-provider.mjs +1 -1
- package/dist/esm/hooks/smart-wallets-provider.mjs +1 -1
- package/dist/esm/hooks/useEmbeddedWalletCreate.mjs +1 -1
- package/dist/esm/hooks/useFormattedBalances.mjs +1 -1
- package/dist/esm/hooks/useImportWallet.mjs +1 -1
- package/dist/esm/hooks/useLinkWithSiwe.mjs +1 -1
- package/dist/esm/hooks/useLoginWithEmail.mjs +1 -1
- package/dist/esm/hooks/useLoginWithOAuth.mjs +1 -1
- package/dist/esm/hooks/useLoginWithPasskey.mjs +1 -1
- package/dist/esm/hooks/useLoginWithSms.mjs +1 -1
- package/dist/esm/hooks/usePrivy.mjs +1 -1
- package/dist/esm/hooks/useSolanaWallets.mjs +1 -1
- package/dist/esm/hooks/useWalletBalance.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/lib/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/lib/erc20/actions/getErc20TokenInfo.mjs +1 -1
- package/dist/esm/lib/ethers.mjs +1 -1
- package/dist/esm/lib/funding/prepareFundingModalData.mjs +1 -1
- package/dist/esm/lib/smart-wallets-shared.mjs +1 -1
- package/dist/esm/lib/smart-wallets.mjs +1 -1
- package/dist/esm/lib/viem/prepareTransactionRequest.mjs +1 -0
- package/dist/esm/lib/viem/toViemTransactionSerializable.mjs +1 -0
- package/dist/esm/lib/wallets/actions/getBalanceForChains.mjs +1 -1
- package/dist/esm/lib/wallets/actions/getErc20Balance.mjs +1 -1
- package/dist/esm/privy-components/user-pill/Account.mjs +1 -1
- package/dist/esm/privy-components/user-pill/PrimaryAccount.mjs +1 -1
- package/dist/esm/privy-components/user-pill/PrimaryWallet.mjs +1 -1
- package/dist/esm/privy-components/user-pill/UserMenu.mjs +1 -1
- package/dist/esm/privy-components/user-pill/UserPill.mjs +2 -2
- package/dist/esm/privy-components/user-pill/UserPill.test.mjs +1 -1
- package/dist/esm/privy-components/user-pill/screens/AccountScreen.mjs +1 -1
- package/dist/esm/privy-components/user-pill/screens/LinkedAccountsScreen.mjs +1 -1
- package/dist/esm/privy-components/user-pill/screens/MenuScreen.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/ActiveWalletCard.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/ConnectWalletView.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/SelectActiveWalletView.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/WalletCardView.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/WalletsDialog.mjs +1 -1
- package/dist/esm/privy-components/wallets-pill/useActiveWallet.mjs +1 -1
- package/dist/esm/privy-provider-CMFBXAga.mjs +2 -0
- package/dist/esm/screens/AccountTransferScreen/EmbeddedWalletInfoView.mjs +1 -1
- package/dist/esm/screens/AccountTransferScreen/LinkConflictScreen.mjs +1 -1
- package/dist/esm/screens/AffirmativeConsentScreen.mjs +1 -1
- package/dist/esm/screens/AwaitingPasswordlessCodeScreen.mjs +1 -1
- package/dist/esm/screens/CaptchaScreen.mjs +1 -1
- package/dist/esm/screens/ConnectOnlyAuthenticatedScreen.mjs +1 -1
- package/dist/esm/screens/ConnectOnlyLandingScreen.mjs +1 -1
- package/dist/esm/screens/ConnectOnlyStatusScreen.mjs +1 -1
- package/dist/esm/screens/ConnectionStatusScreen.mjs +1 -1
- package/dist/esm/screens/CrossAppAuthScreen.mjs +1 -1
- package/dist/esm/screens/DelegatedActionsConsentScreen.mjs +1 -1
- package/dist/esm/screens/EmbeddedWalletConnectingScreen.mjs +1 -1
- package/dist/esm/screens/EmbeddedWalletCreatedScreen.mjs +1 -1
- package/dist/esm/screens/EmbeddedWalletKeyExportScreen.mjs +2 -2
- package/dist/esm/screens/EmbeddedWalletOnAccountCreateScreen.mjs +1 -1
- package/dist/esm/screens/EmbeddedWalletPasswordUpdateScreen.mjs +1 -1
- package/dist/esm/screens/ErrorScreen.mjs +1 -1
- package/dist/esm/screens/FarcasterConnectStatusScreen.mjs +2 -2
- package/dist/esm/screens/FarcasterSignerStatusScreen.mjs +2 -2
- package/dist/esm/screens/Funding/AwaitingEvmToSolBridgingScreen.mjs +1 -1
- package/dist/esm/screens/Funding/AwaitingExternalSolanaTransferScreen.mjs +2 -2
- package/dist/esm/screens/Funding/AwaitingExternalTransferScreen.mjs +2 -2
- package/dist/esm/screens/Funding/AwaitingSolToEvmBridgingScreen.mjs +1 -1
- package/dist/esm/screens/Funding/BridgeNetworkSelectionView.mjs +1 -1
- package/dist/esm/screens/Funding/FundingEditAmountScreen.mjs +1 -1
- package/dist/esm/screens/Funding/FundingMethodSelectionScreen.mjs +1 -1
- package/dist/esm/screens/Funding/ManualTransferScreen.mjs +1 -1
- package/dist/esm/screens/Funding/TransferFromWalletScreen.mjs +1 -1
- package/dist/esm/screens/Funding/TransferOrBridgeLoadingScreen.mjs +1 -1
- package/dist/esm/screens/Funding/styles.mjs +1 -1
- package/dist/esm/screens/LandingScreen/ConnectOrCreateScreen.mjs +1 -1
- package/dist/esm/screens/LandingScreen/CustomLandingScreenView.mjs +1 -1
- package/dist/esm/screens/LandingScreen/EmailButton.mjs +1 -1
- package/dist/esm/screens/LandingScreen/FarcasterButton.mjs +1 -1
- package/dist/esm/screens/LandingScreen/LandingScreen.mjs +1 -1
- package/dist/esm/screens/LandingScreen/LandingScreenView.mjs +1 -1
- package/dist/esm/screens/LandingScreen/PasskeyLink.mjs +1 -1
- package/dist/esm/screens/LandingScreen/SmsButton.mjs +1 -1
- package/dist/esm/screens/LandingScreen/SocialButton.mjs +1 -1
- package/dist/esm/screens/LandingScreen/TelegramButton.mjs +1 -1
- package/dist/esm/screens/LinkEmailScreen.mjs +1 -1
- package/dist/esm/screens/LinkWalletScreen.mjs +1 -1
- package/dist/esm/screens/MfaScreens/EnrollPasskey.mjs +1 -1
- package/dist/esm/screens/MfaScreens/EnrollSms.mjs +1 -1
- package/dist/esm/screens/MfaScreens/EnrollTotp.mjs +1 -1
- package/dist/esm/screens/MfaScreens/MfaEnrollmentFlowScreen.mjs +1 -1
- package/dist/esm/screens/MfaScreens/MfaVerifyFlowScreen.mjs +1 -1
- package/dist/esm/screens/MfaScreens/VerifyWithPasskey.mjs +1 -1
- package/dist/esm/screens/OAuthStatusScreen.mjs +1 -1
- package/dist/esm/screens/Recovery/PasswordRecoveryScreen.mjs +1 -1
- package/dist/esm/screens/Recovery/RecoveryPasswordCreateScreen.mjs +1 -1
- package/dist/esm/screens/Recovery/RecoverySelectionScreen.mjs +1 -1
- package/dist/esm/screens/Recovery/SetAutomaticRecoveryScreen.mjs +1 -1
- package/dist/esm/screens/SendSolanaTransactionScreen/SendSolanaTransactionScreen.mjs +1 -1
- package/dist/esm/screens/SendSolanaTransactionScreen/SolanaTransactionReceiptView.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/SendTransactionScreen.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/SendTransactionScreenView.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/TransactionDetail.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/TransactionErrorView.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/TransactionReceiptView.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/index.mjs +1 -1
- package/dist/esm/screens/SendTransactionScreen/usePrepareTransaction.mjs +1 -1
- package/dist/esm/screens/SignRequestScreen.mjs +1 -1
- package/dist/esm/screens/TelegramAuthScreen.mjs +1 -1
- package/dist/esm/screens/UpdateEmailScreen.mjs +1 -1
- package/dist/esm/session.mjs +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/svg/qr-codes.mjs +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/utils/eth/getPublicClient.mjs +1 -0
- package/dist/esm/utils/index.mjs +1 -1
- package/package.json +7 -19
- package/dist/cjs/errors-3fxlG6WB.js +0 -1
- package/dist/cjs/ethers-De6TACnn.js +0 -1
- package/dist/cjs/index-DNFBYH7-.js +0 -1
- package/dist/cjs/lib/polygonGasStation.js +0 -1
- package/dist/cjs/privy-provider-Bb_yjats.js +0 -2
- package/dist/cjs/screens/SendTransactionScreen/EthersTransactionError.js +0 -1
- package/dist/esm/errors-9ucGZPEs.mjs +0 -1
- package/dist/esm/ethers-Cz-frLvN.mjs +0 -1
- package/dist/esm/index-B3QfI7v9.mjs +0 -1
- package/dist/esm/lib/polygonGasStation.mjs +0 -1
- package/dist/esm/privy-provider-Bvi3C9T4.mjs +0 -2
- package/dist/esm/screens/SendTransactionScreen/EthersTransactionError.mjs +0 -1
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { C as ConnectedSolanaWallet, S as SolanaAdapterConnector, a as SolanaTransactionReceipt, b as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-
|
|
2
|
-
export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-
|
|
3
|
-
import '@ethersproject/providers';
|
|
1
|
+
export { C as ConnectedSolanaWallet, S as SolanaAdapterConnector, a as SolanaTransactionReceipt, b as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-BlSTYBTj.js';
|
|
2
|
+
export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-BSJVk8QT.js';
|
|
4
3
|
import '@solana/wallet-adapter-base';
|
|
5
4
|
import 'react';
|
|
6
5
|
import 'viem';
|
|
7
|
-
import 'web3-core';
|
|
8
6
|
import '@privy-io/js-sdk-core';
|
|
9
7
|
import '@privy-io/public-api';
|
|
10
8
|
import 'eventemitter3';
|
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { C as ConnectedSolanaWallet, S as SolanaAdapterConnector, a as SolanaTransactionReceipt, b as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-
|
|
2
|
-
export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-
|
|
3
|
-
import '@ethersproject/providers';
|
|
1
|
+
export { C as ConnectedSolanaWallet, S as SolanaAdapterConnector, a as SolanaTransactionReceipt, b as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-BlSTYBTj.js';
|
|
2
|
+
export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-BSJVk8QT.js';
|
|
4
3
|
import '@solana/wallet-adapter-base';
|
|
5
4
|
import 'react';
|
|
6
5
|
import 'viem';
|
|
7
|
-
import 'web3-core';
|
|
8
6
|
import '@privy-io/js-sdk-core';
|
|
9
7
|
import '@privy-io/public-api';
|
|
10
8
|
import 'eventemitter3';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Web3Provider } from '@ethersproject/providers';
|
|
2
1
|
import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
|
|
3
2
|
import { ReactElement } from 'react';
|
|
4
3
|
import { Hex } from 'viem';
|
|
5
|
-
import {
|
|
6
|
-
import { Cluster as Cluster$1, CountryCode } from '@privy-io/js-sdk-core';
|
|
4
|
+
import { CountryCode } from '@privy-io/js-sdk-core';
|
|
7
5
|
import { CustomMetadataType, SmartWalletType, PasskeyAuthenticateInputType } from '@privy-io/public-api';
|
|
8
6
|
import EventEmitter from 'eventemitter3';
|
|
9
7
|
import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
|
|
@@ -549,9 +547,7 @@ type PreferredCardProvider = 'coinbase' | 'moonpay';
|
|
|
549
547
|
*/
|
|
550
548
|
type SolanaFundingConfig = {
|
|
551
549
|
/** The cluster used for connections */
|
|
552
|
-
cluster?:
|
|
553
|
-
name: Cluster$1;
|
|
554
|
-
};
|
|
550
|
+
cluster?: SolanaCluster;
|
|
555
551
|
/** The default amount in SOL */
|
|
556
552
|
amount?: string;
|
|
557
553
|
/** The default funding method */
|
|
@@ -733,7 +729,7 @@ interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
|
|
|
733
729
|
/**
|
|
734
730
|
* Switch the network chain to a specified ID.
|
|
735
731
|
* Note: The chainId must be a supported network: https://docs.privy.io/guide/frontend/embedded/networks
|
|
736
|
-
* Note: This will not update any existing provider instances, re-request `wallet.
|
|
732
|
+
* Note: This will not update any existing provider instances, re-request `wallet.getEthereumProvider` (e.g.)
|
|
737
733
|
* to get a provider with the updated chainId.
|
|
738
734
|
*
|
|
739
735
|
* @param targetChainId The specified chain ID to switch to, as a number or 0x prefixed string.
|
|
@@ -742,8 +738,6 @@ interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
|
|
|
742
738
|
switchChain: (targetChainId: `0x${string}` | number) => Promise<void>;
|
|
743
739
|
/** Helper methods to build providers for interfacing with this wallet. */
|
|
744
740
|
getEthereumProvider: () => Promise<EIP1193Provider>;
|
|
745
|
-
getEthersProvider: () => Promise<Web3Provider>;
|
|
746
|
-
getWeb3jsProvider: () => Promise<AbstractProvider>;
|
|
747
741
|
/**
|
|
748
742
|
* Perform personal_sign with the user's wallet.
|
|
749
743
|
*
|
|
@@ -1502,15 +1496,6 @@ interface PrivyClientConfig {
|
|
|
1502
1496
|
* Defaults to false.
|
|
1503
1497
|
*/
|
|
1504
1498
|
requireUserPasswordOnCreate?: boolean;
|
|
1505
|
-
/**
|
|
1506
|
-
* @deprecated. Instead, use the server-driven configuration found in the Privy console: https://dashboard.privy.io/apps/YOUR_APP_ID/embedded.
|
|
1507
|
-
* or the client-side 'embeddedWallets.showWalletUIs' configuration.
|
|
1508
|
-
* If true, Privy will not prompt or instantiate any UI for embedded wallet signatures and transactions.
|
|
1509
|
-
* If false, embedded wallet actions will raise a modal and require user confirmation to proceed.
|
|
1510
|
-
*
|
|
1511
|
-
* Defaults to false.
|
|
1512
|
-
*/
|
|
1513
|
-
noPromptOnSignature?: boolean;
|
|
1514
1499
|
/**
|
|
1515
1500
|
* Override any settings for the embedded wallet's UI to show or hide the wallet UIs.
|
|
1516
1501
|
*
|
|
@@ -1520,31 +1505,6 @@ interface PrivyClientConfig {
|
|
|
1520
1505
|
* If not set, the default behavior will match the server configuration.
|
|
1521
1506
|
*/
|
|
1522
1507
|
showWalletUIs?: boolean;
|
|
1523
|
-
/**
|
|
1524
|
-
* @experimental
|
|
1525
|
-
*
|
|
1526
|
-
* **This setting is only honored when using the EIP-1193 Ethereum Provider to interface
|
|
1527
|
-
* with the embedded wallet, i.e. using `getEthereumProvider` or `getEthersProvider`.
|
|
1528
|
-
* This setting is only honored when used alongside `showWalletUIs: false`**
|
|
1529
|
-
*
|
|
1530
|
-
* If true, calls to `sendTransaction` will wait for the transaction to be confirmed before resolving.
|
|
1531
|
-
* If false, calls to `sendTransaction` will resolve once the transaction has been submitted.
|
|
1532
|
-
*
|
|
1533
|
-
* Defaults to true.
|
|
1534
|
-
*
|
|
1535
|
-
* @example
|
|
1536
|
-
* <PrivyProvider
|
|
1537
|
-
* config={{
|
|
1538
|
-
* embeddedWallets: {
|
|
1539
|
-
* showWalletUIs: false,
|
|
1540
|
-
* waitForTransactionConfirmation: false,
|
|
1541
|
-
* },
|
|
1542
|
-
* }}
|
|
1543
|
-
* >
|
|
1544
|
-
* {children}
|
|
1545
|
-
* </PrivyProvider>
|
|
1546
|
-
*/
|
|
1547
|
-
waitForTransactionConfirmation?: boolean;
|
|
1548
1508
|
/**
|
|
1549
1509
|
* Options to customize the display of transaction prices in the embedded wallet's transaction
|
|
1550
1510
|
* prompt. You may configure a primary currency to emphasize, and a secondary currency to show
|
|
@@ -1910,7 +1870,7 @@ type SendTransactionModalUIOptions = {
|
|
|
1910
1870
|
};
|
|
1911
1871
|
/**
|
|
1912
1872
|
* Our external-facing `UnsignedTransactionRequest` type makes the `chainId` field optional,
|
|
1913
|
-
* matching ethers, wagmi, and
|
|
1873
|
+
* matching ethers, wagmi, and other libraries. However, our modal needs to be "aware"
|
|
1914
1874
|
* of the transaction's `chainId` to ensure it does price conversion, quote labeling, etc. importantly.
|
|
1915
1875
|
*
|
|
1916
1876
|
* Thus, in the modal, we enforce a stricter type `UnsignedTransactionRequestWithChainId` which wraps
|
|
@@ -2128,4 +2088,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
|
|
|
2128
2088
|
type SolanaRpcRequestType = solana_signMessage;
|
|
2129
2089
|
type SolanaRpcResponseType = solana_signMessageResponse;
|
|
2130
2090
|
|
|
2131
|
-
export { type
|
|
2091
|
+
export { type SmartWalletConfig as $, type BaseConnectedWallet as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectWalletModalOptions as D, type EthereumRpcRequestType as E, type FundingMethod as F, type LoginModalOptions as G, type CreateWalletOptions as H, type SetWalletRecoveryOptions as I, type SignMessageModalUIOptions as J, type SignTypedDataParams as K, type LoginMethod as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type SendTransactionModalUIOptions as Q, type RuntimeLoginOverridableOptions as R, SolanaWalletConnector as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type OAuthProviderType as Y, type MoonpaySignRequest as Z, type MoonpaySignResponse as _, type SolanaTransactionReceipt as a, type PrivyServerConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type OAuthUserInfo as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type UnsignedTransactionRequestWithChainId as a9, type GithubOAuthWithMetadata as aA, type TiktokOAuthWithMetadata as aB, type LinkedInOAuthWithMetadata as aC, type AppleOAuthWithMetadata as aD, type FarcasterWithMetadata as aE, type TelegramWithMetadata as aF, type CrossAppAccountWithMetadata as aG, type PasskeyWithMetadata as aH, type Email as aI, type Phone as aJ, type TransactionUIOptions as aK, type ContractUIOptions as aL, type NativeFundingConfig as aM, type MoonpayFundingConfig as aN, type PriceDisplayOptions as aO, type Farcaster as aP, type Passkey as aQ, type LoginMethodOrderOption as aR, type BaseConnectedWalletType as aa, type CustomAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type TransactionReceipt as aj, type NonEmptyArray as ak, type EmailWithMetadata as al, type PhoneWithMetadata as am, type WalletWithMetadata as an, type Google as ao, type Twitter as ap, type Discord as aq, type Github as ar, type LinkedIn as as, type Apple as at, type Tiktok as au, type Telegram as av, type CrossAppAccount as aw, type GoogleOAuthWithMetadata as ax, type TwitterOAuthWithMetadata as ay, type DiscordOAuthWithMetadata as az, type SupportedSolanaTransaction as b, type Chain as c, type LinkedAccountWithMetadata as d, type BaseConnectedSolanaWallet as e, type UserRecoveryMethod as f, type SolanaCluster as g, type SolanaFundingConfig as h, type PrivyFarcasterSignerInitResponse as i, type MfaSubmitArgs as j, type SolanaRpcRequestType as k, type EthereumRpcResponseType as l, type SolanaRpcResponseType as m, type PrivyClientConfig as n, type RpcConfig as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletTimeoutError as s, toSolanaWalletConnectors as t, WalletConnector as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type ConnectorType as x, type WalletListEntry as y, type ExternalWalletsConfig as z };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Web3Provider } from '@ethersproject/providers';
|
|
2
1
|
import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
|
|
3
2
|
import { ReactElement } from 'react';
|
|
4
3
|
import { Hex } from 'viem';
|
|
5
|
-
import {
|
|
6
|
-
import { Cluster as Cluster$1, CountryCode } from '@privy-io/js-sdk-core';
|
|
4
|
+
import { CountryCode } from '@privy-io/js-sdk-core';
|
|
7
5
|
import { CustomMetadataType, SmartWalletType, PasskeyAuthenticateInputType } from '@privy-io/public-api';
|
|
8
6
|
import EventEmitter from 'eventemitter3';
|
|
9
7
|
import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
|
|
@@ -549,9 +547,7 @@ type PreferredCardProvider = 'coinbase' | 'moonpay';
|
|
|
549
547
|
*/
|
|
550
548
|
type SolanaFundingConfig = {
|
|
551
549
|
/** The cluster used for connections */
|
|
552
|
-
cluster?:
|
|
553
|
-
name: Cluster$1;
|
|
554
|
-
};
|
|
550
|
+
cluster?: SolanaCluster;
|
|
555
551
|
/** The default amount in SOL */
|
|
556
552
|
amount?: string;
|
|
557
553
|
/** The default funding method */
|
|
@@ -733,7 +729,7 @@ interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
|
|
|
733
729
|
/**
|
|
734
730
|
* Switch the network chain to a specified ID.
|
|
735
731
|
* Note: The chainId must be a supported network: https://docs.privy.io/guide/frontend/embedded/networks
|
|
736
|
-
* Note: This will not update any existing provider instances, re-request `wallet.
|
|
732
|
+
* Note: This will not update any existing provider instances, re-request `wallet.getEthereumProvider` (e.g.)
|
|
737
733
|
* to get a provider with the updated chainId.
|
|
738
734
|
*
|
|
739
735
|
* @param targetChainId The specified chain ID to switch to, as a number or 0x prefixed string.
|
|
@@ -742,8 +738,6 @@ interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
|
|
|
742
738
|
switchChain: (targetChainId: `0x${string}` | number) => Promise<void>;
|
|
743
739
|
/** Helper methods to build providers for interfacing with this wallet. */
|
|
744
740
|
getEthereumProvider: () => Promise<EIP1193Provider>;
|
|
745
|
-
getEthersProvider: () => Promise<Web3Provider>;
|
|
746
|
-
getWeb3jsProvider: () => Promise<AbstractProvider>;
|
|
747
741
|
/**
|
|
748
742
|
* Perform personal_sign with the user's wallet.
|
|
749
743
|
*
|
|
@@ -1502,15 +1496,6 @@ interface PrivyClientConfig {
|
|
|
1502
1496
|
* Defaults to false.
|
|
1503
1497
|
*/
|
|
1504
1498
|
requireUserPasswordOnCreate?: boolean;
|
|
1505
|
-
/**
|
|
1506
|
-
* @deprecated. Instead, use the server-driven configuration found in the Privy console: https://dashboard.privy.io/apps/YOUR_APP_ID/embedded.
|
|
1507
|
-
* or the client-side 'embeddedWallets.showWalletUIs' configuration.
|
|
1508
|
-
* If true, Privy will not prompt or instantiate any UI for embedded wallet signatures and transactions.
|
|
1509
|
-
* If false, embedded wallet actions will raise a modal and require user confirmation to proceed.
|
|
1510
|
-
*
|
|
1511
|
-
* Defaults to false.
|
|
1512
|
-
*/
|
|
1513
|
-
noPromptOnSignature?: boolean;
|
|
1514
1499
|
/**
|
|
1515
1500
|
* Override any settings for the embedded wallet's UI to show or hide the wallet UIs.
|
|
1516
1501
|
*
|
|
@@ -1520,31 +1505,6 @@ interface PrivyClientConfig {
|
|
|
1520
1505
|
* If not set, the default behavior will match the server configuration.
|
|
1521
1506
|
*/
|
|
1522
1507
|
showWalletUIs?: boolean;
|
|
1523
|
-
/**
|
|
1524
|
-
* @experimental
|
|
1525
|
-
*
|
|
1526
|
-
* **This setting is only honored when using the EIP-1193 Ethereum Provider to interface
|
|
1527
|
-
* with the embedded wallet, i.e. using `getEthereumProvider` or `getEthersProvider`.
|
|
1528
|
-
* This setting is only honored when used alongside `showWalletUIs: false`**
|
|
1529
|
-
*
|
|
1530
|
-
* If true, calls to `sendTransaction` will wait for the transaction to be confirmed before resolving.
|
|
1531
|
-
* If false, calls to `sendTransaction` will resolve once the transaction has been submitted.
|
|
1532
|
-
*
|
|
1533
|
-
* Defaults to true.
|
|
1534
|
-
*
|
|
1535
|
-
* @example
|
|
1536
|
-
* <PrivyProvider
|
|
1537
|
-
* config={{
|
|
1538
|
-
* embeddedWallets: {
|
|
1539
|
-
* showWalletUIs: false,
|
|
1540
|
-
* waitForTransactionConfirmation: false,
|
|
1541
|
-
* },
|
|
1542
|
-
* }}
|
|
1543
|
-
* >
|
|
1544
|
-
* {children}
|
|
1545
|
-
* </PrivyProvider>
|
|
1546
|
-
*/
|
|
1547
|
-
waitForTransactionConfirmation?: boolean;
|
|
1548
1508
|
/**
|
|
1549
1509
|
* Options to customize the display of transaction prices in the embedded wallet's transaction
|
|
1550
1510
|
* prompt. You may configure a primary currency to emphasize, and a secondary currency to show
|
|
@@ -1910,7 +1870,7 @@ type SendTransactionModalUIOptions = {
|
|
|
1910
1870
|
};
|
|
1911
1871
|
/**
|
|
1912
1872
|
* Our external-facing `UnsignedTransactionRequest` type makes the `chainId` field optional,
|
|
1913
|
-
* matching ethers, wagmi, and
|
|
1873
|
+
* matching ethers, wagmi, and other libraries. However, our modal needs to be "aware"
|
|
1914
1874
|
* of the transaction's `chainId` to ensure it does price conversion, quote labeling, etc. importantly.
|
|
1915
1875
|
*
|
|
1916
1876
|
* Thus, in the modal, we enforce a stricter type `UnsignedTransactionRequestWithChainId` which wraps
|
|
@@ -2128,4 +2088,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
|
|
|
2128
2088
|
type SolanaRpcRequestType = solana_signMessage;
|
|
2129
2089
|
type SolanaRpcResponseType = solana_signMessageResponse;
|
|
2130
2090
|
|
|
2131
|
-
export { type
|
|
2091
|
+
export { type SmartWalletConfig as $, type BaseConnectedWallet as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectWalletModalOptions as D, type EthereumRpcRequestType as E, type FundingMethod as F, type LoginModalOptions as G, type CreateWalletOptions as H, type SetWalletRecoveryOptions as I, type SignMessageModalUIOptions as J, type SignTypedDataParams as K, type LoginMethod as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type SendTransactionModalUIOptions as Q, type RuntimeLoginOverridableOptions as R, SolanaWalletConnector as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type OAuthProviderType as Y, type MoonpaySignRequest as Z, type MoonpaySignResponse as _, type SolanaTransactionReceipt as a, type PrivyServerConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type OAuthUserInfo as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type UnsignedTransactionRequestWithChainId as a9, type GithubOAuthWithMetadata as aA, type TiktokOAuthWithMetadata as aB, type LinkedInOAuthWithMetadata as aC, type AppleOAuthWithMetadata as aD, type FarcasterWithMetadata as aE, type TelegramWithMetadata as aF, type CrossAppAccountWithMetadata as aG, type PasskeyWithMetadata as aH, type Email as aI, type Phone as aJ, type TransactionUIOptions as aK, type ContractUIOptions as aL, type NativeFundingConfig as aM, type MoonpayFundingConfig as aN, type PriceDisplayOptions as aO, type Farcaster as aP, type Passkey as aQ, type LoginMethodOrderOption as aR, type BaseConnectedWalletType as aa, type CustomAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type TransactionReceipt as aj, type NonEmptyArray as ak, type EmailWithMetadata as al, type PhoneWithMetadata as am, type WalletWithMetadata as an, type Google as ao, type Twitter as ap, type Discord as aq, type Github as ar, type LinkedIn as as, type Apple as at, type Tiktok as au, type Telegram as av, type CrossAppAccount as aw, type GoogleOAuthWithMetadata as ax, type TwitterOAuthWithMetadata as ay, type DiscordOAuthWithMetadata as az, type SupportedSolanaTransaction as b, type Chain as c, type LinkedAccountWithMetadata as d, type BaseConnectedSolanaWallet as e, type UserRecoveryMethod as f, type SolanaCluster as g, type SolanaFundingConfig as h, type PrivyFarcasterSignerInitResponse as i, type MfaSubmitArgs as j, type SolanaRpcRequestType as k, type EthereumRpcResponseType as l, type SolanaRpcResponseType as m, type PrivyClientConfig as n, type RpcConfig as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletTimeoutError as s, toSolanaWalletConnectors as t, WalletConnector as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type ConnectorType as x, type WalletListEntry as y, type ExternalWalletsConfig as z };
|
package/dist/dts/ui.d.mts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, c as Chain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, c as Chain } from './types-BlSTYBTj.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Cluster } from '@privy-io/js-sdk-core';
|
|
5
|
-
import '@ethersproject/providers';
|
|
6
5
|
import '@solana/wallet-adapter-base';
|
|
7
6
|
import 'react';
|
|
8
|
-
import 'web3-core';
|
|
9
7
|
import '@privy-io/public-api';
|
|
10
8
|
import 'eventemitter3';
|
|
11
9
|
import '@metamask/eth-sig-util';
|
package/dist/dts/ui.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, c as Chain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, c as Chain } from './types-BlSTYBTj.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Cluster } from '@privy-io/js-sdk-core';
|
|
5
|
-
import '@ethersproject/providers';
|
|
6
5
|
import '@solana/wallet-adapter-base';
|
|
7
6
|
import 'react';
|
|
8
|
-
import 'web3-core';
|
|
9
7
|
import '@privy-io/public-api';
|
|
10
8
|
import 'eventemitter3';
|
|
11
9
|
import '@metamask/eth-sig-util';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as PrivyErrorCode, U as User, L as LoginMethod, d as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, e as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, f as UserRecoveryMethod, a as SolanaTransactionReceipt, c as Chain, F as FundingMethod, g as SolanaCluster, C as ConnectedSolanaWallet, h as CreateWalletOptions, i as SolanaFundingConfig } from './types-DLYwr0wq.js';
|
|
3
|
-
import { TransactionResponse } from '@ethersproject/providers';
|
|
1
|
+
import { P as PrivyErrorCode, U as User, L as LoginMethod, d as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, e as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, f as UserRecoveryMethod, a as SolanaTransactionReceipt, c as Chain, F as FundingMethod, g as SolanaCluster, C as ConnectedSolanaWallet, h as SolanaFundingConfig } from './types-BlSTYBTj.js';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* `CallbackError` optionally includes a second parameter with further error details.
|
|
@@ -185,10 +183,12 @@ interface PrivyEvents {
|
|
|
185
183
|
sendTransaction: {
|
|
186
184
|
/**
|
|
187
185
|
* Callback that will execute once a successful `sendTransaction` completes.
|
|
188
|
-
* This will not run
|
|
189
|
-
* @param
|
|
186
|
+
* This will not run for transactions with external wallets.
|
|
187
|
+
* @param an object with the transaction hash
|
|
190
188
|
*/
|
|
191
|
-
onSuccess?: (
|
|
189
|
+
onSuccess?: (data: {
|
|
190
|
+
hash: `0x${string}`;
|
|
191
|
+
}) => void;
|
|
192
192
|
/**
|
|
193
193
|
* Callback that will execute in the case of a non-successful sendTransaction.
|
|
194
194
|
*
|
|
@@ -308,15 +308,7 @@ interface UseSolanaWalletsInterface {
|
|
|
308
308
|
* embedded Solana wallet.
|
|
309
309
|
* @returns wallet {Wallet} the Solana linked account for the user.
|
|
310
310
|
*/
|
|
311
|
-
|
|
312
|
-
* Creates a Solana embedded wallet for the current user.
|
|
313
|
-
*
|
|
314
|
-
* This method will error if the user already has an embedded wallet or if they
|
|
315
|
-
* exit in the middle of the flow.
|
|
316
|
-
*
|
|
317
|
-
* @returns Promise for the {@link Wallet} object for the newly created Solana embedded wallet
|
|
318
|
-
*/
|
|
319
|
-
createWallet: (options?: CreateWalletOptions | MouseEvent<any, any>) => Promise<Wallet>;
|
|
311
|
+
createWallet: () => Promise<Wallet>;
|
|
320
312
|
/**
|
|
321
313
|
* Shows the user a Privy modal, from which they can copy their embedded solana wallet's private
|
|
322
314
|
* key for easy export to another wallet client (e.g. Phantom, Backpack). The private key is loaded
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as PrivyErrorCode, U as User, L as LoginMethod, d as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, e as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, f as UserRecoveryMethod, a as SolanaTransactionReceipt, c as Chain, F as FundingMethod, g as SolanaCluster, C as ConnectedSolanaWallet, h as CreateWalletOptions, i as SolanaFundingConfig } from './types-DLYwr0wq.js';
|
|
3
|
-
import { TransactionResponse } from '@ethersproject/providers';
|
|
1
|
+
import { P as PrivyErrorCode, U as User, L as LoginMethod, d as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, e as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, f as UserRecoveryMethod, a as SolanaTransactionReceipt, c as Chain, F as FundingMethod, g as SolanaCluster, C as ConnectedSolanaWallet, h as SolanaFundingConfig } from './types-BlSTYBTj.js';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* `CallbackError` optionally includes a second parameter with further error details.
|
|
@@ -185,10 +183,12 @@ interface PrivyEvents {
|
|
|
185
183
|
sendTransaction: {
|
|
186
184
|
/**
|
|
187
185
|
* Callback that will execute once a successful `sendTransaction` completes.
|
|
188
|
-
* This will not run
|
|
189
|
-
* @param
|
|
186
|
+
* This will not run for transactions with external wallets.
|
|
187
|
+
* @param an object with the transaction hash
|
|
190
188
|
*/
|
|
191
|
-
onSuccess?: (
|
|
189
|
+
onSuccess?: (data: {
|
|
190
|
+
hash: `0x${string}`;
|
|
191
|
+
}) => void;
|
|
192
192
|
/**
|
|
193
193
|
* Callback that will execute in the case of a non-successful sendTransaction.
|
|
194
194
|
*
|
|
@@ -308,15 +308,7 @@ interface UseSolanaWalletsInterface {
|
|
|
308
308
|
* embedded Solana wallet.
|
|
309
309
|
* @returns wallet {Wallet} the Solana linked account for the user.
|
|
310
310
|
*/
|
|
311
|
-
|
|
312
|
-
* Creates a Solana embedded wallet for the current user.
|
|
313
|
-
*
|
|
314
|
-
* This method will error if the user already has an embedded wallet or if they
|
|
315
|
-
* exit in the middle of the flow.
|
|
316
|
-
*
|
|
317
|
-
* @returns Promise for the {@link Wallet} object for the newly created Solana embedded wallet
|
|
318
|
-
*/
|
|
319
|
-
createWallet: (options?: CreateWalletOptions | MouseEvent<any, any>) => Promise<Wallet>;
|
|
311
|
+
createWallet: () => Promise<Wallet>;
|
|
320
312
|
/**
|
|
321
313
|
* Shows the user a Privy modal, from which they can copy their embedded solana wallet's private
|
|
322
314
|
* key for easy export to another wallet client (e.g. Phantom, Backpack). The private key is loaded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useAbstractSmartWallets}from"./lib/abstract-smart-wallets.mjs";import"@abstract-foundation/agw-client";import"viem";import"viem/accounts";import"viem/chains";import"./client/user.mjs";import"
|
|
1
|
+
export{useAbstractSmartWallets}from"./lib/abstract-smart-wallets.mjs";import"@abstract-foundation/agw-client";import"viem";import"viem/accounts";import"viem/chains";import"./client/user.mjs";import"viem/utils";import"./hooks/internal-context.mjs";import"react";import"./hooks/index.mjs";import"./hooks/modal-context.mjs";import"react/jsx-runtime";import"./components/PrefetchedImage.mjs";import"./configuration/context.mjs";import"./config.mjs";import"./configuration/defaultClientConfig.mjs";import"./constants.mjs";import"./configuration/login-methods.mjs";import"./configuration/wallets.mjs";import"./connectors/chains/index.mjs";import"./connectors/chains/arbitrum.mjs";import"./connectors/chains/arbitrumSepolia.mjs";import"./connectors/chains/avalanche.mjs";import"./connectors/chains/avalancheFuji.mjs";import"./connectors/chains/base.mjs";import"./connectors/chains/baseSepolia.mjs";import"./connectors/chains/berachainArtio.mjs";import"./connectors/chains/celo.mjs";import"./connectors/chains/celoAlfajores.mjs";import"./connectors/chains/filecoin.mjs";import"./connectors/chains/filecoinCalibration.mjs";import"./connectors/chains/garnetHolesky.mjs";import"./connectors/chains/holesky.mjs";import"./connectors/chains/linea.mjs";import"./connectors/chains/lineaTestnet.mjs";import"./connectors/chains/lukso.mjs";import"./connectors/chains/mainnet.mjs";import"./connectors/chains/optimism.mjs";import"./connectors/chains/optimismSepolia.mjs";import"./connectors/chains/polygon.mjs";import"./connectors/chains/polygonAmoy.mjs";import"./connectors/chains/redstone.mjs";import"./connectors/chains/sepolia.mjs";import"./connectors/chains/zora.mjs";import"./connectors/chains/zoraSepolia.mjs";import"./connectors/chains/zoraTestnet.mjs";import"./connectors/chains/utils.mjs";import"./lib/solana/index.mjs";import"./theme.mjs";import"tinycolor2";import"./lib/cybr53.mjs";import"./screens/index.mjs";import"./hooks/privy-context.mjs";import"./hooks/useWallets.mjs";import"./utils/eth/getPublicClient.mjs";import"./errors.mjs";import"ofetch";import"./lib/getEmbeddedConnectedWallet.mjs";import"./lib/smart-wallets.mjs";import"./hooks/useSmartWalletChain.mjs";import"./lib/smart-wallets-shared.mjs";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getImportedPrivyEthereumWallet as e}from"../client/user.mjs";import{PrivyErrorCode as
|
|
1
|
+
import{getImportedPrivyEthereumWallet as e}from"../client/user.mjs";import{PrivyErrorCode as t,PrivyClientError as r}from"../errors.mjs";import"viem/utils";import"ofetch";const i=async({emitPrivyEvent:i,getAccessToken:o,initializeWalletProxy:n,refreshUser:a,user:s},{privateKey:c})=>{if(!s)throw i("linkAccount","onError",t.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");let[l,E]=await Promise.all([o(),n(15e3)]);if(!E||!l)throw i("linkAccount","onError",t.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");await E.import({privateKey:c,accessToken:l});let m=e(await a());if(!m)throw i("createWallet","onError",t.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return i("createWallet","onSuccess",m),m};export{i as importWallet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isMobile as t,isIOS as e}from"react-device-detect";import{openHref as i}from"../connectors/walletconnect-registry.mjs";import{RunEffectOnce as n}from"../effect.mjs";import{PrivyClientError as s,formatApiError as a}from"../errors.mjs";import{farcasterAuthenticatePath as o,farcasterLinkPath as h,farcasterInitPath as r,farcasterStatusPath as c}from"../paths.mjs";import"../storage.mjs";import"../utils/index.mjs";import"
|
|
1
|
+
import{isMobile as t,isIOS as e}from"react-device-detect";import{openHref as i}from"../connectors/walletconnect-registry.mjs";import{RunEffectOnce as n}from"../effect.mjs";import{PrivyClientError as s,formatApiError as a}from"../errors.mjs";import{farcasterAuthenticatePath as o,farcasterLinkPath as h,farcasterInitPath as r,farcasterStatusPath as c}from"../paths.mjs";import"../storage.mjs";import"../utils/index.mjs";import"../connectors/get-legacy-injected-providers.mjs";import"../connectors/is-wallet-installed.mjs";import"../utils/eth/getPublicClient.mjs";import"viem";import"ofetch";class l{get meta(){return this._meta}async authenticate(){if(!this.api)throw new s("Auth flow has no API instance");if(!this.meta.channelToken)throw new s("Auth flow must be initialized first");try{let t=await this.api.post(o,{channel_token:this.meta.channelToken,message:this.message,signature:this.signature,fid:this.fid,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"});if(!t)throw new s("No response from authentication");return t}catch(t){throw a(t)}}async link(){if(!this.api)throw new s("Auth flow has no API instance");try{return await this.api.post(h,{channel_token:this.meta.channelToken,message:this.message,signature:this.signature,fid:this.fid})}catch(t){throw a(t)}}async _startChannelOnce(){if(!this.api)throw new s("Auth flow has no API instance");let n=await this.api.post(r,{token:this.captchaToken});t&&!e&&n.connect_uri&&i(n.connect_uri,"_blank"),this._meta={...this._meta,connectUri:n.connect_uri,channelToken:n.channel_token}}async initializeFarcasterConnect(){if(!this.api)throw new s("Auth flow has no API instance");await this.startChannelOnce.execute()}async _pollForReady(){if(!this.api)throw new s("Auth flow has no API instance");if(!this.meta.channelToken)throw new s("Auth flow must be initialized first");let t=await this.api.get(c,{headers:{"farcaster-channel-token":this.meta.channelToken}});return"completed"===t.state&&(this.message=t.message,this.signature=t.signature,this.fid=t.fid,!0)}constructor(t,e=!1){this._meta={disableSignup:!1},this.captchaToken=t,this.startChannelOnce=new n(this._startChannelOnce.bind(this)),this.pollForReady=new n(this._pollForReady.bind(this)),this._meta.disableSignup=e}}export{l as FarcasterFlow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PrivyClientError as e,formatApiError as t,PrivyErrorCode as a}from"../errors.mjs";import{CaptchaError as r}from"../hooks/captcha-context.mjs";import{telegramAccountAuthenticatePath as i,telegramAccountLinkPath as o}from"../paths.mjs";import"ofetch";import"react/jsx-runtime";import"../hooks/index.mjs";import"react";import"../utils/index.mjs";import"
|
|
1
|
+
import{PrivyClientError as e,formatApiError as t,PrivyErrorCode as a}from"../errors.mjs";import{CaptchaError as r}from"../hooks/captcha-context.mjs";import{telegramAccountAuthenticatePath as i,telegramAccountLinkPath as o}from"../paths.mjs";import"ofetch";import"react/jsx-runtime";import"../hooks/index.mjs";import"react";import"../utils/index.mjs";import"../connectors/get-legacy-injected-providers.mjs";import"../connectors/is-wallet-installed.mjs";import"../utils/eth/getPublicClient.mjs";import"viem";class n{async authenticate(){if(!this.api)throw new e("Auth flow has no API instance");try{return await this.api.post(i,{captcha_token:this.meta.captchaToken,telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw t(e)}}async link(){if(!this.api)throw new e("Auth flow has no API instance");try{return await this.api.post(o,{telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData})}catch(e){throw t(e)}}constructor(e,t=!1){this.meta={disableSignup:!1},this.meta={captchaToken:e,disableSignup:!1},this.meta.disableSignup=t}}function s(e){let t={detail:"",retryable:!1};return e?.privyErrorCode===a.LINKED_TO_ANOTHER_USER&&(t.detail="This account has already been linked to another user."),e?.privyErrorCode===a.DISALLOWED_LOGIN_METHOD&&(t.detail="Login with Telegram not allowed."),e?.privyErrorCode===a.INVALID_DATA&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===a.CANNOT_LINK_MORE_OF_TYPE&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===a.INVALID_CREDENTIALS&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===a.TOO_MANY_REQUESTS&&(t.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===a.TOO_MANY_REQUESTS&&e.message.includes("rate limit")&&(t.detail="Request limit reached for Telegram. Please wait a moment and try again."),e instanceof r&&(t.retryable=!0,t.detail="Something went wrong. Try again."),t}function l(){let e;return(e=function(){let e=new URLSearchParams(window.location.search),t=Number(e.get("id")||""),a=e.get("hash"),r=Number(e.get("auth_date")||""),i=e.get("first_name");if(t&&i&&r&&a)return Object.fromEntries(e.entries())}())?(h(),{flowType:"login-url",authData:e}):(e=function(){let e=window.location.hash;if(!e||!e.startsWith("#tgWebAppData"))return;let t=new URLSearchParams(decodeURIComponent(e.replace("#tgWebAppData=",""))),a=t.get("user"),r=Number(t.get("auth_date")||""),i=t.get("hash");return a&&r&&i?Object.fromEntries(t.entries()):void 0}())?(h(),{flowType:"web-app",authData:e}):void 0}function h(){let e=new URL(window.location.href);e.searchParams.delete("id"),e.searchParams.delete("hash"),e.searchParams.delete("auth_date"),e.searchParams.delete("first_name"),e.searchParams.delete("last_name"),e.searchParams.delete("username"),e.searchParams.delete("photo_url"),e.hash="",window.history.replaceState({},"",e)}export{n as TelegramAuthFlow,l as detectCompletingTelegramFlow,s as getTelegramAuthErrorMessage};
|
package/dist/esm/client/user.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAddress as e}from"
|
|
1
|
+
import{getAddress as e}from"viem/utils";function t(e){return e?new Date(1e3*e):null}function i(e,t){return e.slice().sort(((e,t)=>(t.firstVerifiedAt??t.verifiedAt).getTime()-(e.firstVerifiedAt??e.verifiedAt).getTime())).find((e=>e.type===t))}const a=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,r=e=>e?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),s=e=>r(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e))||null,l=e=>e?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&"ethereum"===e.chainType)),d=e=>e?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)),n=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,f=e=>d(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e))||null,u=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,p=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,_=e=>a(e)??n(e),c=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")},m=e=>{let t=_(e);if(!t)throw Error("Failed to find primary wallet");return c(t)},o=(t,i)=>{let r=l(t).find((t=>e(t.address)===e(i)));return{signingWallet:r,rootWallet:r?r.imported?r:a(t):void 0}},y=(e,t)=>{let i=d(e).find((e=>e.address.toLowerCase()===t.toLowerCase()));return{signingWallet:i,rootWallet:0===i?.walletIndex?i:n(e)}};const v=(e,t)=>!(a(e)||n(e)||"all-users"!==t&&("users-without-wallets"!==t||(e=>e.linkedAccounts.filter((e=>"wallet"===e.type)))(e)?.length));function h(e){if(!e)return null;let a=function(e){let i=[];for(let a of e){let e=a.type;switch(a.type){case"wallet":let r={address:a.address,type:a.type,imported:a.imported,delegated:a.delegated,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at),chainType:a.chain_type,chainId:a.chain_id,walletClient:"privy"===a.wallet_client_type?"privy":"unknown",walletClientType:a.wallet_client_type,connectorType:a.connector_type,recoveryMethod:a.recovery_method,walletIndex:a.wallet_index};i.push(r);break;case"smart_wallet":let s={address:a.address,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at),smartWalletType:a.smart_wallet_type};i.push(s);break;case"cross_app":let l={type:a.type,subject:a.subject,embeddedWallets:a.embedded_wallets,smartWallets:a.smart_wallets,providerApp:{id:a.provider_app_id},verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(l);break;case"email":let d={address:a.address,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(d);break;case"phone":let n={number:a.phoneNumber,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(n);break;case"google_oauth":let f={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(f);break;case"spotify_oauth":let u={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(u);break;case"instagram_oauth":let p={subject:a.subject,username:a.username,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(p);break;case"twitter_oauth":let _={subject:a.subject,username:a.username,name:a.name,type:a.type,profilePictureUrl:a.profile_picture_url,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(_);break;case"discord_oauth":let c={subject:a.subject,username:a.username,email:a.email,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(c);break;case"github_oauth":let m={subject:a.subject,username:a.username,name:a.name,email:a.email,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(m);break;case"tiktok_oauth":let o={subject:a.subject,username:a.username,name:a.name,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(o);break;case"linkedin_oauth":let y={subject:a.subject,name:a.name,email:a.email,vanityName:a.vanity_name,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(y);break;case"apple_oauth":let v={subject:a.subject,email:a.email,type:a.type,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(v);break;case"custom_auth":i.push({type:a.type,customUserId:a.custom_user_id,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)});break;case"farcaster":let h={type:a.type,fid:a.fid,ownerAddress:a.owner_address,displayName:a.display_name,username:a.username,bio:a.bio,pfp:a.profile_picture_url,url:a.homepage_url,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at),signerPublicKey:a.signer_public_key};i.push(h);break;case"passkey":let b={type:a.type,enrolledInMfa:a.enrolled_in_mfa,credentialId:a.credential_id,authenticatorName:a.authenticator_name,createdWithDevice:a.created_with_device,createdWithOs:a.created_with_os,createdWithBrowser:a.created_with_browser,verifiedAt:t(a.verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(b);break;case"telegram":let A={type:a.type,telegramUserId:a.telegram_user_id,firstName:a.first_name,lastName:a.last_name,username:a.username,photoUrl:a.photo_url,verifiedAt:t(a.first_verified_at),firstVerifiedAt:t(a.first_verified_at),latestVerifiedAt:t(a.latest_verified_at)};i.push(A);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return i}(e.linked_accounts),r=i(a,"wallet"),s=i(a,"smart_wallet"),l=i(a,"email"),d=i(a,"phone"),n=i(a,"google_oauth"),f=i(a,"twitter_oauth"),u=i(a,"discord_oauth"),p=i(a,"github_oauth"),_=i(a,"spotify_oauth"),c=i(a,"instagram_oauth"),m=i(a,"tiktok_oauth"),o=i(a,"linkedin_oauth"),y=i(a,"apple_oauth"),v=i(a,"farcaster"),h=i(a,"telegram"),b=e.mfa_methods.map((({type:e,verified_at:i})=>({type:e,verifiedAt:t(i)})));return{id:e.id,createdAt:t(e.created_at),linkedAccounts:a,email:l&&{address:l?.address},phone:d&&{number:d?.number},wallet:r&&{address:r.address,chainType:r.chainType,chainId:r.chainId,walletClient:r.walletClient,walletClientType:r.walletClientType,connectorType:r.connectorType,recoveryMethod:r.recoveryMethod,imported:r.imported,delegated:r.delegated,walletIndex:r.walletIndex},smartWallet:s&&{address:s.address,smartWalletType:s.smartWalletType},google:n&&{subject:n.subject,email:n.email,name:n.name},twitter:f&&{subject:f.subject,username:f.username,name:f.name,profilePictureUrl:f.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:p&&{subject:p.subject,username:p.username,name:p.name,email:p.email},spotify:_&&{subject:_.subject,email:_.email,name:_.name},instagram:c&&{subject:c.subject,username:c.username},tiktok:m&&{subject:m.subject,username:m.username,name:m.name},linkedin:o&&{subject:o.subject,name:o.name,email:o.email,vanityName:o.vanityName},apple:y&&{subject:y.subject,email:y.email},farcaster:v&&{fid:v.fid,ownerAddress:v.ownerAddress,displayName:v.displayName,username:v.username,bio:v.bio,pfp:v.pfp,url:v.url,signerPublicKey:v.signerPublicKey},telegram:h&&{telegramUserId:h.telegramUserId,firstName:h.firstName,lastName:h.lastName,username:h.username,photoUrl:h.photoUrl},delegatedWallets:[],mfaMethods:b.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}export{h as convertUserResponseToUser,l as getAllPrivyEthereumWallets,c as getEntropyDetailsFromAccount,m as getEntropyDetailsFromUser,o as getEthereumSigningAndRootWallet,u as getImportedPrivyEthereumWallet,s as getLatestPrivyEthereumWallet,f as getLatestPrivySolanaWallet,r as getPrivyEthereumHDWallets,a as getPrivyEthereumWallet,_ as getPrivyPrimaryWallet,d as getPrivySolanaHDWallets,n as getPrivySolanaWallet,p as getPrivyWalletWithAddress,y as getSolanaSigningAndRootWallet,v as shouldProceedtoEmbeddedWalletCreationFlow};
|