@privy-io/react-auth 2.6.2 → 2.6.3

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 (54) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/farcaster.js +1 -1
  3. package/dist/cjs/getEmbeddedConnectedWallet-DTU4T9TJ.js +1 -0
  4. package/dist/cjs/index.js +1 -5
  5. package/dist/cjs/internal-context-HesndSYh.js +1 -0
  6. package/dist/cjs/privy-provider-CWADob3g.js +27 -0
  7. package/dist/cjs/smart-wallets-Dsq1trqs.js +1 -0
  8. package/dist/cjs/smart-wallets.js +1 -1
  9. package/dist/cjs/solana.js +1 -1
  10. package/dist/cjs/ui.js +2 -2
  11. package/dist/cjs/useActiveWallet-D5FyaqZJ.js +1 -0
  12. package/dist/cjs/useFundWallet-BsBuslJV.js +1 -0
  13. package/dist/dts/farcaster.d.mts +1 -1
  14. package/dist/dts/farcaster.d.ts +1 -1
  15. package/dist/dts/index.d.mts +12 -8
  16. package/dist/dts/index.d.ts +12 -8
  17. package/dist/dts/smart-wallets.d.mts +1 -1
  18. package/dist/dts/smart-wallets.d.ts +1 -1
  19. package/dist/dts/solana.d.mts +6 -6
  20. package/dist/dts/solana.d.ts +6 -6
  21. package/dist/dts/{types-CcosPsy6.d.mts → types-CsAGoXth.d.mts} +9 -9
  22. package/dist/dts/{types-CcosPsy6.d.ts → types-CsAGoXth.d.ts} +9 -9
  23. package/dist/dts/ui.d.mts +1 -1
  24. package/dist/dts/ui.d.ts +1 -1
  25. package/dist/dts/{useSolanaWallets-BHduxJmW.d.mts → useSolanaWallets-CFgYdjDv.d.mts} +18 -1
  26. package/dist/dts/{useSolanaWallets-BHduxJmW.d.ts → useSolanaWallets-CFgYdjDv.d.ts} +18 -1
  27. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  28. package/dist/esm/farcaster.mjs +1 -1
  29. package/dist/esm/getEmbeddedConnectedWallet-CSSBWE2p.mjs +1 -0
  30. package/dist/esm/index.mjs +1 -5
  31. package/dist/esm/{internal-context-CL_EG4e1.mjs → internal-context-O3TPYUku.mjs} +1 -1
  32. package/dist/esm/privy-provider-u_cmfixS.mjs +27 -0
  33. package/dist/esm/smart-wallets-vK26EMrU.mjs +1 -0
  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-Cwj5v4eK.mjs +1 -0
  38. package/dist/esm/useFundWallet-BPk4tVPS.mjs +1 -0
  39. package/package.json +4 -4
  40. package/dist/cjs/AwaitingEvmToSolBridgingScreen-pmGmvR1q.js +0 -22
  41. package/dist/cjs/getEmbeddedConnectedWallet-CGj_I0cc.js +0 -2
  42. package/dist/cjs/importWallet-Du1BO6qb.js +0 -1
  43. package/dist/cjs/internal-context-D5TgeQk8.js +0 -1
  44. package/dist/cjs/prepareFundingModalData-C2_ED32S.js +0 -1
  45. package/dist/cjs/smart-wallets-CoYci1bf.js +0 -1
  46. package/dist/cjs/useActiveWallet-CaLK0Ao4.js +0 -1
  47. package/dist/cjs/useFundWallet-92y-LJjK.js +0 -1
  48. package/dist/esm/AwaitingEvmToSolBridgingScreen-DnBONxHo.mjs +0 -22
  49. package/dist/esm/getEmbeddedConnectedWallet-Cyt02rK3.mjs +0 -2
  50. package/dist/esm/importWallet-Bqr-aqzk.mjs +0 -1
  51. package/dist/esm/prepareFundingModalData-Bkg2jc5P.mjs +0 -1
  52. package/dist/esm/smart-wallets-KrlR2oLu.mjs +0 -1
  53. package/dist/esm/useActiveWallet-SKrFBYMY.mjs +0 -1
  54. package/dist/esm/useFundWallet-BvMwnH48.mjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-CcosPsy6.js';
