UNPKG

@dynamic-labs/sdk-react-core

Version:

A React SDK for implementing wallet web3 authentication and authorization to your website.

48 lines (47 loc) 2.23 kB
import { AuthenticatorType } from '@dynamic-labs/wallet-connector-core'; import { Duration, InitEmailAuthResponse, InitPasskeyRecoveryResponse } from '@dynamic-labs/sdk-api-core'; import { Wallet } from '../../../../shared'; import { UserProfile } from '../../../../..'; export declare const initEmbeddedWalletSession: ({ authenticatorType, iframeContainer, iframeElementId, environmentId, user, wallet, sessionExpiration, }: { authenticatorType: AuthenticatorType; iframeContainer: HTMLElement; iframeElementId: string; environmentId: string; user: UserProfile | undefined; wallet: Wallet | null; sessionExpiration?: number; }) => Promise<UserProfile | undefined>; export declare const passkeyRecoveryBundleValidation: ({ user, bundleInput, wallet, }: { user: UserProfile | undefined; bundleInput: string | undefined; wallet: Wallet | null; }) => Promise<void>; export declare const resentRecoveryEmail: ({ authenticatorType, user, environmentId, wallet, }: { authenticatorType: AuthenticatorType; user: UserProfile | undefined; environmentId: string; wallet: Wallet | null; }) => Promise<InitPasskeyRecoveryResponse | InitEmailAuthResponse>; export declare const completePasskeyRecovery: ({ user, environmentId, wallet, }: { environmentId: string; wallet: Wallet | null; user: UserProfile | undefined; }) => Promise<UserProfile>; export declare const addNewPasskeyAuthenticator: ({ user, environmentId, wallet, }: { user: UserProfile | undefined; environmentId: string; wallet: Wallet | null; }) => Promise<UserProfile>; export declare const canRestoreEmbeddedWalletSession: (sessionExpirationTime: Duration | undefined) => boolean; export declare const restoreEmbeddedWalletSession: ({ user, iframeContainer, iframeElementId, wallet, sessionExpiration, }: { user: UserProfile | undefined; iframeContainer: HTMLElement; iframeElementId: string; wallet: Wallet | null; sessionExpiration?: number; }) => Promise<boolean>; export declare const addEmailRecovery: ({ user, environmentId, wallet, }: { user: UserProfile | undefined; environmentId: string; wallet: Wallet | null; }) => Promise<UserProfile | undefined>;