@privy-io/react-auth 1.94.2 → 1.94.3-beta-20241118141256

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 (28) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/{getEmbeddedConnectedWallet-B58KNyMS.js → getEmbeddedConnectedWallet-Del3IDYI.js} +1 -1
  3. package/dist/cjs/index.js +310 -310
  4. package/dist/cjs/{smart-wallets-DLloNuo4.js → smart-wallets-DJPOfurY.js} +1 -1
  5. package/dist/cjs/smart-wallets.js +1 -1
  6. package/dist/cjs/ui.js +1 -1
  7. package/dist/cjs/{useFundWallet-D_NMzUBC.js → useFundWallet-BeSetwKW.js} +1 -1
  8. package/dist/cjs/{useWallets-D_QN9JnP.js → useWallets-C0z7M7ns.js} +1 -1
  9. package/dist/dts/index.d.mts +9 -7
  10. package/dist/dts/index.d.ts +9 -7
  11. package/dist/dts/{solana-PuIs0zwD.d.mts → solana-HIKrfby6.d.mts} +1 -1
  12. package/dist/dts/{solana-PuIs0zwD.d.ts → solana-HIKrfby6.d.ts} +1 -1
  13. package/dist/dts/solana.d.mts +2 -2
  14. package/dist/dts/solana.d.ts +2 -2
  15. package/dist/dts/{types-STuZuryK.d.mts → types-D0KmEjpU.d.mts} +7 -3
  16. package/dist/dts/{types-STuZuryK.d.ts → types-D0KmEjpU.d.ts} +7 -3
  17. package/dist/dts/ui.d.mts +1 -1
  18. package/dist/dts/ui.d.ts +1 -1
  19. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  20. package/dist/esm/{getEmbeddedConnectedWallet-BfN7mN3S.mjs → getEmbeddedConnectedWallet-D3Za0fyV.mjs} +1 -1
  21. package/dist/esm/index.mjs +306 -306
  22. package/dist/esm/{smart-wallets-CUo4wQHo.mjs → smart-wallets-a33-nifX.mjs} +1 -1
  23. package/dist/esm/smart-wallets.mjs +1 -1
  24. package/dist/esm/ui.mjs +1 -1
  25. package/dist/esm/{useFundWallet-CIDZpGjY.mjs → useFundWallet-DU2VXB6Y.mjs} +1 -1
  26. package/dist/esm/useWallets-NYcDMECu.mjs +1 -0
  27. package/package.json +3 -3
  28. package/dist/esm/useWallets-BhLT0fR-.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, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as OAuthProviderType, n as MoonpaySignRequest, o as MoonpaySignResponse, p as SmartWalletConfig, q as PrivyServerConfig, L as LoginMethod, r as SiweWalletMetadata, T as TelegramAuthResult, s as OAuthUserInfo, t as PrivyClientConfig, u as ConnectWalletModalOptions, v as LoginModalOptions, w as CreateWalletOptions, x as Wallet, y as SetWalletRecoveryOptions, z as SignMessageModalUIOptions, A as SignTypedDataParams, D as MfaMethod, F as UnsignedTransactionRequest, G as SendTransactionModalUIOptions, H as FundWalletConfig, I as TransactionReceipt, J as SupportedSolanaTransaction, K as SolanaTransactionReceipt, N as ConnectedWallet, Q as OAuthFlowState, V as LoginWithCode, X as OtpFlowState, Y as PasskeyFlowState, Z as SiweFlowState, _ as UnsignedTransactionRequestWithChainId, $ as CustomAuthFlowState } from './types-STuZuryK.js';
