@privy-io/react-auth 2.17.2 → 2.18.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 (50) 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/internal-context-Uge-4WDr.js +1 -0
  6. package/dist/cjs/privy-provider-DuC0A2fF.js +29 -0
  7. package/dist/cjs/{smart-wallets-CeAM3IuJ.js → smart-wallets-Cmfk2YVq.js} +1 -1
  8. package/dist/cjs/smart-wallets.js +1 -1
  9. package/dist/cjs/solana.js +1 -1
  10. package/dist/cjs/ui.js +1 -1
  11. package/dist/cjs/{use-sign-with-user-signer-CpEHKe74.js → use-sign-with-user-signer-BrJ6QN6E.js} +1 -1
  12. package/dist/cjs/{useActiveWallet-exwS4YR8.js → useActiveWallet-C6pJYZ4P.js} +1 -1
  13. package/dist/cjs/{useFundWallet-B_Yyhki8.js → useFundWallet-cWxux3fW.js} +1 -1
  14. package/dist/dts/extended-chains.d.mts +1 -1
  15. package/dist/dts/extended-chains.d.ts +1 -1
  16. package/dist/dts/farcaster.d.mts +1 -1
  17. package/dist/dts/farcaster.d.ts +1 -1
  18. package/dist/dts/index.d.mts +75 -6
  19. package/dist/dts/index.d.ts +75 -6
  20. package/dist/dts/smart-wallets.d.mts +1 -1
  21. package/dist/dts/smart-wallets.d.ts +1 -1
  22. package/dist/dts/solana.d.mts +4 -4
  23. package/dist/dts/solana.d.ts +4 -4
  24. package/dist/dts/{types-BKf1TjPF.d.mts → types-cSndhqyV.d.mts} +9 -5
  25. package/dist/dts/{types-BKf1TjPF.d.ts → types-cSndhqyV.d.ts} +9 -5
  26. package/dist/dts/ui.d.mts +1 -1
  27. package/dist/dts/ui.d.ts +1 -1
  28. package/dist/dts/{useSolanaWallets-BTDsdOi4.d.mts → useSolanaWallets-BGaZqngA.d.mts} +2 -2
  29. package/dist/dts/{useSolanaWallets-BTDsdOi4.d.ts → useSolanaWallets-BGaZqngA.d.ts} +2 -2
  30. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  31. package/dist/esm/extended-chains.mjs +1 -1
  32. package/dist/esm/farcaster.mjs +1 -1
  33. package/dist/esm/index.mjs +1 -1
  34. package/dist/esm/internal-context-BzsB315R.mjs +1 -0
  35. package/dist/esm/privy-provider-D3Bw8K9z.mjs +29 -0
  36. package/dist/esm/smart-wallets-BHAJajS8.mjs +1 -0
  37. package/dist/esm/smart-wallets.mjs +1 -1
  38. package/dist/esm/solana.mjs +1 -1
  39. package/dist/esm/ui.mjs +2 -2
  40. package/dist/esm/{use-sign-with-user-signer-C3vxQSbq.mjs → use-sign-with-user-signer-C21K9CRz.mjs} +1 -1
  41. package/dist/esm/useActiveWallet-Dic5bVzH.mjs +1 -0
  42. package/dist/esm/useFundWallet-BP5Qli7y.mjs +1 -0
  43. package/package.json +5 -4
  44. package/dist/cjs/internal-context-vhWXhsPy.js +0 -1
  45. package/dist/cjs/privy-provider-Ds0Q6p6C.js +0 -28
  46. package/dist/esm/internal-context-De1jxnac.mjs +0 -1
  47. package/dist/esm/privy-provider-BWC5Ur7o.mjs +0 -28
  48. package/dist/esm/smart-wallets-ClIhi9mx.mjs +0 -1
  49. package/dist/esm/useActiveWallet-CFPTzCLv.mjs +0 -1
  50. package/dist/esm/useFundWallet-BllWoKI2.mjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { 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 EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-BKf1TjPF.js';
4
- export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKf1TjPF.js';
3
+ import { 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 EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-cSndhqyV.js';
4
+ export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-cSndhqyV.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';
@@ -11,13 +11,14 @@ import Privy, { Chain, RpcConfig, GenerateAuthorizationSignatureInput, GenerateA
11
11
  export { DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, addPrivyRpcToChain, addRpcUrlOverrideToChain } from '@privy-io/js-sdk-core';
12
12
  import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
13
13
  import * as viem from 'viem';
14
- import { Address, HttpTransport } from 'viem';
14
+ import { Address, HttpTransport, Hex } from 'viem';
15
15
  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-BTDsdOi4.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BGaZqngA.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BGaZqngA.js';
21
+ import * as viem_accounts from 'viem/accounts';
21
22
  import '@coinbase/wallet-sdk';
22
23
  import '@solana/wallet-adapter-base';
23
24
  import '@solana/wallet-standard-features';
@@ -3396,6 +3397,47 @@ interface UseConnectCoinbaseSmartWalletInterface {
3396
3397
  }
3397
3398
  declare const useConnectCoinbaseSmartWallet: () => UseConnectCoinbaseSmartWalletInterface;
3398
3399
 
3400
+ type UseAuthMfa = {
3401
+ /**
3402
+ * Trigger the verification flow for auth MFA.
3403
+ *
3404
+ * @param o options for the verification flow
3405
+ * @returns a promise that resolves to void on success, rejects otherwise
3406
+ */
3407
+ verify: (o?: {
3408
+ /**
3409
+ * If set to false, `verify` can be used within other Privy flows e.g. enrollment.
3410
+ *
3411
+ * @default true
3412
+ */
3413
+ standalone?: boolean;
3414
+ }) => Promise<void>;
3415
+ };
3416
+ /**
3417
+ * @experimental
3418
+ *
3419
+ * Hook to trigger MFA verification for Privy authentication
3420
+ */
3421
+ declare const useAuthMfa: () => UseAuthMfa;
3422
+
3423
+ type UseAuthMfaEnrollment = {
3424
+ /**
3425
+ * Trigger the enrollment/un-enrollment flow for auth MFA.
3426
+ *
3427
+ * @param o options for the verification flow
3428
+ * @returns a promise that resolves to an object with the updated user
3429
+ */
3430
+ enroll: (o?: Record<string, never>) => Promise<{
3431
+ user: User;
3432
+ }>;
3433
+ };
3434
+ /**
3435
+ * @experimental
3436
+ *
3437
+ * Hook to trigger MFA enrollment for Privy authentication
3438
+ */
3439
+ declare const useAuthMfaEnrollment: () => UseAuthMfaEnrollment;
3440
+
3399
3441
  interface UseImportWalletInterface {
3400
3442
  /**
3401
3443
  * Imports a private key to be used as an embedded wallet for the user
@@ -4142,4 +4184,31 @@ declare const LoginModal: ({ open }: {
4142
4184
  open: boolean;
4143
4185
  }) => react_jsx_runtime.JSX.Element;
4144
4186
 
4145
- 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 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, useActiveWallet, useAuthorizationSignature, 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 };
4187
+ /**
4188
+ * Helper function to create a viem Account instance given a connected Ethereum wallet.
4189
+ *
4190
+ * @param wallet {ConnectedWallet} the connected Ethereum wallet to create an Account for
4191
+ * @returns the corresponding viem account for the wallet
4192
+ */
4193
+ declare const toViemAccount: ({ wallet }: {
4194
+ wallet: ConnectedWallet;
4195
+ }) => Promise<{
4196
+ address: viem.Address;
4197
+ nonceManager?: viem.NonceManager | undefined;
4198
+ sign?: ((parameters: {
4199
+ hash: viem.Hash;
4200
+ }) => Promise<Hex>) | undefined;
4201
+ signAuthorization?: ((parameters: viem.AuthorizationRequest) => Promise<viem_accounts.SignAuthorizationReturnType>) | undefined;
4202
+ signMessage: ({ message }: {
4203
+ message: viem.SignableMessage;
4204
+ }) => Promise<Hex>;
4205
+ signTransaction: <serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
4206
+ serializer?: serializer | undefined;
4207
+ } | undefined) => Promise<viem.IsNarrowable<viem.TransactionSerialized<viem.GetTransactionType<transaction>>, Hex> extends true ? viem.TransactionSerialized<viem.GetTransactionType<transaction>> : Hex>;
4208
+ signTypedData: <const typedData extends viem.TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: viem.TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
4209
+ publicKey: Hex;
4210
+ source: string;
4211
+ type: "local";
4212
+ }>;
4213
+
4214
+ 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 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, 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 };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { 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 EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-BKf1TjPF.js';
4
- export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKf1TjPF.js';
3
+ import { 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 EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-cSndhqyV.js';
4
+ export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-cSndhqyV.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';
@@ -11,13 +11,14 @@ import Privy, { Chain, RpcConfig, GenerateAuthorizationSignatureInput, GenerateA
11
11
  export { DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, addPrivyRpcToChain, addRpcUrlOverrideToChain } from '@privy-io/js-sdk-core';
12
12
  import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
13
13
  import * as viem from 'viem';
14
- import { Address, HttpTransport } from 'viem';
14
+ import { Address, HttpTransport, Hex } from 'viem';
15
15
  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-BTDsdOi4.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BGaZqngA.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BGaZqngA.js';
21
+ import * as viem_accounts from 'viem/accounts';
21
22
  import '@coinbase/wallet-sdk';
22
23
  import '@solana/wallet-adapter-base';
23
24
  import '@solana/wallet-standard-features';
@@ -3396,6 +3397,47 @@ interface UseConnectCoinbaseSmartWalletInterface {
3396
3397
  }
3397
3398
  declare const useConnectCoinbaseSmartWallet: () => UseConnectCoinbaseSmartWalletInterface;
3398
3399
 
3400
+ type UseAuthMfa = {
3401
+ /**
3402
+ * Trigger the verification flow for auth MFA.
3403
+ *
3404
+ * @param o options for the verification flow
3405
+ * @returns a promise that resolves to void on success, rejects otherwise
3406
+ */
3407
+ verify: (o?: {
3408
+ /**
3409
+ * If set to false, `verify` can be used within other Privy flows e.g. enrollment.
3410
+ *
3411
+ * @default true
3412
+ */
3413
+ standalone?: boolean;
3414
+ }) => Promise<void>;
3415
+ };
3416
+ /**
3417
+ * @experimental
3418
+ *
3419
+ * Hook to trigger MFA verification for Privy authentication
3420
+ */
3421
+ declare const useAuthMfa: () => UseAuthMfa;
3422
+
3423
+ type UseAuthMfaEnrollment = {
3424
+ /**
3425
+ * Trigger the enrollment/un-enrollment flow for auth MFA.
3426
+ *
3427
+ * @param o options for the verification flow
3428
+ * @returns a promise that resolves to an object with the updated user
3429
+ */
3430
+ enroll: (o?: Record<string, never>) => Promise<{
3431
+ user: User;
3432
+ }>;
3433
+ };
3434
+ /**
3435
+ * @experimental
3436
+ *
3437
+ * Hook to trigger MFA enrollment for Privy authentication
3438
+ */
3439
+ declare const useAuthMfaEnrollment: () => UseAuthMfaEnrollment;
3440
+
3399
3441
  interface UseImportWalletInterface {
3400
3442
  /**
3401
3443
  * Imports a private key to be used as an embedded wallet for the user
@@ -4142,4 +4184,31 @@ declare const LoginModal: ({ open }: {
4142
4184
  open: boolean;
4143
4185
  }) => react_jsx_runtime.JSX.Element;
4144
4186
 
4145
- 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 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, useActiveWallet, useAuthorizationSignature, 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 };
4187
+ /**
4188
+ * Helper function to create a viem Account instance given a connected Ethereum wallet.
4189
+ *
4190
+ * @param wallet {ConnectedWallet} the connected Ethereum wallet to create an Account for
4191
+ * @returns the corresponding viem account for the wallet
4192
+ */
4193
+ declare const toViemAccount: ({ wallet }: {
4194
+ wallet: ConnectedWallet;
4195
+ }) => Promise<{
4196
+ address: viem.Address;
4197
+ nonceManager?: viem.NonceManager | undefined;
4198
+ sign?: ((parameters: {
4199
+ hash: viem.Hash;
4200
+ }) => Promise<Hex>) | undefined;
4201
+ signAuthorization?: ((parameters: viem.AuthorizationRequest) => Promise<viem_accounts.SignAuthorizationReturnType>) | undefined;
4202
+ signMessage: ({ message }: {
4203
+ message: viem.SignableMessage;
4204
+ }) => Promise<Hex>;
4205
+ signTransaction: <serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
4206
+ serializer?: serializer | undefined;
4207
+ } | undefined) => Promise<viem.IsNarrowable<viem.TransactionSerialized<viem.GetTransactionType<transaction>>, Hex> extends true ? viem.TransactionSerialized<viem.GetTransactionType<transaction>> : Hex>;
4208
+ signTypedData: <const typedData extends viem.TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: viem.TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
4209
+ publicKey: Hex;
4210
+ source: string;
4211
+ type: "local";
4212
+ }>;
4213
+
4214
+ 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 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, 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 };
@@ -4,7 +4,7 @@ import { SmartAccountClient } from 'permissionless';
4
4
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
5
5
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
6
6
  import { SmartWalletType } from '@privy-io/js-sdk-core';
7
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BKf1TjPF.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-cSndhqyV.js';
8
8
  import '@coinbase/wallet-sdk';
9
9
  import '@reown/appkit';
10
10
  import '@solana/wallet-adapter-base';
@@ -4,7 +4,7 @@ import { SmartAccountClient } from 'permissionless';
4
4
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
5
5
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
6
6
  import { SmartWalletType } from '@privy-io/js-sdk-core';
7
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BKf1TjPF.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-cSndhqyV.js';
8
8
  import '@coinbase/wallet-sdk';
9
9
  import '@reown/appkit';
10
10
  import '@solana/wallet-adapter-base';
@@ -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-BKf1TjPF.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKf1TjPF.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
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-cSndhqyV.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-cSndhqyV.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BGaZqngA.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BGaZqngA.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-BKf1TjPF.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKf1TjPF.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
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-cSndhqyV.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-cSndhqyV.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BGaZqngA.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BGaZqngA.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
1
  import { createCoinbaseWalletSDK } from '@coinbase/wallet-sdk';
2
2
  import { AppKit } from '@reown/appkit';
3
3
  import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
4
- import { ReactElement } from 'react';
4
+ import { ReactElement, ReactNode } from 'react';
5
5
  import { Hex } from 'viem';
6
6
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain, RpcConfig } from '@privy-io/js-sdk-core';
7
7
  import { ChainType, SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
@@ -497,7 +497,7 @@ type AlchemyPaymasterContextClient = {
497
497
 
498
498
  /**
499
499
  * A transaction that can be sent to the Solana network. Legacy transactions or v0 transactions (versioned) are supported.
500
- * Refer to {@link https://solana-labs.github.io/solana-web3.js/classes/Transaction.html Transaction} and {@link https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html VersionedTransaction}
500
+ * Refer to {@link https://solana-foundation.github.io/solana-web3.js/classes/Transaction.html Transaction} and {@link https://solana-foundation.github.io/solana-web3.js/classes/VersionedTransaction.html VersionedTransaction}
501
501
  */
502
502
  type SupportedSolanaTransaction = Transaction | VersionedTransaction;
503
503
  /**
@@ -508,7 +508,7 @@ type SolanaTransactionReceipt = {
508
508
  signature: string;
509
509
  /** The signed transaction */
510
510
  signedTransaction: SupportedSolanaTransaction;
511
- /** The parsed transaction result. Refer to {@link https://solana-labs.github.io/solana-web3.js/types/ParsedTransactionWithMeta.html ParsedTransactionWithMeta}*/
511
+ /** The parsed transaction result. Refer to {@link https://solana-foundation.github.io/solana-web3.js/types/ParsedTransactionWithMeta.html ParsedTransactionWithMeta}*/
512
512
  parsedTransaction: ParsedTransactionWithMeta | null;
513
513
  /** The fees payed for the transaction in lamports */
514
514
  fees: bigint;
@@ -516,7 +516,7 @@ type SolanaTransactionReceipt = {
516
516
  type SolanaCluster = {
517
517
  /**
518
518
  * The network name
519
- * Refer to {@link https://solana-labs.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
519
+ * Refer to {@link https://solana-foundation.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
520
520
  * */
521
521
  name: Cluster;
522
522
  /** The RPC endpoint */
@@ -2196,7 +2196,11 @@ type ExternalConnectWalletModalOptions = {
2196
2196
  * a default description will be shown based on the context (e.g., "Connect a wallet to your [app] account").
2197
2197
  * To hide completely, set to an empty string.
2198
2198
  */
2199
- description?: string;
2199
+ description?: ReactNode;
2200
+ /**
2201
+ * When set, the connect view will skip the wallets list and go straight to the wallet connection.
2202
+ */
2203
+ preSelectedWalletId?: string;
2200
2204
  };
2201
2205
  /** Options for Privy's `createWallet` method */
2202
2206
  type CreateWalletOptions = {
@@ -1,7 +1,7 @@
1
1
  import { createCoinbaseWalletSDK } from '@coinbase/wallet-sdk';
2
2
  import { AppKit } from '@reown/appkit';
3
3
  import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
4
- import { ReactElement } from 'react';
4
+ import { ReactElement, ReactNode } from 'react';
5
5
  import { Hex } from 'viem';
6
6
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain, RpcConfig } from '@privy-io/js-sdk-core';
7
7
  import { ChainType, SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
@@ -497,7 +497,7 @@ type AlchemyPaymasterContextClient = {
497
497
 
498
498
  /**
499
499
  * A transaction that can be sent to the Solana network. Legacy transactions or v0 transactions (versioned) are supported.
500
- * Refer to {@link https://solana-labs.github.io/solana-web3.js/classes/Transaction.html Transaction} and {@link https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html VersionedTransaction}
500
+ * Refer to {@link https://solana-foundation.github.io/solana-web3.js/classes/Transaction.html Transaction} and {@link https://solana-foundation.github.io/solana-web3.js/classes/VersionedTransaction.html VersionedTransaction}
501
501
  */
502
502
  type SupportedSolanaTransaction = Transaction | VersionedTransaction;
503
503
  /**
@@ -508,7 +508,7 @@ type SolanaTransactionReceipt = {
508
508
  signature: string;
509
509
  /** The signed transaction */
510
510
  signedTransaction: SupportedSolanaTransaction;
511
- /** The parsed transaction result. Refer to {@link https://solana-labs.github.io/solana-web3.js/types/ParsedTransactionWithMeta.html ParsedTransactionWithMeta}*/
511
+ /** The parsed transaction result. Refer to {@link https://solana-foundation.github.io/solana-web3.js/types/ParsedTransactionWithMeta.html ParsedTransactionWithMeta}*/
512
512
  parsedTransaction: ParsedTransactionWithMeta | null;
513
513
  /** The fees payed for the transaction in lamports */
514
514
  fees: bigint;
@@ -516,7 +516,7 @@ type SolanaTransactionReceipt = {
516
516
  type SolanaCluster = {
517
517
  /**
518
518
  * The network name
519
- * Refer to {@link https://solana-labs.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
519
+ * Refer to {@link https://solana-foundation.github.io/solana-web3.js/types/Cluster.html Cluster} for more information
520
520
  * */
521
521
  name: Cluster;
522
522
  /** The RPC endpoint */
@@ -2196,7 +2196,11 @@ type ExternalConnectWalletModalOptions = {
2196
2196
  * a default description will be shown based on the context (e.g., "Connect a wallet to your [app] account").
2197
2197
  * To hide completely, set to an empty string.
2198
2198
  */
2199
- description?: string;
2199
+ description?: ReactNode;
2200
+ /**
2201
+ * When set, the connect view will skip the wallets list and go straight to the wallet connection.
2202
+ */
2203
+ preSelectedWalletId?: string;
2200
2204
  };
2201
2205
  /** Options for Privy's `createWallet` method */
2202
2206
  type CreateWalletOptions = {
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-BKf1TjPF.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-cSndhqyV.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-BKf1TjPF.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-cSndhqyV.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-BKf1TjPF.js';
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-cSndhqyV.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -248,7 +248,7 @@ interface PrivyEvents {
248
248
  /**
249
249
  * Callback that will execute once a successful `sendSolanaTransaction` completes.
250
250
  * This will not run in the case of a wallet-based authentication or link flow.
251
- * @param params.response - the response {@link https://solana-labs.github.io/solana-web3.js/types/ParsedTransactionMeta.html SolanaTransactionReceipt} from the successful transaction
251
+ * @param params.response - the response {@link https://solana-foundation.github.io/solana-web3.js/types/ParsedTransactionMeta.html SolanaTransactionReceipt} from the successful transaction
252
252
  */
253
253
  onSuccess?: (params: {
254
254
  response: SolanaTransactionReceipt;
@@ -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-BKf1TjPF.js';
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-cSndhqyV.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -248,7 +248,7 @@ interface PrivyEvents {
248
248
  /**
249
249
  * Callback that will execute once a successful `sendSolanaTransaction` completes.
250
250
  * This will not run in the case of a wallet-based authentication or link flow.
251
- * @param params.response - the response {@link https://solana-labs.github.io/solana-web3.js/types/ParsedTransactionMeta.html SolanaTransactionReceipt} from the successful transaction
251
+ * @param params.response - the response {@link https://solana-foundation.github.io/solana-web3.js/types/ParsedTransactionMeta.html SolanaTransactionReceipt} from the successful transaction
252
252
  */
253
253
  onSuccess?: (params: {
254
254
  response: SolanaTransactionReceipt;
@@ -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-C3vxQSbq.mjs";import{e as p,k as m,ay as u,a as h,aJ as I,aK as g,aL as y,l as f}from"./privy-provider-BWC5Ur7o.mjs";import{u as v}from"./internal-context-De1jxnac.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-ClIhi9mx.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-j39vuJt8.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"@headlessui/react";import"@walletconnect/ethereum-provider";import"zustand";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/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";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"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";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:q}=u(),x=l(T),R=!!x&&d(x),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,q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.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);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.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);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.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);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.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-C21K9CRz.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-D3Bw8K9z.mjs";import{u as v}from"./internal-context-BzsB315R.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-BHAJajS8.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-j39vuJt8.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-De1jxnac.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-C3vxQSbq.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-BzsB315R.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-C21K9CRz.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 +1 @@
1
- import{useCallback as t}from"react";import{F as e}from"./frame-UsDF_L76.mjs";import{P as r}from"./paths-j39vuJt8.mjs";import{u as i}from"./internal-context-De1jxnac.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 e}from"./frame-UsDF_L76.mjs";import{P as r}from"./paths-j39vuJt8.mjs";import{u as i}from"./internal-context-BzsB315R.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};