@privy-io/expo
Version:
Expo client for the Privy Auth API
37 lines (32 loc) • 3.41 kB
TypeScript
import { af as PasskeyLinkHookOptions, ag as PasskeyHookResult, ah as PasskeyLoginHookOptions, ai as SubmitPasskeyInput, P as PasskeyFlowState, E as ErrorCallback, a as AuthSuccessCallback } from './predicates-f4e23818.js';
export { Y as CreateEthereumEmbeddedWalletOpts, X as CreateOrRecoverEmbeddedWalletProps, _ as CreateSolanaEmbeddedWalletOpts, a1 as CustomAuthFlowState, a5 as EmbeddedSolanaWalletActions, h as EmbeddedSolanaWalletState, a6 as EmbeddedSolanaWalletStatus, p as EmbeddedWallet, a3 as EmbeddedWalletActions, g as EmbeddedWalletState, a4 as EmbeddedWalletStatus, n as LinkedAccountWithMetadata, a2 as MfaConfig, j as OAuthFlowState, M as PrivyAppleOauthAccount, s as PrivyBitcoinSegwitEmbeddedWalletAccount, t as PrivyBitcoinTaprootEmbeddedWalletAccount, V as PrivyCrossAppWalletAccount, N as PrivyCustomJwtAccount, C as PrivyDiscordOauthAccount, v as PrivyEmailAccount, o as PrivyEmbeddedWalletAccount, x as PrivyEthereumAccount, q as PrivyEthereumEmbeddedWalletAccount, Q as PrivyFarcasterAccount, D as PrivyGithubOauthAccount, z as PrivyGoogleOauthAccount, I as PrivyInstagramOauthAccount, m as PrivyLinkedAccount, K as PrivyLinkedInOauthAccount, T as PrivyPasskeyAccount, w as PrivyPhoneAccount, u as PrivySmartWalletAccount, y as PrivySolanaAccount, r as PrivySolanaEmbeddedWalletAccount, H as PrivySpotifyOauthAccount, U as PrivyTelegramAccount, J as PrivyTiktokOauthAccount, B as PrivyTwitterOauthAccount, l as PrivyUser, Z as RecoverEthereumEmbeddedWalletOpts, $ as RecoverSolanaEmbeddedWalletOpts, R as RecoveryFlowState, a0 as SetRecoveryProps, ad as hasError, a7 as isConnected, a9 as isConnecting, ac as isCreating, aa as isDisconnected, ab as isNotCreated, a8 as isReconnecting, ae as needsRecovery } from './predicates-f4e23818.js';
import { User } from '@privy-io/api-types';
export { LinkedAccount, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, LinkedAccountEmbeddedWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSmartWallet, LinkedAccountSolanaEmbeddedWallet, User } from '@privy-io/api-types';
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: User;
}>;
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 };