UNPKG

@privy-io/expo

Version:

Expo client for the Privy Auth API

37 lines (32 loc) 3.06 kB
import { N as PasskeyLinkHookOptions, Q as PasskeyHookResult, T as PasskeyLoginHookOptions, V as SubmitPasskeyInput, P as PasskeyFlowState, E as ErrorCallback, a as AuthSuccessCallback } from './predicates-358d70ee.js'; export { o as CreateEthereumEmbeddedWalletOpts, C as CreateOrRecoverEmbeddedWalletProps, q as CreateSolanaEmbeddedWalletOpts, t as CustomAuthFlowState, w as EmbeddedSolanaWalletActions, h as EmbeddedSolanaWalletState, x as EmbeddedSolanaWalletStatus, m as EmbeddedWallet, u as EmbeddedWalletActions, g as EmbeddedWalletState, v as EmbeddedWalletStatus, n as LinkedAccountWithMetadata, M as MfaConfig, j as OAuthFlowState, l as PrivyEmbeddedWalletAccount, p as RecoverEthereumEmbeddedWalletOpts, r as RecoverSolanaEmbeddedWalletOpts, R as RecoveryFlowState, s as SetRecoveryProps, U as User, J as hasError, y as isConnected, B as isConnecting, I as isCreating, D as isDisconnected, H as isNotCreated, z as isReconnecting, K as needsRecovery } from './predicates-358d70ee.js'; import { PrivyUser } from '@privy-io/public-api'; export { PrivyAppleOauthAccount, PrivyBitcoinSegwitEmbeddedWalletAccount, PrivyBitcoinTaprootEmbeddedWalletAccount, PrivyCrossAppWalletAccount, PrivyCustomJwtAccount, PrivyDiscordOauthAccount, PrivyEmailAccount, PrivyEthereumAccount, PrivyEthereumEmbeddedWalletAccount, PrivyFarcasterAccount, PrivyGithubOauthAccount, PrivyGoogleOauthAccount, PrivyInstagramOauthAccount, PrivyLinkedAccount, PrivyLinkedInOauthAccount, PrivyPasskeyAccount, PrivyPhoneAccount, PrivySmartWalletAccount, PrivySolanaAccount, PrivySolanaEmbeddedWalletAccount, PrivySpotifyOauthAccount, PrivyTelegramAccount, PrivyTiktokOauthAccount, PrivyTwitterOauthAccount, PrivyUser } from '@privy-io/public-api'; import '@privy-io/js-sdk-core'; declare const useLinkWithPasskey: (opts?: PasskeyLinkHookOptions) => PasskeyHookResult<"link">; declare const useLoginWithPasskey: (opts?: PasskeyLoginHookOptions) => PasskeyHookResult<"login">; interface UseSignupWithPasskeyInterface { /** * Prompts the native flow to register a new passkey and creates a new user account from it. * * Relies on "sign up with passkey" being enabled on the App's dashboard settings. * * This will *not* log the user into an existing account, and will always create a new account. * Use `useLoginWithPasskey` if you want to log in with an existing passkey. */ signupWithPasskey: (input: SubmitPasskeyInput) => Promise<{ user: PrivyUser; }>; state: PasskeyFlowState; } interface UseSignupWithPasskeyOptions { onError?: ErrorCallback; onSuccess?: AuthSuccessCallback; } /** * A hook to sign up a new user using a passkey. This will create a brand new user account. * * Use `useLoginWithPasskey` if you want to log in with an existing passkey instead. */ declare const useSignupWithPasskey: (options?: UseSignupWithPasskeyOptions) => UseSignupWithPasskeyInterface; export { UseSignupWithPasskeyInterface, UseSignupWithPasskeyOptions, useLinkWithPasskey, useLoginWithPasskey, useSignupWithPasskey };