@privy-io/react-auth 2.4.5 → 2.4.6-beta-20250221224248

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 (39) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/{importWallet-DbohmIiw.js → importWallet-CMgoHWDA.js} +1 -1
  3. package/dist/cjs/index.js +4 -4
  4. package/dist/cjs/{prepareFundingModalData-BdtVxCug.js → prepareFundingModalData-COePk3KL.js} +1 -1
  5. package/dist/cjs/{smart-wallets-DR6SCvrN.js → smart-wallets-D8hYncDe.js} +1 -1
  6. package/dist/cjs/smart-wallets.js +1 -1
  7. package/dist/cjs/solana.js +1 -1
  8. package/dist/cjs/ui.js +1 -1
  9. package/dist/cjs/{useActiveWallet-BmSLq25D.js → useActiveWallet-DTkcjOZ9.js} +1 -1
  10. package/dist/cjs/{useFundWallet-DNBXOQPj.js → useFundWallet-jQGkRuiD.js} +1 -1
  11. package/dist/cjs/useWallets-CBV_3oCv.js +1 -0
  12. package/dist/dts/farcaster.d.mts +1 -1
  13. package/dist/dts/farcaster.d.ts +1 -1
  14. package/dist/dts/index.d.mts +12 -5
  15. package/dist/dts/index.d.ts +12 -5
  16. package/dist/dts/smart-wallets.d.mts +1 -1
  17. package/dist/dts/smart-wallets.d.ts +1 -1
  18. package/dist/dts/solana.d.mts +4 -4
  19. package/dist/dts/solana.d.ts +4 -4
  20. package/dist/dts/{types-BKBPK3tN.d.mts → types-VtXkq8Wj.d.mts} +23 -2
  21. package/dist/dts/{types-BKBPK3tN.d.ts → types-VtXkq8Wj.d.ts} +23 -2
  22. package/dist/dts/ui.d.mts +1 -1
  23. package/dist/dts/ui.d.ts +1 -1
  24. package/dist/dts/{useSolanaWallets-BkzftCx7.d.mts → useSolanaWallets-Du5sSdUt.d.mts} +1 -1
  25. package/dist/dts/{useSolanaWallets-BkzftCx7.d.ts → useSolanaWallets-Du5sSdUt.d.ts} +1 -1
  26. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  27. package/dist/esm/{importWallet-ylHVDCXz.mjs → importWallet-CNqmURb-.mjs} +1 -1
  28. package/dist/esm/index.mjs +4 -4
  29. package/dist/esm/{prepareFundingModalData-CsN1TYQy.mjs → prepareFundingModalData-g3-cAzDW.mjs} +1 -1
  30. package/dist/esm/{smart-wallets-gIJUc6-6.mjs → smart-wallets-DodujIvL.mjs} +1 -1
  31. package/dist/esm/smart-wallets.mjs +1 -1
  32. package/dist/esm/solana.mjs +1 -1
  33. package/dist/esm/ui.mjs +1 -1
  34. package/dist/esm/{useActiveWallet-DvvTjRH_.mjs → useActiveWallet-Ci9-tWXQ.mjs} +1 -1
  35. package/dist/esm/{useFundWallet-DS1kytse.mjs → useFundWallet-CCgPgTax.mjs} +1 -1
  36. package/dist/esm/useWallets-DlJamWit.mjs +1 -0
  37. package/package.json +3 -3
  38. package/dist/cjs/useWallets-C7Zst89H.js +0 -1
  39. package/dist/esm/useWallets-8w3LVxdW.mjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-BKBPK3tN.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-BKBPK3tN.js';
3
+ import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-VtXkq8Wj.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-VtXkq8Wj.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';
@@ -14,8 +14,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
14
14
  import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
15
15
  import { Cluster } from '@solana/web3.js';
16
16
  import { FetchOptions } from 'ofetch';
17
- import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
18
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
17
+ import { P as PrivyEvents } from './useSolanaWallets-Du5sSdUt.js';
18
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-Du5sSdUt.js';
19
19
  import '@solana/wallet-adapter-base';
20
20
  import '@privy-io/js-sdk-core';
