capacitor-shamir
Version:
Provides Shamir's Secret Sharing (SSS) functionality for secure splitting and recovering secrets natively on iOS, Android, and Web.
27 lines (26 loc) • 949 B
TypeScript
import { IndexedDbConfig } from '../definitions';
/**
* Simple IndexedDB Key-Value Storage
*
* IndexedDB, as a transactional database, has a somewhat clunky API.
* This service provides a localStorage-like interface for IndexedDB, wrapped in promises.
*
* localStorage has a very low storage limit (5MB), so during development it may not be
* sufficient to store all the data required for the app to function properly.
*/
export declare class IndexedDbFileStorage<T extends {
path: string;
}> {
private config;
setItem(data: T): Promise<void>;
getItem(path: string): Promise<T | null>;
removeItem(path: string): Promise<void>;
updateIndexedDbConfig(config: Partial<IndexedDbConfig>): void;
private openDB;
/**
* Handle database request promise with proper cleanup
* @param request The database request to handle
* @param db The database instance to close
*/
private handleDBRequest;
}