@privy-io/react-auth 2.20.0 → 2.21.0

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.
Files changed (39) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/extended-chains.js +1 -1
  3. package/dist/cjs/farcaster.js +1 -1
  4. package/dist/cjs/index.js +1 -1
  5. package/dist/cjs/{privy-provider-C10uh7jj.js → privy-provider-NikYcweE.js} +22 -22
  6. package/dist/cjs/{smart-wallets-BZ1m1NrG.js → smart-wallets-mWRMk0wI.js} +1 -1
  7. package/dist/cjs/smart-wallets.js +1 -1
  8. package/dist/cjs/solana.js +1 -1
  9. package/dist/cjs/ui.js +1 -1
  10. package/dist/cjs/{useActiveWallet-Bwo1C1JJ.js → useActiveWallet-D0kSB8pr.js} +1 -1
  11. package/dist/cjs/{useFundWallet-w17P8l1R.js → useFundWallet-BLnL9YuU.js} +1 -1
  12. package/dist/dts/extended-chains.d.mts +3 -3
  13. package/dist/dts/extended-chains.d.ts +3 -3
  14. package/dist/dts/farcaster.d.mts +37 -7
  15. package/dist/dts/farcaster.d.ts +37 -7
  16. package/dist/dts/index.d.mts +16 -5
  17. package/dist/dts/index.d.ts +16 -5
  18. package/dist/dts/smart-wallets.d.mts +1 -1
  19. package/dist/dts/smart-wallets.d.ts +1 -1
  20. package/dist/dts/solana.d.mts +4 -4
  21. package/dist/dts/solana.d.ts +4 -4
  22. package/dist/dts/{types-Dmys-XR7.d.mts → types-DYBA51G_.d.mts} +14 -2
  23. package/dist/dts/{types-Dmys-XR7.d.ts → types-DYBA51G_.d.ts} +14 -2
  24. package/dist/dts/ui.d.mts +1 -1
  25. package/dist/dts/ui.d.ts +1 -1
  26. package/dist/dts/{useSolanaWallets-C9c0550h.d.mts → useSolanaWallets-BiSasRT6.d.mts} +1 -1
  27. package/dist/dts/{useSolanaWallets-C9c0550h.d.ts → useSolanaWallets-BiSasRT6.d.ts} +1 -1
  28. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  29. package/dist/esm/extended-chains.mjs +1 -1
  30. package/dist/esm/farcaster.mjs +1 -1
  31. package/dist/esm/index.mjs +1 -1
  32. package/dist/esm/{privy-provider-DRh_qFir.mjs → privy-provider-NPBEALzA.mjs} +23 -23
  33. package/dist/esm/{smart-wallets-BVE7Yf57.mjs → smart-wallets-JbwIgnkS.mjs} +1 -1
  34. package/dist/esm/smart-wallets.mjs +1 -1
  35. package/dist/esm/solana.mjs +1 -1
  36. package/dist/esm/ui.mjs +2 -2
  37. package/dist/esm/{useActiveWallet-BrSwJdVC.mjs → useActiveWallet-MSI4YjRM.mjs} +1 -1
  38. package/dist/esm/{useFundWallet-Ca0OzIi8.mjs → useFundWallet-Cv33RFig.mjs} +1 -1
  39. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { L as LoginToFrame, U as User } from './types-Dmys-XR7.js';
1
+ import { g as LoginToFrame, U as User, h as LoginToMiniApp } from './types-DYBA51G_.js';
2
2
  import '@coinbase/wallet-sdk';
3
3
  import '@reown/appkit';
4
4
  import '@solana/wallet-adapter-base';
@@ -14,9 +14,12 @@ import '@metamask/eth-sig-util';
14
14
  import '@solana/web3.js';
15
15
  import 'eventemitter3';
16
16
 