21
21
  import '@metamask/eth-sig-util';
@@ -2254,7 +2254,14 @@ interface ResponseCrossAppAccount {
2254
2254
  first_verified_at: number | null;
2255
2255
  latest_verified_at: number | null;
2256
2256
  }
2257
- type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
2257
+ interface ResponseSignerAccount {
2258
+ type: 'signer';
2259
+ public_key: string;
2260
+ verified_at: number;
2261
+ first_verified_at: number | null;
2262
+ latest_verified_at: number | null;
2263
+ }
2264
+ type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount | ResponseSignerAccount>;
2258
2265
  interface ResponseSmsMfaMethod {
2259
2266
  type: 'sms';
2260
2267
  verified_at: number;
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-VtXkq8Wj.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-VtXkq8Wj.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKBPK3tN.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-VtXkq8Wj.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-VtXkq8Wj.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-Du5sSdUt.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-Du5sSdUt.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKBPK3tN.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-VtXkq8Wj.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-VtXkq8Wj.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-Du5sSdUt.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-Du5sSdUt.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -521,7 +521,7 @@ type WalletBranding = {
521
521
  id: string;
522
522
  icon?: string | EmbeddedSVG;
523
523
  };
524
- type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'guest';
524
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'signer' | 'guest';
525
525
  /** @ignore */
526
526
  interface LinkMetadata {
527
527
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -548,6 +548,13 @@ type MoonpayFundingConfig = {
548
548
  * Config for preferred credit card provider. We will default to using this method first if available.
549
549
  */
550
550
  type PreferredCardProvider = 'coinbase' | 'moonpay';
551
+ /**
552
+ * Configuration for the funding flow UIs.
553
+ */
554
+ type FundingUiConfig = {
555
+ receiveFundsTitle?: string;
556
+ receiveFundsSubtitle?: string;
557
+ };
551
558
  /**
552
559
  * Configuration for Solana funding
553
560
  */
@@ -564,6 +571,8 @@ type SolanaFundingConfig = {
564
571
  /** The preferred card provider for funding */
565
572
  preferredProvider?: PreferredCardProvider;
566
573
  };
574
+ /** Customization for the funding UIs */
575
+ uiConfig?: FundingUiConfig;
567
576
  };
568
577
  /**
569
578
  * Configuration for native funding amount.
@@ -576,6 +585,8 @@ type NativeFundingConfig = {
576
585
  /** The preferred card onramp for funding */
577
586
  preferredProvider?: PreferredCardProvider;
578
587
  };
588
+ /** Customization for the funding UIs */
589
+ uiConfig?: FundingUiConfig;
579
590
  } | {
580
591
  chain?: ChainLikeWithId;
581
592
  amount: string;
@@ -587,6 +598,8 @@ type NativeFundingConfig = {
587
598
  /** The preferred card onramp for funding */
588
599
  preferredProvider?: PreferredCardProvider;
589
600
  };
601
+ /** Customization for the funding UIs */
602
+ uiConfig?: FundingUiConfig;
590
603
  };
591
604
  /**
592
605
  * Optional configuration parameter for the fiat on-ramp.
@@ -949,6 +962,9 @@ interface CrossAppAccount {
949
962
  providerApp: ProviderAppMetadata;
950
963
  subject: string;
951
964
  }
965
+ interface SignerAccount {
966
+ publicKey: string;
967
+ }
952
968
  /** Object representation of a user's email, with additional metadata for advanced use cases. */
953
969
  interface EmailWithMetadata extends LinkMetadata, Email {
954
970
  /** Denotes that this is an email account. */
@@ -1038,10 +1054,15 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1038
1054
  /** Denotes that this is a cross-app account */
1039
1055
  type: 'cross_app';
1040
1056
  }
1057
+ /** Object representation of a user's signer, with additional metadata for advanced use cases. */
1058
+ interface SignerAccountWithMetadata extends LinkMetadata, SignerAccount {
1059
+ /** Denotes that this is a signer */
1060
+ type: 'signer';
1061
+ }
1041
1062
  /**
1042
1063
  * Object representation of a user's linked accounts
1043
1064
  */
