UNPKG

@dynamic-labs/sdk-react-core

Version:

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

44 lines (43 loc) 2.37 kB
import { EmbeddedWalletChainEnum, EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core'; import { Wallet } from '../../../shared'; import { UserProfile } from '../../../..'; /** * @returns { * createEmbeddedWallet, - creates Dynamic embedded wallet according to the settings * createOrRestoreSession, - creates or restores session for the embedded wallet * createPasskey, - creates passkey for the embedded wallet * getPasskeys, - gets passkeys for the embedded wallet * isLoadingEmbeddedWallet, - loading state of the embedded wallet * isSessionActive, - checks if the session is active for the embedded wallet * revealWalletKey, - reveals the private key or recovery phrase for the embedded wallet * sendOneTimeCode, - sends one time code for the embedded wallet * userHasEmbeddedWallet, - checks if the user has an embedded wallet * } */ export declare const useEmbeddedWallet: () => { readonly createEmbeddedWallet: (chains?: EmbeddedWalletChainEnum[], options?: { webAuthnAttestation: import("dist/packages/wallet-connector-core/src").WebAuthnAttestation; } | undefined) => Promise<Wallet | undefined>; readonly createEmbeddedWalletAccount: ({ chain }: { chain: EmbeddedWalletChainEnum; }) => Promise<UserProfile | undefined>; readonly createOrRestoreSession: (options?: { oneTimeCode: string; } | undefined) => Promise<string | undefined>; readonly createPasskey: (options: { oneTimeCode: string; } | undefined) => Promise<import("dist/packages/wallet-connector-core/src").WebAuthnAttestation>; readonly embeddedWalletSettingVersion: () => EmbeddedWalletVersionEnum | undefined; readonly getPasskeys: () => Promise<import("@dynamic-labs/sdk-api-core").UserPasskey[]>; readonly getWalletVersion: () => import(".").EmbeddedWalletVersion | undefined; readonly isLoadingEmbeddedWallet: boolean; readonly isSessionActive: boolean; readonly revealWalletKey: (options?: { type: "recoveryPhrase" | "privateKey"; htmlContainerId?: string | undefined; } | undefined) => Promise<boolean>; readonly sendOneTimeCode: () => Promise<string>; readonly shouldAutoCreateEmbeddedWallet: (verifiedUser?: UserProfile) => boolean; readonly shouldPromptForKeyExport: () => boolean; readonly userHasEmbeddedWallet: () => boolean; };