17
+ /**
18
+ * @deprecated Use `UseLoginToMiniAppInterface` instead
19
+ */
17
20
  type UseLoginToFrameInterface = {
18
21
  /**
19
- * Initializes the login to farcaster frames email flow.
22
+ * Initializes the login to Farcaster Mini App flow.
20
23
  *
21
24
  * @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
22
25
  */
@@ -24,7 +27,7 @@ type UseLoginToFrameInterface = {
24
27
  nonce: string;
25
28
  }>;
26
29
  /**
27
- * Logs in a user into a Farcaster frame with the signed nonce message.
30
+ * Logs in a user into a Farcaster Mini App with the signed nonce message.
28
31
  *
29
32
  * @param message - the SIWF message which was signed by the Farcaster wallets
30
33
  * @param signature - the signature of the message, verifying the user's Farcaster wallets
@@ -34,12 +37,39 @@ type UseLoginToFrameInterface = {
34
37
  };
35
38
  /**
36
39
  * @experimental
40
+ * @deprecated Use `useLoginToMiniApp` instead
37
41
  *
38
- * Use this hook to log a user into a Farcaster frame
42
+ * Use this hook to log a user into a Farcaster Mini App
39
43
  *
40
- * @returns initLoginToFrame - initializes a Farcaster frame login flow.
41
- * @returns loginToFrame - authenticates a user into a Farcaster frame.
44
+ * @returns initLoginToFrame - initializes a Farcaster Mini App login flow.
45
+ * @returns loginToFrame - authenticates a user into a Farcaster Mini App.
42
46
  */
43
47
  declare const useLoginToFrame: () => UseLoginToFrameInterface;
44
48
 
45
- export { type UseLoginToFrameInterface, useLoginToFrame };
49
+ type UseLoginToMiniAppInterface = {
50
+ /**
51
+ * Initializes the login to Farcaster Mini App flow.
52
+ *
53
+ * @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
54
+ */
55
+ initLoginToMiniApp: () => Promise<{
56
+ nonce: string;
57
+ }>;
58
+ /**
59
+ * Logs in a user into a Farcaster Mini App with the signed nonce message.
60
+ *
61
+ * @param message - the SIWF message which was signed by the Farcaster wallets
62
+ * @param signature - the signature of the message, verifying the user's Farcaster wallets
63
+ * @param fid - the Farcaster user ID
64
+ */
65
+ loginToMiniApp: ({ message, signature }: LoginToMiniApp) => Promise<User | null>;
66
+ };
67
+ /**
68
+ * Use this hook to log a user into a Farcaster Mini App (formerly known as frames)
69
+ *
70
+ * @returns initLoginToMiniApp - initializes a Farcaster Mini App login flow.
71
+ * @returns loginToMiniApp - authenticates a user into a Farcaster Mini App.
72
+ */
73
+ declare const useLoginToMiniApp: () => UseLoginToMiniAppInterface;
74
+
75
+ export { type UseLoginToFrameInterface, type UseLoginToMiniAppInterface, useLoginToFrame, useLoginToMiniApp };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as EIP1193Provider, s as EntropyIdVerifier$1, H as HDWalletWithMetadata, u as RequestArguments, v as WalletConnector, B as BaseConnectedEthereumWallet, w as PrivyProxyProvider, x as WalletClientType, y as ConnectedWalletMetadata, z as PrivyClientConfig, A as ConnectorType, D as SetBaseAccountSdkType, G as WalletListEntry, I as AppConfig, J as BaseConnectedWallet, l as SolanaWalletConnector, U as User, K as ConnectWalletModalOptions, N as LoginModalOptions, g as CreateWalletOptions, W as Wallet, Q as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, T as SignTypedDataParams, M as MfaMethod, V as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, X as FundWalletConfig, Y as ConnectedWallet, O as OAuthTokens, Z as CrossAppProviderDetails, _ as OAuthProviderType, $ as MoonpaySignRequest, a0 as MoonpaySignResponse, a1 as SmartWalletConfig, a as LoginMethod, a2 as ExternalWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as SiwsMessageType, a7 as OAuthFlowState, a8 as LoginWithCode, a9 as OtpFlowState, aa as PasskeyFlowState, ab as SiweFlowState, ac as BaseAccountSdkType, ad as UnsignedTransactionRequestWithChainId, ae as BaseConnectedWalletType, C as ConnectedSolanaWallet, af as SessionSignerInput, ag as TelegramAuthFlowState } from './types-Dmys-XR7.js';
4
- export { az as Apple, aM as AppleOAuthWithMetadata, aU as ContractUIOptions, aD as CrossAppAccount, aP as CrossAppAccountWithMetadata, aw as Discord, aH as DiscordOAuthWithMetadata, aR as Email, ar as EmailWithMetadata, aY as Farcaster, aN as FarcasterWithMetadata, ax as Github, aI as GithubOAuthWithMetadata, au as Google, aF as GoogleOAuthWithMetadata, aB as Line, aK as LineOAuthWithMetadata, aE as LinkedAccountType, b as LinkedAccountWithMetadata, ay as LinkedIn, aL as LinkedInOAuthWithMetadata, a_ as LoginMethodOrderOption, ai as MessageTypes, ak as MoonpayConfig, al as MoonpayCurrencyCode, aW as MoonpayFundingConfig, am as MoonpayPaymentMethod, aV as NativeFundingConfig, aq as NonEmptyArray, aZ as Passkey, aQ as PasskeyWithMetadata, aS as Phone, as as PhoneWithMetadata, aX as PriceDisplayOptions, P as PrivyErrorCode, an as Quantity, aj as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aC as Telegram, aO as TelegramWithMetadata, aA as Tiktok, aJ as TiktokOAuthWithMetadata, ao as TransactionLog, ap as TransactionReceipt, aT as TransactionUIOptions, av as Twitter, aG as TwitterOAuthWithMetadata, ah as TypedMessage, at as WalletWithMetadata } from './types-Dmys-XR7.js';
3
+ import { c as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as EIP1193Provider, u as EntropyIdVerifier$1, H as HDWalletWithMetadata, v as RequestArguments, w as WalletConnector, B as BaseConnectedEthereumWallet, x as PrivyProxyProvider, y as WalletClientType, z as ConnectedWalletMetadata, A as PrivyClientConfig, D as ConnectorType, G as SetBaseAccountSdkType, I as WalletListEntry, J as AppConfig, K as BaseConnectedWallet, m as SolanaWalletConnector, U as User, N as ConnectWalletModalOptions, Q as LoginModalOptions, f as CreateWalletOptions, W as Wallet, T as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, V as SignTypedDataParams, M as MfaMethod, X as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, Y as FundWalletConfig, Z as ConnectedWallet, O as OAuthTokens, _ as CrossAppProviderDetails, $ as OAuthProviderType, a0 as MoonpaySignRequest, a1 as MoonpaySignResponse, a2 as SmartWalletConfig, L as LoginMethod, a3 as ExternalWalletMetadata, a4 as TelegramAuthResult, a5 as TelegramWebAppData, a6 as OAuthUserInfo, a7 as SiwsMessageType, a8 as OAuthFlowState, a9 as LoginWithCode, aa as OtpFlowState, ab as PasskeyFlowState, ac as SiweFlowState, ad as BaseAccountSdkType, ae as UnsignedTransactionRequestWithChainId, af as BaseConnectedWalletType, C as ConnectedSolanaWallet, ag as SessionSignerInput, ah as TelegramAuthFlowState } from './types-DYBA51G_.js';
4
+ export { aA as Apple, aN as AppleOAuthWithMetadata, aV as ContractUIOptions, aE as CrossAppAccount, aQ as CrossAppAccountWithMetadata, ax as Discord, aI as DiscordOAuthWithMetadata, aS as Email, as as EmailWithMetadata, aZ as Farcaster, aO as FarcasterWithMetadata, ay as Github, aJ as GithubOAuthWithMetadata, av as Google, aG as GoogleOAuthWithMetadata, aC as Line, aL as LineOAuthWithMetadata, aF as LinkedAccountType, a as LinkedAccountWithMetadata, az as LinkedIn, aM as LinkedInOAuthWithMetadata, a$ as LoginMethodOrderOption, aj as MessageTypes, al as MoonpayConfig, am as MoonpayCurrencyCode, aX as MoonpayFundingConfig, an as MoonpayPaymentMethod, aW as NativeFundingConfig, ar as NonEmptyArray, a_ as Passkey, aR as PasskeyWithMetadata, aT as Phone, at as PhoneWithMetadata, aY as PriceDisplayOptions, P as PrivyErrorCode, ao as Quantity, ak as SmartWallet, e as SolanaCluster, l as SolanaFundingConfig, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, aD as Telegram, aP as TelegramWithMetadata, aB as Tiktok, aK as TiktokOAuthWithMetadata, ap as TransactionLog, aq as TransactionReceipt, aU as TransactionUIOptions, aw as Twitter, aH as TwitterOAuthWithMetadata, ai as TypedMessage, au as WalletWithMetadata } from './types-DYBA51G_.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import { AppKit } from '@reown/appkit';
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
16
16
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
17
17
  import { Cluster } from '@solana/web3.js';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './useSolanaWallets-C9c0550h.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C9c0550h.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
