@privy-io/react-auth 2.14.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/extended-chains.js +1 -0
  3. package/dist/cjs/farcaster.js +1 -1
  4. package/dist/cjs/frame-B38H7ILa.js +1 -0
  5. package/dist/cjs/index.js +1 -1
  6. package/dist/cjs/internal-context-CrTqNb_c.js +1 -0
  7. package/dist/cjs/paths-CdRs2pll.js +1 -0
  8. package/dist/cjs/privy-provider-BH0F7-54.js +28 -0
  9. package/dist/cjs/smart-wallets-DvmTShkt.js +1 -0
  10. package/dist/cjs/smart-wallets.js +1 -1
  11. package/dist/cjs/solana.js +1 -1
  12. package/dist/cjs/ui.js +2 -2
  13. package/dist/cjs/use-sign-with-user-signer-h5JGn1CY.js +1 -0
  14. package/dist/cjs/useActiveWallet-XehugIB6.js +1 -0
  15. package/dist/cjs/{useFundWallet-IzxVl7fC.js → useFundWallet-hXyQXO7U.js} +1 -1
  16. package/dist/dts/extended-chains.d.mts +53 -0
  17. package/dist/dts/extended-chains.d.ts +53 -0
  18. package/dist/dts/farcaster.d.mts +1 -1
  19. package/dist/dts/farcaster.d.ts +1 -1
  20. package/dist/dts/index.d.mts +84 -9
  21. package/dist/dts/index.d.ts +84 -9
  22. package/dist/dts/smart-wallets.d.mts +1 -1
  23. package/dist/dts/smart-wallets.d.ts +1 -1
  24. package/dist/dts/solana.d.mts +4 -4
  25. package/dist/dts/solana.d.ts +4 -4
  26. package/dist/dts/{types-CCLHKw4p.d.mts → types-BVjRQyBr.d.mts} +2 -2
  27. package/dist/dts/{types-CCLHKw4p.d.ts → types-BVjRQyBr.d.ts} +2 -2
  28. package/dist/dts/ui.d.mts +1 -1
  29. package/dist/dts/ui.d.ts +1 -1
  30. package/dist/dts/{useSolanaWallets-CbaQnTe_.d.mts → useSolanaWallets-B9ju3nTn.d.mts} +1 -1
  31. package/dist/dts/{useSolanaWallets-CbaQnTe_.d.ts → useSolanaWallets-B9ju3nTn.d.ts} +1 -1
  32. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  33. package/dist/esm/extended-chains.mjs +1 -0
  34. package/dist/esm/farcaster.mjs +1 -1
  35. package/dist/esm/frame-UsDF_L76.mjs +1 -0
  36. package/dist/esm/index.mjs +1 -1
  37. package/dist/esm/internal-context-Bxhby7Hv.mjs +1 -0
  38. package/dist/esm/paths-j39vuJt8.mjs +1 -0
  39. package/dist/esm/privy-provider-DyqReHyu.mjs +28 -0
  40. package/dist/esm/smart-wallets-BuJFWcoC.mjs +1 -0
  41. package/dist/esm/smart-wallets.mjs +1 -1
  42. package/dist/esm/solana.mjs +1 -1
  43. package/dist/esm/ui.mjs +2 -2
  44. package/dist/esm/use-sign-with-user-signer-CEyk1z8w.mjs +1 -0
  45. package/dist/esm/useActiveWallet-CKb44UC5.mjs +1 -0
  46. package/dist/esm/{useFundWallet-3u6nKvq9.mjs → useFundWallet-BjWNYKHD.mjs} +1 -1
  47. package/package.json +16 -3
  48. package/dist/cjs/frame-Czznns2Z.js +0 -1
  49. package/dist/cjs/internal-context-VGU3duZo.js +0 -1
  50. package/dist/cjs/privy-provider-CtJSaVGS.js +0 -28
  51. package/dist/cjs/smart-wallets-DamcfGy2.js +0 -1
  52. package/dist/cjs/useActiveWallet-CLlUzbbD.js +0 -1
  53. package/dist/esm/frame-S_4wR3Zf.mjs +0 -1
  54. package/dist/esm/internal-context-pX7RZwl3.mjs +0 -1
  55. package/dist/esm/privy-provider-B_tc-pgO.mjs +0 -28
  56. package/dist/esm/smart-wallets-CLORSRVb.mjs +0 -1
  57. package/dist/esm/useActiveWallet-mXvtXdOw.mjs +0 -1