4
- export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CcosPsy6.js';
3
+ import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-CsAGoXth.js';
4
+ export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CsAGoXth.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import EventEmitter from 'eventemitter3';
@@ -17,8 +17,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
17
17
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
18
18
  import { Cluster } from '@solana/web3.js';
19
19
  import { FetchOptions } from 'ofetch';
20
- import { P as PrivyEvents } from './useSolanaWallets-BHduxJmW.js';
21
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BHduxJmW.js';
20
+ import { P as PrivyEvents } from './useSolanaWallets-CFgYdjDv.js';
21
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CFgYdjDv.js';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@privy-io/js-sdk-core';
24
24
  import '@metamask/eth-sig-util';
@@ -2395,14 +2395,14 @@ interface ResponseCrossAppAccount {
2395
2395
  first_verified_at: number | null;
2396
2396
  latest_verified_at: number | null;
2397
2397
  }
2398
- interface ResponseSignerAccount {
2399
- type: 'signer';
2398
+ interface ResponseAuthorizationKeyAccount {
2399
+ type: 'authorization_key';
2400
2400
  public_key: string;
2401
2401
  verified_at: number;
2402
2402
  first_verified_at: number | null;
2403
2403
  latest_verified_at: number | null;
2404
2404
  }
2405
- type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseSignerAccount>;
2405
+ type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseAuthorizationKeyAccount>;
2406
2406
  interface ResponseSmsMfaMethod {
2407
2407
  type: 'sms';
2408
2408
  verified_at: number;
@@ -2981,6 +2981,10 @@ type UseLoginWithSms = {
2981
2981
  */
2982
2982
  declare const useLoginWithSms: (callbacks?: PrivyEvents["login"]) => UseLoginWithSms;
2983
2983
 
2984
+ declare const useConnectOrCreateWallet: (callbacks?: PrivyEvents["connectOrCreateWallet"]) => {
2985
+ connectOrCreateWallet: () => void;
2986
+ };
2987
+
2984
2988
  type UseLinkWithSiwe = {
2985
2989
  /**
2986
2990
  * Given an external wallet address and chain ID, creates a EIP-4361 message for signing.
@@ -3797,4 +3801,4 @@ declare const LoginModal: ({ open }: {
3797
3801
  open: boolean;
3798
3802
  }) => react_jsx_runtime.JSX.Element;
3799
3803
 
3800
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseSignupWithPasskey, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useToken, useUpdateAccount, useUser, useWallets };
3804
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseSignupWithPasskey, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useToken, useUpdateAccount, useUser, useWallets };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-CcosPsy6.js';
4
- export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CcosPsy6.js';
3
+ import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-CsAGoXth.js';
4
+ export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CsAGoXth.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import EventEmitter from 'eventemitter3';
@@ -17,8 +17,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
17
17
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
18
18
  import { Cluster } from '@solana/web3.js';
19
19
  import { FetchOptions } from 'ofetch';
20
- import { P as PrivyEvents } from './useSolanaWallets-BHduxJmW.js';
21
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BHduxJmW.js';
20
+ import { P as PrivyEvents } from './useSolanaWallets-CFgYdjDv.js';
21
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CFgYdjDv.js';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@privy-io/js-sdk-core';
24
24
  import '@metamask/eth-sig-util';
@@ -2395,14 +2395,14 @@ interface ResponseCrossAppAccount {
2395
2395
  first_verified_at: number | null;
2396
2396
  latest_verified_at: number | null;
2397
2397
  }
2398
- interface ResponseSignerAccount {
2399
- type: 'signer';
2398
+ interface ResponseAuthorizationKeyAccount {
2399
+ type: 'authorization_key';
2400
2400
  public_key: string;
2401
2401
  verified_at: number;
2402
2402
  first_verified_at: number | null;
2403
2403
  latest_verified_at: number | null;
2404
2404
  }
2405
- type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseSignerAccount>;
2405
+ type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseAuthorizationKeyAccount>;
2406
2406
  interface ResponseSmsMfaMethod {
2407
2407
  type: 'sms';
2408
2408
  verified_at: number;
@@ -2981,6 +2981,10 @@ type UseLoginWithSms = {
2981
2981
  */
2982
2982
  declare const useLoginWithSms: (callbacks?: PrivyEvents["login"]) => UseLoginWithSms;
2983
2983
 
2984
+ declare const useConnectOrCreateWallet: (callbacks?: PrivyEvents["connectOrCreateWallet"]) => {
2985
+ connectOrCreateWallet: () => void;
2986
+ };
2987
+
2984
2988
  type UseLinkWithSiwe = {
2985
2989
  /**
2986
2990
  * Given an external wallet address and chain ID, creates a EIP-4361 message for signing.
@@ -3797,4 +3801,4 @@ declare const LoginModal: ({ open }: {
3797
3801
  open: boolean;
3798
3802
  }) => react_jsx_runtime.JSX.Element;
3799
3803
 
3800
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseSignupWithPasskey, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useToken, useUpdateAccount, useUser, useWallets };
3804
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseSignupWithPasskey, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useToken, useUpdateAccount, useUser, useWallets };
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-CcosPsy6.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-CsAGoXth.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-CcosPsy6.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-CsAGoXth.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-CcosPsy6.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CcosPsy6.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BHduxJmW.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BHduxJmW.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-CsAGoXth.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CsAGoXth.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-CFgYdjDv.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CFgYdjDv.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -180,11 +180,11 @@ interface UseSignMessageInterface {
180
180
  * @returns signMessage - prompts the user to sign a message using their embedded wallet
181
181
  */
182
182
  declare function useSignMessage(callbacks?: PrivyEvents['signSolanaMessage']): {
183
- signMessage: (args: {
183
+ signMessage: ({ message: _message, options, }: {
184
184
  message: Uint8Array;
185
185
  options?: {
186
- uiOptions?: SignMessageModalUIOptions;
187
186
  address?: string;
187
+ uiOptions?: SignMessageModalUIOptions;
188
188
  };
189
189
  }) => Promise<Uint8Array>;
190
190
  };
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-CcosPsy6.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CcosPsy6.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BHduxJmW.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BHduxJmW.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-CsAGoXth.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CsAGoXth.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-CFgYdjDv.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CFgYdjDv.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -180,11 +180,11 @@ interface UseSignMessageInterface {
180
180
  * @returns signMessage - prompts the user to sign a message using their embedded wallet
181
181
  */
182
182
  declare function useSignMessage(callbacks?: PrivyEvents['signSolanaMessage']): {
183
- signMessage: (args: {
183
+ signMessage: ({ message: _message, options, }: {
184
184
  message: Uint8Array;
185
185
  options?: {
186
- uiOptions?: SignMessageModalUIOptions;
187
186
  address?: string;
187
+ uiOptions?: SignMessageModalUIOptions;
188
188
  };
189
189
  }) => Promise<Uint8Array>;
190
190
  };
@@ -501,7 +501,7 @@ type LoginWithCode = {
501
501
  };
502
502
  declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
503
503
  type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
504
- declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
504
+ declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
505
505
  type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
506
506
  declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet"];
507
507
  type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
@@ -521,7 +521,7 @@ type WalletBranding = {
521
521
  id: string;
522
522
  icon?: string | EmbeddedSVG;
523
523
  };
524
- type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'signer' | 'guest';
524
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'authorization_key' | 'guest';
525
525
  /** @ignore */
526
526
  interface LinkMetadata {
527
527
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -963,7 +963,7 @@ interface CrossAppAccount {
963
963
  providerApp: ProviderAppMetadata;
964
964
  subject: string;
965
965
  }
966
- interface SignerAccount {
966
+ interface AuthorizationKeyAccount {
967
967
  publicKey: string;
968
968
  }
969
969
  /** Object representation of a user's email, with additional metadata for advanced use cases. */
@@ -1055,15 +1055,15 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1055
1055
  /** Denotes that this is a cross-app account */
1056
1056
  type: 'cross_app';
1057
1057
  }
1058
- /** Object representation of a user's signer, with additional metadata for advanced use cases. */
1059
- interface SignerAccountWithMetadata extends LinkMetadata, SignerAccount {
1060
- /** Denotes that this is a signer */
1061
- type: 'signer';
1058
+ /** Object representation of a user's authorization key, with additional metadata for advanced use cases. */
1059
+ interface AuthorizationKeyAccountWithMetadata extends LinkMetadata, AuthorizationKeyAccount {
1060
+ /** Denotes that this is an authorization key */
1061
+ type: 'authorization_key';
1062
1062
  }
1063
1063
  /**
1064
1064
  * Object representation of a user's linked accounts
1065
1065
  */
1066
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | SignerAccountWithMetadata;
1066
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | AuthorizationKeyAccountWithMetadata;
1067
1067
  interface User {
1068
1068
  /** The Privy-issued DID for the user. If you need to store additional information
1069
1069
  * about a user, you can use this DID to reference them. */
@@ -1223,7 +1223,7 @@ type PriceDisplayOptions = {
1223
1223
  };
1224
1224
  type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
1225
1225
  /** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
1226
- | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'safe' | 'solflare' | 'backpack';
1226
+ | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack';
1227
1227
  type NonEmptyArray<T> = [T, ...T[]];
1228
1228
  type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
1229
1229
  type ExternalWalletsConfig = {
@@ -501,7 +501,7 @@ type LoginWithCode = {
501
501
  };
502
502
  declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
503
503
  type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
504
- declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
504
+ declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "haha_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
505
505
  type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
506
506
  declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet"];
507
507
  type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
@@ -521,7 +521,7 @@ type WalletBranding = {
521
521
  id: string;
522
522
  icon?: string | EmbeddedSVG;
523
523
  };
524
- type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'signer' | 'guest';
524
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'authorization_key' | 'guest';
525
525
  /** @ignore */
526
526
  interface LinkMetadata {
527
527
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -963,7 +963,7 @@ interface CrossAppAccount {
963
963
  providerApp: ProviderAppMetadata;
964
964
  subject: string;
965
965
  }
966
- interface SignerAccount {
966
+ interface AuthorizationKeyAccount {
967
967
  publicKey: string;
968
968
  }
969
969
  /** Object representation of a user's email, with additional metadata for advanced use cases. */
@@ -1055,15 +1055,15 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1055
1055
  /** Denotes that this is a cross-app account */
1056
1056
  type: 'cross_app';
1057
1057
  }
1058
- /** Object representation of a user's signer, with additional metadata for advanced use cases. */
1059
- interface SignerAccountWithMetadata extends LinkMetadata, SignerAccount {
1060
- /** Denotes that this is a signer */
1061
- type: 'signer';
1058
+ /** Object representation of a user's authorization key, with additional metadata for advanced use cases. */
1059
+ interface AuthorizationKeyAccountWithMetadata extends LinkMetadata, AuthorizationKeyAccount {
1060
+ /** Denotes that this is an authorization key */
1061
+ type: 'authorization_key';
1062
1062
  }
1063
1063
  /**
1064
1064
  * Object representation of a user's linked accounts
1065
1065
  */
1066
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | SignerAccountWithMetadata;
1066
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | AuthorizationKeyAccountWithMetadata;
1067
1067
  interface User {
1068
1068
  /** The Privy-issued DID for the user. If you need to store additional information
1069
1069
  * about a user, you can use this DID to reference them. */
@@ -1223,7 +1223,7 @@ type PriceDisplayOptions = {
1223
1223
  };
1224
1224
  type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
1225
1225
  /** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
1226
- | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'safe' | 'solflare' | 'backpack';
1226
+ | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack';
1227
1227
  type NonEmptyArray<T> = [T, ...T[]];
1228
1228
  type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
1229
1229
  type ExternalWalletsConfig = {
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, C as Chain } from './types-CcosPsy6.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-CsAGoXth.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
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, C as Chain } from './types-CcosPsy6.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-CsAGoXth.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
@@ -1,4 +1,4 @@
1
- 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, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-CcosPsy6.js';
1
+ 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, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-CsAGoXth.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -58,6 +58,23 @@ interface PrivyEvents {
58
58
  */
59
59
  onError?: CallbackError;
60
60
  };
61
+ connectOrCreateWallet: {
62
+ /**
63
+ * Callback that will execute once a successful `connectWallet` completes.
64
+ * This will not run in the case of a wallet-based authentication or link flow.
65
+ *
66
+ * @param params.wallet {@link BaseConnectedEthereumWallet | BaseConnectedSolanaWallet} the `wallet` object correspending to the connection
67
+ */
68
+ onSuccess?: (params: {
69
+ wallet: BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
70
+ }) => void;
71
+ /**
72
+ * Callback that will execute in the case of a non-successful wallet connection.
73
+ *
74
+ * @param params.error {@link PrivyErrorCode} - the corresponding error code
75
+ */
76
+ onError?: CallbackError;
77
+ };
61
78
  createWallet: {
62
79
  /**
63
80
  * Callback that will execute once on a successful embedded wallet creation.
@@ -1,4 +1,4 @@
1
- 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, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-CcosPsy6.js';
1
+ 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, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-CsAGoXth.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -58,6 +58,23 @@ interface PrivyEvents {
58
58
  */
59
59
  onError?: CallbackError;
60
60
  };
61
+ connectOrCreateWallet: {
62
+ /**
63
+ * Callback that will execute once a successful `connectWallet` completes.
64
+ * This will not run in the case of a wallet-based authentication or link flow.
65
+ *
66
+ * @param params.wallet {@link BaseConnectedEthereumWallet | BaseConnectedSolanaWallet} the `wallet` object correspending to the connection
67
+ */
68
+ onSuccess?: (params: {
69
+ wallet: BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
70
+ }) => void;
71
+ /**
72
+ * Callback that will execute in the case of a non-successful wallet connection.
73
+ *
74
+ * @param params.error {@link PrivyErrorCode} - the corresponding error code
75
+ */
76
+ onError?: CallbackError;
77
+ };
61
78
  createWallet: {
62
79
  /**
63
80
  * Callback that will execute once on a successful embedded wallet creation.
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as o,createWalletClient as r,custom as n,http as t}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{a9 as c,aa as s,aw as l,cQ as p,cN as m,cY as d}from"./AwaitingEvmToSolBridgingScreen-DnBONxHo.mjs";import{a8 as u}from"./internal-context-CL_EG4e1.mjs";import{S as h,a as I,g as y}from"./getEmbeddedConnectedWallet-Cyt02rK3.mjs";import{c as g}from"./smart-wallets-KrlR2oLu.mjs";import"react/jsx-runtime";import"@heroicons/react/24/outline/CheckCircleIcon";import"react";import"styled-components";import"tinycolor2";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/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"react-device-detect";import"@heroicons/react/24/outline/WalletIcon";import"zustand";import"@privy-io/js-sdk-core";import"@walletconnect/ethereum-provider";import"viem/utils";import"eventemitter3";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";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"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/solid/CheckCircleIcon";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/ShieldCheckIcon";import"jose";import"qrcode";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@headlessui/react";import"@heroicons/react/24/outline/ChevronDownIcon";import"ofetch";import"@heroicons/react/24/outline";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function f(){let{user:f}=c(),{hideWalletUIs:w,openPrivyModal:C,chains:v,appId:T,rpcConfig:P}=u(),{wallets:F}=s(),{setModalData:S}=l(),x=async(c=a.id)=>{let s=y(F);if(!s)throw Error("No connected wallet found");let l="string"==typeof c?o(c):c;if(![a.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let p=v.find((e=>e.id===l));if(!p)throw Error("Chain not configured");await s.switchChain(p.id);let m=await s.getEthereumProvider(),u=r({account:s.address,transport:n(m)}),h=i({address:s.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:p,transport:t(d(p,P,T)),publicTransport:t(d(p,P,T)),signer:h})};return{signMessage:async({message:e},o)=>{let r=await x(o);return new Promise((async(o,n)=>{let{entropyId:t,entropyIdVerifier:i}=p(f);w.current=!0,S({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:h,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:n,uiOptions:{isCancellable:!0}}}),C(I)})).finally((()=>{w.current=!1}))},signTypedData:async(e,o)=>{let r=await x(o);return new Promise((async(o,n)=>{w.current=!0;let{entropyId:t,entropyIdVerifier:i}=p(f);S({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:h,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:n,uiOptions:{isCancellable:!0}}}),C(I)})).finally((()=>{w.current=!1}))},sendTransaction:async e=>{let o=await x(e.chainId),r=[],n="calls"in e&&void 0!==e.calls;return r=n?[...e.calls]:[e],new Promise((async(t,i)=>{w.current=!0;let{entropyId:a,entropyIdVerifier:c}=p(f);S({connectWallet:{entropyId:a,entropyIdVerifier:c,onCompleteNavigateTo:m,onFailure:()=>{}},sendTransaction:{transactionRequests:g({calls:r,chain:o.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:a,entropyIdVerifier:c,transactingWallet:{address:o.account.address,walletIndex:null},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?o.sendTransactionBatch(e):o.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),C(I)})).finally((()=>{w.current=!1}))},signTransaction:async e=>{let o=await x(e.chainId),r=[],n="calls"in e&&void 0!==e.calls;return r=n?[...e.calls]:[e],new Promise((async(t,i)=>{w.current=!0;let{entropyId:a,entropyIdVerifier:c}=p(f);S({connectWallet:{entropyId:a,entropyIdVerifier:c,onCompleteNavigateTo:m,onFailure:()=>{}},sendTransaction:{transactionRequests:g({calls:r,chain:o.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:a,entropyIdVerifier:c,transactingWallet:{address:o.account.address,walletIndex:null},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!n)return o.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),C(I)})).finally((()=>{w.current=!1}))}}}export{f as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as o,createWalletClient as r,custom as t,http as i}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{c as a,k as s,ak as l,j as p,ar as d,as as m,at as u,au as h,l as I}from"./privy-provider-u_cmfixS.mjs";import{u as y}from"./internal-context-O3TPYUku.mjs";import{g}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as f}from"./smart-wallets-vK26EMrU.mjs";import"react/jsx-runtime";import"mipd";import"react";import"react-device-detect";import"viem/utils";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/js-sdk-core";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";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/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"@heroicons/react/24/outline/WalletIcon";import"zustand";import"@walletconnect/ethereum-provider";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";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"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/solid/CheckCircleIcon";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/ShieldCheckIcon";import"qrcode";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@headlessui/react";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/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"ofetch";import"@heroicons/react/24/outline";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 C(){let{user:C}=a(),{hideWalletUIs:v,openPrivyModal:w,chains:P,appId:T,rpcConfig:k}=y(),{wallets:M}=s(),{setModalData:A}=l(),F=p(C),S=async(a=c.id)=>{let s=g(M);if(!s)throw Error("No connected wallet found");let l="string"==typeof a?o(a):a;if(![c.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let p=P.find((e=>e.id===l));if(!p)throw Error("Chain not configured");await s.switchChain(p.id);let d=await s.getEthereumProvider(),m=r({account:s.address,transport:t(d)}),u=n({address:s.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:p,transport:i(I(p,k,T)),publicTransport:i(I(p,k,T)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await S(o);return new Promise((async(o,t)=>{let{entropyId:i,entropyIdVerifier:n}=d(C);v.current=!0,A({connectWallet:{recoveryMethod:F.recoveryMethod,connectingWalletAddress:F.address,entropyId:i,entropyIdVerifier:n,onCompleteNavigateTo:m,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w(u)})).finally((()=>{v.current=!1}))},signTypedData:async(e,o)=>{let r=await S(o);return new Promise((async(o,t)=>{v.current=!0;let{entropyId:i,entropyIdVerifier:n}=d(C);A({connectWallet:{recoveryMethod:F.recoveryMethod,connectingWalletAddress:F.address,entropyId:i,entropyIdVerifier:n,onCompleteNavigateTo:m,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w(u)})).finally((()=>{v.current=!1}))},sendTransaction:async e=>{let o=await S(e.chainId),r=[],t="calls"in e&&void 0!==e.calls;return r=t?[...e.calls]:[e],new Promise((async(i,n)=>{v.current=!0;let{entropyId:c,entropyIdVerifier:a}=d(C);A({connectWallet:{recoveryMethod:F.recoveryMethod,connectingWalletAddress:F.address,entropyId:c,entropyIdVerifier:a,onCompleteNavigateTo:h,onFailure:()=>{}},sendTransaction:{transactionRequests:f({calls:r,chain:o.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:a,transactingWalletAddress:o.account.address,transactingWalletIndex:void 0,signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>t?o.sendTransactionBatch(e):o.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:n,uiOptions:{isCancellable:!0}}}),w(u)})).finally((()=>{v.current=!1}))},signTransaction:async e=>{let o=await S(e.chainId),r=[],t="calls"in e&&void 0!==e.calls;return r=t?[...e.calls]:[e],new Promise((async(i,n)=>{v.current=!0;let{entropyId:c,entropyIdVerifier:a}=d(C);A({connectWallet:{recoveryMethod:F.recoveryMethod,connectingWalletAddress:F.address,entropyId:c,entropyIdVerifier:a,onCompleteNavigateTo:h,onFailure:()=>{}},sendTransaction:{transactionRequests:f({calls:r,chain:o.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:a,transactingWalletAddress:o.account.address,transactingWalletIndex:void 0,signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!t)return o.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>i(e.hash),onFailure:n,uiOptions:{isCancellable:!0}}}),w(u)})).finally((()=>{v.current=!1}))}}}export{C as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{useCallback as t}from"react";import{P as e,am as i,an as a,f as s,a8 as n}from"./internal-context-CL_EG4e1.mjs";import"ofetch";class r{async init(){if(!this.api)throw new e("Auth flow has no API instance");let{nonce:t}=await this.api.post(i,{});return{nonce:t}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new e("Auth flow has no message, signature, or fid");if(!this.api)throw new e("Auth flow has no API instance");try{let t=await this.api.post(a,{message:this.message,signature:this.signature,fid:this.fid});if(!t)throw new e("No response from authentication");return t}catch(t){throw s(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:e,fid:i}){this.message=t,this.signature=e,this.fid=i}constructor(){this.meta={}}}const o=()=>{let{client:i,setAuthenticated:a,setUser:s}=n();return{initLoginToFrame:t((async()=>{let t=new r;if(!i)throw new e("Must initialize Privy client first.");return i.startAuthFlow(t),await t.init()}),[i]),loginToFrame:t((async({message:t,signature:n})=>{if(!i)throw new e("Must initialize Privy client first.");if(!(i.authFlow instanceof r))throw new e("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 e("Invalid message format; could not parse Farcaster ID.");i.authFlow.setAuthData({message:t,signature:n,fid:o});let{user:h}=await i.authenticate();return h&&(s(h),a(!0)),h}),[i,s,a])}};export{o as useLoginToFrame};
1
+ import{useCallback as t}from"react";import{a as e,am as i,an as a,f as s,u as n}from"./internal-context-O3TPYUku.mjs";import"ofetch";class r{async init(){if(!this.api)throw new e("Auth flow has no API instance");let{nonce:t}=await this.api.post(i,{});return{nonce:t}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new e("Auth flow has no message, signature, or fid");if(!this.api)throw new e("Auth flow has no API instance");try{let t=await this.api.post(a,{message:this.message,signature:this.signature,fid:this.fid});if(!t)throw new e("No response from authentication");return t}catch(t){throw s(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:e,fid:i}){this.message=t,this.signature=e,this.fid=i}constructor(){this.meta={}}}const o=()=>{let{client:i,setAuthenticated:a,setUser:s}=n();return{initLoginToFrame:t((async()=>{let t=new r;if(!i)throw new e("Must initialize Privy client first.");return i.startAuthFlow(t),await t.init()}),[i]),loginToFrame:t((async({message:t,signature:n})=>{if(!i)throw new e("Must initialize Privy client first.");if(!(i.authFlow instanceof r))throw new e("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 e("Invalid message format; could not parse Farcaster ID.");i.authFlow.setAuthData({message:t,signature:n,fid:o});let{user:h}=await i.authenticate();return h&&(s(h),a(!0)),h}),[i,s,a])}};export{o as useLoginToFrame};
@@ -0,0 +1 @@
1
+ function e(e){return e.find((e=>"privy"===e.walletClientType&&"embedded"===e.connectorType&&!e.imported))??null}export{e as g};