21
21
  import * as viem_accounts from 'viem/accounts';
22
22
  import '@coinbase/wallet-sdk';
23
23
  import '@solana/wallet-adapter-base';
@@ -4220,4 +4220,15 @@ declare const toViemAccount: ({ wallet }: {
4220
4220
  type: "local";
4221
4221
  }>;
4222
4222
 
4223
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
4223
+ /**
4224
+ * Hook to migrate wallets for apps moving from on-device to TEEs.
4225
+ *
4226
+ * No-op if the app is not set up for TEEs or if the user's wallets are already migrated.
4227
+ */
4228
+ declare const useMigrateWallets: () => {
4229
+ migrate: () => Promise<{
4230
+ success: boolean;
4231
+ }>;
4232
+ };
4233
+
4234
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useMigrateWallets, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as EIP1193Provider, s as EntropyIdVerifier$1, H as HDWalletWithMetadata, u as RequestArguments, v as WalletConnector, B as BaseConnectedEthereumWallet, w as PrivyProxyProvider, x as WalletClientType, y as ConnectedWalletMetadata, z as PrivyClientConfig, A as ConnectorType, D as SetBaseAccountSdkType, G as WalletListEntry, I as AppConfig, J as BaseConnectedWallet, l as SolanaWalletConnector, U as User, K as ConnectWalletModalOptions, N as LoginModalOptions, g as CreateWalletOptions, W as Wallet, Q as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, T as SignTypedDataParams, M as MfaMethod, V as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, X as FundWalletConfig, Y as ConnectedWallet, O as OAuthTokens, Z as CrossAppProviderDetails, _ as OAuthProviderType, $ as MoonpaySignRequest, a0 as MoonpaySignResponse, a1 as SmartWalletConfig, a as LoginMethod, a2 as ExternalWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as SiwsMessageType, a7 as OAuthFlowState, a8 as LoginWithCode, a9 as OtpFlowState, aa as PasskeyFlowState, ab as SiweFlowState, ac as BaseAccountSdkType, ad as UnsignedTransactionRequestWithChainId, ae as BaseConnectedWalletType, C as ConnectedSolanaWallet, af as SessionSignerInput, ag as TelegramAuthFlowState } from './types-Dmys-XR7.js';
4
- export { az as Apple, aM as AppleOAuthWithMetadata, aU as ContractUIOptions, aD as CrossAppAccount, aP as CrossAppAccountWithMetadata, aw as Discord, aH as DiscordOAuthWithMetadata, aR as Email, ar as EmailWithMetadata, aY as Farcaster, aN as FarcasterWithMetadata, ax as Github, aI as GithubOAuthWithMetadata, au as Google, aF as GoogleOAuthWithMetadata, aB as Line, aK as LineOAuthWithMetadata, aE as LinkedAccountType, b as LinkedAccountWithMetadata, ay as LinkedIn, aL as LinkedInOAuthWithMetadata, a_ as LoginMethodOrderOption, ai as MessageTypes, ak as MoonpayConfig, al as MoonpayCurrencyCode, aW as MoonpayFundingConfig, am as MoonpayPaymentMethod, aV as NativeFundingConfig, aq as NonEmptyArray, aZ as Passkey, aQ as PasskeyWithMetadata, aS as Phone, as as PhoneWithMetadata, aX as PriceDisplayOptions, P as PrivyErrorCode, an as Quantity, aj as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aC as Telegram, aO as TelegramWithMetadata, aA as Tiktok, aJ as TiktokOAuthWithMetadata, ao as TransactionLog, ap as TransactionReceipt, aT as TransactionUIOptions, av as Twitter, aG as TwitterOAuthWithMetadata, ah as TypedMessage, at as WalletWithMetadata } from './types-Dmys-XR7.js';
3
+ import { c as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as EIP1193Provider, u as EntropyIdVerifier$1, H as HDWalletWithMetadata, v as RequestArguments, w as WalletConnector, B as BaseConnectedEthereumWallet, x as PrivyProxyProvider, y as WalletClientType, z as ConnectedWalletMetadata, A as PrivyClientConfig, D as ConnectorType, G as SetBaseAccountSdkType, I as WalletListEntry, J as AppConfig, K as BaseConnectedWallet, m as SolanaWalletConnector, U as User, N as ConnectWalletModalOptions, Q as LoginModalOptions, f as CreateWalletOptions, W as Wallet, T as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, V as SignTypedDataParams, M as MfaMethod, X as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, Y as FundWalletConfig, Z as ConnectedWallet, O as OAuthTokens, _ as CrossAppProviderDetails, $ as OAuthProviderType, a0 as MoonpaySignRequest, a1 as MoonpaySignResponse, a2 as SmartWalletConfig, L as LoginMethod, a3 as ExternalWalletMetadata, a4 as TelegramAuthResult, a5 as TelegramWebAppData, a6 as OAuthUserInfo, a7 as SiwsMessageType, a8 as OAuthFlowState, a9 as LoginWithCode, aa as OtpFlowState, ab as PasskeyFlowState, ac as SiweFlowState, ad as BaseAccountSdkType, ae as UnsignedTransactionRequestWithChainId, af as BaseConnectedWalletType, C as ConnectedSolanaWallet, ag as SessionSignerInput, ah as TelegramAuthFlowState } from './types-DYBA51G_.js';
4
+ export { aA as Apple, aN as AppleOAuthWithMetadata, aV as ContractUIOptions, aE as CrossAppAccount, aQ as CrossAppAccountWithMetadata, ax as Discord, aI as DiscordOAuthWithMetadata, aS as Email, as as EmailWithMetadata, aZ as Farcaster, aO as FarcasterWithMetadata, ay as Github, aJ as GithubOAuthWithMetadata, av as Google, aG as GoogleOAuthWithMetadata, aC as Line, aL as LineOAuthWithMetadata, aF as LinkedAccountType, a as LinkedAccountWithMetadata, az as LinkedIn, aM as LinkedInOAuthWithMetadata, a$ as LoginMethodOrderOption, aj as MessageTypes, al as MoonpayConfig, am as MoonpayCurrencyCode, aX as MoonpayFundingConfig, an as MoonpayPaymentMethod, aW as NativeFundingConfig, ar as NonEmptyArray, a_ as Passkey, aR as PasskeyWithMetadata, aT as Phone, at as PhoneWithMetadata, aY as PriceDisplayOptions, P as PrivyErrorCode, ao as Quantity, ak as SmartWallet, e as SolanaCluster, l as SolanaFundingConfig, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, aD as Telegram, aP as TelegramWithMetadata, aB as Tiktok, aK as TiktokOAuthWithMetadata, ap as TransactionLog, aq as TransactionReceipt, aU as TransactionUIOptions, aw as Twitter, aH as TwitterOAuthWithMetadata, ai as TypedMessage, au as WalletWithMetadata } from './types-DYBA51G_.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import { AppKit } from '@reown/appkit';
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
16
16
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
17
17
  import { Cluster } from '@solana/web3.js';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './useSolanaWallets-C9c0550h.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C9c0550h.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