@@ -0,0 +1,53 @@
1
+ import { CurveSigningChainType, WalletResponseType } from '@privy-io/public-api';
2
+ import { U as User } from './types-BVjRQyBr.js';
3
+ import '@coinbase/wallet-sdk';
4
+ import '@reown/appkit';
5
+ import '@solana/wallet-adapter-base';
6
+ import 'react';
7
+ import 'viem';
8
+ import '@privy-io/js-sdk-core';
9
+ import '@solana/wallet-standard-features';
10
+ import '@wallet-standard/base';
11
+ import '@wallet-standard/features';
12
+ import '@metamask/eth-sig-util';
13
+ import '@solana/web3.js';
14
+ import 'eventemitter3';
15
+
16
+ interface CreateWalletInput {
17
+ /** The chain type of the wallet to create. */
18
+ chainType: CurveSigningChainType;
19
+ }
20
+ interface CreateWalletOutput {
21
+ user: User;
22
+ wallet: WalletResponseType;
23
+ }
24
+ interface UseCreateWalletInterface {
25
+ /**
26
+ * Create a new wallet for the user, on an extended chain.
27
+ */
28
+ createWallet: (input: CreateWalletInput) => Promise<CreateWalletOutput>;
29
+ }
30
+ declare const useCreateWallet: () => UseCreateWalletInterface;
31
+
32
+ interface SignRawHashInput {
33
+ /** The address of the wallet to sign the hash with. */
34
+ address: string;
35
+ /** The chain type of the wallet to sign the hash with. */
36
+ chainType: CurveSigningChainType;
37
+ /** The hash to sign. */
38
+ hash: `0x${string}`;
39
+ }
40
+ interface SignRawHashOutput {
41
+ /** The signature of the hash. */
42
+ signature: `0x${string}`;
43
+ }
44
+ interface UseSignRawHashInterface {
45
+ /**
46
+ * Sign a raw hash with a wallet along the blockchain's cryptographic curve.
47
+ * This is only supported for extended chains.
48
+ */
49
+ signRawHash: (input: SignRawHashInput) => Promise<SignRawHashOutput>;
50
+ }
51
+ declare const useSignRawHash: () => UseSignRawHashInterface;
52
+
53
+ export { useCreateWallet, useSignRawHash };
@@ -0,0 +1,53 @@
1
+ import { CurveSigningChainType, WalletResponseType } from '@privy-io/public-api';
2
+ import { U as User } from './types-BVjRQyBr.js';
3
+ import '@coinbase/wallet-sdk';
4
+ import '@reown/appkit';
5
+ import '@solana/wallet-adapter-base';
6
+ import 'react';
7
+ import 'viem';
8
+ import '@privy-io/js-sdk-core';
9
+ import '@solana/wallet-standard-features';
10
+ import '@wallet-standard/base';
11
+ import '@wallet-standard/features';
12
+ import '@metamask/eth-sig-util';
13
+ import '@solana/web3.js';
14
+ import 'eventemitter3';
15
+
16
+ interface CreateWalletInput {
17
+ /** The chain type of the wallet to create. */
18
+ chainType: CurveSigningChainType;
19
+ }
20
+ interface CreateWalletOutput {
21
+ user: User;
22
+ wallet: WalletResponseType;
23
+ }
24
+ interface UseCreateWalletInterface {
25
+ /**
26
+ * Create a new wallet for the user, on an extended chain.
27
+ */
28
+ createWallet: (input: CreateWalletInput) => Promise<CreateWalletOutput>;
29
+ }
30
+ declare const useCreateWallet: () => UseCreateWalletInterface;
31
+
32
+ interface SignRawHashInput {
33
+ /** The address of the wallet to sign the hash with. */
34
+ address: string;
35
+ /** The chain type of the wallet to sign the hash with. */
36
+ chainType: CurveSigningChainType;
37
+ /** The hash to sign. */
38
+ hash: `0x${string}`;
39
+ }
40
+ interface SignRawHashOutput {
41
+ /** The signature of the hash. */
42
+ signature: `0x${string}`;
43
+ }
44
+ interface UseSignRawHashInterface {
45
+ /**
46
+ * Sign a raw hash with a wallet along the blockchain's cryptographic curve.
47
+ * This is only supported for extended chains.
48
+ */
49
+ signRawHash: (input: SignRawHashInput) => Promise<SignRawHashOutput>;
50
+ }
51
+ declare const useSignRawHash: () => UseSignRawHashInterface;
52
+
53
+ export { useCreateWallet, useSignRawHash };
@@ -1,4 +1,4 @@
1
- import { L as LoginToFrame, U as User } from './types-CCLHKw4p.js';
1
+ import { L as LoginToFrame, U as User } from './types-BVjRQyBr.js';
2
2
  import '@coinbase/wallet-sdk';
