import type { CookieInit, CookieList, CookieListItem, CookieStore, CookieStoreDeleteOptions, CookieStoreGetOptions } from 'cookie-store-interface'; export * from 'cookie-store-interface'; export interface EncryptedCookieStoreOptions { /** * One or more crypto keys that were previously used to encrypt cookies. * `EncryptedCookieStore` will try to decrypt cookies using these, but they are not used for encrypting new cookies. */ keyring?: readonly CryptoKey[]; } export interface DeriveOptions { secret: string | BufferSource | JsonWebKey; salt?: BufferSource; iterations?: number; format?: KeyFormat; hash?: HashAlgorithmIdentifier; hmacHash?: HashAlgorithmIdentifier; length?: number; } /** * # Encrypted Cookie Store * A partial implementation of the [Cookie Store API](https://wicg.github.io/cookie-store) * that transparently encrypts and decrypts cookies via AES-GCM. * * This is likely only useful in server-side implementations, * but written in a platform-agnostic way. */ export declare class EncryptedCookieStore implements CookieStore { #private; /** A helper function to derive a crypto key from a passphrase */ static deriveCryptoKey(opts: DeriveOptions): Promise; constructor(store: CookieStore, key: CryptoKey, opts?: EncryptedCookieStoreOptions); get(name?: string): Promise; get(options?: CookieStoreGetOptions): Promise; getAll(name?: string): Promise; getAll(options?: CookieStoreGetOptions): Promise; set(name: string, value: string): Promise; set(options: CookieInit): Promise; delete(name: string): Promise; delete(options: CookieStoreDeleteOptions): Promise; addEventListener(...args: Parameters): void; dispatchEvent(event: Event): boolean; removeEventListener(...args: Parameters): void; }