ndwallet-core
Version:
Core cryptographic library for NDWallet browser environments
21 lines (20 loc) • 910 B
TypeScript
export declare const KEY_SHARE = "share";
export declare const KEY_AUTH_TOKEN = "auth_token";
export declare const KEY_CREDENTIAL = "credential";
export declare const KEY_DEVICE_SECRET = "device_secret";
type KeyType = 'share' | 'credential' | 'auth_token' | 'device_secret';
/**
* Save local data for a specific account
* @param email - The email address associated with the account
* @param key - The key identifier for the data (e.g., 'share', 'auth_token')
* @param data - The data to save
*/
export declare function saveLocalData(email: string, key: KeyType, data: any): void;
/**
* Get local data for a specific account
* @param email - The email address associated with the account
* @param key - The key identifier for the data (e.g., 'share', 'auth_token')
* @returns The data or null if not found
*/
export declare function getLocalData(email: string, key: KeyType): any | null;
export {};