/**
 * Storage Interface.
 */
interface PvStorage {
    setItem: (key: string, value: string) => void | Promise<void>;
    getItem: (key: string) => string | Promise<string>;
    removeItem: (key: string) => void | Promise<void>;
}
/**
 * Gets the storage to use. Either tries to use IndexedDB or localStorage.
 *
 * @returns PvStorage instance to use as storage.
 */
export declare function getPvStorage(): PvStorage;
/**
 * Convert a null terminated phrase stored inside an array buffer to a string
 *
 * @param arrayBuffer input array buffer
 * @param indexStart the index at which the phrase is stored
 * @return retrieved string
 */
export declare function arrayBufferToStringAtIndex(arrayBuffer: Uint8Array, indexStart: number): string;
/**
 * Decode a base64 string and stored it in a Uint8Array array
 *
 * @param base64String input base64 string
 * @return decoded array
 */
export declare function base64ToUint8Array(base64String: string): Uint8Array;
/**
 * Encode an ArrayBuffer array to base64 string
 *
 * @param arrayBuffer input array
 * @param size size of the phrase to be encoded
 * @param index the index at which the phrase is stored
 * @return base64 string
 */
export declare function arrayBufferToBase64AtIndex(arrayBuffer: ArrayBuffer, size: number, index: number): string;
/**
 * Convert a string header to JS object
 *
 * @param stringHeader input string in json format
 * @return retrieved object
 */
export declare function stringHeaderToObject(stringHeader: string): object;
/**
 * A wrapper to fetch that also supports timeout
 *
 * @param uri the URL of the resource
 * @param options other options related to fetch
 * @param time timeout value
 * @return received response
 */
export declare function fetchWithTimeout(uri: string, options?: {}, time?: number): Promise<Response>;
/**
 * Checking whether the given AccessKey is valid
 *
 * @return true if the AccessKey is valid, false if not
 */
export declare function isAccessKeyValid(accessKey: string): boolean;
export {};
//# sourceMappingURL=utils.d.ts.map