@privy-io/react-auth 2.16.0 → 2.17.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 (45) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/extended-chains.js +1 -1
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/cjs/privy-provider-XQ1bAxfj.js +28 -0
  5. package/dist/cjs/{smart-wallets-BBYteGIQ.js → smart-wallets-BbSOUgn3.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 +2 -2
  9. package/dist/cjs/use-sign-with-user-signer-CpEHKe74.js +1 -0
  10. package/dist/cjs/useActiveWallet-BqfSIn3W.js +1 -0
  11. package/dist/cjs/{useFundWallet-Do4NJHE-.js → useFundWallet-BrBwa4tQ.js} +1 -1
  12. package/dist/dts/extended-chains.d.mts +1 -1
  13. package/dist/dts/extended-chains.d.ts +1 -1
  14. package/dist/dts/farcaster.d.mts +1 -1
  15. package/dist/dts/farcaster.d.ts +1 -1
  16. package/dist/dts/index.d.mts +29 -5
  17. package/dist/dts/index.d.ts +29 -5
  18. package/dist/dts/smart-wallets.d.mts +1 -1
  19. package/dist/dts/smart-wallets.d.ts +1 -1
  20. package/dist/dts/solana.d.mts +4 -4
  21. package/dist/dts/solana.d.ts +4 -4
  22. package/dist/dts/{types-CH4HSSkH.d.mts → types-BKf1TjPF.d.mts} +27 -8
  23. package/dist/dts/{types-CH4HSSkH.d.ts → types-BKf1TjPF.d.ts} +27 -8
  24. package/dist/dts/ui.d.mts +1 -1
  25. package/dist/dts/ui.d.ts +1 -1
  26. package/dist/dts/{useSolanaWallets-NCQrusNU.d.mts → useSolanaWallets-BTDsdOi4.d.mts} +1 -1
  27. package/dist/dts/{useSolanaWallets-NCQrusNU.d.ts → useSolanaWallets-BTDsdOi4.d.ts} +1 -1
  28. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  29. package/dist/esm/extended-chains.mjs +1 -1
  30. package/dist/esm/index.mjs +1 -1
  31. package/dist/esm/privy-provider-3RsLI3qL.mjs +28 -0
  32. package/dist/esm/{smart-wallets-BODPu_tJ.mjs → smart-wallets-WRYrOnt1.mjs} +1 -1
  33. package/dist/esm/smart-wallets.mjs +1 -1
  34. package/dist/esm/solana.mjs +1 -1
  35. package/dist/esm/ui.mjs +2 -2
  36. package/dist/esm/use-sign-with-user-signer-C3vxQSbq.mjs +1 -0
  37. package/dist/esm/useActiveWallet-35GU0sZj.mjs +1 -0
  38. package/dist/esm/{useFundWallet-CZq0dDAM.mjs → useFundWallet-Cb7opCd3.mjs} +1 -1
  39. package/package.json +12 -10
  40. package/dist/cjs/privy-provider-BwT4_Q1p.js +0 -28
  41. package/dist/cjs/use-sign-with-user-signer-Btd3Mi-j.js +0 -1
  42. package/dist/cjs/useActiveWallet-geVurizV.js +0 -1
  43. package/dist/esm/privy-provider-9dA1clzB.mjs +0 -28
  44. package/dist/esm/use-sign-with-user-signer-Yg0Gn-gB.mjs +0 -1
  45. package/dist/esm/useActiveWallet-jVmO0lCL.mjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-CH4HSSkH.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-CH4HSSkH.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-BKf1TjPF.js';
4
+ export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKf1TjPF.js';
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';
@@ -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-NCQrusNU.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-NCQrusNU.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
21
21
  import '@coinbase/wallet-sdk';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@solana/wallet-standard-features';
@@ -1604,6 +1604,11 @@ interface PrivyInterface {
1604
1604
  * This will directly initiate the OAuth flow for Tiktok.
1605
1605
  */
1606
1606
  linkTiktok: () => void;
1607
+ /**
1608
+ * For users who are authenticated, prompts the user to link Line OAuth account
1609
+ * This will directly initiate the OAuth flow for Line.
1610
+ */
1611
+ linkLine: () => void;
1607
1612
  /**
1608
1613
  * For users who are authenticated, prompts the user to link LinkedIn OAuth account
1609
1614
  * This will directly initiate the OAuth flow for LinkedIn.
@@ -1728,6 +1733,13 @@ interface PrivyInterface {
1728
1733
  * @returns Promise for the {@link User} object after the provided Tiktok account has been unlinked
1729
1734
  */
1730
1735
  unlinkTiktok: (subject: string) => Promise<User>;
1736
+ /**
1737
+ * Unlink a Line social account from a user, by passing the line subject ID. Note that you can only unlink a social account if the user has at least one other account.
1738
+ *
1739
+ * @param subject {string} line account's subject ID
1740
+ * @returns Promise for the {@link User} object after the provided Line account has been unlinked
1741
+ */
1742
+ unlinkLine: (subject: string) => Promise<User>;
1731
1743
  /**
1732
1744
  * Unlink a LinkedIn social account from a user, by passing the linkedin subject ID. Note that you can only unlink a social account if the user has at least one other account.
1733
1745
  *
@@ -2362,6 +2374,16 @@ interface ResponseOAuthTiktok {
2362
2374
  first_verified_at: number | null;
2363
2375
  latest_verified_at: number | null;
2364
2376
  }
2377
+ interface ResponseOAuthLine {
2378
+ type: 'line_oauth';
2379
+ subject: string;
2380
+ name: string | null;
2381
+ email: string | null;
2382
+ profile_picture_url: string | null;
2383
+ verified_at: number;
2384
+ first_verified_at: number | null;
2385
+ latest_verified_at: number | null;
2386
+ }
2365
2387
  interface ResponseOAuthLinkedIn {
2366
2388
  type: 'linkedin_oauth';
2367
2389
  subject: string;
@@ -2423,7 +2445,7 @@ interface ResponseCrossAppAccount {
2423
2445
  first_verified_at: number | null;
2424
2446
  latest_verified_at: number | null;
2425
2447
  }
2426
- type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
2448
+ type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLine | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
2427
2449
  interface ResponseSmsMfaMethod {
2428
2450
  type: 'sms';
2429
2451
  verified_at: number;
@@ -3214,6 +3236,7 @@ declare function useRegisterMfaListener(callbacks: PrivyEvents['configureMfa']):
3214
3236
  * @returns linkGithub - immediately redirects to Github login page and prompts the user to link their account
3215
3237
  * @returns linkLinkedIn - immediately redirects to LinkedIn login page and prompts the user to link their account
3216
3238
  * @returns linkTikTok - immediately redirects to TikTok login page and prompts the user to link their account
3239
+ * @returns linkLine - immediately redirects to Line login page and prompts the user to link their account
3217
3240
  * @returns linkSpotify - immediately redirects to Spotify login page and prompts the user to link their account
3218
3241
  * @returns linkInstagram - immediately redirects to Instagram login page and prompts the user to link their account
3219
3242
  * @returns linkTelegram - immediately redirects to Telegram login page and prompts the user to link their account
@@ -3231,6 +3254,7 @@ declare function useLinkAccount(callbacks?: PrivyEvents['linkAccount']): {
3231
3254
  linkGithub: () => void;
3232
3255
  linkLinkedIn: () => void;
3233
3256
  linkTiktok: () => void;
3257
+ linkLine: () => void;
3234
3258
  linkSpotify: () => void;
3235
3259
  linkInstagram: () => void;
3236
3260
  linkFarcaster: () => void;
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as EIP1193Provider, v as EntropyIdVerifier$1, H as HDWalletWithMetadata, w as RequestArguments, x as WalletTimeoutError, y as WalletConnector, B as BaseConnectedEthereumWallet, z as ConnectedWalletMetadata, A as ConnectorType, D as WalletListEntry, G as AppConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, g as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, i as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, h as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a as LoginMethod, a1 as SiweWalletMetadata, a2 as TelegramAuthResult, a3 as TelegramWebAppData, a4 as OAuthUserInfo, a5 as SiwsMessageType, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, C as ConnectedSolanaWallet, ad as SessionSignerInput, ae as TelegramAuthFlowState } from './types-CH4HSSkH.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-CH4HSSkH.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-BKf1TjPF.js';
4
+ export { ax as Apple, aK as AppleOAuthWithMetadata, aS as ContractUIOptions, aB as CrossAppAccount, aN as CrossAppAccountWithMetadata, au as Discord, aF as DiscordOAuthWithMetadata, aP as Email, ap as EmailWithMetadata, aW as Farcaster, aL as FarcasterWithMetadata, av as Github, aG as GithubOAuthWithMetadata, as as Google, aD as GoogleOAuthWithMetadata, az as Line, aI as LineOAuthWithMetadata, aC as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aJ as LinkedInOAuthWithMetadata, aY as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aU as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aT as NativeFundingConfig, ao as NonEmptyArray, aX as Passkey, aO as PasskeyWithMetadata, aQ as Phone, aq as PhoneWithMetadata, aV as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, aA as Telegram, aM as TelegramWithMetadata, ay as Tiktok, aH as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aR as TransactionUIOptions, at as Twitter, aE as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKf1TjPF.js';
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';
@@ -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-NCQrusNU.js';
20
- export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-NCQrusNU.js';
19
+ import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
20
+ export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
21
21
  import '@coinbase/wallet-sdk';
22
22
  import '@solana/wallet-adapter-base';
23
23
  import '@solana/wallet-standard-features';
@@ -1604,6 +1604,11 @@ interface PrivyInterface {
1604
1604
  * This will directly initiate the OAuth flow for Tiktok.
1605
1605
  */
1606
1606
  linkTiktok: () => void;
1607
+ /**
1608
+ * For users who are authenticated, prompts the user to link Line OAuth account
1609
+ * This will directly initiate the OAuth flow for Line.
1610
+ */
1611
+ linkLine: () => void;
1607
1612
  /**
1608
1613
  * For users who are authenticated, prompts the user to link LinkedIn OAuth account
1609
1614
  * This will directly initiate the OAuth flow for LinkedIn.
@@ -1728,6 +1733,13 @@ interface PrivyInterface {
1728
1733
  * @returns Promise for the {@link User} object after the provided Tiktok account has been unlinked
1729
1734
  */
1730
1735
  unlinkTiktok: (subject: string) => Promise<User>;
1736
+ /**
1737
+ * Unlink a Line social account from a user, by passing the line subject ID. Note that you can only unlink a social account if the user has at least one other account.
1738
+ *
1739
+ * @param subject {string} line account's subject ID
1740
+ * @returns Promise for the {@link User} object after the provided Line account has been unlinked
1741
+ */
1742
+ unlinkLine: (subject: string) => Promise<User>;
1731
1743
  /**
1732
1744
  * Unlink a LinkedIn social account from a user, by passing the linkedin subject ID. Note that you can only unlink a social account if the user has at least one other account.
1733
1745
  *
@@ -2362,6 +2374,16 @@ interface ResponseOAuthTiktok {
2362
2374
  first_verified_at: number | null;
2363
2375
  latest_verified_at: number | null;
2364
2376
  }
2377
+ interface ResponseOAuthLine {
2378
+ type: 'line_oauth';
2379
+ subject: string;
2380
+ name: string | null;
2381
+ email: string | null;
2382
+ profile_picture_url: string | null;
2383
+ verified_at: number;
2384
+ first_verified_at: number | null;
2385
+ latest_verified_at: number | null;
2386
+ }
2365
2387
  interface ResponseOAuthLinkedIn {
2366
2388
  type: 'linkedin_oauth';
2367
2389
  subject: string;
@@ -2423,7 +2445,7 @@ interface ResponseCrossAppAccount {
2423
2445
  first_verified_at: number | null;
2424
2446
  latest_verified_at: number | null;
2425
2447
  }
2426
- type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
2448
+ type LinkedAccountsResponseType = Array<ResponseEmailAccount | ResponsePhoneAccount | ResponseEthereumAccount | ResponseSmartWalletAccount | ResponseSolanaAccount | ResponseOAuthGoogle | ResponseOAuthTwitter | ResponseOAuthDiscord | ResponseOAuthGithub | ResponseOAuthSpotify | ResponseOAuthInstagram | ResponseOAuthTiktok | ResponseOAuthLine | ResponseOAuthLinkedIn | ResponseOAuthApple | ResponseCustomJwtAccount | ResponseFarcasterAccount | ResponsePasskeyAccount | ResponseTelegramAccount | ResponseCrossAppAccount>;
2427
2449
  interface ResponseSmsMfaMethod {
2428
2450
  type: 'sms';
2429
2451
  verified_at: number;
@@ -3214,6 +3236,7 @@ declare function useRegisterMfaListener(callbacks: PrivyEvents['configureMfa']):
3214
3236
  * @returns linkGithub - immediately redirects to Github login page and prompts the user to link their account
3215
3237
  * @returns linkLinkedIn - immediately redirects to LinkedIn login page and prompts the user to link their account
3216
3238
  * @returns linkTikTok - immediately redirects to TikTok login page and prompts the user to link their account
3239
+ * @returns linkLine - immediately redirects to Line login page and prompts the user to link their account
3217
3240
  * @returns linkSpotify - immediately redirects to Spotify login page and prompts the user to link their account
3218
3241
  * @returns linkInstagram - immediately redirects to Instagram login page and prompts the user to link their account
3219
3242
  * @returns linkTelegram - immediately redirects to Telegram login page and prompts the user to link their account
@@ -3231,6 +3254,7 @@ declare function useLinkAccount(callbacks?: PrivyEvents['linkAccount']): {
3231
3254
  linkGithub: () => void;
3232
3255
  linkLinkedIn: () => void;
3233
3256
  linkTiktok: () => void;
3257
+ linkLine: () => void;
3234
3258
  linkSpotify: () => void;
3235
3259
  linkInstagram: () => void;
3236
3260
  linkFarcaster: () => void;
@@ -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-CH4HSSkH.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BKf1TjPF.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-CH4HSSkH.js';
7
+ import { h as SendTransactionModalUIOptions, i as SignMessageModalUIOptions } from './types-BKf1TjPF.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-CH4HSSkH.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CH4HSSkH.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-NCQrusNU.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-NCQrusNU.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-BKf1TjPF.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKf1TjPF.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
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-CH4HSSkH.js';
2
- export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-CH4HSSkH.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-NCQrusNU.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-NCQrusNU.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-BKf1TjPF.js';
2
+ export { C as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKf1TjPF.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-BTDsdOi4.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BTDsdOi4.js';
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';
@@ -525,7 +525,7 @@ type SolanaCluster = {
525
525
  blockExplorerUrl?: string;
526
526
  };
527
527
 
528
- declare const SUPPORTED_OAUTH_PROVIDERS: readonly ["google", "discord", "twitter", "github", "spotify", "instagram", "tiktok", "linkedin", "apple"];
528
+ declare const SUPPORTED_OAUTH_PROVIDERS: readonly ["google", "discord", "twitter", "github", "spotify", "instagram", "tiktok", "line", "linkedin", "apple"];
529
529
  declare const SUPPORTED_RECOVERY_PROVIDERS: readonly ["google-drive", "icloud"];
530
530
  declare const SUPPORTED_MFA_METHODS: readonly ["sms", "totp", "passkey"];
531
531
  type MfaMethod = (typeof SUPPORTED_MFA_METHODS)[number];
@@ -537,7 +537,7 @@ type MfaSubmitArgs = {
537
537
  type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier';
538
538
  /**
539
539
  * Supported OAuth providers. Can be `'google'`, `'discord'`, `'twitter'`, `'github'`, `'spotify'`,
540
- * `'instagram'`, `'tiktok'`, `'linkedin'`, or `'apple'`
540
+ * `'instagram'`, `'tiktok'`, `'line'`, `'linkedin'`, or `'apple'`
541
541
  */
542
542
  type OAuthProviderType = (typeof SUPPORTED_OAUTH_PROVIDERS)[number];
543
543
  /**
@@ -573,7 +573,7 @@ type WalletBranding = {
573
573
  id: string;
574
574
  icon?: string | EmbeddedSVG;
575
575
  };
576
- 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' | 'authorization_key' | 'guest';
576
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'line_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'authorization_key' | 'guest';
577
577
  /** @ignore */
578
578
  interface LinkMetadata {
579
579
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -945,6 +945,17 @@ interface Tiktok {
945
945
  /** The display name associated with the Tiktok account. */
946
946
  name: string | null;
947
947
  }
948
+ /** Object representation of a user's Line account. */
949
+ interface Line {
950
+ /** The `sub` claim from the Line-issued JWT for this account. */
951
+ subject: string;
952
+ /** The name associated with the Line account. */
953
+ name: string | null;
954
+ /** The email associated with the Line account. */
955
+ email: string | null;
956
+ /** The profile image URL associated with the Line account. */
957
+ profilePictureUrl: string | null;
958
+ }
948
959
  /** Object representation of a user's LinkedIn account. */
949
960
  interface LinkedIn {
950
961
  /** The `sub` claim from the LinkedIn-issued JWT for this account. */
@@ -1074,9 +1085,9 @@ interface GithubOAuthWithMetadata extends LinkMetadata, Github {
1074
1085
  /** Denotes that this is a Github account. */
1075
1086
  type: 'github_oauth';
1076
1087
  }
1077
- /** Object representation of a user's Tiktok Account, with additional metadata for advanced use cases. */
1088
+ /** Object representation of a user's Spotify Account, with additional metadata for advanced use cases. */
1078
1089
  interface SpotifyOAuthWithMetadata extends LinkMetadata, Spotify {
1079
- /** Denotes that this is a Tiktok account. */
1090
+ /** Denotes that this is a Spotify account. */
1080
1091
  type: 'spotify_oauth';
1081
1092
  }
1082
1093
  /** Object representation of a user's Instagram Account, with additional metadata for advanced use cases. */
@@ -1089,6 +1100,11 @@ interface TiktokOAuthWithMetadata extends LinkMetadata, Tiktok {
1089
1100
  /** Denotes that this is a Tiktok account. */
1090
1101
  type: 'tiktok_oauth';
1091
1102
  }
1103
+ /** Object representation of a user's Line Account, with additional metadata for advanced use cases. */
1104
+ interface LineOAuthWithMetadata extends LinkMetadata, Line {
1105
+ /** Denotes that this is a Line account. */
1106
+ type: 'line_oauth';
1107
+ }
1092
1108
  /** Object representation of a user's LinkedIn Account, with additional metadata for advanced use cases. */
1093
1109
  interface LinkedInOAuthWithMetadata extends LinkMetadata, LinkedIn {
1094
1110
  /** Denotes that this is a LinkedIn account. */
@@ -1127,7 +1143,7 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1127
1143
  /**
1128
1144
  * Object representation of a user's linked accounts
1129
1145
  */
1130
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1146
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LineOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1131
1147
  interface User {
1132
1148
  /** The Privy-issued DID for the user. If you need to store additional information
1133
1149
  * about a user, you can use this DID to reference them. */
@@ -1160,6 +1176,8 @@ interface User {
1160
1176
  instagram?: Instagram;
1161
1177
  /** The user's Tiktok account, if they have linked one. It cannot be linked to another user. */
1162
1178
  tiktok?: Tiktok;
1179
+ /** The user's Line account, if they have linked one. It cannot be linked to another user. */
1180
+ line?: Line;
1163
1181
  /** The user's LinkedIn account, if they have linked one. It cannot be linked to another user. */
1164
1182
  linkedin?: LinkedIn;
1165
1183
  /** The user's Apple account, if they have linked one. It cannot be linked to another user. */
@@ -1364,7 +1382,7 @@ interface PrivyClientConfig {
1364
1382
  *
1365
1383
  * If both `loginMethodsAndOrder` and `loginMethods` are defined, `loginMethodsAndOrder` will take precedence.
1366
1384
  */
1367
- loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram' | 'passkey'>;
1385
+ loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'line' | 'apple' | 'farcaster' | 'telegram' | 'passkey'>;
1368
1386
  /**
1369
1387
  * Login methods for the Privy modal. _This will override carefully designed defaults and should be used with caution._
1370
1388
  *
@@ -1768,6 +1786,7 @@ type AppConfig = {
1768
1786
  spotify?: boolean;
1769
1787
  instagram?: boolean;
1770
1788
  tiktok?: boolean;
1789
+ line?: boolean;
1771
1790
  linkedin?: boolean;
1772
1791
  apple?: boolean;
1773
1792
  farcaster?: boolean;
@@ -2224,4 +2243,4 @@ type SessionSignerInput = {
2224
2243
  policyIds?: string[];
2225
2244
  }[];
2226
2245
 
2227
- export { type MoonpaySignResponse as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type AppConfig as G, type HDWalletWithMetadata as H, type BaseConnectedWallet as I, type ConnectWalletModalOptions as J, type LoginModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type SetWalletRecoveryOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SignTypedDataParams as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type UnsignedTransactionRequest as T, type User as U, type FundWalletConfig as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LoginMethod as a, type SmartWalletConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type TelegramWebAppData as a3, type OAuthUserInfo as a4, type SiwsMessageType as a5, type OAuthFlowState as a6, type LoginWithCode as a7, type OtpFlowState as a8, type PasskeyFlowState as a9, type CrossAppAccount as aA, type LinkedAccountType as aB, type GoogleOAuthWithMetadata as aC, type TwitterOAuthWithMetadata as aD, type DiscordOAuthWithMetadata as aE, type GithubOAuthWithMetadata as aF, type TiktokOAuthWithMetadata as aG, type LinkedInOAuthWithMetadata as aH, type AppleOAuthWithMetadata as aI, type FarcasterWithMetadata as aJ, type TelegramWithMetadata as aK, type CrossAppAccountWithMetadata as aL, type PasskeyWithMetadata as aM, type Email as aN, type Phone as aO, type TransactionUIOptions as aP, type ContractUIOptions as aQ, type NativeFundingConfig as aR, type MoonpayFundingConfig as aS, type PriceDisplayOptions as aT, type Farcaster as aU, type Passkey as aV, type LoginMethodOrderOption as aW, type SiweFlowState as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SessionSignerInput as ad, type TelegramAuthFlowState as ae, type TypedMessage as af, type MessageTypes as ag, type SmartWallet as ah, type MoonpayConfig as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Telegram as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
2246
+ export { type MoonpaySignResponse as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type AppConfig as G, type HDWalletWithMetadata as H, type BaseConnectedWallet as I, type ConnectWalletModalOptions as J, type LoginModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type SetWalletRecoveryOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SignTypedDataParams as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type UnsignedTransactionRequest as T, type User as U, type FundWalletConfig as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LoginMethod as a, type SmartWalletConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type TelegramWebAppData as a3, type OAuthUserInfo as a4, type SiwsMessageType as a5, type OAuthFlowState as a6, type LoginWithCode as a7, type OtpFlowState as a8, type PasskeyFlowState as a9, type Telegram as aA, type CrossAppAccount as aB, type LinkedAccountType as aC, type GoogleOAuthWithMetadata as aD, type TwitterOAuthWithMetadata as aE, type DiscordOAuthWithMetadata as aF, type GithubOAuthWithMetadata as aG, type TiktokOAuthWithMetadata as aH, type LineOAuthWithMetadata as aI, type LinkedInOAuthWithMetadata as aJ, type AppleOAuthWithMetadata as aK, type FarcasterWithMetadata as aL, type TelegramWithMetadata as aM, type CrossAppAccountWithMetadata as aN, type PasskeyWithMetadata as aO, type Email as aP, type Phone as aQ, type TransactionUIOptions as aR, type ContractUIOptions as aS, type NativeFundingConfig as aT, type MoonpayFundingConfig as aU, type PriceDisplayOptions as aV, type Farcaster as aW, type Passkey as aX, type LoginMethodOrderOption as aY, type SiweFlowState as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SessionSignerInput as ad, type TelegramAuthFlowState as ae, type TypedMessage as af, type MessageTypes as ag, type SmartWallet as ah, type MoonpayConfig as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Line as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
@@ -525,7 +525,7 @@ type SolanaCluster = {
525
525
  blockExplorerUrl?: string;
526
526
  };
527
527
 
528
- declare const SUPPORTED_OAUTH_PROVIDERS: readonly ["google", "discord", "twitter", "github", "spotify", "instagram", "tiktok", "linkedin", "apple"];
528
+ declare const SUPPORTED_OAUTH_PROVIDERS: readonly ["google", "discord", "twitter", "github", "spotify", "instagram", "tiktok", "line", "linkedin", "apple"];
529
529
  declare const SUPPORTED_RECOVERY_PROVIDERS: readonly ["google-drive", "icloud"];
530
530
  declare const SUPPORTED_MFA_METHODS: readonly ["sms", "totp", "passkey"];
531
531
  type MfaMethod = (typeof SUPPORTED_MFA_METHODS)[number];
@@ -537,7 +537,7 @@ type MfaSubmitArgs = {
537
537
  type EntropyIdVerifier = 'ethereum-address-verifier' | 'solana-address-verifier';
538
538
  /**
539
539
  * Supported OAuth providers. Can be `'google'`, `'discord'`, `'twitter'`, `'github'`, `'spotify'`,
540
- * `'instagram'`, `'tiktok'`, `'linkedin'`, or `'apple'`
540
+ * `'instagram'`, `'tiktok'`, `'line'`, `'linkedin'`, or `'apple'`
541
541
  */
542
542
  type OAuthProviderType = (typeof SUPPORTED_OAUTH_PROVIDERS)[number];
543
543
  /**
@@ -573,7 +573,7 @@ type WalletBranding = {
573
573
  id: string;
574
574
  icon?: string | EmbeddedSVG;
575
575
  };
576
- 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' | 'authorization_key' | 'guest';
576
+ type LinkedAccountType = 'wallet' | 'smart_wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'line_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'authorization_key' | 'guest';
577
577
  /** @ignore */
578
578
  interface LinkMetadata {
579
579
  /** Account type, most commonly useful when filtering through linkedAccounts */
@@ -945,6 +945,17 @@ interface Tiktok {
945
945
  /** The display name associated with the Tiktok account. */
946
946
  name: string | null;
947
947
  }
948
+ /** Object representation of a user's Line account. */
949
+ interface Line {
950
+ /** The `sub` claim from the Line-issued JWT for this account. */
951
+ subject: string;
952
+ /** The name associated with the Line account. */
953
+ name: string | null;
954
+ /** The email associated with the Line account. */
955
+ email: string | null;
956
+ /** The profile image URL associated with the Line account. */
957
+ profilePictureUrl: string | null;
958
+ }
948
959
  /** Object representation of a user's LinkedIn account. */
949
960
  interface LinkedIn {
950
961
  /** The `sub` claim from the LinkedIn-issued JWT for this account. */
@@ -1074,9 +1085,9 @@ interface GithubOAuthWithMetadata extends LinkMetadata, Github {
1074
1085
  /** Denotes that this is a Github account. */
1075
1086
  type: 'github_oauth';
1076
1087
  }
1077
- /** Object representation of a user's Tiktok Account, with additional metadata for advanced use cases. */
1088
+ /** Object representation of a user's Spotify Account, with additional metadata for advanced use cases. */
1078
1089
  interface SpotifyOAuthWithMetadata extends LinkMetadata, Spotify {
1079
- /** Denotes that this is a Tiktok account. */
1090
+ /** Denotes that this is a Spotify account. */
1080
1091
  type: 'spotify_oauth';
1081
1092
  }
1082
1093
  /** Object representation of a user's Instagram Account, with additional metadata for advanced use cases. */
@@ -1089,6 +1100,11 @@ interface TiktokOAuthWithMetadata extends LinkMetadata, Tiktok {
1089
1100
  /** Denotes that this is a Tiktok account. */
1090
1101
  type: 'tiktok_oauth';
1091
1102
  }
1103
+ /** Object representation of a user's Line Account, with additional metadata for advanced use cases. */
1104
+ interface LineOAuthWithMetadata extends LinkMetadata, Line {
1105
+ /** Denotes that this is a Line account. */
1106
+ type: 'line_oauth';
1107
+ }
1092
1108
  /** Object representation of a user's LinkedIn Account, with additional metadata for advanced use cases. */
1093
1109
  interface LinkedInOAuthWithMetadata extends LinkMetadata, LinkedIn {
1094
1110
  /** Denotes that this is a LinkedIn account. */
@@ -1127,7 +1143,7 @@ interface CrossAppAccountWithMetadata extends LinkMetadata, CrossAppAccount {
1127
1143
  /**
1128
1144
  * Object representation of a user's linked accounts
1129
1145
  */
1130
- type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1146
+ type LinkedAccountWithMetadata = WalletWithMetadata | SmartWalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata | GithubOAuthWithMetadata | SpotifyOAuthWithMetadata | InstagramOAuthWithMetadata | TiktokOAuthWithMetadata | LineOAuthWithMetadata | LinkedInOAuthWithMetadata | AppleOAuthWithMetadata | CustomJwtAccountWithMetadata | FarcasterWithMetadata | PasskeyWithMetadata | TelegramWithMetadata | CrossAppAccountWithMetadata;
1131
1147
  interface User {
1132
1148
  /** The Privy-issued DID for the user. If you need to store additional information
1133
1149
  * about a user, you can use this DID to reference them. */
@@ -1160,6 +1176,8 @@ interface User {
1160
1176
  instagram?: Instagram;
1161
1177
  /** The user's Tiktok account, if they have linked one. It cannot be linked to another user. */
1162
1178
  tiktok?: Tiktok;
1179
+ /** The user's Line account, if they have linked one. It cannot be linked to another user. */
1180
+ line?: Line;
1163
1181
  /** The user's LinkedIn account, if they have linked one. It cannot be linked to another user. */
1164
1182
  linkedin?: LinkedIn;
1165
1183
  /** The user's Apple account, if they have linked one. It cannot be linked to another user. */
@@ -1364,7 +1382,7 @@ interface PrivyClientConfig {
1364
1382
  *
1365
1383
  * If both `loginMethodsAndOrder` and `loginMethods` are defined, `loginMethodsAndOrder` will take precedence.
1366
1384
  */
1367
- loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram' | 'passkey'>;
1385
+ loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'line' | 'apple' | 'farcaster' | 'telegram' | 'passkey'>;
1368
1386
  /**
1369
1387
  * Login methods for the Privy modal. _This will override carefully designed defaults and should be used with caution._
1370
1388
  *
@@ -1768,6 +1786,7 @@ type AppConfig = {
1768
1786
  spotify?: boolean;
1769
1787
  instagram?: boolean;
1770
1788
  tiktok?: boolean;
1789
+ line?: boolean;
1771
1790
  linkedin?: boolean;
1772
1791
  apple?: boolean;
1773
1792
  farcaster?: boolean;
@@ -2224,4 +2243,4 @@ type SessionSignerInput = {
2224
2243
  policyIds?: string[];
2225
2244
  }[];
2226
2245
 
2227
- export { type MoonpaySignResponse as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type AppConfig as G, type HDWalletWithMetadata as H, type BaseConnectedWallet as I, type ConnectWalletModalOptions as J, type LoginModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type SetWalletRecoveryOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SignTypedDataParams as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type UnsignedTransactionRequest as T, type User as U, type FundWalletConfig as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LoginMethod as a, type SmartWalletConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type TelegramWebAppData as a3, type OAuthUserInfo as a4, type SiwsMessageType as a5, type OAuthFlowState as a6, type LoginWithCode as a7, type OtpFlowState as a8, type PasskeyFlowState as a9, type CrossAppAccount as aA, type LinkedAccountType as aB, type GoogleOAuthWithMetadata as aC, type TwitterOAuthWithMetadata as aD, type DiscordOAuthWithMetadata as aE, type GithubOAuthWithMetadata as aF, type TiktokOAuthWithMetadata as aG, type LinkedInOAuthWithMetadata as aH, type AppleOAuthWithMetadata as aI, type FarcasterWithMetadata as aJ, type TelegramWithMetadata as aK, type CrossAppAccountWithMetadata as aL, type PasskeyWithMetadata as aM, type Email as aN, type Phone as aO, type TransactionUIOptions as aP, type ContractUIOptions as aQ, type NativeFundingConfig as aR, type MoonpayFundingConfig as aS, type PriceDisplayOptions as aT, type Farcaster as aU, type Passkey as aV, type LoginMethodOrderOption as aW, type SiweFlowState as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SessionSignerInput as ad, type TelegramAuthFlowState as ae, type TypedMessage as af, type MessageTypes as ag, type SmartWallet as ah, type MoonpayConfig as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Telegram as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
2246
+ export { type MoonpaySignResponse as $, type ConnectorType as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type WalletListEntry as D, type EthereumRpcRequestType as E, type FundingMethod as F, type AppConfig as G, type HDWalletWithMetadata as H, type BaseConnectedWallet as I, type ConnectWalletModalOptions as J, type LoginModalOptions as K, type LoginToFrame as L, type MfaMethod as M, type SetWalletRecoveryOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type SignTypedDataParams as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type UnsignedTransactionRequest as T, type User as U, type FundWalletConfig as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LoginMethod as a, type SmartWalletConfig as a0, type SiweWalletMetadata as a1, type TelegramAuthResult as a2, type TelegramWebAppData as a3, type OAuthUserInfo as a4, type SiwsMessageType as a5, type OAuthFlowState as a6, type LoginWithCode as a7, type OtpFlowState as a8, type PasskeyFlowState as a9, type Telegram as aA, type CrossAppAccount as aB, type LinkedAccountType as aC, type GoogleOAuthWithMetadata as aD, type TwitterOAuthWithMetadata as aE, type DiscordOAuthWithMetadata as aF, type GithubOAuthWithMetadata as aG, type TiktokOAuthWithMetadata as aH, type LineOAuthWithMetadata as aI, type LinkedInOAuthWithMetadata as aJ, type AppleOAuthWithMetadata as aK, type FarcasterWithMetadata as aL, type TelegramWithMetadata as aM, type CrossAppAccountWithMetadata as aN, type PasskeyWithMetadata as aO, type Email as aP, type Phone as aQ, type TransactionUIOptions as aR, type ContractUIOptions as aS, type NativeFundingConfig as aT, type MoonpayFundingConfig as aU, type PriceDisplayOptions as aV, type Farcaster as aW, type Passkey as aX, type LoginMethodOrderOption as aY, type SiweFlowState as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SessionSignerInput as ad, type TelegramAuthFlowState as ae, type TypedMessage as af, type MessageTypes as ag, type SmartWallet as ah, type MoonpayConfig as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Line as az, type LinkedAccountWithMetadata as b, type BaseConnectedSolanaWallet as c, type UserRecoveryMethod as d, type SupportedSolanaTransaction as e, type SolanaCluster as f, type CreateWalletOptions as g, type SendTransactionModalUIOptions as h, type SignMessageModalUIOptions as i, type SolanaStandardWallet as j, type SolanaFundingConfig as k, SolanaWalletConnector as l, type WalletClientType as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type PrivyClientConfig as s, toSolanaWalletConnectors as t, type EIP1193Provider as u, type EntropyIdVerifier as v, type RequestArguments as w, WalletTimeoutError as x, WalletConnector as y, type ConnectedWalletMetadata as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-CH4HSSkH.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-BKf1TjPF.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-CH4HSSkH.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-BKf1TjPF.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-CH4HSSkH.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-BKf1TjPF.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-CH4HSSkH.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-BKf1TjPF.js';
3
3
  import { MouseEvent } from 'react';
4
4
 
5
5
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as o}from"@abstract-foundation/agw-client/actions";import{hexToNumber as r,createWalletClient as t,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{u as s,g as l,c as d}from"./use-sign-with-user-signer-Yg0Gn-gB.mjs";import{e as p,k as m,ap as u,a as h,aA as I,aB as g,aC as y,l as f}from"./privy-provider-9dA1clzB.mjs";import{u as v}from"./internal-context-De1jxnac.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-BODPu_tJ.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}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:A,appId:b,rpcConfig:W,client:M}=v(),k=p(),{wallets:F}=m(),{setModalData:q}=u(),x=l(T),R=!!x&&d(x),D=async(o=c.id)=>{let s=w(F);if(!s)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![c.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=A.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let p=await s.getEthereumProvider(),m=t({account:s.address,transport:n(p)}),u=a({address:s.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:i(f(d,W,b)),publicTransport:i(f(d,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);P.current=!0,q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))}}}export{T as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as o}from"@abstract-foundation/agw-client/actions";import{hexToNumber as r,createWalletClient as t,custom as n,http as i}from"viem";import{toAccount as a}from"viem/accounts";import{abstractTestnet as c}from"viem/chains";import{u as s,g as l,c as d}from"./use-sign-with-user-signer-C3vxQSbq.mjs";import{e as p,k as m,ay as u,a as h,aJ as I,aK as g,aL as y,l as f}from"./privy-provider-3RsLI3qL.mjs";import{u as v}from"./internal-context-De1jxnac.mjs";import{g as w}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as C}from"./smart-wallets-WRYrOnt1.mjs";import"react";import"react/jsx-runtime";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"./paths-j39vuJt8.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"@marsidev/react-turnstile";import"styled-components";import"tinycolor2";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"zustand";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/UserCircleIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/WalletIcon";import"@heroicons/react/24/outline/CheckIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/ArrowTopRightOnSquareIcon";import"@heroicons/react/24/solid/DocumentCheckIcon";import"@heroicons/react/24/solid/XCircleIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"qrcode";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/LockClosedIcon";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@heroicons/react/24/outline";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/CloudArrowUpIcon";import"@heroicons/react/24/outline/NoSymbolIcon";import"@heroicons/react/24/outline/ClockIcon";import"@heroicons/react/24/outline/TrashIcon";import"@heroicons/react/24/solid/CheckBadgeIcon";import"@heroicons/react/24/solid/IdentificationIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/solid/ShieldCheckIcon";import"js-cookie";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=s(),{hideWalletUIs:P,openPrivyModal:S,chains:b,appId:A,rpcConfig:W,client:M}=v(),k=p(),{wallets:F}=m(),{setModalData:q}=u(),x=l(T),R=!!x&&d(x),D=async(o=c.id)=>{let s=w(F);if(!s)throw Error("No connected wallet found");let l="string"==typeof o?r(o):o;if(![c.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=b.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await s.switchChain(d.id);let p=await s.getEthereumProvider(),m=t({account:s.address,transport:n(p)}),u=a({address:s.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:i(f(d,W,A)),publicTransport:i(f(d,W,A)),signer:u})};return{signMessage:async({message:e},o)=>{let r=await D(o);return new Promise((async(o,t)=>{let{entropyId:n,entropyIdVerifier:i}=h(T);P.current=!0,q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTypedData:async(e,o)=>{let r=await D(o);return new Promise((async(o,t)=>{P.current=!0;let{entropyId:n,entropyIdVerifier:i}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:n,entropyIdVerifier:i,onCompleteNavigateTo:I,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>o(e),onFailure:t,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},sendTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data,eip_712_meta:{paymaster_params:{paymaster:i.paymaster,paymaster_input:i.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>n?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))},signTransaction:async e=>{let r=await D(e.chainId),t=[],n="calls"in e&&void 0!==e.calls;return t=n?[...e.calls]:[e],new Promise((async(i,a)=>{P.current=!0;let{entropyId:c,entropyIdVerifier:s}=h(T);q({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:R,entropyId:c,entropyIdVerifier:s,onCompleteNavigateTo:y,onFailure:()=>{}},sendTransaction:{transactionRequests:C({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:c,entropyIdVerifier:s,transactingWalletAddress:r.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=n?o(r.account.address,e):e;return await r.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!M)throw Error("Privy client not found");let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return await M.scanTransaction({metadata:{domain:k.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:i.from,to:i.to,value:i.value?.toString(),gas:i.gas?.toString(),gasPrice:i.gasPrice?.toString(),nonce:i.nonce?.toString(),data:i.data}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=n?o(r.account.address,e):e,i=await r.prepareAbstractTransactionRequest(t);return r.signTransaction(i)},onSuccess:e=>i(e.hash),onFailure:a,uiOptions:{isCancellable:!0}}}),S(g)})).finally((()=>{P.current=!1}))}}}export{T as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{useMemo as r}from"react";import{create as e,rawSign as t}from"@privy-io/js-sdk-core";import{u as a}from"./internal-context-De1jxnac.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-Yg0Gn-gB.mjs";import"viem";const u=()=>{let{refreshSessionAndUser:t,privy:i}=a();return r((()=>({async createWallet(r){let a=await e(i,{request:{chain_type:r.chainType}}),s=await t();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[t,i])},d=()=>{let{user:e}=i(),{privy:u}=a(),{signWithUserSigner:d}=s();return r((()=>({async signRawHash({address:r,chainType:a,hash:i}){if(!e)throw Error("User must be authenticated before signing");let s=n(e,a).filter((r=>o(r))).find((e=>e.address===r));if(!s)throw Error("Wallet not found");let h=await t(u,d,{wallet_id:s.id,params:{hash:i}});if(h.data&&"signature"in h.data&&"hex"===h.data.encoding)return{signature:h.data.signature};throw Error("Failed to sign")}})),[u])};export{u as useCreateWallet,d as useSignRawHash};
1
+ import{useMemo as r}from"react";import{create as e,rawSign as t}from"@privy-io/js-sdk-core";import{u as a}from"./internal-context-De1jxnac.mjs";import{u as i,a as s,f as n,c as o}from"./use-sign-with-user-signer-C3vxQSbq.mjs";import"viem";const u=()=>{let{refreshSessionAndUser:t,privy:i}=a();return r((()=>({async createWallet(r){let a=await e(i,{request:{chain_type:r.chainType}}),s=await t();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[t,i])},d=()=>{let{user:e}=i(),{privy:u}=a(),{signWithUserSigner:d}=s();return r((()=>({async signRawHash({address:r,chainType:a,hash:i}){if(!e)throw Error("User must be authenticated before signing");let s=n(e,a).filter((r=>o(r))).find((e=>e.address===r));if(!s)throw Error("Wallet not found");let h=await t(u,d,{wallet_id:s.id,params:{hash:i}});if(h.data&&"signature"in h.data&&"hex"===h.data.encoding)return{signature:h.data.signature};throw Error("Failed to sign")}})),[u])};export{u as useCreateWallet,d as useSignRawHash};