import type { CookieInit, CookieList, CookieListItem, CookieStore, CookieStoreDeleteOptions, CookieStoreGetOptions } from 'cookie-store-interface'; export * from 'cookie-store-interface'; export interface SignedCookieStoreOptions { /** * One or more crypto keys that were previously used to sign cookies. * `SignedCookieStore` will try to verify the signature using these, but they are not used for signing. */ keyring?: readonly CryptoKey[]; } export interface DeriveOptions { secret: string | BufferSource | JsonWebKey; salt?: BufferSource; iterations?: number; format?: KeyFormat; hash?: HashAlgorithmIdentifier; hmacHash?: HashAlgorithmIdentifier; length?: number; } /** * # Signed Cookie Store * A partial implementation of the [Cookie Store API](https://wicg.github.io/cookie-store) * that transparently signs and verifies cookies via the Web Cryptography API. * * This is likely only useful in server-side implementations, * but written in a platform-agnostic way. */ export declare class SignedCookieStore 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?: SignedCookieStoreOptions); /** * @throws if the signature doesn't match. * @returns null when the signature cookie is missing. */ get(name?: string): Promise; get(options?: CookieStoreGetOptions): Promise; /** * @throws if any signature doesn't match. * @returns A list of cookies, exclusive of all cookies without signatures */ 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; }