4
- export { ai as Apple, as as AppleOAuthWithMetadata, aH as ConnectedSolanaWallet, aA as ContractUIOptions, al as CrossAppAccount, av as CrossAppAccountWithMetadata, af as Discord, ao as DiscordOAuthWithMetadata, ax as Email, aa as EmailWithMetadata, aE as Farcaster, at as FarcasterWithMetadata, ag as Github, ap as GithubOAuthWithMetadata, ad as Google, am as GoogleOAuthWithMetadata, ah as LinkedIn, ar as LinkedInOAuthWithMetadata, aG as LoginMethodOrderOption, a1 as MessageTypes, a3 as MoonpayConfig, a4 as MoonpayCurrencyCode, aC as MoonpayFundingConfig, a5 as MoonpayPaymentMethod, aB as NativeFundingConfig, a9 as NonEmptyArray, aF as Passkey, aw as PasskeyWithMetadata, ay as Phone, ab as PhoneWithMetadata, aD as PriceDisplayOptions, a6 as Quantity, a8 as SolanaCluster, a2 as SolanaFundingConfig, ak as Telegram, au as TelegramWithMetadata, aj as Tiktok, aq as TiktokOAuthWithMetadata, a7 as TransactionLog, az as TransactionUIOptions, ae as Twitter, an as TwitterOAuthWithMetadata, a0 as TypedMessage, ac as WalletWithMetadata } from './types-STuZuryK.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as CrossAppProviderDetails, n as OAuthProviderType, o as MoonpaySignRequest, p as MoonpaySignResponse, q as SmartWalletConfig, r as PrivyServerConfig, L as LoginMethod, s as SiweWalletMetadata, T as TelegramAuthResult, t as OAuthUserInfo, u as PrivyClientConfig, v as ConnectWalletModalOptions, w as LoginModalOptions, x as CreateWalletOptions, y as Wallet, z as SetWalletRecoveryOptions, A as SignMessageModalUIOptions, D as SignTypedDataParams, F as MfaMethod, G as UnsignedTransactionRequest, H as SendTransactionModalUIOptions, I as FundWalletConfig, J as TransactionReceipt, K as SupportedSolanaTransaction, N as SolanaTransactionReceipt, Q as ConnectedWallet, V as OAuthFlowState, X as LoginWithCode, Y as OtpFlowState, Z as PasskeyFlowState, _ as SiweFlowState, $ as UnsignedTransactionRequestWithChainId, a0 as CustomAuthFlowState } from './types-D0KmEjpU.js';
4
+ export { aj as Apple, at as AppleOAuthWithMetadata, aI as ConnectedSolanaWallet, aB as ContractUIOptions, am as CrossAppAccount, aw as CrossAppAccountWithMetadata, ag as Discord, ap as DiscordOAuthWithMetadata, ay as Email, ab as EmailWithMetadata, aF as Farcaster, au as FarcasterWithMetadata, ah as Github, aq as GithubOAuthWithMetadata, ae as Google, an as GoogleOAuthWithMetadata, ai as LinkedIn, as as LinkedInOAuthWithMetadata, aH as LoginMethodOrderOption, a2 as MessageTypes, a4 as MoonpayConfig, a5 as MoonpayCurrencyCode, aD as MoonpayFundingConfig, a6 as MoonpayPaymentMethod, aC as NativeFundingConfig, aa as NonEmptyArray, aG as Passkey, ax as PasskeyWithMetadata, az as Phone, ac as PhoneWithMetadata, aE as PriceDisplayOptions, a7 as Quantity, a9 as SolanaCluster, a3 as SolanaFundingConfig, al as Telegram, av as TelegramWithMetadata, ak as Tiktok, ar as TiktokOAuthWithMetadata, a8 as TransactionLog, aA as TransactionUIOptions, af as Twitter, ao as TwitterOAuthWithMetadata, a1 as TypedMessage, ad as WalletWithMetadata } from './types-D0KmEjpU.js';
5
5
  import { E as EIP1193Provider, R as RequestArguments, P as PrivyProxyProvider } from './privyProxyProvider-BuMncVkt.js';
6
6
  export { A as AsExternalProvider } from './privyProxyProvider-BuMncVkt.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -18,8 +18,8 @@ import * as _solana_web3_js from '@solana/web3.js';
18
18
  import { Connection } from '@solana/web3.js';
19
19
  import { AbstractProvider } from 'web3-core';
20
20
  import { FetchOptions } from 'ofetch';
21
- import { P as PrivyEvents } from './solana-PuIs0zwD.js';
22
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-PuIs0zwD.js';
21
+ import { P as PrivyEvents } from './solana-HIKrfby6.js';
22
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-HIKrfby6.js';
23
23
  import 'viem';
24
24
  import '@privy-io/js-sdk-core';
25
25
  import '@metamask/eth-sig-util';
@@ -982,6 +982,8 @@ declare class PrivyClient {
982
982
  };
983
983
  userVerification: UserVerificationRequirement;
984
984
  }>;
985
+ _cachedProviderAppDetails: Record<string, CrossAppProviderDetails>;
986
+ getCrossAppProviderDetails(appId: string): Promise<CrossAppProviderDetails | undefined>;
985
987
  acceptTerms(): Promise<User>;
986
988
  unlinkEmail(address: string): Promise<User>;
987
989
  unlinkPhone(phoneNumber: string): Promise<User>;