21
21
  import * as viem_accounts from 'viem/accounts';
22
22
  import '@coinbase/wallet-sdk';
23
23
  import '@solana/wallet-adapter-base';
@@ -4220,4 +4220,15 @@ declare const toViemAccount: ({ wallet }: {
4220
4220
  type: "local";
4221
4221
  }>;
4222
4222
 
4223
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
4223
+ /**
4224
+ * Hook to migrate wallets for apps moving from on-device to TEEs.
4225
+ *
4226
+ * No-op if the app is not set up for TEEs or if the user's wallets are already migrated.
4227
+ */
4228
+ declare const useMigrateWallets: () => {
4229
+ migrate: () => Promise<{
4230
+ success: boolean;
4231
+ }>;
4232
+ };
4233
+
4234
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useMigrateWallets, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import react__default from 'react';
3
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Dmys-XR7.js';
3
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
4
4
  import { SmartAccountClient } from 'permissionless';
5
5
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
6
6
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import react__default from 'react';
3
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Dmys-XR7.js';
3
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
4
4
  import { SmartAccountClient } from 'permissionless';
5
5
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
6
6
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-Dmys-XR7.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Dmys-XR7.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-C9c0550h.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C9c0550h.js';
1
+ import { W as Wallet, k as SolanaStandardWallet, l as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
2
+ export { C as ConnectedSolanaWallet, m as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DYBA51G_.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
5
5
  import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
6
6
  import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
7
7
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-Dmys-XR7.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Dmys-XR7.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-C9c0550h.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C9c0550h.js';
1
+ import { W as Wallet, k as SolanaStandardWallet, l as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
2
+ export { C as ConnectedSolanaWallet, m as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DYBA51G_.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
5
5
  import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
6
6
  import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
7
7
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -1608,6 +1608,13 @@ interface PrivyClientConfig {
1608
1608
  */
1609
1609
  createOnLogin?: EmbeddedWalletCreateOnLoginConfig;
1610
1610
  };
1611
+ /**
1612
+ * Set to `true` to disable automatic migration, if you are migrating
1613
+ * manually via the `useMigrateWallets` hook.
1614
+ *
1615
+ * @default false
1616
+ */
1617
+ disableAutomaticMigration?: boolean;
1611
1618
  /**
1612
1619
  * @deprecated. Instead, use the server-driven configuration found in the Privy console: https://dashboard.privy.io/apps/YOUR_APP_ID/embedded. This client-side setting
1613
1620
  * is currently honored, but will be fully removed in a future release.
@@ -1893,6 +1900,7 @@ type AppConfig = {
1893
1900
  solana: {
1894
1901
  createOnLogin: NonNullable<PrivyAppResponse['embedded_wallet_config']>['solana']['create_on_login'];
1895
1902
  };
1903
+ disableAutomaticMigration: NonNullable<NonNullable<PrivyClientConfig['embeddedWallets']>['disableAutomaticMigration']>;
1896
1904
  requireUserOwnedRecoveryOnCreate: NonNullable<PrivyAppResponse['embedded_wallet_config']>['require_user_owned_recovery_on_create'];
1897
1905
  userOwnedRecoveryOptions: NonNullable<PrivyAppResponse['embedded_wallet_config']>['user_owned_recovery_options'];
1898
1906
  mode: 'legacy-embedded-wallets-only' | 'user-controlled-server-wallets-only';
@@ -2280,7 +2288,7 @@ type CrossAppProviderDetails = {
2280
2288
  name: string;
2281
2289
  icon_url: string | null;
2282
2290
  };
2283
- type LoginToFrame = {
2291
+ type LoginToMiniApp = {
2284
2292
  /**
2285
2293
  * The message the Farcaster wallet signed
2286
2294
  */
@@ -2290,6 +2298,10 @@ type LoginToFrame = {
2290
2298
  */
2291
2299
  signature: string;
2292
2300
  };
2301
+ /**
2302
+ * @deprecated Use `LoginToMiniApp` instead
2303
+ */
2304
+ type LoginToFrame = LoginToMiniApp;
2293
2305
  /**
2294
2306
  * For SIWS flows, indicates whether or not the SIWS message is plaintext, or wrapped in a memo transaction
2295
2307
  */
@@ -2299,4 +2311,4 @@ type SessionSignerInput = {
2299
2311
  policyIds?: string[];
2300
2312
  }[];
2301
2313
 
2302
- export { type MoonpaySignRequest as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type SetBaseAccountSdkType as D, type EthereumRpcRequestType as E, type FundingMethod as F, type WalletListEntry as G, type HDWalletWithMetadata as H, type AppConfig as I, type BaseConnectedWallet as J, type ConnectWalletModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type LoginModalOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SetWalletRecoveryOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type SignTypedDataParams as T, type User as U, type UnsignedTransactionRequest as V, type Wallet as W, type FundWalletConfig as X, type ConnectedWallet as Y, type CrossAppProviderDetails as Z, type OAuthProviderType as _, type LoginMethod as a, type MoonpaySignResponse as a0, type SmartWalletConfig as a1, type ExternalWalletMetadata as a2, type TelegramAuthResult as a3, type TelegramWebAppData as a4, type OAuthUserInfo as a5, type SiwsMessageType as a6, type OAuthFlowState as a7, type LoginWithCode as a8, type OtpFlowState as a9, type Tiktok as aA, type Line as aB, type Telegram as aC, type CrossAppAccount as aD, type LinkedAccountType as aE, type GoogleOAuthWithMetadata as aF, type TwitterOAuthWithMetadata as aG, type DiscordOAuthWithMetadata as aH, type GithubOAuthWithMetadata as aI, type TiktokOAuthWithMetadata as aJ, type LineOAuthWithMetadata as aK, type LinkedInOAuthWithMetadata as aL, type AppleOAuthWithMetadata as aM, type FarcasterWithMetadata as aN, type TelegramWithMetadata as aO, type CrossAppAccountWithMetadata as aP, type PasskeyWithMetadata as aQ, type Email as aR, type Phone as aS, type TransactionUIOptions as aT, type ContractUIOptions as aU, type NativeFundingConfig as aV, type MoonpayFundingConfig as aW, type PriceDisplayOptions as aX, type Farcaster as aY, type Passkey as aZ, type LoginMethodOrderOption as a_, type PasskeyFlowState as aa, type SiweFlowState as ab, type BaseAccountSdkType as ac, type UnsignedTransactionRequestWithChainId as ad, type BaseConnectedWalletType as ae, type SessionSignerInput as af, type TelegramAuthFlowState as ag, type TypedMessage as ah, type MessageTypes as ai, type SmartWallet as aj, type MoonpayConfig as ak, type MoonpayCurrencyCode as al, type MoonpayPaymentMethod as am, type Quantity as an, type TransactionLog as ao, type TransactionReceipt as ap, type NonEmptyArray as aq, type EmailWithMetadata as ar, type PhoneWithMetadata as as, type WalletWithMetadata as at, type Google as au, type Twitter as av, type Discord as aw, type Github as ax, type LinkedIn as ay, type Apple as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type PrivyFarcasterSignerInitResponse as m, type MfaSubmitArgs as n, type SolanaRpcRequestType as o, type EthereumRpcResponseType as p, type SolanaRpcResponseType as q, type EIP1193Provider as r, type EntropyIdVerifier as s, toSolanaWalletConnectors as t, type RequestArguments as u, WalletConnector as v, PrivyProxyProvider as w, type WalletClientType as x, type ConnectedWalletMetadata as y, type PrivyClientConfig as z };
2314
+ export { type OAuthProviderType as $, type PrivyClientConfig as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectorType as D, type EthereumRpcRequestType as E, type FundingMethod as F, type SetBaseAccountSdkType as G, type HDWalletWithMetadata as H, type WalletListEntry as I, type AppConfig as J, type BaseConnectedWallet as K, type LoginMethod as L, type MfaMethod as M, type ConnectWalletModalOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type LoginModalOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type SetWalletRecoveryOptions as T, type User as U, type SignTypedDataParams as V, type Wallet as W, type UnsignedTransactionRequest as X, type FundWalletConfig as Y, type ConnectedWallet as Z, type CrossAppProviderDetails as _, type LinkedAccountWithMetadata as a, type LoginMethodOrderOption as a$, type MoonpaySignRequest as a0, type MoonpaySignResponse as a1, type SmartWalletConfig as a2, type ExternalWalletMetadata as a3, type TelegramAuthResult as a4, type TelegramWebAppData as a5, type OAuthUserInfo as a6, type SiwsMessageType as a7, type OAuthFlowState as a8, type LoginWithCode as a9, type Apple as aA, type Tiktok as aB, type Line as aC, type Telegram as aD, type CrossAppAccount as aE, type LinkedAccountType as aF, type GoogleOAuthWithMetadata as aG, type TwitterOAuthWithMetadata as aH, type DiscordOAuthWithMetadata as aI, type GithubOAuthWithMetadata as aJ, type TiktokOAuthWithMetadata as aK, type LineOAuthWithMetadata as aL, type LinkedInOAuthWithMetadata as aM, type AppleOAuthWithMetadata as aN, type FarcasterWithMetadata as aO, type TelegramWithMetadata as aP, type CrossAppAccountWithMetadata as aQ, type PasskeyWithMetadata as aR, type Email as aS, type Phone as aT, type TransactionUIOptions as aU, type ContractUIOptions as aV, type NativeFundingConfig as aW, type MoonpayFundingConfig as aX, type PriceDisplayOptions as aY, type Farcaster as aZ, type Passkey as a_, type OtpFlowState as aa, type PasskeyFlowState as ab, type SiweFlowState as ac, type BaseAccountSdkType as ad, type UnsignedTransactionRequestWithChainId as ae, type BaseConnectedWalletType as af, type SessionSignerInput as ag, type TelegramAuthFlowState as ah, type TypedMessage as ai, type MessageTypes as aj, type SmartWallet as ak, type MoonpayConfig as al, type MoonpayCurrencyCode as am, type MoonpayPaymentMethod as an, type Quantity as ao, type TransactionLog as ap, type TransactionReceipt as aq, type NonEmptyArray as ar, type EmailWithMetadata as as, type PhoneWithMetadata as at, type WalletWithMetadata as au, type Google as av, type Twitter as aw, type Discord as ax, type Github as ay, type LinkedIn as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type SupportedSolanaTransaction as d, type SolanaCluster as e, type CreateWalletOptions as f, type LoginToFrame as g, type LoginToMiniApp as h, type SendTransactionModalUIOptions as i, type SignMessageModalUIOptions as j, type SolanaStandardWallet as k, type SolanaFundingConfig as l, SolanaWalletConnector as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type EIP1193Provider as s, toSolanaWalletConnectors as t, type EntropyIdVerifier as u, type RequestArguments as v, WalletConnector as w, PrivyProxyProvider as x, type WalletClientType as y, type ConnectedWalletMetadata as z };
@@ -1608,6 +1608,13 @@ interface PrivyClientConfig {
1608
1608
  */
1609
1609
  createOnLogin?: EmbeddedWalletCreateOnLoginConfig;
1610
1610
  };
1611
+ /**
1612
+ * Set to `true` to disable automatic migration, if you are migrating
1613
+ * manually via the `useMigrateWallets` hook.
1614
+ *
1615
+ * @default false
1616
+ */
1617
+ disableAutomaticMigration?: boolean;
1611
1618
  /**
1612
1619
  * @deprecated. Instead, use the server-driven configuration found in the Privy console: https://dashboard.privy.io/apps/YOUR_APP_ID/embedded. This client-side setting
1613
1620
  * is currently honored, but will be fully removed in a future release.
@@ -1893,6 +1900,7 @@ type AppConfig = {
1893
1900
  solana: {
1894
1901
  createOnLogin: NonNullable<PrivyAppResponse['embedded_wallet_config']>['solana']['create_on_login'];
1895
1902
  };
1903
+ disableAutomaticMigration: NonNullable<NonNullable<PrivyClientConfig['embeddedWallets']>['disableAutomaticMigration']>;
1896
1904
  requireUserOwnedRecoveryOnCreate: NonNullable<PrivyAppResponse['embedded_wallet_config']>['require_user_owned_recovery_on_create'];
1897
1905
  userOwnedRecoveryOptions: NonNullable<PrivyAppResponse['embedded_wallet_config']>['user_owned_recovery_options'];
1898
1906
  mode: 'legacy-embedded-wallets-only' | 'user-controlled-server-wallets-only';
@@ -2280,7 +2288,7 @@ type CrossAppProviderDetails = {
2280
2288
  name: string;
2281
2289
  icon_url: string | null;
2282
2290
  };
2283
- type LoginToFrame = {
2291
+ type LoginToMiniApp = {
2284
2292
  /**
2285
2293
  * The message the Farcaster wallet signed
2286
2294
  */
@@ -2290,6 +2298,10 @@ type LoginToFrame = {
2290
2298
  */
2291
2299
  signature: string;
2292
2300
  };
2301
+ /**
2302
+ * @deprecated Use `LoginToMiniApp` instead
2303
+ */
2304
+ type LoginToFrame = LoginToMiniApp;
2293
2305
  /**
2294
2306
  * For SIWS flows, indicates whether or not the SIWS message is plaintext, or wrapped in a memo transaction
2295
2307
  */
@@ -2299,4 +2311,4 @@ type SessionSignerInput = {
2299
2311
  policyIds?: string[];
2300
2312
  }[];
2301
2313
 
2302
- export { type MoonpaySignRequest as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type SetBaseAccountSdkType as D, type EthereumRpcRequestType as E, type FundingMethod as F, type WalletListEntry as G, type HDWalletWithMetadata as H, type AppConfig as I, type BaseConnectedWallet as J, type ConnectWalletModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type LoginModalOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SetWalletRecoveryOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type SignTypedDataParams as T, type User as U, type UnsignedTransactionRequest as V, type Wallet as W, type FundWalletConfig as X, type ConnectedWallet as Y, type CrossAppProviderDetails as Z, type OAuthProviderType as _, type LoginMethod as a, type MoonpaySignResponse as a0, type SmartWalletConfig as a1, type ExternalWalletMetadata as a2, type TelegramAuthResult as a3, type TelegramWebAppData as a4, type OAuthUserInfo as a5, type SiwsMessageType as a6, type OAuthFlowState as a7, type LoginWithCode as a8, type OtpFlowState as a9, type Tiktok as aA, type Line as aB, type Telegram as aC, type CrossAppAccount as aD, type LinkedAccountType as aE, type GoogleOAuthWithMetadata as aF, type TwitterOAuthWithMetadata as aG, type DiscordOAuthWithMetadata as aH, type GithubOAuthWithMetadata as aI, type TiktokOAuthWithMetadata as aJ, type LineOAuthWithMetadata as aK, type LinkedInOAuthWithMetadata as aL, type AppleOAuthWithMetadata as aM, type FarcasterWithMetadata as aN, type TelegramWithMetadata as aO, type CrossAppAccountWithMetadata as aP, type PasskeyWithMetadata as aQ, type Email as aR, type Phone as aS, type TransactionUIOptions as aT, type ContractUIOptions as aU, type NativeFundingConfig as aV, type MoonpayFundingConfig as aW, type PriceDisplayOptions as aX, type Farcaster as aY, type Passkey as aZ, type LoginMethodOrderOption as a_, type PasskeyFlowState as aa, type SiweFlowState as ab, type BaseAccountSdkType as ac, type UnsignedTransactionRequestWithChainId as ad, type BaseConnectedWalletType as ae, type SessionSignerInput as af, type TelegramAuthFlowState as ag, type TypedMessage as ah, type MessageTypes as ai, type SmartWallet as aj, type MoonpayConfig as ak, type MoonpayCurrencyCode as al, type MoonpayPaymentMethod as am, type Quantity as an, type TransactionLog as ao, type TransactionReceipt as ap, type NonEmptyArray as aq, type EmailWithMetadata as ar, type PhoneWithMetadata as as, type WalletWithMetadata as at, type Google as au, type Twitter as av, type Discord as aw, type Github as ax, type LinkedIn as ay, type Apple as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type PrivyFarcasterSignerInitResponse as m, type MfaSubmitArgs as n, type SolanaRpcRequestType as o, type EthereumRpcResponseType as p, type SolanaRpcResponseType as q, type EIP1193Provider as r, type EntropyIdVerifier as s, toSolanaWalletConnectors as t, type RequestArguments as u, WalletConnector as v, PrivyProxyProvider as w, type WalletClientType as x, type ConnectedWalletMetadata as y, type PrivyClientConfig as z };
2314
+ export { type OAuthProviderType as $, type PrivyClientConfig as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectorType as D, type EthereumRpcRequestType as E, type FundingMethod as F, type SetBaseAccountSdkType as G, type HDWalletWithMetadata as H, type WalletListEntry as I, type AppConfig as J, type BaseConnectedWallet as K, type LoginMethod as L, type MfaMethod as M, type ConnectWalletModalOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type LoginModalOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type SetWalletRecoveryOptions as T, type User as U, type SignTypedDataParams as V, type Wallet as W, type UnsignedTransactionRequest as X, type FundWalletConfig as Y, type ConnectedWallet as Z, type CrossAppProviderDetails as _, type LinkedAccountWithMetadata as a, type LoginMethodOrderOption as a$, type MoonpaySignRequest as a0, type MoonpaySignResponse as a1, type SmartWalletConfig as a2, type ExternalWalletMetadata as a3, type TelegramAuthResult as a4, type TelegramWebAppData as a5, type OAuthUserInfo as a6, type SiwsMessageType as a7, type OAuthFlowState as a8, type LoginWithCode as a9, type Apple as aA, type Tiktok as aB, type Line as aC, type Telegram as aD, type CrossAppAccount as aE, type LinkedAccountType as aF, type GoogleOAuthWithMetadata as aG, type TwitterOAuthWithMetadata as aH, type DiscordOAuthWithMetadata as aI, type GithubOAuthWithMetadata as aJ, type TiktokOAuthWithMetadata as aK, type LineOAuthWithMetadata as aL, type LinkedInOAuthWithMetadata as aM, type AppleOAuthWithMetadata as aN, type FarcasterWithMetadata as aO, type TelegramWithMetadata as aP, type CrossAppAccountWithMetadata as aQ, type PasskeyWithMetadata as aR, type Email as aS, type Phone as aT, type TransactionUIOptions as aU, type ContractUIOptions as aV, type NativeFundingConfig as aW, type MoonpayFundingConfig as aX, type PriceDisplayOptions as aY, type Farcaster as aZ, type Passkey as a_, type OtpFlowState as aa, type PasskeyFlowState as ab, type SiweFlowState as ac, type BaseAccountSdkType as ad, type UnsignedTransactionRequestWithChainId as ae, type BaseConnectedWalletType as af, type SessionSignerInput as ag, type TelegramAuthFlowState as ah, type TypedMessage as ai, type MessageTypes as aj, type SmartWallet as ak, type MoonpayConfig as al, type MoonpayCurrencyCode as am, type MoonpayPaymentMethod as an, type Quantity as ao, type TransactionLog as ap, type TransactionReceipt as aq, type NonEmptyArray as ar, type EmailWithMetadata as as, type PhoneWithMetadata as at, type WalletWithMetadata as au, type Google as av, type Twitter as aw, type Discord as ax, type Github as ay, type LinkedIn as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type SupportedSolanaTransaction as d, type SolanaCluster as e, type CreateWalletOptions as f, type LoginToFrame as g, type LoginToMiniApp as h, type SendTransactionModalUIOptions as i, type SignMessageModalUIOptions as j, type SolanaStandardWallet as k, type SolanaFundingConfig as l, SolanaWalletConnector as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type EIP1193Provider as s, toSolanaWalletConnectors as t, type EntropyIdVerifier as u, type RequestArguments as v, WalletConnector as w, PrivyProxyProvider as x, type WalletClientType as y, type ConnectedWalletMetadata as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-Dmys-XR7.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-DYBA51G_.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
package/dist/dts/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-Dmys-XR7.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-DYBA51G_.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
@@ -1,5 +1,5 @@
1
1
  import { Chain } from '@privy-io/js-sdk-core';
2
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, f as SolanaCluster, C as ConnectedSolanaWallet, g as CreateWalletOptions } from './types-Dmys-XR7.js';
2
+ import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-DYBA51G_.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Chain } from '@privy-io/js-sdk-core';
2
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, f as SolanaCluster, C as ConnectedSolanaWallet, g as CreateWalletOptions } from './types-Dmys-XR7.js';
2
+ import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, e as SolanaCluster, C as ConnectedSolanaWallet, f as CreateWalletOptions } from './types-DYBA51G_.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as o}from"@abstract-foundation/agw-client/actions";import{hexToNumber as r,createWalletClient as t,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{u as s,g as l,c as d}from"./use-sign-with-user-signer-CyFzXla-.mjs";import{o as p,w as m,e as u,a as h,a$ as I,b0 as g,b1 as y,x as f}from"./privy-provider-DRh_qFir.mjs";import{u as v}from"./internal-context-qdNgTV5f.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-BVE7Yf57.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-DCwuPDUk.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"zustand";import"@headlessui/react";import"@heroicons/react/24/outline/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"@walletconnect/ethereum-provider";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/WalletIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/ArrowTopRightOnSquareIcon";import"@heroicons/react/24/solid/DocumentCheckIcon";import"@heroicons/react/24/solid/XCircleIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"qrcode";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/LockClosedIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:b,appId:A,rpcConfig:W,client:M}=v(),k=p(),{wallets:F}=m(),{setModalData:x}=u(),q=l(T),R=!!q&&d(q),D=async(o=c.id)=>{let s=w(F);if(!s)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![c.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=b.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let p=await s.getEthereumProvider(),m=t({account:s.address,transport:n(p)}),u=a({address:s.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:i(f(d,W,A)),publicTransport:i(f(d,W,A)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await D(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);P.current=!0,x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))}}}export{T as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as o}from"@abstract-foundation/agw-client/actions";import{hexToNumber as r,createWalletClient as t,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{u as s,g as l,c as d}from"./use-sign-with-user-signer-CyFzXla-.mjs";import{o as p,w as m,e as u,a as h,b0 as I,b1 as g,b2 as y,x as f}from"./privy-provider-NPBEALzA.mjs";import{u as v}from"./internal-context-qdNgTV5f.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-JbwIgnkS.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-DCwuPDUk.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"zustand";import"@headlessui/react";import"@heroicons/react/24/outline/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"@walletconnect/ethereum-provider";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/WalletIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/ArrowTopRightOnSquareIcon";import"@heroicons/react/24/solid/DocumentCheckIcon";import"@heroicons/react/24/solid/XCircleIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"qrcode";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/LockClosedIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:b,appId:A,rpcConfig:W,client:M}=v(),k=p(),{wallets:F}=m(),{setModalData:x}=u(),q=l(T),R=!!q&&d(q),D=async(o=c.id)=>{let s=w(F);if(!s)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![c.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=b.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let p=await s.getEthereumProvider(),m=t({account:s.address,transport:n(p)}),u=a({address:s.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:i(f(d,W,A)),publicTransport:i(f(d,W,A)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await D(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);P.current=!0,x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);x({connectWallet:{recoveryMethod:q.recoveryMethod,connectingWalletAddress:q.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))}}}export{T as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{useMemo as r}from"react";import{create as e,rawSign as t}from"@privy-io/js-sdk-core";import{u as a}from"./internal-context-qdNgTV5f.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-CyFzXla-.mjs";import"viem";const u=()=>{let{refreshSessionAndUser:t,privy:i}=a();return r((()=>({async createWallet(r){let a=await e(i,{request:{chain_type:r.chainType}}),s=await t();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[t,i])},d=()=>{let{user:e}=i(),{privy:u}=a(),{signWithUserSigner:d}=s();return r((()=>({async signRawHash({address:r,chainType:a,hash:i}){if(!e)throw Error("User must be authenticated before signing");let s=n(e,a).filter((r=>o(r))).find((e=>e.address===r));if(!s)throw Error("Wallet not found");let h=await t(u,d,{wallet_id:s.id,params:{hash:i}});if(h.data&&"signature"in h.data&&"hex"===h.data.encoding)return{signature:h.data.signature};throw Error("Failed to sign")}})),[u])};export{u as useCreateWallet,d as useSignRawHash};
1
+ import{useMemo as r}from"react";import{create as e,rawSign as t}from"@privy-io/js-sdk-core";import{u as a}from"./internal-context-qdNgTV5f.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-CyFzXla-.mjs";import"viem";const u=()=>{let{refreshSessionAndUser:t,privy:i}=a();return r((()=>({async createWallet(r){let a=await e(i,{request:{chain_type:r.chainType}}),s=await t();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[t,i])},d=()=>{let{user:e}=i(),{privy:u}=a(),{signWithUserSigner:d}=s();return r((()=>({async signRawHash({address:r,chainType:a,hash:i}){if(!e)throw Error("User must be authenticated before signing");let s=n(e,a).filter((r=>o(r))).find((e=>e.address===r));if(!s)throw Error("Wallet not found");let h=await t(u,d,{wallet_id:s.id,params:{hash:i}});if(h.data&&"signature"in h.data&&"hex"===h.data.encoding)return{signature:h.data.signature};throw Error("Failed to sign")}})),[u,d,e])};export{u as useCreateWallet,d as useSignRawHash};
@@ -1 +1 @@
1
- import{useCallback as t}from"react";import{F as e}from"./frame-DMd4vZ0H.mjs";import{P as r}from"./paths-DCwuPDUk.mjs";import{u as i}from"./internal-context-qdNgTV5f.mjs";import"ofetch";const a=()=>{let{client:a,setAuthenticated:s,setUser:n}=i();return{initLoginToFrame:t((async()=>{let t=new e;if(!a)throw new r("Must initialize Privy client first.");return a.startAuthFlow(t),await t.init()}),[a]),loginToFrame:t((async({message:t,signature:i})=>{if(!a)throw new r("Must initialize Privy client first.");if(!(a.authFlow instanceof e))throw new r("Must initialize Farcaster frame flow first.");let o=(t=>{let e=t.match(/farcaster:\/\/fid\/(\d+)/);return e&&e[1]?parseInt(e[1],10):null})(t);if(!o)throw new r("Invalid message format; could not parse Farcaster ID.");a.authFlow.setAuthData({message:t,signature:i,fid:o});let{user:l}=await a.authenticate();return l&&(n(l),s(!0)),l}),[a,n,s])}};export{a as useLoginToFrame};
1
+ import{useCallback as t}from"react";import{F as i}from"./frame-DMd4vZ0H.mjs";import{P as e}from"./paths-DCwuPDUk.mjs";import{u as a}from"./internal-context-qdNgTV5f.mjs";import"ofetch";const n=()=>{let{client:n,setAuthenticated:r,setUser:s}=a();return{initLoginToMiniApp:t((async()=>{let t=new i;if(!n)throw new e("Must initialize Privy client first.");return n.startAuthFlow(t),await t.init()}),[n]),loginToMiniApp:t((async({message:t,signature:a})=>{if(!n)throw new e("Must initialize Privy client first.");if(!(n.authFlow instanceof i))throw new e("Must initialize Farcaster Mini App flow first.");let o=(t=>{let i=t.match(/farcaster:\/\/fid\/(\d+)/);return i&&i[1]?parseInt(i[1],10):null})(t);if(!o)throw new e("Invalid message format; could not parse Farcaster ID.");n.authFlow.setAuthData({message:t,signature:a,fid:o});let{user:l}=await n.authenticate();return l&&(s(l),r(!0)),l}),[n,s,r])}},r=()=>{let{initLoginToMiniApp:i,loginToMiniApp:e}=n();return{initLoginToFrame:t((async()=>await i()),[i]),loginToFrame:t((async({message:t,signature:i})=>await e({message:t,signature:i})),[e])}};export{r as useLoginToFrame,n as useLoginToMiniApp};