1044
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1065
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | SignerAccountWithMetadata;
1045
1066
  interface User {
1046
1067
  /** The Privy-issued DID for the user. If you need to store additional information
1047
1068
  * about a user, you can use this DID to reference them. */
@@ -521,7 +521,7 @@ type WalletBranding = {
521
521
  id: string;
522
522
  icon?: string | EmbeddedSVG;
523
523
  };
524
- type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'guest';
524
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'signer' | 'guest';
525
525
  /** @ignore */
526
526
  interface LinkMetadata {
527
527
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -548,6 +548,13 @@ type MoonpayFundingConfig = {
548
548
  * Config for preferred credit card provider. We will default to using this method first if available.
549
549
  */
550
550
  type PreferredCardProvider = 'coinbase' | 'moonpay';
551
+ /**
552
+ * Configuration for the funding flow UIs.
553
+ */
554
+ type FundingUiConfig = {
555
+ receiveFundsTitle?: string;
556
+ receiveFundsSubtitle?: string;
557
+ };
551
558
  /**
552
559
  * Configuration for Solana funding
553
560
  */
@@ -564,6 +571,8 @@ type SolanaFundingConfig = {
564
571
  /** The preferred card provider for funding */
565
572
  preferredProvider?: PreferredCardProvider;
566
573
  };
574
+ /** Customization for the funding UIs */
575
+ uiConfig?: FundingUiConfig;
567
576
  };
568
577
  /**
569
578
  * Configuration for native funding amount.
@@ -576,6 +585,8 @@ type NativeFundingConfig = {
576
585
  /** The preferred card onramp for funding */
577
586
  preferredProvider?: PreferredCardProvider;
578
587
  };
588
+ /** Customization for the funding UIs */
589
+ uiConfig?: FundingUiConfig;
579
590
  } | {
580
591
  chain?: ChainLikeWithId;
581
592
  amount: string;
@@ -587,6 +598,8 @@ type NativeFundingConfig = {
587
598
  /** The preferred card onramp for funding */
588
599
  preferredProvider?: PreferredCardProvider;
589
600
  };
601
+ /** Customization for the funding UIs */
602
+ uiConfig?: FundingUiConfig;
590
603
  };
591
604
  /**
592
605
  * Optional configuration parameter for the fiat on-ramp.
@@ -949,6 +962,9 @@ interface CrossAppAccount {
949
962
  providerApp: ProviderAppMetadata;
950
963
  subject: string;
951
964
  }
965
+ interface SignerAccount {
966
+ publicKey: string;
967
+ }
952
968
  /** Object representation of a user's email, with additional metadata for advanced use cases. */
953
969
  interface EmailWithMetadata extends LinkMetadata, Email {
954
970
  /** Denotes that this is an email account. */
@@ -1038,10 +1054,15 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1038
1054
  /** Denotes that this is a cross-app account */
1039
1055
  type: 'cross_app';
1040
1056
  }
1057
+ /** Object representation of a user's signer, with additional metadata for advanced use cases. */
1058
+ interface SignerAccountWithMetadata extends LinkMetadata, SignerAccount {
1059
+ /** Denotes that this is a signer */
1060
+ type: 'signer';
1061
+ }
1041
1062
  /**
1042
1063
  * Object representation of a user's linked accounts
1043
1064
  */
