UNPKG

@oraichain/customauth

Version:

CustomAuth login with torus to get user private key

52 lines (51 loc) 2.03 kB
import { Auth0UserInfo, MultifactorsGenericObject } from "../handlers/interfaces"; import { LOGIN_TYPE, REDIRECT_PARAMS_STORAGE_METHOD_TYPE } from "./enums"; interface CustomMessageEvent extends MessageEvent { error: string; } interface EventListener { (evt: CustomMessageEvent): void; } type EmitterType = { addEventListener(type: string, handler: EventListener): void; removeEventListener(type: string, handler: EventListener): void; }; export declare function eventToPromise<T>(emitter: EmitterType): Promise<T>; export declare const loginToConnectionMap: { apple: string; github: string; linkedin: string; twitter: string; weibo: string; line: string; email_password: string; passwordless: string; }; export declare const padUrlString: (url: URL) => string; /** * Returns a random number. Don't use for cryptographic purposes. * @returns a random number */ export declare const randomId: () => string; export declare const broadcastChannelOptions: { webWorkerSupport: boolean; }; export declare const getVerifierId: (userInfo: Auth0UserInfo, typeOfLogin: LOGIN_TYPE, verifierIdField?: string, isVerifierIdCaseSensitive?: boolean) => string; export declare const handleRedirectParameters: (hash: string, queryParameters: MultifactorsGenericObject) => { error: string; instanceParameters: MultifactorsGenericObject; hashParameters: MultifactorsGenericObject; }; export declare function storageAvailable(type: REDIRECT_PARAMS_STORAGE_METHOD_TYPE): boolean; export declare function getPopupFeatures(): string; export declare const isFirefox: () => boolean; export declare function constructURL(params: { baseURL: string; query?: Record<string, unknown>; hash?: Record<string, unknown>; }): string; export declare function are3PCSupported(): boolean; export declare const validateAndConstructUrl: (domain: string) => URL; export declare const wait: (s: number) => Promise<void>; export declare function stringtifyError(error: any): string; export {};