UNPKG

@web3auth/no-modal

Version:
27 lines (26 loc) 1.52 kB
import { type Ref, type ShallowRef } from "vue"; import { type ChainNamespaceType, type Connection, type CONNECTOR_STATUS_TYPE, type IWeb3Auth, IWeb3AuthState } from "../base"; export type IWeb3AuthInnerContextValue<TWeb3Auth extends IWeb3Auth> = { web3Auth: ShallowRef<TWeb3Auth | null>; isConnected: Ref<boolean>; isAuthorized: Ref<boolean>; connection: Ref<Connection | null>; isInitializing: Ref<boolean>; initError: Ref<Error | null>; isInitialized: Ref<boolean>; status: Ref<CONNECTOR_STATUS_TYPE | null>; isMFAEnabled: Ref<boolean>; chainId: Ref<string | null>; chainNamespace: Ref<ChainNamespaceType | null>; getPlugin: TWeb3Auth["getPlugin"]; setIsMFAEnabled: (isMfaEnabled: boolean) => void; }; type UseWeb3AuthInnerContextValueOptions<TWeb3Auth extends IWeb3Auth, TWatchSource, TWeb3AuthOptions> = { Web3AuthConstructor: new (options: TWeb3AuthOptions, initialState?: Partial<IWeb3AuthState>) => TWeb3Auth; watchSource: () => TWatchSource; getWeb3AuthOptions: (source: TWatchSource) => TWeb3AuthOptions; createConnectionRef?: () => Ref<Connection | null>; initialState?: Partial<IWeb3AuthState>; }; export declare function useWeb3AuthInnerContextValue<TWeb3Auth extends IWeb3Auth, TWatchSource, TWeb3AuthOptions>({ Web3AuthConstructor, watchSource, getWeb3AuthOptions, initialState, createConnectionRef, }: UseWeb3AuthInnerContextValueOptions<TWeb3Auth, TWatchSource, TWeb3AuthOptions>): IWeb3AuthInnerContextValue<TWeb3Auth>; export {};