/** * Napplet NAP storage sdk entrypoint. * * @module */ /** * Retrieve a stored value by key. Returns null if the key does not exist. * * @param key The storage key * @returns The stored string value, or null if not found * * @example * ```ts * import { storageGetItem } from '@napplet/nap/storage'; * * const theme = await storageGetItem('theme'); * ``` */ declare function storageGetItem(key: string): Promise; /** * Store a key-value pair. * * @param key The storage key * @param value The string value to store * * @example * ```ts * import { storageSetItem } from '@napplet/nap/storage'; * * await storageSetItem('theme', 'dark'); * ``` */ declare function storageSetItem(key: string, value: string): Promise; /** * Remove a stored key. * * @param key The storage key to remove * * @example * ```ts * import { storageRemoveItem } from '@napplet/nap/storage'; * * await storageRemoveItem('theme'); * ``` */ declare function storageRemoveItem(key: string): Promise; /** * List all keys stored by this napplet. * * @returns Array of storage key strings * * @example * ```ts * import { storageKeys } from '@napplet/nap/storage'; * * const allKeys = await storageKeys(); * ``` */ declare function storageKeys(): Promise; /** * Retrieve a per-instance value by key. Returns null if the key does not exist. * * Per-instance storage is scoped to this napplet instance (sets * `scope: "instance"` on the wire) rather than shared across instances. * * @param key The storage key * @returns The stored string value, or null if not found * * @example * ```ts * import { storageInstanceGetItem } from '@napplet/nap/storage'; * * const draft = await storageInstanceGetItem('draft'); * ``` */ declare function storageInstanceGetItem(key: string): Promise; /** * Store a per-instance key-value pair. * * @param key The storage key * @param value The string value to store * * @example * ```ts * import { storageInstanceSetItem } from '@napplet/nap/storage'; * * await storageInstanceSetItem('draft', 'hello'); * ``` */ declare function storageInstanceSetItem(key: string, value: string): Promise; /** * Remove a per-instance key. * * @param key The storage key to remove * * @example * ```ts * import { storageInstanceRemoveItem } from '@napplet/nap/storage'; * * await storageInstanceRemoveItem('draft'); * ``` */ declare function storageInstanceRemoveItem(key: string): Promise; /** * List all per-instance keys for this napplet instance. * * @returns Array of storage key strings * * @example * ```ts * import { storageInstanceKeys } from '@napplet/nap/storage'; * * const allKeys = await storageInstanceKeys(); * ``` */ declare function storageInstanceKeys(): Promise; export { storageGetItem, storageInstanceGetItem, storageInstanceKeys, storageInstanceRemoveItem, storageInstanceSetItem, storageKeys, storageRemoveItem, storageSetItem };