import type { GetType } from "purify-ts";
import { Either } from "purify-ts";
declare const codecs: {
    "sk-widget@1//skPubKeys": import("purify-ts").Codec<Record<string, string>>;
    "sk-widget@1//tosAccepted": import("purify-ts").Codec<boolean>;
};
export type LocalStorageKV = {
    [Key in keyof typeof codecs]: GetType<(typeof codecs)[Key]>;
};
type LocalStorageValue<K extends keyof LocalStorageKV> = GetType<(typeof codecs)[K]>;
export declare const getStorageItem: <K extends keyof LocalStorageKV>(key: K) => Either<Error, LocalStorageValue<K> | null>;
export declare const setStorageItem: <K extends keyof LocalStorageKV>(key: K, value: GetType<(typeof codecs)[K]>) => Either<Error, void | undefined>;
type Listener<K extends keyof LocalStorageKV = keyof LocalStorageKV> = (val: GetType<(typeof codecs)[K]>) => void;
export declare const addLocalStorageListener: <K extends keyof LocalStorageKV>(key: K, listener: Listener<K>) => () => boolean;
export {};