1044
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1065
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata | SignerAccountWithMetadata;
1045
1066
  interface User {
1046
1067
  /** The Privy-issued DID for the user. If you need to store additional information
1047
1068
  * about a user, you can use this DID to reference them. */
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-BKBPK3tN.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-VtXkq8Wj.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
package/dist/dts/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-BKBPK3tN.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-VtXkq8Wj.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
@@ -1,4 +1,4 @@
1
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-BKBPK3tN.js';
1
+ import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-VtXkq8Wj.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-BKBPK3tN.js';
1
+ import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-VtXkq8Wj.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as n,createWalletClient as r,custom as a,http as t}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as s}from"viem/chains";import{r as o,E as c,u as l,ac as d,M as p}from"./useWallets-8w3LVxdW.mjs";import{u as m}from"./internal-context-DBDJ7qsa.mjs";import{a as E}from"./getPublicClient-BghjDv1y.mjs";import{g as u}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as y}from"./smart-wallets-gIJUc6-6.mjs";import"viem/utils";import"react/jsx-runtime";import"react";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"@privy-io/js-sdk-core";function g(){let{user:g}=o(),{hideWalletUIs:f,openPrivyModal:I,chains:T,appId:C,rpcConfig:N}=m(),{wallets:D}=c(),{setModalData:_}=l(),h=async(o=s.id)=>{let c=u(D);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?n(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=T.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await c.switchChain(d.id);let p=await c.getEthereumProvider(),m=r({account:c.address,transport:a(p)}),y=i({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:t(E(d,N,C)),publicTransport:t(E(d,N,C)),signer:y})};return{signMessage:async({message:e},n)=>{let r=await h(n);return new Promise((async(n,a)=>{let{entropyId:t,entropyIdVerifier:i}=d(g);f.current=!0,_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTypedData:async(e,n)=>{let r=await h(n);return new Promise((async(n,a)=>{f.current=!0;let{entropyId:t,entropyIdVerifier:i}=d(g);_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},sendTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>a?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!a)return n.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))}}}export{g as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as n,createWalletClient as r,custom as a,http as t}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as s}from"viem/chains";import{r as o,E as c,u as l,ac as d,M as p}from"./useWallets-DlJamWit.mjs";import{u as m}from"./internal-context-DBDJ7qsa.mjs";import{a as E}from"./getPublicClient-BghjDv1y.mjs";import{g as u}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as y}from"./smart-wallets-DodujIvL.mjs";import"viem/utils";import"react/jsx-runtime";import"react";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"@privy-io/js-sdk-core";function g(){let{user:g}=o(),{hideWalletUIs:f,openPrivyModal:I,chains:T,appId:C,rpcConfig:N}=m(),{wallets:D}=c(),{setModalData:_}=l(),h=async(o=s.id)=>{let c=u(D);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?n(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=T.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await c.switchChain(d.id);let p=await c.getEthereumProvider(),m=r({account:c.address,transport:a(p)}),y=i({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:t(E(d,N,C)),publicTransport:t(E(d,N,C)),signer:y})};return{signMessage:async({message:e},n)=>{let r=await h(n);return new Promise((async(n,a)=>{let{entropyId:t,entropyIdVerifier:i}=d(g);f.current=!0,_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTypedData:async(e,n)=>{let r=await h(n);return new Promise((async(n,a)=>{f.current=!0;let{entropyId:t,entropyIdVerifier:i}=d(g);_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},sendTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>a?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!a)return n.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))}}}export{g as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{a0 as e,a6 as t}from"./useWallets-8w3LVxdW.mjs";import{a,P as r}from"./internal-context-DBDJ7qsa.mjs";const i=async({emitPrivyEvent:i,getAccessToken:n,initializeWalletProxy:o,refreshSessionAndUser:s,user:l},{privateKey:c,chainType:E})=>{if(!l)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");let[T,m]=await Promise.all([n(),o(15e3)]);if(!m||!T)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");await m.importWallet({privateKey:c,accessToken:T,chainType:E});let u=await s(),w="solana"===E?e(u):t(u);if(!w)throw i("createWallet","onError",a.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return i("createWallet","onSuccess",{wallet:w}),w};export{i};
1
+ import{a0 as e,a6 as t}from"./useWallets-DlJamWit.mjs";import{a,P as r}from"./internal-context-DBDJ7qsa.mjs";const i=async({emitPrivyEvent:i,getAccessToken:n,initializeWalletProxy:o,refreshSessionAndUser:s,user:l},{privateKey:c,chainType:E})=>{if(!l)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");let[T,m]=await Promise.all([n(),o(15e3)]);if(!m||!T)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");await m.importWallet({privateKey:c,accessToken:T,chainType:E});let u=await s(),w="solana"===E?e(u):t(u);if(!w)throw i("createWallet","onError",a.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return i("createWallet","onSuccess",{wallet:w}),w};export{i};