@privy-io/react-auth 2.12.0 → 2.13.0-beta-20250429210734

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 (33) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/{privy-provider-WROKgGLv.js → privy-provider-BRLoNLzO.js} +21 -21
  4. package/dist/cjs/{smart-wallets-BOO4AAyW.js → smart-wallets-C4gFTR0Y.js} +1 -1
  5. package/dist/cjs/smart-wallets.js +1 -1
  6. package/dist/cjs/solana.js +1 -1
  7. package/dist/cjs/ui.js +1 -1
  8. package/dist/cjs/{useActiveWallet-jRYT06Mr.js → useActiveWallet-CFjocDW3.js} +1 -1
  9. package/dist/cjs/{useFundWallet-Cgo-Ct91.js → useFundWallet-DepHOq2e.js} +1 -1
  10. package/dist/dts/farcaster.d.mts +4 -1
  11. package/dist/dts/farcaster.d.ts +4 -1
  12. package/dist/dts/index.d.mts +7 -4
  13. package/dist/dts/index.d.ts +7 -4
  14. package/dist/dts/smart-wallets.d.mts +4 -1
  15. package/dist/dts/smart-wallets.d.ts +4 -1
  16. package/dist/dts/solana.d.mts +23 -7
  17. package/dist/dts/solana.d.ts +23 -7
  18. package/dist/dts/{types-Nqh9YCV3.d.mts → types-DWeM9B29.d.mts} +34 -3
  19. package/dist/dts/{types-Nqh9YCV3.d.ts → types-DWeM9B29.d.ts} +34 -3
  20. package/dist/dts/ui.d.mts +4 -1
  21. package/dist/dts/ui.d.ts +4 -1
  22. package/dist/dts/{useSolanaWallets-BSVQS05e.d.mts → useSolanaWallets-DG2oXveQ.d.mts} +1 -1
  23. package/dist/dts/{useSolanaWallets-BSVQS05e.d.ts → useSolanaWallets-DG2oXveQ.d.ts} +1 -1
  24. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  25. package/dist/esm/index.mjs +1 -1
  26. package/dist/esm/{privy-provider-CE4-s2JH.mjs → privy-provider-DHU2bEeW.mjs} +21 -21
  27. package/dist/esm/{smart-wallets-C2dDEs0t.mjs → smart-wallets-55YSeFOS.mjs} +1 -1
  28. package/dist/esm/smart-wallets.mjs +1 -1
  29. package/dist/esm/solana.mjs +1 -1
  30. package/dist/esm/ui.mjs +1 -1
  31. package/dist/esm/{useActiveWallet-B62Sy0KW.mjs → useActiveWallet-C0t_HPvH.mjs} +1 -1
  32. package/dist/esm/{useFundWallet-D2_dle4r.mjs → useFundWallet-CA9Qmx4f.mjs} +1 -1
  33. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-Nqh9YCV3.js';
4
- export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-Nqh9YCV3.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, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as ExternalWalletsConfig, H as BaseConnectedWallet, l as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, g as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as OAuthProviderType, Z as MoonpaySignRequest, _ as MoonpaySignResponse, $ as SmartWalletConfig, a as LoginMethod, a0 as SiweWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a9 as UnsignedTransactionRequestWithChainId, aa as BaseConnectedWalletType, C as ConnectedSolanaWallet, ab as TelegramAuthFlowState } from './types-DWeM9B29.js';
4
+ export { au as Apple, aF as AppleOAuthWithMetadata, aN as ContractUIOptions, ax as CrossAppAccount, aI as CrossAppAccountWithMetadata, ar as Discord, aB as DiscordOAuthWithMetadata, aK as Email, am as EmailWithMetadata, aR as Farcaster, aG as FarcasterWithMetadata, as as Github, aC as GithubOAuthWithMetadata, ap as Google, az as GoogleOAuthWithMetadata, ay as LinkedAccountType, b as LinkedAccountWithMetadata, at as LinkedIn, aE as LinkedInOAuthWithMetadata, aT as LoginMethodOrderOption, ad as MessageTypes, af as MoonpayConfig, ag as MoonpayCurrencyCode, aP as MoonpayFundingConfig, ah as MoonpayPaymentMethod, aO as NativeFundingConfig, al as NonEmptyArray, aS as Passkey, aJ as PasskeyWithMetadata, aL as Phone, an as PhoneWithMetadata, aQ as PriceDisplayOptions, P as PrivyErrorCode, ai as Quantity, ae as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aw as Telegram, aH as TelegramWithMetadata, av as Tiktok, aD as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aM as TransactionUIOptions, aq as Twitter, aA as TwitterOAuthWithMetadata, ac as TypedMessage, ao as WalletWithMetadata } from './types-DWeM9B29.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import EventEmitter from 'eventemitter3';
@@ -16,9 +16,12 @@ 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-BSVQS05e.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-DG2oXveQ.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-DG2oXveQ.js';
21
21
  import '@solana/wallet-adapter-base';