@@ -2595,12 +2597,12 @@ interface UseDelegatedActionsInterface {
2595
2597
  * within a set of pre-defined permissions. Users can always decline or revoke delegation.
2596
2598
  *
2597
2599
  * @param address {string} address of the wallet to delegate
2598
- * @param chainType {'solana'} chain type for the wallet to delegate
2600
+ * @param chainType {'solana' | 'ethereum'} chain type for the wallet to delegate
2599
2601
  * @returns
2600
2602
  */
2601
- delegateWallet: ({ address, chainType }: {
2603
+ delegateWallet: ({ address, chainType, }: {
2602
2604
  address: string;
2603
- chainType: 'solana';
2605
+ chainType: 'solana' | 'ethereum';
2604
2606
  }) => Promise<void>;
2605
2607
  /**
2606
2608
  * Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as OAuthProviderType, n as MoonpaySignRequest, o as MoonpaySignResponse, p as SmartWalletConfig, q as PrivyServerConfig, L as LoginMethod, r as SiweWalletMetadata, T as TelegramAuthResult, s as OAuthUserInfo, t as PrivyClientConfig, u as ConnectWalletModalOptions, v as LoginModalOptions, w as CreateWalletOptions, x as Wallet, y as SetWalletRecoveryOptions, z as SignMessageModalUIOptions, A as SignTypedDataParams, D as MfaMethod, F as UnsignedTransactionRequest, G as SendTransactionModalUIOptions, H as FundWalletConfig, I as TransactionReceipt, J as SupportedSolanaTransaction, K as SolanaTransactionReceipt, N as ConnectedWallet, Q as OAuthFlowState, V as LoginWithCode, X as OtpFlowState, Y as PasskeyFlowState, Z as SiweFlowState, _ as UnsignedTransactionRequestWithChainId, $ as CustomAuthFlowState } from './types-STuZuryK.js';
4
- export { ai as Apple, as as AppleOAuthWithMetadata, aH as ConnectedSolanaWallet, aA as ContractUIOptions, al as CrossAppAccount, av as CrossAppAccountWithMetadata, af as Discord, ao as DiscordOAuthWithMetadata, ax as Email, aa as EmailWithMetadata, aE as Farcaster, at as FarcasterWithMetadata, ag as Github, ap as GithubOAuthWithMetadata, ad as Google, am as GoogleOAuthWithMetadata, ah as LinkedIn, ar as LinkedInOAuthWithMetadata, aG as LoginMethodOrderOption, a1 as MessageTypes, a3 as MoonpayConfig, a4 as MoonpayCurrencyCode, aC as MoonpayFundingConfig, a5 as MoonpayPaymentMethod, aB as NativeFundingConfig, a9 as NonEmptyArray, aF as Passkey, aw as PasskeyWithMetadata, ay as Phone, ab as PhoneWithMetadata, aD as PriceDisplayOptions, a6 as Quantity, a8 as SolanaCluster, a2 as SolanaFundingConfig, ak as Telegram, au as TelegramWithMetadata, aj as Tiktok, aq as TiktokOAuthWithMetadata, a7 as TransactionLog, az as TransactionUIOptions, ae as Twitter, an as TwitterOAuthWithMetadata, a0 as TypedMessage, ac as WalletWithMetadata } from './types-STuZuryK.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as CrossAppProviderDetails, n as OAuthProviderType, o as MoonpaySignRequest, p as MoonpaySignResponse, q as SmartWalletConfig, r as PrivyServerConfig, L as LoginMethod, s as SiweWalletMetadata, T as TelegramAuthResult, t as OAuthUserInfo, u as PrivyClientConfig, v as ConnectWalletModalOptions, w as LoginModalOptions, x as CreateWalletOptions, y as Wallet, z as SetWalletRecoveryOptions, A as SignMessageModalUIOptions, D as SignTypedDataParams, F as MfaMethod, G as UnsignedTransactionRequest, H as SendTransactionModalUIOptions, I as FundWalletConfig, J as TransactionReceipt, K as SupportedSolanaTransaction, N as SolanaTransactionReceipt, Q as ConnectedWallet, V as OAuthFlowState, X as LoginWithCode, Y as OtpFlowState, Z as PasskeyFlowState, _ as SiweFlowState, $ as UnsignedTransactionRequestWithChainId, a0 as CustomAuthFlowState } from './types-D0KmEjpU.js';
4
+ export { aj as Apple, at as AppleOAuthWithMetadata, aI as ConnectedSolanaWallet, aB as ContractUIOptions, am as CrossAppAccount, aw as CrossAppAccountWithMetadata, ag as Discord, ap as DiscordOAuthWithMetadata, ay as Email, ab as EmailWithMetadata, aF as Farcaster, au as FarcasterWithMetadata, ah as Github, aq as GithubOAuthWithMetadata, ae as Google, an as GoogleOAuthWithMetadata, ai as LinkedIn, as as LinkedInOAuthWithMetadata, aH as LoginMethodOrderOption, a2 as MessageTypes, a4 as MoonpayConfig, a5 as MoonpayCurrencyCode, aD as MoonpayFundingConfig, a6 as MoonpayPaymentMethod, aC as NativeFundingConfig, aa as NonEmptyArray, aG as Passkey, ax as PasskeyWithMetadata, az as Phone, ac as PhoneWithMetadata, aE as PriceDisplayOptions, a7 as Quantity, a9 as SolanaCluster, a3 as SolanaFundingConfig, al as Telegram, av as TelegramWithMetadata, ak as Tiktok, ar as TiktokOAuthWithMetadata, a8 as TransactionLog, aA as TransactionUIOptions, af as Twitter, ao as TwitterOAuthWithMetadata, a1 as TypedMessage, ad as WalletWithMetadata } from './types-D0KmEjpU.js';
5
5
  import { E as EIP1193Provider, R as RequestArguments, P as PrivyProxyProvider } from './privyProxyProvider-BuMncVkt.js';
6
6
  export { A as AsExternalProvider } from './privyProxyProvider-BuMncVkt.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -18,8 +18,8 @@ import * as _solana_web3_js from '@solana/web3.js';
18
18
  import { Connection } from '@solana/web3.js';
19
19
  import { AbstractProvider } from 'web3-core';
20
20
  import { FetchOptions } from 'ofetch';
21
- import { P as PrivyEvents } from './solana-PuIs0zwD.js';
22
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-PuIs0zwD.js';
21
+ import { P as PrivyEvents } from './solana-HIKrfby6.js';
22
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-HIKrfby6.js';
23
23
  import 'viem';
24
24
  import '@privy-io/js-sdk-core';
25
25
  import '@metamask/eth-sig-util';
@@ -982,6 +982,8 @@ declare class PrivyClient {
982
982
  };
983
983
  userVerification: UserVerificationRequirement;
984
984
  }>;
985
+ _cachedProviderAppDetails: Record<string, CrossAppProviderDetails>;
986
+ getCrossAppProviderDetails(appId: string): Promise<CrossAppProviderDetails | undefined>;
985
987
  acceptTerms(): Promise<User>;
986
988
  unlinkEmail(address: string): Promise<User>;
987
989
  unlinkPhone(phoneNumber: string): Promise<User>;
@@ -2595,12 +2597,12 @@ interface UseDelegatedActionsInterface {
2595
2597
  * within a set of pre-defined permissions. Users can always decline or revoke delegation.
2596
2598
  *
2597
2599
  * @param address {string} address of the wallet to delegate
2598
- * @param chainType {'solana'} chain type for the wallet to delegate
2600
+ * @param chainType {'solana' | 'ethereum'} chain type for the wallet to delegate
2599
2601
  * @returns
2600
2602
  */
2601
- delegateWallet: ({ address, chainType }: {
2603
+ delegateWallet: ({ address, chainType, }: {
2602
2604
  address: string;
2603
- chainType: 'solana';
2605
+ chainType: 'solana' | 'ethereum';
2604
2606
  }) => Promise<void>;
2605
2607
  /**
2606
2608
  * Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
@@ -1,4 +1,4 @@
1
- import { l as User, L as LoginMethod, aI as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aJ as BaseConnectedSolanaWallet, x as Wallet, D as MfaMethod, U as UserRecoveryMethod, K as SolanaTransactionReceipt, C as Chain, aK as FundingMethod, a8 as SolanaCluster, aH as ConnectedSolanaWallet, a2 as SolanaFundingConfig } from './types-STuZuryK.js';
1
+ import { l as User, L as LoginMethod, aJ as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aK as BaseConnectedSolanaWallet, y as Wallet, F as MfaMethod, U as UserRecoveryMethod, N as SolanaTransactionReceipt, C as Chain, aL as FundingMethod, a9 as SolanaCluster, aI as ConnectedSolanaWallet, a3 as SolanaFundingConfig } from './types-D0KmEjpU.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
  import { a as PrivyErrorCode } from './privyProxyProvider-BuMncVkt.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { l as User, L as LoginMethod, aI as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aJ as BaseConnectedSolanaWallet, x as Wallet, D as MfaMethod, U as UserRecoveryMethod, K as SolanaTransactionReceipt, C as Chain, aK as FundingMethod, a8 as SolanaCluster, aH as ConnectedSolanaWallet, a2 as SolanaFundingConfig } from './types-STuZuryK.js';
1
+ import { l as User, L as LoginMethod, aJ as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aK as BaseConnectedSolanaWallet, y as Wallet, F as MfaMethod, U as UserRecoveryMethod, N as SolanaTransactionReceipt, C as Chain, aL as FundingMethod, a9 as SolanaCluster, aI as ConnectedSolanaWallet, a3 as SolanaFundingConfig } from './types-D0KmEjpU.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
  import { a as PrivyErrorCode } from './privyProxyProvider-BuMncVkt.js';
4
4
 
@@ -1,5 +1,5 @@
1
- export { aH as ConnectedSolanaWallet, k as SolanaAdapterConnector, K as SolanaTransactionReceipt, J as SupportedSolanaTransaction, aL as toSolanaWalletConnectors } from './types-STuZuryK.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-PuIs0zwD.js';
1
+ export { aI as ConnectedSolanaWallet, k as SolanaAdapterConnector, N as SolanaTransactionReceipt, K as SupportedSolanaTransaction, aM as toSolanaWalletConnectors } from './types-D0KmEjpU.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-HIKrfby6.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
- export { aH as ConnectedSolanaWallet, k as SolanaAdapterConnector, K as SolanaTransactionReceipt, J as SupportedSolanaTransaction, aL as toSolanaWalletConnectors } from './types-STuZuryK.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-PuIs0zwD.js';
1
+ export { aI as ConnectedSolanaWallet, k as SolanaAdapterConnector, N as SolanaTransactionReceipt, K as SupportedSolanaTransaction, aM as toSolanaWalletConnectors } from './types-D0KmEjpU.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-HIKrfby6.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -552,7 +552,7 @@ interface BaseConnectedWallet {
552
552
  /** Returns true if the wallet is connected, false otherwise */
553
553
  isConnected: () => Promise<boolean>;
554
554
  /**
555
- * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
555
+ * @experimental **Experimental**: This property is subject to change at any time.
556
556
  *
557
557
  * Not all wallet clients support programmatic disconnects (e.g. MetaMask, Phantom).
558
558
  * In kind, if the wallet's client does not support programmatic disconnects,
@@ -1067,7 +1067,7 @@ type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' |
1067
1067
  /** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
1068
1068
  | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'safe';
1069
1069
  type NonEmptyArray<T> = [T, ...T[]];
1070
- type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | 'farcaster' | 'telegram';
1070
+ type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
1071
1071
  type ExternalWalletsConfig = {
1072
1072
  /**
1073
1073
  * Options to configure connections to the Coinbase Wallet (browser extension wallet, mobile wallet, and
@@ -1820,6 +1820,10 @@ type CreateWalletOptions = {
1820
1820
  walletIndex: number;
1821
1821
  };
1822
1822
  type SetWalletRecoveryOptions = {};
1823
+ type CrossAppProviderDetails = {
1824
+ name: string;
1825
+ icon_url: string | null;
1826
+ };
1823
1827
  type CustomAuthFlowState = {
1824
1828
  status: 'initial';
1825
1829
  } | {
@@ -1959,4 +1963,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
1959
1963
  type SolanaRpcRequestType = solana_signMessage;
1960
1964
  type SolanaRpcResponseType = solana_signMessageResponse;
1961
1965
 
1962
- export { type CustomAuthFlowState as $, type SignTypedDataParams as A, type BaseConnectedEthereumWallet as B, type Chain as C, type MfaMethod as D, type EthereumRpcRequestType as E, type UnsignedTransactionRequest as F, type SendTransactionModalUIOptions as G, type FundWalletConfig as H, type TransactionReceipt as I, type SupportedSolanaTransaction as J, type SolanaTransactionReceipt as K, type LoginMethod as L, type MfaSubmitArgs as M, type ConnectedWallet as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type OAuthFlowState as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type LoginWithCode as V, WalletConnector as W, type OtpFlowState as X, type PasskeyFlowState as Y, type SiweFlowState as Z, type UnsignedTransactionRequestWithChainId as _, type EthereumRpcResponseType as a, type TypedMessage as a0, type MessageTypes as a1, type SolanaFundingConfig as a2, type MoonpayConfig as a3, type MoonpayCurrencyCode as a4, type MoonpayPaymentMethod as a5, type Quantity as a6, type TransactionLog as a7, type SolanaCluster as a8, type NonEmptyArray as a9, type ContractUIOptions as aA, type NativeFundingConfig as aB, type MoonpayFundingConfig as aC, type PriceDisplayOptions as aD, type Farcaster as aE, type Passkey as aF, type LoginMethodOrderOption as aG, type ConnectedSolanaWallet as aH, type LinkedAccountWithMetadata as aI, type BaseConnectedSolanaWallet as aJ, type FundingMethod as aK, toSolanaWalletConnectors as aL, type EmailWithMetadata as aa, type PhoneWithMetadata as ab, type WalletWithMetadata as ac, type Google as ad, type Twitter as ae, type Discord as af, type Github as ag, type LinkedIn as ah, type Apple as ai, type Tiktok as aj, type Telegram as ak, type CrossAppAccount as al, type GoogleOAuthWithMetadata as am, type TwitterOAuthWithMetadata as an, type DiscordOAuthWithMetadata as ao, type GithubOAuthWithMetadata as ap, type TiktokOAuthWithMetadata as aq, type LinkedInOAuthWithMetadata as ar, type AppleOAuthWithMetadata as as, type FarcasterWithMetadata as at, type TelegramWithMetadata as au, type CrossAppAccountWithMetadata as av, type PasskeyWithMetadata as aw, type Email as ax, type Phone as ay, type TransactionUIOptions as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type OAuthProviderType as m, type MoonpaySignRequest as n, type MoonpaySignResponse as o, type SmartWalletConfig as p, type PrivyServerConfig as q, type SiweWalletMetadata as r, type OAuthUserInfo as s, type PrivyClientConfig as t, type ConnectWalletModalOptions as u, type LoginModalOptions as v, type CreateWalletOptions as w, type Wallet as x, type SetWalletRecoveryOptions as y, type SignMessageModalUIOptions as z };
1966
+ export { type UnsignedTransactionRequestWithChainId as $, type SignMessageModalUIOptions as A, type BaseConnectedEthereumWallet as B, type Chain as C, type SignTypedDataParams as D, type EthereumRpcRequestType as E, type MfaMethod as F, type UnsignedTransactionRequest as G, type SendTransactionModalUIOptions as H, type FundWalletConfig as I, type TransactionReceipt as J, type SupportedSolanaTransaction as K, type LoginMethod as L, type MfaSubmitArgs as M, type SolanaTransactionReceipt as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type ConnectedWallet as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type OAuthFlowState as V, WalletConnector as W, type LoginWithCode as X, type OtpFlowState as Y, type PasskeyFlowState as Z, type SiweFlowState as _, type EthereumRpcResponseType as a, type CustomAuthFlowState as a0, type TypedMessage as a1, type MessageTypes as a2, type SolanaFundingConfig as a3, type MoonpayConfig as a4, type MoonpayCurrencyCode as a5, type MoonpayPaymentMethod as a6, type Quantity as a7, type TransactionLog as a8, type SolanaCluster as a9, type TransactionUIOptions as aA, type ContractUIOptions as aB, type NativeFundingConfig as aC, type MoonpayFundingConfig as aD, type PriceDisplayOptions as aE, type Farcaster as aF, type Passkey as aG, type LoginMethodOrderOption as aH, type ConnectedSolanaWallet as aI, type LinkedAccountWithMetadata as aJ, type BaseConnectedSolanaWallet as aK, type FundingMethod as aL, toSolanaWalletConnectors as aM, type NonEmptyArray as aa, type EmailWithMetadata as ab, type PhoneWithMetadata as ac, type WalletWithMetadata as ad, type Google as ae, type Twitter as af, type Discord as ag, type Github as ah, type LinkedIn as ai, type Apple as aj, type Tiktok as ak, type Telegram as al, type CrossAppAccount as am, type GoogleOAuthWithMetadata as an, type TwitterOAuthWithMetadata as ao, type DiscordOAuthWithMetadata as ap, type GithubOAuthWithMetadata as aq, type TiktokOAuthWithMetadata as ar, type LinkedInOAuthWithMetadata as as, type AppleOAuthWithMetadata as at, type FarcasterWithMetadata as au, type TelegramWithMetadata as av, type CrossAppAccountWithMetadata as aw, type PasskeyWithMetadata as ax, type Email as ay, type Phone as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type CrossAppProviderDetails as m, type OAuthProviderType as n, type MoonpaySignRequest as o, type MoonpaySignResponse as p, type SmartWalletConfig as q, type PrivyServerConfig as r, type SiweWalletMetadata as s, type OAuthUserInfo as t, type PrivyClientConfig as u, type ConnectWalletModalOptions as v, type LoginModalOptions as w, type CreateWalletOptions as x, type Wallet as y, type SetWalletRecoveryOptions as z };
@@ -552,7 +552,7 @@ interface BaseConnectedWallet {
552
552
  /** Returns true if the wallet is connected, false otherwise */
553
553
  isConnected: () => Promise<boolean>;
554
554
  /**
555
- * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
555
+ * @experimental **Experimental**: This property is subject to change at any time.
556
556
  *
557
557
  * Not all wallet clients support programmatic disconnects (e.g. MetaMask, Phantom).
558
558
  * In kind, if the wallet's client does not support programmatic disconnects,
@@ -1067,7 +1067,7 @@ type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' |
1067
1067
  /** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
1068
1068
  | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'safe';
1069
1069
  type NonEmptyArray<T> = [T, ...T[]];
1070
- type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | 'farcaster' | 'telegram';
1070
+ type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
1071
1071
  type ExternalWalletsConfig = {
1072
1072
  /**
1073
1073
  * Options to configure connections to the Coinbase Wallet (browser extension wallet, mobile wallet, and
@@ -1820,6 +1820,10 @@ type CreateWalletOptions = {
1820
1820
  walletIndex: number;
1821
1821
  };
1822
1822
  type SetWalletRecoveryOptions = {};
1823
+ type CrossAppProviderDetails = {
1824
+ name: string;
1825
+ icon_url: string | null;
1826
+ };
1823
1827
  type CustomAuthFlowState = {
1824
1828
  status: 'initial';
1825
1829
  } | {
@@ -1959,4 +1963,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
1959
1963
  type SolanaRpcRequestType = solana_signMessage;
1960
1964
  type SolanaRpcResponseType = solana_signMessageResponse;
1961
1965
 
1962
- export { type CustomAuthFlowState as $, type SignTypedDataParams as A, type BaseConnectedEthereumWallet as B, type Chain as C, type MfaMethod as D, type EthereumRpcRequestType as E, type UnsignedTransactionRequest as F, type SendTransactionModalUIOptions as G, type FundWalletConfig as H, type TransactionReceipt as I, type SupportedSolanaTransaction as J, type SolanaTransactionReceipt as K, type LoginMethod as L, type MfaSubmitArgs as M, type ConnectedWallet as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type OAuthFlowState as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type LoginWithCode as V, WalletConnector as W, type OtpFlowState as X, type PasskeyFlowState as Y, type SiweFlowState as Z, type UnsignedTransactionRequestWithChainId as _, type EthereumRpcResponseType as a, type TypedMessage as a0, type MessageTypes as a1, type SolanaFundingConfig as a2, type MoonpayConfig as a3, type MoonpayCurrencyCode as a4, type MoonpayPaymentMethod as a5, type Quantity as a6, type TransactionLog as a7, type SolanaCluster as a8, type NonEmptyArray as a9, type ContractUIOptions as aA, type NativeFundingConfig as aB, type MoonpayFundingConfig as aC, type PriceDisplayOptions as aD, type Farcaster as aE, type Passkey as aF, type LoginMethodOrderOption as aG, type ConnectedSolanaWallet as aH, type LinkedAccountWithMetadata as aI, type BaseConnectedSolanaWallet as aJ, type FundingMethod as aK, toSolanaWalletConnectors as aL, type EmailWithMetadata as aa, type PhoneWithMetadata as ab, type WalletWithMetadata as ac, type Google as ad, type Twitter as ae, type Discord as af, type Github as ag, type LinkedIn as ah, type Apple as ai, type Tiktok as aj, type Telegram as ak, type CrossAppAccount as al, type GoogleOAuthWithMetadata as am, type TwitterOAuthWithMetadata as an, type DiscordOAuthWithMetadata as ao, type GithubOAuthWithMetadata as ap, type TiktokOAuthWithMetadata as aq, type LinkedInOAuthWithMetadata as ar, type AppleOAuthWithMetadata as as, type FarcasterWithMetadata as at, type TelegramWithMetadata as au, type CrossAppAccountWithMetadata as av, type PasskeyWithMetadata as aw, type Email as ax, type Phone as ay, type TransactionUIOptions as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type OAuthProviderType as m, type MoonpaySignRequest as n, type MoonpaySignResponse as o, type SmartWalletConfig as p, type PrivyServerConfig as q, type SiweWalletMetadata as r, type OAuthUserInfo as s, type PrivyClientConfig as t, type ConnectWalletModalOptions as u, type LoginModalOptions as v, type CreateWalletOptions as w, type Wallet as x, type SetWalletRecoveryOptions as y, type SignMessageModalUIOptions as z };
1966
+ export { type UnsignedTransactionRequestWithChainId as $, type SignMessageModalUIOptions as A, type BaseConnectedEthereumWallet as B, type Chain as C, type SignTypedDataParams as D, type EthereumRpcRequestType as E, type MfaMethod as F, type UnsignedTransactionRequest as G, type SendTransactionModalUIOptions as H, type FundWalletConfig as I, type TransactionReceipt as J, type SupportedSolanaTransaction as K, type LoginMethod as L, type MfaSubmitArgs as M, type SolanaTransactionReceipt as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type ConnectedWallet as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type OAuthFlowState as V, WalletConnector as W, type LoginWithCode as X, type OtpFlowState as Y, type PasskeyFlowState as Z, type SiweFlowState as _, type EthereumRpcResponseType as a, type CustomAuthFlowState as a0, type TypedMessage as a1, type MessageTypes as a2, type SolanaFundingConfig as a3, type MoonpayConfig as a4, type MoonpayCurrencyCode as a5, type MoonpayPaymentMethod as a6, type Quantity as a7, type TransactionLog as a8, type SolanaCluster as a9, type TransactionUIOptions as aA, type ContractUIOptions as aB, type NativeFundingConfig as aC, type MoonpayFundingConfig as aD, type PriceDisplayOptions as aE, type Farcaster as aF, type Passkey as aG, type LoginMethodOrderOption as aH, type ConnectedSolanaWallet as aI, type LinkedAccountWithMetadata as aJ, type BaseConnectedSolanaWallet as aK, type FundingMethod as aL, toSolanaWalletConnectors as aM, type NonEmptyArray as aa, type EmailWithMetadata as ab, type PhoneWithMetadata as ac, type WalletWithMetadata as ad, type Google as ae, type Twitter as af, type Discord as ag, type Github as ah, type LinkedIn as ai, type Apple as aj, type Tiktok as ak, type Telegram as al, type CrossAppAccount as am, type GoogleOAuthWithMetadata as an, type TwitterOAuthWithMetadata as ao, type DiscordOAuthWithMetadata as ap, type GithubOAuthWithMetadata as aq, type TiktokOAuthWithMetadata as ar, type LinkedInOAuthWithMetadata as as, type AppleOAuthWithMetadata as at, type FarcasterWithMetadata as au, type TelegramWithMetadata as av, type CrossAppAccountWithMetadata as aw, type PasskeyWithMetadata as ax, type Email as ay, type Phone as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type CrossAppProviderDetails as m, type OAuthProviderType as n, type MoonpaySignRequest as o, type MoonpaySignResponse as p, type SmartWalletConfig as q, type PrivyServerConfig as r, type SiweWalletMetadata as s, type OAuthUserInfo as t, type PrivyClientConfig as u, type ConnectWalletModalOptions as v, type LoginModalOptions as w, type CreateWalletOptions as x, type Wallet as y, type SetWalletRecoveryOptions as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-STuZuryK.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-D0KmEjpU.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
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-STuZuryK.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-D0KmEjpU.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as r,custom as t}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{j as i,u as s,w as o}from"./privy-context-2XTbQLV9.mjs";import{u as c,M as l,g as p}from"./getEmbeddedConnectedWallet-BfN7mN3S.mjs";import{a4 as m,U as d}from"./useWallets-BhLT0fR-.mjs";import{c as E}from"./smart-wallets-CUo4wQHo.mjs";import"ofetch";import"@ethersproject/address";import"react";import"react/jsx-runtime";import"@ethersproject/providers";import"tinycolor2";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=i(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:D}=s(),{wallets:h}=m(),{setModalData:I}=c(),N=async()=>{let i=p(h);if(!i)throw Error("No connected wallet found");let s=f.find((e=>e.id===a.id));if(!s)throw Error("Chain not configured");await i.switchChain(s.id);let o=await i.getEthereumProvider(),c=r({account:i.address,transport:t(o)}),l=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...s,rpcUrls:{default:{http:[d(s,D,T)]}}},signer:l})};return{signMessage:async({message:e})=>{let r=await N();return new Promise((async(t,n)=>{let{entropyId:a,entropyIdVerifier:i}=o(u);g.current=!0,I({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let r=await N();return new Promise((async(t,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:i}=o(u);I({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let r=await N(),t=[];return t="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:i,entropyIdVerifier:s}=o(u);I({connectWallet:{entropyId:i,entropyIdVerifier:s,onCompleteNavigateTo:l.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:i,entropyIdVerifier:s,transactingWallet:{address:r.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterData,onConfirm:()=>t.length>1?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as r,custom as t}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{j as i,u as s,w as o}from"./privy-context-2XTbQLV9.mjs";import{u as c,M as l,g as p}from"./getEmbeddedConnectedWallet-D3Za0fyV.mjs";import{a4 as m,U as d}from"./useWallets-NYcDMECu.mjs";import{c as E}from"./smart-wallets-a33-nifX.mjs";import"ofetch";import"@ethersproject/address";import"react";import"react/jsx-runtime";import"@ethersproject/providers";import"tinycolor2";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=i(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:D}=s(),{wallets:h}=m(),{setModalData:I}=c(),N=async()=>{let i=p(h);if(!i)throw Error("No connected wallet found");let s=f.find((e=>e.id===a.id));if(!s)throw Error("Chain not configured");await i.switchChain(s.id);let o=await i.getEthereumProvider(),c=r({account:i.address,transport:t(o)}),l=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...s,rpcUrls:{default:{http:[d(s,D,T)]}}},signer:l})};return{signMessage:async({message:e})=>{let r=await N();return new Promise((async(t,n)=>{let{entropyId:a,entropyIdVerifier:i}=o(u);g.current=!0,I({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let r=await N();return new Promise((async(t,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:i}=o(u);I({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let r=await N(),t=[];return t="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:i,entropyIdVerifier:s}=o(u);I({connectWallet:{entropyId:i,entropyIdVerifier:s,onCompleteNavigateTo:l.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:i,entropyIdVerifier:s,transactingWallet:{address:r.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterData,onConfirm:()=>t.length>1?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{jsx as E,jsxs as _}from"react/jsx-runtime";import{useState as N,useEffect as A,useRef as S,useContext as R,createContext as T}from"react";import{A as C,aq as D}from"./useWallets-BhLT0fR-.mjs";import{n as L}from"./privy-context-2XTbQLV9.mjs";function O({src:_,...N}){return E("img",{src:_,...N,style:{display:"none"}})}var I,e;(I=e||(e={})).LANDING="LANDING",I.CONNECT_OR_CREATE="CONNECT_OR_CREATE",I.AWAITING_CONNECTION="AWAITING_CONNECTION",I.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",I.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",I.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",I.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",I.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",I.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",I.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",I.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",I.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",I.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",I.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",I.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",I.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",I.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",I.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",I.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",I.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",I.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",I.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",I.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",I.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",I.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",I.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",I.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",I.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",I.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",I.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",I.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",I.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",I.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",I.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",I.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",I.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",I.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",I.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",I.INSTALL_PHANTOM_SCREEN="INSTALL_PHANTOM_SCREEN",I.PHANTOM_INTERSTITIAL_SCREEN="PHANTOM_INTERSTITIAL_SCREEN",I.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",I.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",I.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",I.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",I.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",I.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",I.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",I.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",I.MOONPAY_PROMPT_SCREEN="MOONPAY_PROMPT_SCREEN",I.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",I.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",I.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",I.CAPTCHA_SCREEN="CAPTCHA_SCREEN",I.ERROR_SCREEN="ERROR_SCREEN",I.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",I.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",I.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN";const M=T({ready:!1,app:D,currentScreen:null,lastScreen:null,navigate:L,navigateBack:L,resetNavigation:L,setModalData:L,onUserCloseViaDialogOrKeybindRef:void 0});let a=[e.LANDING,e.CONNECT_ONLY_LANDING_SCREEN,null];const W=R=>{let T=C(),D=R.authenticated,[L,I]=N(R.initialScreen);A((()=>{D||a.includes(R.initialScreen)||R.setInitialScreen(null)}),[D]);let e=S(null);A((()=>{R.open||(e.current=null)}),[R.open]),A((()=>{e.current=null}),[R.initialScreen]);let W={ready:!!T.id,app:T,data:R.data,setModalData:R.setModalData,currentScreen:R.initialScreen,lastScreen:L,navigate:(E,_=!0)=>{R.setInitialScreen(E),_&&I(R.initialScreen)},navigateBack:()=>{R.setInitialScreen(L)},resetNavigation:()=>{R.setInitialScreen(null),I(null)},onUserCloseViaDialogOrKeybindRef:e};return _(M.Provider,{value:W,children:[("string"==typeof T.appearance.logo||"img"===T.appearance.logo?.type)&&E(O,{src:"string"==typeof T.appearance.logo?T.appearance.logo:T.appearance.logo.props.src}),R.children]})},n=()=>R(M);function t(E){return E.find((E=>"privy"===E.walletClientType&&"embedded"===E.connectorType&&!E.imported))??null}export{e as M,W as a,t as g,n as u};
1
+ import{jsx as E,jsxs as _}from"react/jsx-runtime";import{useState as N,useEffect as A,useRef as S,useContext as R,createContext as T}from"react";import{A as C,aq as D}from"./useWallets-NYcDMECu.mjs";import{n as L}from"./privy-context-2XTbQLV9.mjs";function O({src:_,...N}){return E("img",{src:_,...N,style:{display:"none"}})}var I,e;(I=e||(e={})).LANDING="LANDING",I.CONNECT_OR_CREATE="CONNECT_OR_CREATE",I.AWAITING_CONNECTION="AWAITING_CONNECTION",I.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",I.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",I.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",I.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",I.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",I.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",I.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",I.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",I.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",I.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",I.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",I.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",I.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",I.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",I.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",I.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",I.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",I.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",I.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",I.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",I.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",I.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",I.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",I.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",I.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",I.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",I.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",I.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",I.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",I.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",I.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",I.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",I.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",I.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",I.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",I.INSTALL_PHANTOM_SCREEN="INSTALL_PHANTOM_SCREEN",I.PHANTOM_INTERSTITIAL_SCREEN="PHANTOM_INTERSTITIAL_SCREEN",I.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",I.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",I.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",I.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",I.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",I.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",I.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",I.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",I.MOONPAY_PROMPT_SCREEN="MOONPAY_PROMPT_SCREEN",I.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",I.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",I.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",I.CAPTCHA_SCREEN="CAPTCHA_SCREEN",I.ERROR_SCREEN="ERROR_SCREEN",I.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",I.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",I.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN";const M=T({ready:!1,app:D,currentScreen:null,lastScreen:null,navigate:L,navigateBack:L,resetNavigation:L,setModalData:L,onUserCloseViaDialogOrKeybindRef:void 0});let a=[e.LANDING,e.CONNECT_ONLY_LANDING_SCREEN,null];const W=R=>{let T=C(),D=R.authenticated,[L,I]=N(R.initialScreen);A((()=>{D||a.includes(R.initialScreen)||R.setInitialScreen(null)}),[D]);let e=S(null);A((()=>{R.open||(e.current=null)}),[R.open]),A((()=>{e.current=null}),[R.initialScreen]);let W={ready:!!T.id,app:T,data:R.data,setModalData:R.setModalData,currentScreen:R.initialScreen,lastScreen:L,navigate:(E,_=!0)=>{R.setInitialScreen(E),_&&I(R.initialScreen)},navigateBack:()=>{R.setInitialScreen(L)},resetNavigation:()=>{R.setInitialScreen(null),I(null)},onUserCloseViaDialogOrKeybindRef:e};return _(M.Provider,{value:W,children:[("string"==typeof T.appearance.logo||"img"===T.appearance.logo?.type)&&E(O,{src:"string"==typeof T.appearance.logo?T.appearance.logo:T.appearance.logo.props.src}),R.children]})},n=()=>R(M);function t(E){return E.find((E=>"privy"===E.walletClientType&&"embedded"===E.connectorType&&!E.imported))??null}export{e as M,W as a,t as g,n as u};