3
3
  import '@reown/appkit';
4
4
  import '@solana/wallet-adapter-base';
@@ -1,4 +1,4 @@
1
- import { L as LoginToFrame, U as User } from './types-CCLHKw4p.js';
1
+ import { L as LoginToFrame, U as User } from './types-BVjRQyBr.js';
2
2
  import '@coinbase/wallet-sdk';
3
3
  import '@reown/appkit';
4
4
  import '@solana/wallet-adapter-base';
@@ -1,13 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-CCLHKw4p.js';
4
- export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CCLHKw4p.js';
3
+ import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-BVjRQyBr.js';
4
+ export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BVjRQyBr.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import { AppKit } from '@reown/appkit';
8
8
  import EventEmitter from 'eventemitter3';
9
9
  import { Store, EIP6963ProviderDetail } from 'mipd';
10
- import Privy, { Chain, RpcConfig } from '@privy-io/js-sdk-core';
10
+ import Privy, { Chain, RpcConfig, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput } from '@privy-io/js-sdk-core';
11
11
  export { DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, addPrivyRpcToChain, addRpcUrlOverrideToChain } from '@privy-io/js-sdk-core';
12
12
  import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
13
13
  import * as viem from 'viem';
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
16
16
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
17
17
  import { Cluster } from '@solana/web3.js';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './useSolanaWallets-CbaQnTe_.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CbaQnTe_.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-B9ju3nTn.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-B9ju3nTn.js';
21
21
  import '@coinbase/wallet-sdk';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@solana/wallet-standard-features';
@@ -3540,10 +3540,71 @@ declare function useSignMessage(callbacks?: PrivyEvents['signMessage']): {
3540
3540
  };
3541
3541
 
3542
3542
  /**
3543
- * @experimental Interfaces are subject to change in the future.
3543
+ * Signs an EIP-7702 authorization with the user's wallet.
3544
3544
  *
3545
- * Signs an EIP-7702 authorization with the user's wallet. This is
3546
- * strongly not recommended for production use until the Pectra hard fork
3545
+ */
3546
+ declare const useSign7702Authorization: () => {
3547
+ signAuthorization: (input: {
3548
+ contractAddress: `0x${string}`;
3549
+ chainId?: number;
3550
+ nonce?: number;
3551
+ executor?: "self" | `0x${string}`;
3552
+ }, options?: {
3553
+ address?: string;
3554
+ }) => Promise<{
3555
+ r: `0x${string}`;
3556
+ s: `0x${string}`;
3557
+ v: bigint;
3558
+ yParity: number;
3559
+ address: viem.Address;
3560
+ chainId: number;
3561
+ nonce: number;
3562
+ } | {
3563
+ r: `0x${string}`;
3564
+ s: `0x${string}`;
3565
+ yParity: number;
3566
+ v?: bigint | undefined;
3567
+ address: viem.Address;
3568
+ chainId: number;
3569
+ nonce: number;
3570
+ } | {
3571
+ r: `0x${string}`;
3572
+ s: `0x${string}`;
3573
+ v: bigint;
3574
+ yParity: number;
3575
+ address: viem.Address;
3576
+ chainId: number;
3577
+ nonce: number;
3578
+ } | {
3579
+ r: `0x${string}`;
3580
+ s: `0x${string}`;
3581
+ yParity: number;
3582
+ v?: bigint | undefined;
3583
+ address: viem.Address;
3584
+ chainId: number;
3585
+ nonce: number;
3586
+ } | {
3587
+ r: `0x${string}`;
3588
+ s: `0x${string}`;
3589
+ v: bigint;
3590
+ yParity: number;
3591
+ address: viem.Address;
3592
+ chainId: number;
3593
+ nonce: number;
3594
+ } | {
3595
+ r: `0x${string}`;
3596
+ s: `0x${string}`;
3597
+ yParity: number;
3598
+ v?: bigint | undefined;
3599
+ address: viem.Address;
3600
+ chainId: number;
3601
+ nonce: number;
3602
+ }>;
3603
+ };
3604
+ /**
3605
+ * @deprecated Use `useSign7702Authorization` instead.
3606
+ *
3607
+ * Signs an EIP-7702 authorization with the user's wallet.
3547
3608
  */
