@nostr-dev-kit/ndk-mobile
Version:
NDK Mobile
33 lines • 1.12 kB
TypeScript
import { type NDKSessionStorageAdapter } from "@nostr-dev-kit/ndk-hooks";
/**
* Implementation of NDKSessionStorageAdapter using Expo's SecureStore.
*/
export declare class NDKSessionExpoSecureStore implements NDKSessionStorageAdapter {
/**
* Get an item from SecureStore.
*
* @param key The key to retrieve.
* @returns The stored value or null if not found.
*/
getItem(key: string): string | null;
/**
* Set an item in SecureStore.
*
* @param key The key to store.
* @param value The value to store.
*/
setItem(key: string, value: string): void;
/**
* Delete an item from SecureStore.
* Note: This is a synchronous wrapper around the asynchronous SecureStore API.
*
* @param key The key to delete.
*/
deleteItem(key: string): void;
}
/**
* Migrate legacy login data to the new session storage format.
* @returns A promise that resolves when migration is complete.
*/
export declare function migrateLegacyLogin(sessionStore: NDKSessionStorageAdapter): Promise<void>;
//# sourceMappingURL=session-storage-adapter.d.ts.map