import { ErrorCodes, IModule, ITKeyApi, ITkeyError, ShareStore, StringifiedType, TkeyError } from "@tkey/common-types"; declare class WebStorageError extends TkeyError { protected static messages: ErrorCodes; constructor(code: number, message?: string); static fromCode(code: number, extraMessage?: string): ITkeyError; static default(extraMessage?: string): ITkeyError; static unableToReadFromStorage(extraMessage?: string): ITkeyError; static shareUnavailableInFileStorage(extraMessage?: string): ITkeyError; static fileStorageUnavailable(extraMessage?: string): ITkeyError; static localStorageUnavailable(extraMessage?: string): ITkeyError; static shareUnavailableInLocalStorage(extraMessage?: string): ITkeyError; } declare global { interface Navigator { webkitPersistentStorage: { requestQuota: (a: number, b: (grantedBytes: number) => void, c: (reason: string) => void) => unknown; }; } } export declare const getShareFromFileStorage: (key: string) => Promise; export declare const storeShareOnFileStorage: (share: ShareStore, key: string) => Promise; export declare const canAccessFileStorage: () => Promise; export declare const storeShareOnLocalStorage: (share: ShareStore, key: string) => Promise; export declare const getShareFromLocalStorage: (key: string) => Promise; export declare const WEB_STORAGE_MODULE_NAME = "webStorage"; declare class WebStorageModule implements IModule { moduleName: string; tbSDK: ITKeyApi; canUseFileStorage: boolean; constructor(canUseFileStorage?: boolean); setFileStorageAccess(): Promise; setModuleReferences(tbSDK: ITKeyApi): void; initialize(): Promise; storeDeviceShare(deviceShareStore: ShareStore, customDeviceInfo?: StringifiedType): Promise; storeDeviceShareOnFileStorage(shareIndex: bigint): Promise; getDeviceShare(): Promise; inputShareFromWebStorage(): Promise; } export { WebStorageError, WebStorageModule }; //# sourceMappingURL=index.d.ts.map