3548
3609
  declare const useSignAuthorization: () => {
3549
3610
  signAuthorization: (input: {
@@ -3932,6 +3993,20 @@ interface UseSessionSignersInterface {
3932
3993
  }
3933
3994
  declare const useSessionSigners: () => UseSessionSignersInterface;
3934
3995
 
3996
+ interface UseAuthorizationSignatureInterface {
3997
+ /**
3998
+ * Generate an authorization signature for an API request with the user's authorization key.
3999
+ * @see {@link https://docs.privy.io/api-reference/authorization-signatures |Authorization signatures}
4000
+ * @returns The user's authorization signature over the API request.
4001
+ */
4002
+ generateAuthorizationSignature: (input: GenerateAuthorizationSignatureInput) => Promise<GenerateAuthorizationSignatureOutput>;
4003
+ }
4004
+ /**
4005
+ * Hook to sign an API request with the user's authorization key.
4006
+ * @returns The `generateAuthorizationSignature` method which can be used to sign over an API request.
4007
+ */
4008
+ declare const useAuthorizationSignature: () => UseAuthorizationSignatureInterface;
4009
+
3935
4010
  /**
3936
4011
  * Use this hook to programmatically update the user in response to any backend change
3937
4012
  *
@@ -4013,4 +4088,4 @@ declare const LoginModal: ({ open }: {
4013
4088
  open: boolean;
4014
4089
  }) => react_jsx_runtime.JSX.Element;
4015
4090
 
4016
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
4091
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useAuthorizationSignature, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
@@ -1,13 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-CCLHKw4p.js';
4
- export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-CCLHKw4p.js';
3
+ import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-BVjRQyBr.js';
4
+ export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BVjRQyBr.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { TurnstileProps } from '@marsidev/react-turnstile';
7
7
  import { AppKit } from '@reown/appkit';
8
8
  import EventEmitter from 'eventemitter3';
9
9
  import { Store, EIP6963ProviderDetail } from 'mipd';
10
- import Privy, { Chain, RpcConfig } from '@privy-io/js-sdk-core';
10
+ import Privy, { Chain, RpcConfig, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput } from '@privy-io/js-sdk-core';
11
11
  export { DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, addPrivyRpcToChain, addRpcUrlOverrideToChain } from '@privy-io/js-sdk-core';
12
12
  import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse, PrivyTransactionScanningInputType, PrivyTransactionScanningResponseType } from '@privy-io/public-api';
13
13
  import * as viem from 'viem';
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
16
16
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
17
17
  import { Cluster } from '@solana/web3.js';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './useSolanaWallets-CbaQnTe_.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CbaQnTe_.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-B9ju3nTn.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-B9ju3nTn.js';
21
21
  import '@coinbase/wallet-sdk';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@solana/wallet-standard-features';
@@ -3540,10 +3540,71 @@ declare function useSignMessage(callbacks?: PrivyEvents['signMessage']): {
3540
3540
  };
3541
3541
 
3542
3542
  /**
3543
- * @experimental Interfaces are subject to change in the future.
3543
+ * Signs an EIP-7702 authorization with the user's wallet.
3544
3544
  *
3545
- * Signs an EIP-7702 authorization with the user's wallet. This is
3546
- * strongly not recommended for production use until the Pectra hard fork
3545
+ */
3546
+ declare const useSign7702Authorization: () => {
3547
+ signAuthorization: (input: {
3548
+ contractAddress: `0x${string}`;
3549
+ chainId?: number;
3550
+ nonce?: number;
3551
+ executor?: "self" | `0x${string}`;
3552
+ }, options?: {
3553
+ address?: string;
3554
+ }) => Promise<{
3555
+ r: `0x${string}`;
3556
+ s: `0x${string}`;
3557
+ v: bigint;
3558
+ yParity: number;
3559
+ address: viem.Address;
3560
+ chainId: number;
3561
+ nonce: number;
3562
+ } | {
3563
+ r: `0x${string}`;
3564
+ s: `0x${string}`;
3565
+ yParity: number;
3566
+ v?: bigint | undefined;
3567
+ address: viem.Address;
3568
+ chainId: number;
3569
+ nonce: number;
3570
+ } | {
3571
+ r: `0x${string}`;
3572
+ s: `0x${string}`;
3573
+ v: bigint;
3574
+ yParity: number;
3575
+ address: viem.Address;
3576
+ chainId: number;
3577
+ nonce: number;
3578
+ } | {
3579
+ r: `0x${string}`;
3580
+ s: `0x${string}`;
3581
+ yParity: number;
3582
+ v?: bigint | undefined;
3583
+ address: viem.Address;
3584
+ chainId: number;
3585
+ nonce: number;
3586
+ } | {
3587
+ r: `0x${string}`;
3588
+ s: `0x${string}`;
3589
+ v: bigint;
3590
+ yParity: number;
3591
+ address: viem.Address;
3592
+ chainId: number;
3593
+ nonce: number;
3594
+ } | {
3595
+ r: `0x${string}`;
3596
+ s: `0x${string}`;
3597
+ yParity: number;
3598
+ v?: bigint | undefined;
3599
+ address: viem.Address;
3600
+ chainId: number;
3601
+ nonce: number;
3602
+ }>;
3603
+ };
3604
+ /**
3605
+ * @deprecated Use `useSign7702Authorization` instead.
3606
+ *
3607
+ * Signs an EIP-7702 authorization with the user's wallet.
3547
3608
  */
3548
3609
  declare const useSignAuthorization: () => {
3549
3610
  signAuthorization: (input: {
@@ -3932,6 +3993,20 @@ interface UseSessionSignersInterface {
3932
3993
  }
3933
3994
  declare const useSessionSigners: () => UseSessionSignersInterface;
3934
3995
 
3996
+ interface UseAuthorizationSignatureInterface {
3997
+ /**
3998
+ * Generate an authorization signature for an API request with the user's authorization key.
3999
+ * @see {@link https://docs.privy.io/api-reference/authorization-signatures |Authorization signatures}
4000
+ * @returns The user's authorization signature over the API request.
4001
+ */
4002
+ generateAuthorizationSignature: (input: GenerateAuthorizationSignatureInput) => Promise<GenerateAuthorizationSignatureOutput>;
4003
+ }
4004
+ /**
4005
+ * Hook to sign an API request with the user's authorization key.
4006
+ * @returns The `generateAuthorizationSignature` method which can be used to sign over an API request.
4007
+ */
4008
+ declare const useAuthorizationSignature: () => UseAuthorizationSignatureInterface;
4009
+
3935
4010
  /**
3936
4011
  * Use this hook to programmatically update the user in response to any backend change
3937
4012
  *
@@ -4013,4 +4088,4 @@ declare const LoginModal: ({ open }: {
4013
4088
  open: boolean;
4014
4089
  }) => react_jsx_runtime.JSX.Element;
4015
4090
 
4016
- export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
4091
+ export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useAuthorizationSignature, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUser, useWallets };
@@ -4,7 +4,7 @@ import { SmartAccountClient } from 'permissionless';
4
4
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
5
5
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
6
6
  import { SmartWalletType } from '@privy-io/js-sdk-core';
7
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-CCLHKw4p.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BVjRQyBr.js';
8
8
  import '@coinbase/wallet-sdk';
9
9
  import '@reown/appkit';
10
10
  import '@solana/wallet-adapter-base';
@@ -4,7 +4,7 @@ import { SmartAccountClient } from 'permissionless';
4
4
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
5
5
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
6
6
  import { SmartWalletType } from '@privy-io/js-sdk-core';
7
- import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-CCLHKw4p.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BVjRQyBr.js';
8
8
  import '@coinbase/wallet-sdk';
9
9
  import '@reown/appkit';
10
10
  import '@solana/wallet-adapter-base';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-CCLHKw4p.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CCLHKw4p.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-CbaQnTe_.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CbaQnTe_.js';
1
+ import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-BVjRQyBr.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BVjRQyBr.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-B9ju3nTn.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-B9ju3nTn.js';
5
5
  import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
6
6
  import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
7
7
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-CCLHKw4p.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CCLHKw4p.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-CbaQnTe_.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CbaQnTe_.js';
1
+ import { W as Wallet, j as SolanaStandardWallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, h as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, i as SignMessageModalUIOptions } from './types-BVjRQyBr.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BVjRQyBr.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-B9ju3nTn.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-B9ju3nTn.js';
5
5
  import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
6
6
  import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
7
7
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -4,7 +4,7 @@ import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapter
4
4
  import { ReactElement } from 'react';
5
5
  import { Hex } from 'viem';
6
6
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain, RpcConfig } from '@privy-io/js-sdk-core';
7
- import { SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
7
+ import { ChainType, SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
8
8
  import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
9
9
  import { WalletWithFeatures } from '@wallet-standard/base';
10
10
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -675,7 +675,7 @@ interface Wallet {
675
675
  /**
676
676
  * Chain type of the wallet address.
677
677
  */
678
- chainType: 'ethereum' | 'solana';
678
+ chainType: ChainType;
679
679
  /**
680
680
  * The wallet client used for this wallet during the most recent verification.
681
681
  *
@@ -4,7 +4,7 @@ import { StandardWalletAdapter, Adapter, WalletError, MessageSignerWalletAdapter
4
4
  import { ReactElement } from 'react';
5
5
  import { Hex } from 'viem';
6
6
  import { Cluster as Cluster$1, ChainLikeWithId, CountryCode, Chain, RpcConfig } from '@privy-io/js-sdk-core';
7
- import { SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
7
+ import { ChainType, SmartWalletType, CustomMetadataType, PrivyAppResponse, PasskeyAuthenticateInputType } from '@privy-io/public-api';
8
8
  import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
9
9
  import { WalletWithFeatures } from '@wallet-standard/base';
10
10
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -675,7 +675,7 @@ interface Wallet {
675
675
  /**
676
676
  * Chain type of the wallet address.
677
677
  */
678
- chainType: 'ethereum' | 'solana';
678
+ chainType: ChainType;
679
679
  /**
680
680
  * The wallet client used for this wallet during the most recent verification.
681
681
  *
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-CCLHKw4p.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-BVjRQyBr.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
package/dist/dts/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-CCLHKw4p.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-BVjRQyBr.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain, Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
@@ -1,5 +1,5 @@
1
1
  import { Chain } from '@privy-io/js-sdk-core';
2
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, F as FundingMethod, f as SolanaCluster, C as ConnectedSolanaWallet, g as CreateWalletOptions } from './types-CCLHKw4p.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-BVjRQyBr.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-CCLHKw4p.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-BVjRQyBr.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 s}from"viem/chains";import{u as c,f as l,l as d,au as p,m,v as u,a as h,aH as y,aI as I,aJ as g,n as v}from"./privy-provider-B_tc-pgO.mjs";import{u as f}from"./internal-context-pX7RZwl3.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-CLORSRVb.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"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/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/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/LockClosedIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"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}=c(),{hideWalletUIs:S,openPrivyModal:P,chains:b,appId:A,rpcConfig:W,client:M}=f(),k=l(),{wallets:F}=d(),{setModalData:q}=p(),x=m(T),R=!!x&&u(x),D=async(o=s.id)=>{let c=w(F);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=b.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await c.switchChain(d.id);let p=await c.getEthereumProvider(),m=t({account:c.address,transport:n(p)}),u=a({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:i(v(d,W,A)),publicTransport:i(v(d,W,A)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await D(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);S.current=!0,q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:y,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{S.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:y,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:g,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput})},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:g,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput})},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.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 s}from"viem/chains";import{u as c,g as l,c as p}from"./use-sign-with-user-signer-CEyk1z8w.mjs";import{e as d,k as m,ao as u,a as h,az as y,aA as I,aB as g,l as v}from"./privy-provider-DyqReHyu.mjs";import{u as f}from"./internal-context-Bxhby7Hv.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-BuJFWcoC.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-j39vuJt8.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/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/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/LockClosedIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@heroicons/react/24/outline";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=c(),{hideWalletUIs:S,openPrivyModal:P,chains:A,appId:b,rpcConfig:W,client:M}=f(),k=d(),{wallets:F}=m(),{setModalData:q}=u(),x=l(T),R=!!x&&p(x),D=async(o=s.id)=>{let c=w(F);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let p=A.find((e=>e.id===l));if(!p)throw Error("Chain not configured");await c.switchChain(p.id);let d=await c.getEthereumProvider(),m=t({account:c.address,transport:n(d)}),u=a({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:p,transport:i(v(p,W,b)),publicTransport:i(v(p,W,b)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await D(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);S.current=!0,q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:y,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{S.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:y,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:g,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput})},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{S.current=!0;let{entropyId:s,entropyIdVerifier:c}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:s,entropyIdVerifier:c,onCompleteNavigateTo:g,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:c,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput})},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest({...t,isSponsored:void 0!==t.paymaster&&void 0!==t.paymasterInput});return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),P(I)})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};
@@ -0,0 +1 @@
1
+ import{useMemo as r}from"react";import{create as e,rawSign as t}from"@privy-io/js-sdk-core";import{u as a}from"./internal-context-Bxhby7Hv.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-CEyk1z8w.mjs";import"viem";const u=()=>{let{refreshSessionAndUser:t,privy:i}=a();return r((()=>({async createWallet(r){let a=await e(i,{request:{chain_type:r.chainType}}),s=await t();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[t,i])},d=()=>{let{user:e}=i(),{privy:u}=a(),{signWithUserSigner:d}=s();return r((()=>({async signRawHash({address:r,chainType:a,hash:i}){if(!e)throw Error("User must be authenticated before signing");let s=n(e,a).filter((r=>o(r))).find((e=>e.address===r));if(!s)throw Error("Wallet not found");let h=await t(u,d,{wallet_id:s.id,params:{hash:i}});if(h.data&&"signature"in h.data&&"hex"===h.data.encoding)return{signature:`0x${h.data.signature}`};throw Error("Failed to sign")}})),[u])};export{u as useCreateWallet,d as useSignRawHash};
@@ -1 +1 @@
1
- import{useCallback as t}from"react";import{F as e}from"./frame-S_4wR3Zf.mjs";import{u as i,P as r}from"./internal-context-pX7RZwl3.mjs";import"ofetch";const a=()=>{let{client:a,setAuthenticated:n,setUser:s}=i();return{initLoginToFrame:t((async()=>{let t=new e;if(!a)throw new r("Must initialize Privy client first.");return a.startAuthFlow(t),await t.init()}),[a]),loginToFrame:t((async({message:t,signature:i})=>{if(!a)throw new r("Must initialize Privy client first.");if(!(a.authFlow instanceof e))throw new r("Must initialize Farcaster frame flow first.");let o=(t=>{let e=t.match(/farcaster:\/\/fid\/(\d+)/);return e&&e[1]?parseInt(e[1],10):null})(t);if(!o)throw new r("Invalid message format; could not parse Farcaster ID.");a.authFlow.setAuthData({message:t,signature:i,fid:o});let{user:l}=await a.authenticate();return l&&(s(l),n(!0)),l}),[a,s,n])}};export{a as useLoginToFrame};
1
+ import{useCallback as t}from"react";import{F as e}from"./frame-UsDF_L76.mjs";import{P as r}from"./paths-j39vuJt8.mjs";import{u as i}from"./internal-context-Bxhby7Hv.mjs";import"ofetch";const a=()=>{let{client:a,setAuthenticated:s,setUser:n}=i();return{initLoginToFrame:t((async()=>{let t=new e;if(!a)throw new r("Must initialize Privy client first.");return a.startAuthFlow(t),await t.init()}),[a]),loginToFrame:t((async({message:t,signature:i})=>{if(!a)throw new r("Must initialize Privy client first.");if(!(a.authFlow instanceof e))throw new r("Must initialize Farcaster frame flow first.");let o=(t=>{let e=t.match(/farcaster:\/\/fid\/(\d+)/);return e&&e[1]?parseInt(e[1],10):null})(t);if(!o)throw new r("Invalid message format; could not parse Farcaster ID.");a.authFlow.setAuthData({message:t,signature:i,fid:o});let{user:l}=await a.authenticate();return l&&(n(l),s(!0)),l}),[a,n,s])}};export{a as useLoginToFrame};
@@ -0,0 +1 @@
1
+ import{P as t,aj as s,ak as i,f as a}from"./paths-j39vuJt8.mjs";class e{async init(){if(!this.api)throw new t("Auth flow has no API instance");let{nonce:i,expires_at:a}=await this.api.post(s,{});return{nonce:i,expiresAt:a}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new t("Auth flow has no message, signature, or fid");if(!this.api)throw new t("Auth flow has no API instance");try{let s=await this.api.post(i,{message:this.message,signature:this.signature,fid:this.fid});if(!s)throw new t("No response from authentication");return s}catch(t){throw a(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:s,fid:i}){this.message=t,this.signature=s,this.fid=i}constructor(){this.meta={}}}export{e as F};