22
+ import '@solana/wallet-standard-features';
23
+ import '@wallet-standard/base';
24
+ import '@wallet-standard/features';
22
25
  import '@metamask/eth-sig-util';
23
26
 
24
27
  type MobileWalletConfig = {
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { l as WalletClientType, d as UserRecoveryMethod, m as PrivyFarcasterSignerInitResponse, n as MfaSubmitArgs, E as EthereumRpcRequestType, o as SolanaRpcRequestType, p as EthereumRpcResponseType, q as SolanaRpcResponseType, r as PrivyClientConfig, s as EIP1193Provider, u as EntropyIdVerifier$1, v as RequestArguments, w as WalletTimeoutError, x as WalletConnector, B as BaseConnectedEthereumWallet, y as ConnectedWalletMetadata, z as ConnectorType, A as WalletListEntry, D as ExternalWalletsConfig, G as BaseConnectedWallet, k as SolanaWalletConnector, U as User, H as ConnectWalletModalOptions, I as LoginModalOptions, g as CreateWalletOptions, W as Wallet, J as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, K as SignTypedDataParams, M as MfaMethod, N as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, Q as FundWalletConfig, T as ConnectedWallet, O as OAuthTokens, V as CrossAppProviderDetails, X as OAuthProviderType, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, a as LoginMethod, $ as SiweWalletMetadata, a0 as TelegramAuthResult, a1 as TelegramWebAppData, a2 as OAuthUserInfo, a3 as OAuthFlowState, a4 as LoginWithCode, a5 as OtpFlowState, a6 as PasskeyFlowState, a7 as SiweFlowState, a8 as UnsignedTransactionRequestWithChainId, a9 as BaseConnectedWalletType, C as ConnectedSolanaWallet, aa as TelegramAuthFlowState } from './types-Nqh9YCV3.js';
4
- export { at as Apple, aE as AppleOAuthWithMetadata, aM as ContractUIOptions, aw as CrossAppAccount, aH as CrossAppAccountWithMetadata, aq as Discord, aA as DiscordOAuthWithMetadata, aJ as Email, al as EmailWithMetadata, aQ as Farcaster, aF as FarcasterWithMetadata, ar as Github, aB as GithubOAuthWithMetadata, ao as Google, ay as GoogleOAuthWithMetadata, ax as LinkedAccountType, b as LinkedAccountWithMetadata, as as LinkedIn, aD as LinkedInOAuthWithMetadata, aS as LoginMethodOrderOption, ac as MessageTypes, ae as MoonpayConfig, af as MoonpayCurrencyCode, aO as MoonpayFundingConfig, ag as MoonpayPaymentMethod, aN as NativeFundingConfig, ak as NonEmptyArray, aR as Passkey, aI as PasskeyWithMetadata, aK as Phone, am as PhoneWithMetadata, aP as PriceDisplayOptions, P as PrivyErrorCode, ah as Quantity, ad as SmartWallet, f as SolanaCluster, j as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, av as Telegram, aG as TelegramWithMetadata, au as Tiktok, aC as TiktokOAuthWithMetadata, ai as TransactionLog, aj as TransactionReceipt, aL as TransactionUIOptions, ap as Twitter, az as TwitterOAuthWithMetadata, ab as TypedMessage, an as WalletWithMetadata } from './types-Nqh9YCV3.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, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as ExternalWalletsConfig, H as BaseConnectedWallet, l as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, g as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as OAuthProviderType, Z as MoonpaySignRequest, _ as MoonpaySignResponse, $ as SmartWalletConfig, a as LoginMethod, a0 as SiweWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a9 as UnsignedTransactionRequestWithChainId, aa as BaseConnectedWalletType, C as ConnectedSolanaWallet, ab as TelegramAuthFlowState } from './types-DWeM9B29.js';
4
+ export { au as Apple, aF as AppleOAuthWithMetadata, aN as ContractUIOptions, ax as CrossAppAccount, aI as CrossAppAccountWithMetadata, ar as Discord, aB as DiscordOAuthWithMetadata, aK as Email, am as EmailWithMetadata, aR as Farcaster, aG as FarcasterWithMetadata, as as Github, aC as GithubOAuthWithMetadata, ap as Google, az as GoogleOAuthWithMetadata, ay as LinkedAccountType, b as LinkedAccountWithMetadata, at as LinkedIn, aE as LinkedInOAuthWithMetadata, aT as LoginMethodOrderOption, ad as MessageTypes, af as MoonpayConfig, ag as MoonpayCurrencyCode, aP as MoonpayFundingConfig, ah as MoonpayPaymentMethod, aO as NativeFundingConfig, al as NonEmptyArray, aS as Passkey, aJ as PasskeyWithMetadata, aL as Phone, an as PhoneWithMetadata, aQ as PriceDisplayOptions, P as PrivyErrorCode, ai as Quantity, ae as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aw as Telegram, aH as TelegramWithMetadata, av as Tiktok, aD as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aM as TransactionUIOptions, aq as Twitter, aA as TwitterOAuthWithMetadata, ac as TypedMessage, ao as WalletWithMetadata } from './types-DWeM9B29.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import EventEmitter from 'eventemitter3';
@@ -16,9 +16,12 @@ 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-BSVQS05e.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-DG2oXveQ.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-DG2oXveQ.js';
21
21
  import '@solana/wallet-adapter-base';
22
+ import '@solana/wallet-standard-features';
23
+ import '@wallet-standard/base';
24
+ import '@wallet-standard/features';
22
25
  import '@metamask/eth-sig-util';
23
26
 
24
27
  type MobileWalletConfig = {
@@ -7,9 +7,12 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
10
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-DWeM9B29.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
+ import '@solana/wallet-standard-features';
14
+ import '@wallet-standard/base';
15
+ import '@wallet-standard/features';
13
16
  import '@metamask/eth-sig-util';
14
17
  import '@solana/web3.js';
15
18
  import 'eventemitter3';
@@ -7,9 +7,12 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
10
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-DWeM9B29.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
+ import '@solana/wallet-standard-features';
14
+ import '@wallet-standard/base';
15
+ import '@wallet-standard/features';
13
16
  import '@metamask/eth-sig-util';
14
17
  import '@solana/web3.js';
15
18
  import 'eventemitter3';
@@ -1,8 +1,8 @@
1
- import { W as Wallet, j as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
2
- export { C as ConnectedSolanaWallet, k as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Nqh9YCV3.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BSVQS05e.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
5
- import { WalletWithSolanaFeatures, SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
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-DWeM9B29.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DWeM9B29.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-DG2oXveQ.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-DG2oXveQ.js';
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';
8
8
  import { Transaction, VersionedTransaction, Cluster, SendOptions, TransactionSignature, Connection } from '@solana/web3.js';
@@ -102,7 +102,7 @@ type PrivyFeature = {
102
102
  /**
103
103
  * Privy standard wallet implementation.
104
104
  */
105
- declare class PrivyStandardWallet implements WalletWithSolanaFeatures {
105
+ declare class PrivyStandardWallet implements SolanaStandardWallet {
106
106
  #private;
107
107
  get version(): "1.0.0";
108
108
  get name(): string;
@@ -110,6 +110,7 @@ declare class PrivyStandardWallet implements WalletWithSolanaFeatures {
110
110
  get chains(): ("solana:mainnet" | "solana:devnet" | "solana:testnet")[];
111
111
  get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignAndSendTransactionFeature & SolanaSignTransactionFeature & SolanaSignMessageFeature & PrivyFeature;
112
112
  get accounts(): PrivyWalletAccount[];
113
+ get isPrivyWallet(): boolean;
113
114
  constructor({ name, icon, version, injection, wallets, }: {
114
115
  name: string;
115
116
  icon: WalletIcon;
@@ -139,6 +140,21 @@ interface UsePrivyStandardWalletInterface {
139
140
  */
140
141
  declare function usePrivyStandardWallet(): UsePrivyStandardWalletInterface;
141
142
 
143
+ /**
144
+ * Use this hook to get the wallets that implement the Solana Standard Wallet interface.
145
+ */
146
+ interface UseSolanaStandardWalletsInterface {
147
+ /**
148
+ * Whether the wallets are ready to be used.
149
+ */
150
+ ready: boolean;
151
+ /**
152
+ * The wallets that implement the Solana Standard Wallet interface.
153
+ */
154
+ wallets: SolanaStandardWallet[];
155
+ }
156
+ declare function useSolanaStandardWallets(): UseSolanaStandardWalletsInterface;
157
+
142
158
  /**
143
159
  * Method to fund a user's Solana wallet via Privy's funding feature by inputting a valid wallet address.
144
160
  * You can access the fields and methods documented here via the {@link useFundWallet} hook.
@@ -295,4 +311,4 @@ declare function useSignMessage(callbacks?: PrivyEvents['signSolanaMessage']): {
295
311
  }) => Promise<Uint8Array>;
296
312
  };
297
313
 
298
- export { PrivyStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin };
314
+ export { PrivyStandardWallet, SolanaStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, type UseSolanaStandardWalletsInterface, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaStandardWallets };
@@ -1,8 +1,8 @@
1
- import { W as Wallet, j as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-Nqh9YCV3.js';
2
- export { C as ConnectedSolanaWallet, k as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Nqh9YCV3.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BSVQS05e.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BSVQS05e.js';
5
- import { WalletWithSolanaFeatures, SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
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-DWeM9B29.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DWeM9B29.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-DG2oXveQ.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-DG2oXveQ.js';
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';
8
8
  import { Transaction, VersionedTransaction, Cluster, SendOptions, TransactionSignature, Connection } from '@solana/web3.js';
@@ -102,7 +102,7 @@ type PrivyFeature = {
102
102
  /**
103
103
  * Privy standard wallet implementation.
104
104
  */
105
- declare class PrivyStandardWallet implements WalletWithSolanaFeatures {
105
+ declare class PrivyStandardWallet implements SolanaStandardWallet {
106
106
  #private;
107
107
  get version(): "1.0.0";
108
108
  get name(): string;
@@ -110,6 +110,7 @@ declare class PrivyStandardWallet implements WalletWithSolanaFeatures {
110
110
  get chains(): ("solana:mainnet" | "solana:devnet" | "solana:testnet")[];
111
111
  get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignAndSendTransactionFeature & SolanaSignTransactionFeature & SolanaSignMessageFeature & PrivyFeature;
112
112
  get accounts(): PrivyWalletAccount[];
113
+ get isPrivyWallet(): boolean;
113
114
  constructor({ name, icon, version, injection, wallets, }: {
114
115
  name: string;
115
116
  icon: WalletIcon;
@@ -139,6 +140,21 @@ interface UsePrivyStandardWalletInterface {
139
140
  */
140
141
  declare function usePrivyStandardWallet(): UsePrivyStandardWalletInterface;
141
142
 
143
+ /**
144
+ * Use this hook to get the wallets that implement the Solana Standard Wallet interface.
145
+ */
146
+ interface UseSolanaStandardWalletsInterface {
147
+ /**
148
+ * Whether the wallets are ready to be used.
149
+ */
150
+ ready: boolean;
151
+ /**
152
+ * The wallets that implement the Solana Standard Wallet interface.
153
+ */
154
+ wallets: SolanaStandardWallet[];
155
+ }
156
+ declare function useSolanaStandardWallets(): UseSolanaStandardWalletsInterface;
157
+
142
158
  /**
143
159
  * Method to fund a user's Solana wallet via Privy's funding feature by inputting a valid wallet address.
144
160
  * You can access the fields and methods documented here via the {@link useFundWallet} hook.
@@ -295,4 +311,4 @@ declare function useSignMessage(callbacks?: PrivyEvents['signSolanaMessage']): {
295
311
  }) => Promise<Uint8Array>;
296
312
  };
297
313
 
298
- export { PrivyStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin };
314
+ export { PrivyStandardWallet, SolanaStandardWallet, SolanaTransactionReceipt, SupportedSolanaTransaction, type UseFundWalletInterface, type UseImportWalletInterface, type UsePrivyStandardWalletInterface, type UseSendTransactionInterface, type UseSignMessageInterface, type UseSignTransactionInterface, type UseSolanaStandardWalletsInterface, useFundWallet, useImportWallet, usePrivyStandardWallet, useSendTransaction, useSignMessage, useSignTransaction, useSolanaFundingPlugin, useSolanaStandardWallets };
@@ -1,8 +1,11 @@
1
- import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
1
+ import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
2
2
  import { ReactElement } from 'react';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain } from '@privy-io/js-sdk-core';
5
5
  import { SmartWalletType, CustomMetadataType, PasskeyAuthenticateInputType } from '@privy-io/public-api';
6
+ import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
7
+ import { WalletWithFeatures } from '@wallet-standard/base';
8
+ import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
6
9
  import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
7
10
  import { Transaction, VersionedTransaction, ParsedTransactionWithMeta, Cluster } from '@solana/web3.js';
8
11
  import EventEmitter from 'eventemitter3';
@@ -174,6 +177,19 @@ interface RequestArguments {
174
177
  readonly params?: readonly unknown[] | object | any;
175
178
  }
176
179
 
180
+ /**
181
+ * Helper type for defining a Standard Wallet with a union of Solana features.
182
+ */
183
+ type SolanaStandardWallet = WalletWithFeatures<{
184
+ 'standard:connect'?: StandardConnectFeature['standard:connect'];
185
+ 'standard:disconnect'?: StandardDisconnectFeature['standard:disconnect'];
186
+ 'standard:events'?: StandardEventsFeature['standard:events'];
187
+ 'solana:signMessage'?: SolanaSignMessageFeature['solana:signMessage'];
188
+ 'solana:signTransaction'?: SolanaSignTransactionFeature['solana:signTransaction'];
189
+ 'solana:signAndSendTransaction'?: SolanaSignAndSendTransactionFeature['solana:signAndSendTransaction'];
190
+ 'solana:signIn'?: SolanaSignInFeature['solana:signIn'];
191
+ }>;
192
+
177
193
  /**
178
194
  * Represents a connection with a single Solana wallet provider. Manages wallet state
179
195
  * including ongoing connection status, and exposes methods for connecting and disconnecting.
@@ -184,8 +200,9 @@ declare class SolanaWalletConnector extends WalletConnector {
184
200
  wallets: BaseConnectedSolanaWallet[];
185
201
  private adapter;
186
202
  private autoConnectEnabled;
187
- constructor(adapter: Adapter, autoConnectEnabled: boolean);
203
+ constructor(adapter: StandardWalletAdapter, autoConnectEnabled: boolean);
188
204
  get isInstalled(): boolean;
205
+ get wallet(): SolanaStandardWallet;
189
206
  /**
190
207
  * Builds a connected wallet object to be exposed to the developer. This object
191
208
  * contains the address and a few helper methods.
@@ -609,11 +626,25 @@ interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
609
626
  /**
610
627
  * Returns a light provider for interfacing with this wallet. Support message signing
611
628
  * on embedded and external wallets using an internal interface.
629
+ *
630
+ * @deprecated Use `useSolanaStandardWallets` to get the wallet provider for this wallet.
612
631
  */
613
632
  getProvider: () => Promise<SolanaProvider>;
633
+ /**
634
+ * @deprecated Use `useSignMessage` from the solana package instead.
635
+ */
614
636
  signMessage: MessageSignerWalletAdapterProps['signMessage'];
637
+ /**
638
+ * @deprecated Use `useSendTransaction` from the solana package instead.
639
+ */
615
640
  sendTransaction: WalletAdapterProps['sendTransaction'];
641
+ /**
642
+ * @deprecated Use `useSignTransaction` from the solana package instead.
643
+ */
616
644
  signTransaction: SignerWalletAdapterProps['signTransaction'];
645
+ /**
646
+ * @deprecated Use `useSignTransaction` from the solana package instead.
647
+ */
617
648
  signAllTransactions: SignerWalletAdapterProps['signAllTransactions'];
618
649
  }
619
650
  /**
@@ -1970,4 +2001,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
1970
2001
  type SolanaRpcRequestType = solana_signMessage;
1971
2002
  type SolanaRpcResponseType = solana_signMessageResponse;
1972
2003
 
1973
- export { type SiweWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ExternalWalletsConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type ConnectWalletModalOptions as H, type LoginModalOptions as I, type SetWalletRecoveryOptions as J, type SignTypedDataParams as K, type LoginToFrame as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type FundWalletConfig as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type ConnectedWallet as T, type User as U, type CrossAppProviderDetails as V, type Wallet as W, type OAuthProviderType as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SmartWalletConfig as _, type LoginMethod as a, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type UnsignedTransactionRequestWithChainId as a8, type BaseConnectedWalletType as a9, type DiscordOAuthWithMetadata as aA, type GithubOAuthWithMetadata as aB, type TiktokOAuthWithMetadata as aC, type LinkedInOAuthWithMetadata as aD, type AppleOAuthWithMetadata as aE, type FarcasterWithMetadata as aF, type TelegramWithMetadata as aG, type CrossAppAccountWithMetadata as aH, type PasskeyWithMetadata as aI, type Email as aJ, type Phone as aK, type TransactionUIOptions as aL, type ContractUIOptions as aM, type NativeFundingConfig as aN, type MoonpayFundingConfig as aO, type PriceDisplayOptions as aP, type Farcaster as aQ, type Passkey as aR, type LoginMethodOrderOption as aS, type TelegramAuthFlowState as aa, type TypedMessage as ab, type MessageTypes as ac, type SmartWallet as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type TransactionReceipt as aj, type NonEmptyArray as ak, type EmailWithMetadata as al, type PhoneWithMetadata as am, type WalletWithMetadata as an, type Google as ao, type Twitter as ap, type Discord as aq, type Github as ar, type LinkedIn as as, type Apple as at, type Tiktok as au, type Telegram as av, type CrossAppAccount as aw, type LinkedAccountType as ax, type GoogleOAuthWithMetadata as ay, type TwitterOAuthWithMetadata as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaFundingConfig as j, SolanaWalletConnector as k, type WalletClientType as l, type PrivyFarcasterSignerInitResponse as m, type MfaSubmitArgs as n, type SolanaRpcRequestType as o, type EthereumRpcResponseType as p, type SolanaRpcResponseType as q, type PrivyClientConfig as r, type EIP1193Provider as s, toSolanaWalletConnectors as t, type EntropyIdVerifier as u, type RequestArguments as v, WalletTimeoutError as w, WalletConnector as x, type ConnectedWalletMetadata as y, type ConnectorType as z };
2004
+ export { type SmartWalletConfig as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type ExternalWalletsConfig as G, type BaseConnectedWallet as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginToFrame as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type OAuthProviderType as Y, type MoonpaySignRequest as Z, type MoonpaySignResponse as _, type LoginMethod as a, type SiweWalletMetadata as a0, type TelegramAuthResult as a1, type TelegramWebAppData as a2, type OAuthUserInfo as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type UnsignedTransactionRequestWithChainId as a9, type TwitterOAuthWithMetadata as aA, type DiscordOAuthWithMetadata as aB, type GithubOAuthWithMetadata as aC, type TiktokOAuthWithMetadata as aD, type LinkedInOAuthWithMetadata as aE, type AppleOAuthWithMetadata as aF, type FarcasterWithMetadata as aG, type TelegramWithMetadata as aH, type CrossAppAccountWithMetadata as aI, type PasskeyWithMetadata as aJ, type Email as aK, type Phone as aL, type TransactionUIOptions as aM, type ContractUIOptions as aN, type NativeFundingConfig as aO, type MoonpayFundingConfig as aP, type PriceDisplayOptions as aQ, type Farcaster as aR, type Passkey as aS, type LoginMethodOrderOption as aT, type BaseConnectedWalletType as aa, type TelegramAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type SmartWallet as ae, type MoonpayConfig as af, type MoonpayCurrencyCode as ag, type MoonpayPaymentMethod as ah, type Quantity as ai, type TransactionLog as aj, type TransactionReceipt as ak, type NonEmptyArray as al, type EmailWithMetadata as am, type PhoneWithMetadata as an, type WalletWithMetadata as ao, type Google as ap, type Twitter as aq, type Discord as ar, type Github as as, type LinkedIn as at, type Apple as au, type Tiktok as av, type Telegram as aw, type CrossAppAccount as ax, type LinkedAccountType as ay, type GoogleOAuthWithMetadata as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
@@ -1,8 +1,11 @@
1
- import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
1
+ import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
2
2
  import { ReactElement } from 'react';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain } from '@privy-io/js-sdk-core';
5
5
  import { SmartWalletType, CustomMetadataType, PasskeyAuthenticateInputType } from '@privy-io/public-api';
6
+ import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
7
+ import { WalletWithFeatures } from '@wallet-standard/base';
8
+ import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
6
9
  import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
7
10
  import { Transaction, VersionedTransaction, ParsedTransactionWithMeta, Cluster } from '@solana/web3.js';
8
11
  import EventEmitter from 'eventemitter3';
@@ -174,6 +177,19 @@ interface RequestArguments {
174
177
  readonly params?: readonly unknown[] | object | any;
175
178
  }
176
179
 
180
+ /**
181
+ * Helper type for defining a Standard Wallet with a union of Solana features.
182
+ */
183
+ type SolanaStandardWallet = WalletWithFeatures<{
184
+ 'standard:connect'?: StandardConnectFeature['standard:connect'];
185
+ 'standard:disconnect'?: StandardDisconnectFeature['standard:disconnect'];
186
+ 'standard:events'?: StandardEventsFeature['standard:events'];
187
+ 'solana:signMessage'?: SolanaSignMessageFeature['solana:signMessage'];
188
+ 'solana:signTransaction'?: SolanaSignTransactionFeature['solana:signTransaction'];
189
+ 'solana:signAndSendTransaction'?: SolanaSignAndSendTransactionFeature['solana:signAndSendTransaction'];
190
+ 'solana:signIn'?: SolanaSignInFeature['solana:signIn'];
191
+ }>;
192
+
177
193
  /**
178
194
  * Represents a connection with a single Solana wallet provider. Manages wallet state
179
195
  * including ongoing connection status, and exposes methods for connecting and disconnecting.
@@ -184,8 +200,9 @@ declare class SolanaWalletConnector extends WalletConnector {
184
200
  wallets: BaseConnectedSolanaWallet[];
185
201
  private adapter;
186
202
  private autoConnectEnabled;
187
- constructor(adapter: Adapter, autoConnectEnabled: boolean);
203
+ constructor(adapter: StandardWalletAdapter, autoConnectEnabled: boolean);
188
204
  get isInstalled(): boolean;
205
+ get wallet(): SolanaStandardWallet;
189
206
  /**
190
207
  * Builds a connected wallet object to be exposed to the developer. This object
191
208
  * contains the address and a few helper methods.
@@ -609,11 +626,25 @@ interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
609
626
  /**
610
627
  * Returns a light provider for interfacing with this wallet. Support message signing
611
628
  * on embedded and external wallets using an internal interface.
629
+ *
630
+ * @deprecated Use `useSolanaStandardWallets` to get the wallet provider for this wallet.
612
631
  */
613
632
  getProvider: () => Promise<SolanaProvider>;
633
+ /**
634
+ * @deprecated Use `useSignMessage` from the solana package instead.
635
+ */
614
636
  signMessage: MessageSignerWalletAdapterProps['signMessage'];
637
+ /**
638
+ * @deprecated Use `useSendTransaction` from the solana package instead.
639
+ */
615
640
  sendTransaction: WalletAdapterProps['sendTransaction'];
641
+ /**
642
+ * @deprecated Use `useSignTransaction` from the solana package instead.
643
+ */
616
644
  signTransaction: SignerWalletAdapterProps['signTransaction'];
645
+ /**
646
+ * @deprecated Use `useSignTransaction` from the solana package instead.
647
+ */
617
648
  signAllTransactions: SignerWalletAdapterProps['signAllTransactions'];
618
649
  }
619
650
  /**
@@ -1970,4 +2001,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
1970
2001
  type SolanaRpcRequestType = solana_signMessage;
1971
2002
  type SolanaRpcResponseType = solana_signMessageResponse;
1972
2003
 
1973
- export { type SiweWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ExternalWalletsConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type ConnectWalletModalOptions as H, type LoginModalOptions as I, type SetWalletRecoveryOptions as J, type SignTypedDataParams as K, type LoginToFrame as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type FundWalletConfig as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type ConnectedWallet as T, type User as U, type CrossAppProviderDetails as V, type Wallet as W, type OAuthProviderType as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SmartWalletConfig as _, type LoginMethod as a, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type UnsignedTransactionRequestWithChainId as a8, type BaseConnectedWalletType as a9, type DiscordOAuthWithMetadata as aA, type GithubOAuthWithMetadata as aB, type TiktokOAuthWithMetadata as aC, type LinkedInOAuthWithMetadata as aD, type AppleOAuthWithMetadata as aE, type FarcasterWithMetadata as aF, type TelegramWithMetadata as aG, type CrossAppAccountWithMetadata as aH, type PasskeyWithMetadata as aI, type Email as aJ, type Phone as aK, type TransactionUIOptions as aL, type ContractUIOptions as aM, type NativeFundingConfig as aN, type MoonpayFundingConfig as aO, type PriceDisplayOptions as aP, type Farcaster as aQ, type Passkey as aR, type LoginMethodOrderOption as aS, type TelegramAuthFlowState as aa, type TypedMessage as ab, type MessageTypes as ac, type SmartWallet as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type TransactionReceipt as aj, type NonEmptyArray as ak, type EmailWithMetadata as al, type PhoneWithMetadata as am, type WalletWithMetadata as an, type Google as ao, type Twitter as ap, type Discord as aq, type Github as ar, type LinkedIn as as, type Apple as at, type Tiktok as au, type Telegram as av, type CrossAppAccount as aw, type LinkedAccountType as ax, type GoogleOAuthWithMetadata as ay, type TwitterOAuthWithMetadata as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaFundingConfig as j, SolanaWalletConnector as k, type WalletClientType as l, type PrivyFarcasterSignerInitResponse as m, type MfaSubmitArgs as n, type SolanaRpcRequestType as o, type EthereumRpcResponseType as p, type SolanaRpcResponseType as q, type PrivyClientConfig as r, type EIP1193Provider as s, toSolanaWalletConnectors as t, type EntropyIdVerifier as u, type RequestArguments as v, WalletTimeoutError as w, WalletConnector as x, type ConnectedWalletMetadata as y, type ConnectorType as z };
2004
+ export { type SmartWalletConfig as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type ExternalWalletsConfig as G, type BaseConnectedWallet as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginToFrame as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type OAuthProviderType as Y, type MoonpaySignRequest as Z, type MoonpaySignResponse as _, type LoginMethod as a, type SiweWalletMetadata as a0, type TelegramAuthResult as a1, type TelegramWebAppData as a2, type OAuthUserInfo as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type UnsignedTransactionRequestWithChainId as a9, type TwitterOAuthWithMetadata as aA, type DiscordOAuthWithMetadata as aB, type GithubOAuthWithMetadata as aC, type TiktokOAuthWithMetadata as aD, type LinkedInOAuthWithMetadata as aE, type AppleOAuthWithMetadata as aF, type FarcasterWithMetadata as aG, type TelegramWithMetadata as aH, type CrossAppAccountWithMetadata as aI, type PasskeyWithMetadata as aJ, type Email as aK, type Phone as aL, type TransactionUIOptions as aM, type ContractUIOptions as aN, type NativeFundingConfig as aO, type MoonpayFundingConfig as aP, type PriceDisplayOptions as aQ, type Farcaster as aR, type Passkey as aS, type LoginMethodOrderOption as aT, type BaseConnectedWalletType as aa, type TelegramAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type SmartWallet as ae, type MoonpayConfig as af, type MoonpayCurrencyCode as ag, type MoonpayPaymentMethod as ah, type Quantity as ai, type TransactionLog as aj, type TransactionReceipt as ak, type NonEmptyArray as al, type EmailWithMetadata as am, type PhoneWithMetadata as an, type WalletWithMetadata as ao, type Google as ap, type Twitter as aq, type Discord as ar, type Github as as, type LinkedIn as at, type Apple as au, type Tiktok as av, type Telegram as aw, type CrossAppAccount as ax, type LinkedAccountType as ay, type GoogleOAuthWithMetadata as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,10 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-Nqh9YCV3.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-DWeM9B29.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
6
6
  import 'react';
7
7
  import '@privy-io/public-api';
8
+ import '@solana/wallet-standard-features';
9
+ import '@wallet-standard/base';
10
+ import '@wallet-standard/features';
8
11
  import '@metamask/eth-sig-util';
9
12
  import '@solana/web3.js';
10
13
  import 'eventemitter3';
package/dist/dts/ui.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-Nqh9YCV3.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-DWeM9B29.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
6
6
  import 'react';
7
7
  import '@privy-io/public-api';
8
+ import '@solana/wallet-standard-features';
9
+ import '@wallet-standard/base';
10
+ import '@wallet-standard/features';
8
11
  import '@metamask/eth-sig-util';
9
12
  import '@solana/web3.js';
10
13
  import 'eventemitter3';
@@ -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-Nqh9YCV3.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-DWeM9B29.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Chain } from '@privy-io/js-sdk-core';
2
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, f as SolanaCluster, C as ConnectedSolanaWallet, g as CreateWalletOptions } from './types-Nqh9YCV3.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-DWeM9B29.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as o}from"@abstract-foundation/agw-client/actions";import{hexToNumber as r,createWalletClient as t,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{u as s,f as l,l as d,at as m,m as p,t as u,a as h,aE as I,aF as g,aG as y,n as f}from"./privy-provider-CE4-s2JH.mjs";import{u as v}from"./internal-context-lAHxpYRu.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-C2dDEs0t.mjs";import"react/jsx-runtime";import"mipd";import"react";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";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/ChevronDownIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";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/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/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"ofetch";import"@heroicons/react/24/outline";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:W,appId:b,rpcConfig:A,client:M}=v(),k=l(),{wallets:F}=d(),{setModalData:E}=m(),x=p(T),D=!!x&&u(x),_=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=W.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let m=await s.getEthereumProvider(),p=t({account:s.address,transport:n(m)}),u=a({address:s.address,signMessage:p.signMessage,signTransaction:p.signTransaction,signTypedData:p.signTypedData});return await e({chain:d,transport:i(f(d,A,b)),publicTransport:i(f(d,A,b)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await _(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);P.current=!0,E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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 _(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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 _(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);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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,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:i.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 _(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);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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,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:i.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:()=>{if(!n)return r.signTransaction(e);throw Error("Batch transactions not supported for signing")},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,f as l,l as d,at as m,m as p,t as u,a as h,aE as I,aF as g,aG as y,n as f}from"./privy-provider-DHU2bEeW.mjs";import{u as v}from"./internal-context-lAHxpYRu.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-55YSeFOS.mjs";import"react/jsx-runtime";import"mipd";import"react";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";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/ChevronDownIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";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/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/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"ofetch";import"@heroicons/react/24/outline";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:W,appId:b,rpcConfig:A,client:M}=v(),k=l(),{wallets:F}=d(),{setModalData:E}=m(),x=p(T),D=!!x&&u(x),_=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=W.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let m=await s.getEthereumProvider(),p=t({account:s.address,transport:n(m)}),u=a({address:s.address,signMessage:p.signMessage,signTransaction:p.signTransaction,signTypedData:p.signTypedData});return await e({chain:d,transport:i(f(d,A,b)),publicTransport:i(f(d,A,b)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await _(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);P.current=!0,E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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 _(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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 _(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);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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,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:i.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 _(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);E({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:D,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,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:i.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:()=>{if(!n)return r.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))}}}export{T as useAbstractSmartWallets};